From f7c0321b715ceed8e87eba2ca507ad2dc28a428d Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 1 Jan 2020 15:29:24 -0500 Subject: [PATCH] Hello WWWWWWorld! --- .github/pull_request_template.md | 33 + LICENSE.md | 17 + README.md | 22 + desktop_version/CMakeLists.txt | 131 + desktop_version/README.md | 52 + desktop_version/lodepng/lodepng.c | 6369 +++++++++++++ desktop_version/lodepng/lodepng.h | 1941 ++++ desktop_version/physfs/LICENSE.txt | 23 + desktop_version/physfs/README.txt | 9 + desktop_version/physfs/physfs.c | 3318 +++++++ desktop_version/physfs/physfs.h | 3854 ++++++++ desktop_version/physfs/physfs_archiver_dir.c | 196 + .../physfs/physfs_archiver_unpacked.c | 305 + desktop_version/physfs/physfs_archiver_zip.c | 1710 ++++ desktop_version/physfs/physfs_byteorder.c | 137 + desktop_version/physfs/physfs_casefolding.h | 2572 ++++++ desktop_version/physfs/physfs_internal.h | 729 ++ desktop_version/physfs/physfs_miniz.h | 701 ++ .../physfs/physfs_platform_apple.m | 188 + .../physfs/physfs_platform_posix.c | 417 + desktop_version/physfs/physfs_platform_unix.c | 367 + .../physfs/physfs_platform_windows.c | 1028 +++ desktop_version/physfs/physfs_platforms.h | 80 + desktop_version/physfs/physfs_unicode.c | 567 ++ desktop_version/src/BinaryBlob.cpp | 145 + desktop_version/src/BinaryBlob.h | 41 + desktop_version/src/BlockV.cpp | 36 + desktop_version/src/BlockV.h | 31 + desktop_version/src/Ent.cpp | 88 + desktop_version/src/Ent.h | 44 + desktop_version/src/Entity.cpp | 5528 +++++++++++ desktop_version/src/Entity.h | 245 + desktop_version/src/Enums.h | 11 + desktop_version/src/FileSystemUtils.cpp | 363 + desktop_version/src/FileSystemUtils.h | 18 + desktop_version/src/Finalclass.cpp | 2317 +++++ desktop_version/src/Finalclass.h | 20 + desktop_version/src/Game.cpp | 7707 ++++++++++++++++ desktop_version/src/Game.h | 359 + desktop_version/src/Graphics.cpp | 3207 +++++++ desktop_version/src/Graphics.h | 280 + desktop_version/src/GraphicsResources.cpp | 113 + desktop_version/src/GraphicsResources.h | 36 + desktop_version/src/GraphicsUtil.cpp | 525 ++ desktop_version/src/GraphicsUtil.h | 51 + desktop_version/src/Input.cpp | 2546 ++++++ desktop_version/src/Input.h | 30 + desktop_version/src/KeyPoll.cpp | 333 + desktop_version/src/KeyPoll.h | 83 + desktop_version/src/Labclass.cpp | 1862 ++++ desktop_version/src/Labclass.h | 18 + desktop_version/src/Logic.cpp | 1547 ++++ desktop_version/src/Logic.h | 23 + desktop_version/src/MakeAndPlay.h | 10 + desktop_version/src/Map.cpp | 1997 ++++ desktop_version/src/Map.h | 182 + desktop_version/src/Maths.h | 28 + desktop_version/src/Music.cpp | 454 + desktop_version/src/Music.h | 65 + desktop_version/src/Network.h | 28 + desktop_version/src/Otherlevel.cpp | 8099 +++++++++++++++++ desktop_version/src/Otherlevel.h | 38 + desktop_version/src/Screen.cpp | 212 + desktop_version/src/Screen.h | 40 + desktop_version/src/Script.cpp | 3545 ++++++++ desktop_version/src/Script.h | 75 + desktop_version/src/Scripts.cpp | 6580 +++++++++++++ desktop_version/src/SoundSystem.cpp | 68 + desktop_version/src/SoundSystem.h | 29 + desktop_version/src/Spacestation2.cpp | 3220 +++++++ desktop_version/src/Spacestation2.h | 17 + desktop_version/src/SteamNetwork.c | 219 + desktop_version/src/TerminalScripts.cpp | 903 ++ desktop_version/src/Textbox.cpp | 154 + desktop_version/src/Textbox.h | 54 + desktop_version/src/Tower.cpp | 1192 +++ desktop_version/src/Tower.h | 51 + desktop_version/src/UtilityClass.cpp | 360 + desktop_version/src/UtilityClass.h | 46 + desktop_version/src/WarpClass.cpp | 1033 +++ desktop_version/src/WarpClass.h | 19 + desktop_version/src/editor.cpp | 5353 +++++++++++ desktop_version/src/editor.h | 262 + desktop_version/src/main.cpp | 539 ++ desktop_version/src/preloader.cpp | 126 + desktop_version/src/preloader.h | 10 + desktop_version/src/titlerender.cpp | 3096 +++++++ desktop_version/src/titlerender.h | 35 + desktop_version/tinyxml/readme.txt | 530 ++ desktop_version/tinyxml/tinystr.cpp | 111 + desktop_version/tinyxml/tinystr.h | 305 + desktop_version/tinyxml/tinyxml.cpp | 1886 ++++ desktop_version/tinyxml/tinyxml.h | 1805 ++++ desktop_version/tinyxml/tinyxmlerror.cpp | 52 + desktop_version/tinyxml/tinyxmlparser.cpp | 1638 ++++ mobile_version/application.xml | 73 + .../eurogamerotherlevelclass.as | 7792 ++++++++++++++++ mobile_version/levels/finalclass.as | 2300 +++++ mobile_version/levels/labclass.as | 1864 ++++ mobile_version/levels/newgameclass.as | 75 + mobile_version/levels/otherlevelclass.as | 8093 ++++++++++++++++ mobile_version/levels/spacestation2class.as | 3197 +++++++ mobile_version/levels/towerclass.as | 1174 +++ mobile_version/levels/warpclass.as | 1005 ++ mobile_version/readme.MD | 5 + mobile_version/src/EditorDataclass.as | 28 + mobile_version/src/LevelMetaData.as | 42 + mobile_version/src/Main.as | 1036 +++ mobile_version/src/Preloader.as | 310 + mobile_version/src/bigroom/input/KeyPoll.as | 371 + mobile_version/src/blockclass.as | 36 + mobile_version/src/device.as | 57 + mobile_version/src/dwgraphicsclass.as | 2874 ++++++ mobile_version/src/edentitiesclass.as | 22 + mobile_version/src/editor.as | 1499 +++ mobile_version/src/edlevelclass.as | 28 + mobile_version/src/entclass.as | 77 + mobile_version/src/entityclass.as | 4022 ++++++++ mobile_version/src/gameclass.as | 5290 +++++++++++ mobile_version/src/helpclass.as | 130 + mobile_version/src/includes/input.as | 1902 ++++ mobile_version/src/includes/logic.as | 1372 +++ mobile_version/src/includes/render.as | 2524 +++++ mobile_version/src/includes/scripts.as | 5822 ++++++++++++ .../src/includes/terminalscripts.as | 816 ++ mobile_version/src/mapclass.as | 1611 ++++ mobile_version/src/musicclass.as | 194 + mobile_version/src/platformclass.as | 25 + mobile_version/src/saveclass.as | 18 + mobile_version/src/scoreclass.as | 186 + mobile_version/src/scriptclass.as | 2134 +++++ mobile_version/src/textboxclass.as | 107 + mobile_version/src/tmap.as | 23 + 133 files changed, 154973 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 desktop_version/CMakeLists.txt create mode 100644 desktop_version/README.md create mode 100644 desktop_version/lodepng/lodepng.c create mode 100644 desktop_version/lodepng/lodepng.h create mode 100644 desktop_version/physfs/LICENSE.txt create mode 100644 desktop_version/physfs/README.txt create mode 100644 desktop_version/physfs/physfs.c create mode 100644 desktop_version/physfs/physfs.h create mode 100644 desktop_version/physfs/physfs_archiver_dir.c create mode 100644 desktop_version/physfs/physfs_archiver_unpacked.c create mode 100644 desktop_version/physfs/physfs_archiver_zip.c create mode 100644 desktop_version/physfs/physfs_byteorder.c create mode 100644 desktop_version/physfs/physfs_casefolding.h create mode 100644 desktop_version/physfs/physfs_internal.h create mode 100644 desktop_version/physfs/physfs_miniz.h create mode 100644 desktop_version/physfs/physfs_platform_apple.m create mode 100644 desktop_version/physfs/physfs_platform_posix.c create mode 100644 desktop_version/physfs/physfs_platform_unix.c create mode 100644 desktop_version/physfs/physfs_platform_windows.c create mode 100644 desktop_version/physfs/physfs_platforms.h create mode 100644 desktop_version/physfs/physfs_unicode.c create mode 100644 desktop_version/src/BinaryBlob.cpp create mode 100644 desktop_version/src/BinaryBlob.h create mode 100644 desktop_version/src/BlockV.cpp create mode 100644 desktop_version/src/BlockV.h create mode 100644 desktop_version/src/Ent.cpp create mode 100644 desktop_version/src/Ent.h create mode 100644 desktop_version/src/Entity.cpp create mode 100644 desktop_version/src/Entity.h create mode 100644 desktop_version/src/Enums.h create mode 100644 desktop_version/src/FileSystemUtils.cpp create mode 100644 desktop_version/src/FileSystemUtils.h create mode 100644 desktop_version/src/Finalclass.cpp create mode 100644 desktop_version/src/Finalclass.h create mode 100644 desktop_version/src/Game.cpp create mode 100644 desktop_version/src/Game.h create mode 100644 desktop_version/src/Graphics.cpp create mode 100644 desktop_version/src/Graphics.h create mode 100644 desktop_version/src/GraphicsResources.cpp create mode 100644 desktop_version/src/GraphicsResources.h create mode 100644 desktop_version/src/GraphicsUtil.cpp create mode 100644 desktop_version/src/GraphicsUtil.h create mode 100644 desktop_version/src/Input.cpp create mode 100644 desktop_version/src/Input.h create mode 100644 desktop_version/src/KeyPoll.cpp create mode 100644 desktop_version/src/KeyPoll.h create mode 100644 desktop_version/src/Labclass.cpp create mode 100644 desktop_version/src/Labclass.h create mode 100644 desktop_version/src/Logic.cpp create mode 100644 desktop_version/src/Logic.h create mode 100644 desktop_version/src/MakeAndPlay.h create mode 100644 desktop_version/src/Map.cpp create mode 100644 desktop_version/src/Map.h create mode 100644 desktop_version/src/Maths.h create mode 100644 desktop_version/src/Music.cpp create mode 100644 desktop_version/src/Music.h create mode 100644 desktop_version/src/Network.h create mode 100644 desktop_version/src/Otherlevel.cpp create mode 100644 desktop_version/src/Otherlevel.h create mode 100644 desktop_version/src/Screen.cpp create mode 100644 desktop_version/src/Screen.h create mode 100644 desktop_version/src/Script.cpp create mode 100644 desktop_version/src/Script.h create mode 100644 desktop_version/src/Scripts.cpp create mode 100644 desktop_version/src/SoundSystem.cpp create mode 100644 desktop_version/src/SoundSystem.h create mode 100644 desktop_version/src/Spacestation2.cpp create mode 100644 desktop_version/src/Spacestation2.h create mode 100644 desktop_version/src/SteamNetwork.c create mode 100644 desktop_version/src/TerminalScripts.cpp create mode 100644 desktop_version/src/Textbox.cpp create mode 100644 desktop_version/src/Textbox.h create mode 100644 desktop_version/src/Tower.cpp create mode 100644 desktop_version/src/Tower.h create mode 100644 desktop_version/src/UtilityClass.cpp create mode 100644 desktop_version/src/UtilityClass.h create mode 100644 desktop_version/src/WarpClass.cpp create mode 100644 desktop_version/src/WarpClass.h create mode 100644 desktop_version/src/editor.cpp create mode 100644 desktop_version/src/editor.h create mode 100644 desktop_version/src/main.cpp create mode 100644 desktop_version/src/preloader.cpp create mode 100644 desktop_version/src/preloader.h create mode 100644 desktop_version/src/titlerender.cpp create mode 100644 desktop_version/src/titlerender.h create mode 100644 desktop_version/tinyxml/readme.txt create mode 100644 desktop_version/tinyxml/tinystr.cpp create mode 100644 desktop_version/tinyxml/tinystr.h create mode 100644 desktop_version/tinyxml/tinyxml.cpp create mode 100644 desktop_version/tinyxml/tinyxml.h create mode 100644 desktop_version/tinyxml/tinyxmlerror.cpp create mode 100644 desktop_version/tinyxml/tinyxmlparser.cpp create mode 100644 mobile_version/application.xml create mode 100644 mobile_version/levels/eurogamer fork/eurogamerotherlevelclass.as create mode 100644 mobile_version/levels/finalclass.as create mode 100644 mobile_version/levels/labclass.as create mode 100644 mobile_version/levels/newgameclass.as create mode 100644 mobile_version/levels/otherlevelclass.as create mode 100644 mobile_version/levels/spacestation2class.as create mode 100644 mobile_version/levels/towerclass.as create mode 100644 mobile_version/levels/warpclass.as create mode 100644 mobile_version/readme.MD create mode 100644 mobile_version/src/EditorDataclass.as create mode 100644 mobile_version/src/LevelMetaData.as create mode 100644 mobile_version/src/Main.as create mode 100644 mobile_version/src/Preloader.as create mode 100644 mobile_version/src/bigroom/input/KeyPoll.as create mode 100644 mobile_version/src/blockclass.as create mode 100644 mobile_version/src/device.as create mode 100644 mobile_version/src/dwgraphicsclass.as create mode 100644 mobile_version/src/edentitiesclass.as create mode 100644 mobile_version/src/editor.as create mode 100644 mobile_version/src/edlevelclass.as create mode 100644 mobile_version/src/entclass.as create mode 100644 mobile_version/src/entityclass.as create mode 100644 mobile_version/src/gameclass.as create mode 100644 mobile_version/src/helpclass.as create mode 100644 mobile_version/src/includes/input.as create mode 100644 mobile_version/src/includes/logic.as create mode 100644 mobile_version/src/includes/render.as create mode 100644 mobile_version/src/includes/scripts.as create mode 100644 mobile_version/src/includes/terminalscripts.as create mode 100644 mobile_version/src/mapclass.as create mode 100644 mobile_version/src/musicclass.as create mode 100644 mobile_version/src/platformclass.as create mode 100644 mobile_version/src/saveclass.as create mode 100644 mobile_version/src/scoreclass.as create mode 100644 mobile_version/src/scriptclass.as create mode 100644 mobile_version/src/textboxclass.as create mode 100644 mobile_version/src/tmap.as diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..021efe01 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,33 @@ +## The Basics + +Thanks for making a pull request! Before making a pull request, we have some +things for you to read through first: + +- We generally do not accept patches for formatting fixes, unless the formatting + fixes are part of a functional patch (for example, when fixing a bug in a + function you can fix up the lines surrounding it if needed). +- Patches that break compatibility with the original game data or save data will + not be accepted. +- New features and user interface changes will most likely not be accepted + unless they are for improving user accessibility. +- New platforms are acceptable if they use SDL + PhysicsFS and don't mess with + the game source too much. + - (No homebrew console targets, sorry! Maybe do the work in SDL instead?) +- Pull requests that do not fill out the Legal Stuff will be closed + automatically. + +If you understand these notes, you can delete the text in this section. Pull +requests that still have this text will be closed automatically. + +## Legal Stuff: + +By submitting this pull request, I confirm that... + +- [ ] My changes may be used in a future commercial release of VVVVVV (for + example, a 2.3 update on Steam for Windows/macOS/Linux) +- [ ] I will be credited in a `CONTRIBUTORS` file for all of said releases, but + will NOT be compensated for these changes + +## Changes: + +Describe your patch here! diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..0d8ec4d7 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,17 @@ +VVVVVV Source Code License v1.0 +------- +Last updated on January 7th, 2020. + +This repo contains the source code for VVVVVV, including all level content and text from the game. It does not, however, contain any of the icons, art, graphics or music for the game, which are still under a proprietary license. For personal use, you can find these assets for free in the [Make and Play Edition](http://distractionware.com/blog/category/vvvvvv-make-and-play/). + +If you are interested in distributing work that falls outside the terms in the licence below, or if you are interested in distributing work that includes using any part of VVVVVV not included in this repo then please get in touch - we can discuss granting a licence for that on a case by case basis. The purpose of making the contents of this repo available is for others to learn from, to inspire new work, and to allow the creation of new tools and modifications for VVVVVV. + +This software available from here is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any claim, damages or other liability arising from the use or in connection with this software. All materials in the repo are copyright of Terry Cavanagh © 2010-2020. + +Permission is granted to anyone to use this software and to alter it and redistribute it freely, subject to the following restrictions: + + - You may not alter or redistribute this software in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. This includes, but is not limited to, selling altered or unaltered versions of this software, or including advertisements of any kind in altered or unaltered versions of this software. + - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, you are required to include an acknowledgement in the product that this software is the copyright of Terry Cavanagh and is based on the VVVVVV source code. + - Altered source/binary versions must be plainly marked as such, and must not be misrepresented as being the original software. + - You must not distribute any materials from the game which are not included in this repo unless approved by us in writing. + - This notice may not be removed or altered from any source/binary distribution. diff --git a/README.md b/README.md new file mode 100644 index 00000000..c9c680d2 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +This is the source code to VVVVVV, version 2.0+. + +License +------- +VVVVVV's source code is made available under a custom license. See [LICENSE.md](LICENSE.md) for more details. + +In general, if you're interested in creating something that falls outside the license terms, get in touch with Terry and we'll talk about it! + +Authors +------- +- Created by [Terry Cavanagh](http://distractionware.com/) +- Room Names by [Bennett Foddy](http://www.foddy.net) +- Music by [Magnus Pålsson](http://souleye.madtracker.net/) +- Metal Soundtrack by [FamilyJules](http://familyjules7x.com/) +- 2.0 Update (C++ Port) by [Simon Roth](http://www.machinestudios.co.uk) +- 2.2 Update (SDL2/PhysicsFS/Steamworks port) by [Ethan Lee](http://www.flibitijibibo.com/) +- Beta Testing by Sam Kaplan and Pauli Kohberger +- Ending Picture by Pauli Kohberger + +Versions +------------ +There are two versions of the VVVVVV source code available - the [desktop version](https://github.com/TerryCavanagh/VVVVVV/tree/master/desktop_version) (based on the C++ port, and currently live on Steam), and the [mobile version](https://github.com/TerryCavanagh/VVVVVV/tree/master/mobile_version) (based on a fork of the original flash source code, and currently live on iOS and Android). diff --git a/desktop_version/CMakeLists.txt b/desktop_version/CMakeLists.txt new file mode 100644 index 00000000..3cf9ef7b --- /dev/null +++ b/desktop_version/CMakeLists.txt @@ -0,0 +1,131 @@ +# CMake File for VVVVVV +# Written by Ethan "flibitijibibo" Lee + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) +PROJECT(VVVVVV) + +# Architecture Flags +IF(APPLE) + # Wow, Apple is a huge jerk these days huh? + SET(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk) + SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.9) + LINK_DIRECTORIES(/usr/local/lib) +ENDIF() + +# Compiler Flags +ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_DEFAULT=0 -DPHYSFS_SUPPORTS_ZIP=1) + +# Executable Suffix +IF(APPLE) + SET(CMAKE_EXECUTABLE_SUFFIX ".osx") +ELSEIF(WIN32) + # Nothing! +ELSEIF(CMAKE_SIZEOF_VOID_P MATCHES "8") + SET(CMAKE_EXECUTABLE_SUFFIX ".x86_64") +ELSE() + SET(CMAKE_EXECUTABLE_SUFFIX ".x86") +ENDIF() + +# Include Directories +INCLUDE_DIRECTORIES(src tinyxml physfs lodepng) + +# Source Lists +SET(VVV_SRC + src/BinaryBlob.cpp + src/BlockV.cpp + src/editor.cpp + src/Ent.cpp + src/Entity.cpp + src/FileSystemUtils.cpp + src/Finalclass.cpp + src/Game.cpp + src/Graphics.cpp + src/GraphicsResources.cpp + src/GraphicsUtil.cpp + src/Input.cpp + src/KeyPoll.cpp + src/Labclass.cpp + src/Logic.cpp + src/Map.cpp + src/Music.cpp + src/Otherlevel.cpp + src/preloader.cpp + src/Screen.cpp + src/Script.cpp + src/Scripts.cpp + src/SoundSystem.cpp + src/Spacestation2.cpp + src/TerminalScripts.cpp + src/Textbox.cpp + src/titlerender.cpp + src/Tower.cpp + src/UtilityClass.cpp + src/WarpClass.cpp + src/main.cpp + src/SteamNetwork.c +) +SET(XML_SRC + tinyxml/tinystr.cpp + tinyxml/tinyxml.cpp + tinyxml/tinyxmlerror.cpp + tinyxml/tinyxmlparser.cpp +) +SET(PFS_SRC + physfs/physfs.c + physfs/physfs_archiver_dir.c + physfs/physfs_archiver_unpacked.c + physfs/physfs_archiver_zip.c + physfs/physfs_byteorder.c + physfs/physfs_unicode.c + physfs/physfs_platform_posix.c + physfs/physfs_platform_unix.c + physfs/physfs_platform_windows.c +) +IF(APPLE) + # Are you noticing a pattern with this Apple crap yet? + SET(PFS_SRC ${PFS_SRC} physfs/physfs_platform_apple.m) +ENDIF() +SET(PNG_SRC lodepng/lodepng.c) + +# Executable information +IF(WIN32) + ADD_EXECUTABLE(vvvvvv WIN32 ${VVV_SRC}) +ELSE() + ADD_EXECUTABLE(vvvvvv ${VVV_SRC}) +ENDIF() + +# Library information +ADD_LIBRARY(tinyxml-static STATIC ${XML_SRC}) +ADD_LIBRARY(physfs-static STATIC ${PFS_SRC} ${PFSP_SRC}) +ADD_LIBRARY(lodepng-static STATIC ${PNG_SRC}) + +# Static Dependencies +TARGET_LINK_LIBRARIES(vvvvvv physfs-static tinyxml-static lodepng-static) + +# SDL2 Dependency (Detection pulled from FAudio) +if (DEFINED SDL2_INCLUDE_DIRS AND DEFINED SDL2_LIBRARIES) + message(STATUS "Using pre-defined SDL2 variables SDL2_INCLUDE_DIRS and SDL2_LIBRARIES") + target_include_directories(vvvvvv PUBLIC "$") + target_link_libraries(vvvvvv ${SDL2_LIBRARIES}) +else() + # Only try to autodetect if both SDL2 variables aren't explicitly set + find_package(SDL2 CONFIG) + if (TARGET SDL2::SDL2) + message(STATUS "Using TARGET SDL2::SDL2") + target_link_libraries(vvvvvv SDL2::SDL2 SDL2_mixer) + elseif (TARGET SDL2) + message(STATUS "Using TARGET SDL2") + target_link_libraries(vvvvvv SDL2 SDL2_mixer) + else() + message(STATUS "No TARGET SDL2::SDL2, or SDL2, using variables") + target_include_directories(vvvvvv PUBLIC "$") + target_link_libraries(vvvvvv ${SDL2_LIBRARIES} SDL2_mixer) + endif() +endif() + +# Yes, more Apple Crap +IF(APPLE) + FIND_LIBRARY(FOUNDATION NAMES Foundation) + FIND_LIBRARY(IOKIT NAMES IOKit) + TARGET_LINK_LIBRARIES(vvvvvv objc ${IOKIT} ${FOUNDATION}) +ENDIF() diff --git a/desktop_version/README.md b/desktop_version/README.md new file mode 100644 index 00000000..a6a2c067 --- /dev/null +++ b/desktop_version/README.md @@ -0,0 +1,52 @@ +How to Build +------------ +VVVVVV's official desktop versions are built with the following environments: + +- Windows: Visual Studio 2010 +- macOS: Xcode CLT, currently targeting 10.9 SDK +- GNU/Linux: CentOS 7 + +The engine depends solely on SDL2 and SDL2_mixer. All other dependencies are +statically linked into the engine. The libs for Windows are in this repository, +all other platforms should install them either from the OS package manager or +from self-compiled source. + +Steamworks support is included and the DLL is loaded dynamically, you do not +need the SDK headers and there is no special Steam or non-Steam version. The +current implementation has been tested with Steamworks SDK v1.46. + +To generate the projects on Windows: +``` +# Put the SDL2/SDL2_mixer VC development libraries next to the VVVVVV folder! +mkdir flibitBuild +cd flibitBuild +cmake -G "Visual Studio 10 2010" .. -DSDL2_INCLUDE_DIRS="../../SDL2-2.0.10/include;../../SDL2_mixer-2.0.4/include" -DSDL2_LIBRARIES="../../SDL2-2.0.10/lib/x86/SDL2;../../SDL2-2.0.10/lib/x86/SDL2main;../../SDL2_mixer-2.0.4/lib/x86/SDL2_mixer" +``` + +To generate everywhere else: +``` +mkdir flibitBuild +cd flibitBuild +cmake .. +``` + +macOS may be fussy about the SDK version. How to fix this is up to the whims of +however Apple wants to make CMAKE_OSX_SYSROOT annoying to configure and retain +each time Xcode updates. + +A Word About Compiler Quirks +---------------------------- + +This engine is _super_ fussy about optimization levels and runtime checks. In +particular, the Windows version _absolutely positively must_ be compiled in +Debug mode, with /RTC enabled. If you build in Release mode, or have /RTC +disabled, the game behaves dramatically different in ways that were never fully +documented (bizarre softlocks, out-of-bounds issues that don't show up in tools +like Valgrind, stuff like that). There are lots of things about this old code +that could be cleaned up, polished, rewritten, and so on, but this is the one +that will probably bite you the hardest when setting up your own build, +regardless of platform. + +We hope you'll enjoy messing with the source anyway! + +Love, flibit diff --git a/desktop_version/lodepng/lodepng.c b/desktop_version/lodepng/lodepng.c new file mode 100644 index 00000000..29f50c58 --- /dev/null +++ b/desktop_version/lodepng/lodepng.c @@ -0,0 +1,6369 @@ +/* +LodePNG version 20191109 + +Copyright (c) 2005-2019 Lode Vandevenne + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +/* +The manual and changelog are in the header file "lodepng.h" +Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for C. +*/ + +#include "lodepng.h" + +#ifdef LODEPNG_COMPILE_DISK +#include /* LONG_MAX */ +#include /* file handling */ +#endif /* LODEPNG_COMPILE_DISK */ + +#ifdef LODEPNG_COMPILE_ALLOCATORS +#include /* allocations */ +#endif /* LODEPNG_COMPILE_ALLOCATORS */ + +#if defined(_MSC_VER) && (_MSC_VER >= 1310) /*Visual Studio: A few warning types are not desired here.*/ +#pragma warning( disable : 4244 ) /*implicit conversions: not warned by gcc -Wall -Wextra and requires too much casts*/ +#pragma warning( disable : 4996 ) /*VS does not like fopen, but fopen_s is not standard C so unusable here*/ +#endif /*_MSC_VER */ + +const char* LODEPNG_VERSION_STRING = "20191109"; + +/* +This source file is built up in the following large parts. The code sections +with the "LODEPNG_COMPILE_" #defines divide this up further in an intermixed way. +-Tools for C and common code for PNG and Zlib +-C Code for Zlib (huffman, deflate, ...) +-C Code for PNG (file format chunks, adam7, PNG filters, color conversions, ...) +-The C++ wrapper around all of the above +*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* // Tools for C, and common code for PNG and Zlib. // */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*The malloc, realloc and free functions defined here with "lodepng_" in front +of the name, so that you can easily change them to others related to your +platform if needed. Everything else in the code calls these. Pass +-DLODEPNG_NO_COMPILE_ALLOCATORS to the compiler, or comment out +#define LODEPNG_COMPILE_ALLOCATORS in the header, to disable the ones here and +define them in your own project's source files without needing to change +lodepng source code. Don't forget to remove "static" if you copypaste them +from here.*/ + +#ifdef LODEPNG_COMPILE_ALLOCATORS +static void* lodepng_malloc(size_t size) { +#ifdef LODEPNG_MAX_ALLOC + if(size > LODEPNG_MAX_ALLOC) return 0; +#endif + return malloc(size); +} + +static void* lodepng_realloc(void* ptr, size_t new_size) { +#ifdef LODEPNG_MAX_ALLOC + if(new_size > LODEPNG_MAX_ALLOC) return 0; +#endif + return realloc(ptr, new_size); +} + +static void lodepng_free(void* ptr) { + free(ptr); +} +#else /*LODEPNG_COMPILE_ALLOCATORS*/ +/* TODO: support giving additional void* payload to the custom allocators */ +void* lodepng_malloc(size_t size); +void* lodepng_realloc(void* ptr, size_t new_size); +void lodepng_free(void* ptr); +#endif /*LODEPNG_COMPILE_ALLOCATORS*/ + +/* convince the compiler to inline a function, for use when this measurably improves performance */ +/* inline is not available in C90, but use it when supported by the compiler */ +#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || (defined(__cplusplus) && (__cplusplus >= 199711L)) +#define LODEPNG_INLINE inline +#else +#define LODEPNG_INLINE /* not available */ +#endif + +/* restrict is not available in C90, but use it when supported by the compiler */ +#if (defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) ||\ + (defined(_MSC_VER) && (_MSC_VER >= 1400)) || \ + (defined(__WATCOMC__) && (__WATCOMC__ >= 1250) && !defined(__cplusplus)) +#define LODEPNG_RESTRICT __restrict +#else +#define LODEPNG_RESTRICT /* not available */ +#endif + +/* Replacements for C library functions memcpy and strlen, to support those platforms +where a full C library is not available. The compiler can recognize them and compile +to something as fast. */ + +static void lodepng_memcpy(void* LODEPNG_RESTRICT dst, + const void* LODEPNG_RESTRICT src, size_t size) { + size_t i; + for(i = 0; i < size; i++) ((char*)dst)[i] = ((const char*)src)[i]; +} + +/* does not check memory out of bounds, do not use on untrusted data */ +static size_t lodepng_strlen(const char* a) { + const char* orig = a; + /* avoid warning about unused function in case of disabled COMPILE... macros */ + (void)lodepng_strlen; + while(*a) a++; + return (size_t)(a - orig); +} + +#define LODEPNG_MAX(a, b) (((a) > (b)) ? (a) : (b)) +#define LODEPNG_MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define LODEPNG_ABS(x) ((x) < 0 ? -(x) : (x)) + + +#ifdef LODEPNG_COMPILE_DECODER +/* Safely check if multiplying two integers will overflow (no undefined +behavior, compiler removing the code, etc...) and output result. */ +static int lodepng_mulofl(size_t a, size_t b, size_t* result) { + *result = a * b; /* Unsigned multiplication is well defined and safe in C90 */ + return (a != 0 && *result / a != b); +} + +/* Safely check if adding two integers will overflow (no undefined +behavior, compiler removing the code, etc...) and output result. */ +static int lodepng_addofl(size_t a, size_t b, size_t* result) { + *result = a + b; /* Unsigned addition is well defined and safe in C90 */ + return *result < a; +} + +#ifdef LODEPNG_COMPILE_ZLIB +/* Safely check if a + b > c, even if overflow could happen. */ +static int lodepng_gtofl(size_t a, size_t b, size_t c) { + size_t d; + if(lodepng_addofl(a, b, &d)) return 1; + return d > c; +} +#endif /*LODEPNG_COMPILE_ZLIB*/ +#endif /*LODEPNG_COMPILE_DECODER*/ + + +/* +Often in case of an error a value is assigned to a variable and then it breaks +out of a loop (to go to the cleanup phase of a function). This macro does that. +It makes the error handling code shorter and more readable. + +Example: if(!uivector_resizev(&frequencies_ll, 286, 0)) ERROR_BREAK(83); +*/ +#define CERROR_BREAK(errorvar, code){\ + errorvar = code;\ + break;\ +} + +/*version of CERROR_BREAK that assumes the common case where the error variable is named "error"*/ +#define ERROR_BREAK(code) CERROR_BREAK(error, code) + +/*Set error var to the error code, and return it.*/ +#define CERROR_RETURN_ERROR(errorvar, code){\ + errorvar = code;\ + return code;\ +} + +/*Try the code, if it returns error, also return the error.*/ +#define CERROR_TRY_RETURN(call){\ + unsigned error = call;\ + if(error) return error;\ +} + +/*Set error var to the error code, and return from the void function.*/ +#define CERROR_RETURN(errorvar, code){\ + errorvar = code;\ + return;\ +} + +/* +About uivector, ucvector and string: +-All of them wrap dynamic arrays or text strings in a similar way. +-LodePNG was originally written in C++. The vectors replace the std::vectors that were used in the C++ version. +-The string tools are made to avoid problems with compilers that declare things like strncat as deprecated. +-They're not used in the interface, only internally in this file as static functions. +-As with many other structs in this file, the init and cleanup functions serve as ctor and dtor. +*/ + +#ifdef LODEPNG_COMPILE_ZLIB +#ifdef LODEPNG_COMPILE_ENCODER +/*dynamic vector of unsigned ints*/ +typedef struct uivector { + unsigned* data; + size_t size; /*size in number of unsigned longs*/ + size_t allocsize; /*allocated size in bytes*/ +} uivector; + +static void uivector_cleanup(void* p) { + ((uivector*)p)->size = ((uivector*)p)->allocsize = 0; + lodepng_free(((uivector*)p)->data); + ((uivector*)p)->data = NULL; +} + +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned uivector_reserve(uivector* p, size_t allocsize) { + if(allocsize > p->allocsize) { + size_t newsize = (allocsize > p->allocsize * 2u) ? allocsize : ((allocsize * 3u) >> 1u); + void* data = lodepng_realloc(p->data, newsize); + if(data) { + p->allocsize = newsize; + p->data = (unsigned*)data; + } + else return 0; /*error: not enough memory*/ + } + return 1; +} + +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned uivector_resize(uivector* p, size_t size) { + if(!uivector_reserve(p, size * sizeof(unsigned))) return 0; + p->size = size; + return 1; /*success*/ +} + +/*resize and give all new elements the value*/ +static unsigned uivector_resizev(uivector* p, size_t size, unsigned value) { + size_t oldsize = p->size, i; + if(!uivector_resize(p, size)) return 0; + for(i = oldsize; i < size; ++i) p->data[i] = value; + return 1; +} + +static void uivector_init(uivector* p) { + p->data = NULL; + p->size = p->allocsize = 0; +} + +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned uivector_push_back(uivector* p, unsigned c) { + if(!uivector_resize(p, p->size + 1)) return 0; + p->data[p->size - 1] = c; + return 1; +} +#endif /*LODEPNG_COMPILE_ENCODER*/ +#endif /*LODEPNG_COMPILE_ZLIB*/ + +/* /////////////////////////////////////////////////////////////////////////// */ + +/*dynamic vector of unsigned chars*/ +typedef struct ucvector { + unsigned char* data; + size_t size; /*used size*/ + size_t allocsize; /*allocated size*/ +} ucvector; + +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned ucvector_reserve(ucvector* p, size_t allocsize) { + if(allocsize > p->allocsize) { + size_t newsize = (allocsize > p->allocsize * 2u) ? allocsize : ((allocsize * 3u) >> 1u); + void* data = lodepng_realloc(p->data, newsize); + if(data) { + p->allocsize = newsize; + p->data = (unsigned char*)data; + } + else return 0; /*error: not enough memory*/ + } + return 1; +} + +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned ucvector_resize(ucvector* p, size_t size) { + if(!ucvector_reserve(p, size * sizeof(unsigned char))) return 0; + p->size = size; + return 1; /*success*/ +} + +#ifdef LODEPNG_COMPILE_PNG + +static void ucvector_cleanup(void* p) { + ((ucvector*)p)->size = ((ucvector*)p)->allocsize = 0; + lodepng_free(((ucvector*)p)->data); + ((ucvector*)p)->data = NULL; +} + +static void ucvector_init(ucvector* p) { + p->data = NULL; + p->size = p->allocsize = 0; +} +#endif /*LODEPNG_COMPILE_PNG*/ + +#ifdef LODEPNG_COMPILE_ZLIB +/*you can both convert from vector to buffer&size and vice versa. If you use +init_buffer to take over a buffer and size, it is not needed to use cleanup*/ +static void ucvector_init_buffer(ucvector* p, unsigned char* buffer, size_t size) { + p->data = buffer; + p->allocsize = p->size = size; +} +#endif /*LODEPNG_COMPILE_ZLIB*/ + +#if (defined(LODEPNG_COMPILE_PNG) && defined(LODEPNG_COMPILE_ANCILLARY_CHUNKS)) || defined(LODEPNG_COMPILE_ENCODER) +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned ucvector_push_back(ucvector* p, unsigned char c) { + if(!ucvector_resize(p, p->size + 1)) return 0; + p->data[p->size - 1] = c; + return 1; +} +#endif /*defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER)*/ + + +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_PNG +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + +/*free string pointer and set it to NULL*/ +static void string_cleanup(char** out) { + lodepng_free(*out); + *out = NULL; +} + +/* dynamically allocates a new string with a copy of the null terminated input text */ +static char* alloc_string(const char* in) { + size_t insize = lodepng_strlen(in); + char* out = (char*)lodepng_malloc(insize + 1); + if(out) { + size_t i; + for(i = 0; i != insize; ++i) { + out[i] = in[i]; + } + out[i] = 0; + } + return out; +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +#endif /*LODEPNG_COMPILE_PNG*/ + +/* ////////////////////////////////////////////////////////////////////////// */ + +#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_PNG) +static unsigned lodepng_read32bitInt(const unsigned char* buffer) { + return (((unsigned)buffer[0] << 24u) | ((unsigned)buffer[1] << 16u) | + ((unsigned)buffer[2] << 8u) | (unsigned)buffer[3]); +} +#endif /*defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_PNG)*/ + +#if defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER) +/*buffer must have at least 4 allocated bytes available*/ +static void lodepng_set32bitInt(unsigned char* buffer, unsigned value) { + buffer[0] = (unsigned char)((value >> 24) & 0xff); + buffer[1] = (unsigned char)((value >> 16) & 0xff); + buffer[2] = (unsigned char)((value >> 8) & 0xff); + buffer[3] = (unsigned char)((value ) & 0xff); +} +#endif /*defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER)*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / File IO / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_DISK + +/* returns negative value on error. This should be pure C compatible, so no fstat. */ +static long lodepng_filesize(const char* filename) { + FILE* file; + long size; + file = fopen(filename, "rb"); + if(!file) return -1; + + if(fseek(file, 0, SEEK_END) != 0) { + fclose(file); + return -1; + } + + size = ftell(file); + /* It may give LONG_MAX as directory size, this is invalid for us. */ + if(size == LONG_MAX) size = -1; + + fclose(file); + return size; +} + +/* load file into buffer that already has the correct allocated size. Returns error code.*/ +static unsigned lodepng_buffer_file(unsigned char* out, size_t size, const char* filename) { + FILE* file; + size_t readsize; + file = fopen(filename, "rb"); + if(!file) return 78; + + readsize = fread(out, 1, size, file); + fclose(file); + + if (readsize != size) return 78; + return 0; +} + +unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename) { + long size = lodepng_filesize(filename); + if (size < 0) return 78; + *outsize = (size_t)size; + + *out = (unsigned char*)lodepng_malloc((size_t)size); + if(!(*out) && size > 0) return 83; /*the above malloc failed*/ + + return lodepng_buffer_file(*out, (size_t)size, filename); +} + +/*write given buffer to the file, overwriting the file, it doesn't append to it.*/ +unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) { + FILE* file; + file = fopen(filename, "wb" ); + if(!file) return 79; + fwrite(buffer, 1, buffersize, file); + fclose(file); + return 0; +} + +#endif /*LODEPNG_COMPILE_DISK*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* // End of common code and tools. Begin of Zlib related code. // */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_ZLIB +#ifdef LODEPNG_COMPILE_ENCODER + +typedef struct { + ucvector* data; + size_t bp; +} LodePNGBitWriter; + +void LodePNGBitWriter_init(LodePNGBitWriter* writer, ucvector* data) { + writer->data = data; + writer->bp = 0; +} + +/*TODO: this ignores potential out of memory errors*/ +#define WRITEBIT(/*size_t**/ writer, /*unsigned char*/ bit){\ + /* append new byte */\ + if(((writer->bp) & 7u) == 0) ucvector_push_back(writer->data, (unsigned char)0);\ + (writer->data->data[writer->data->size - 1]) |= (bit << ((writer->bp) & 7u));\ + ++writer->bp;\ +} + +/* LSB of value is written first, and LSB of bytes is used first */ +static void writeBits(LodePNGBitWriter* writer, unsigned value, size_t nbits) { + if(nbits == 1) { /* compiler should statically compile this case if nbits == 1 */ + WRITEBIT(writer, value); + } else { + /* TODO: increase output size nly once here rather than in each WRITEBIT */ + size_t i; + for(i = 0; i != nbits; ++i) { + WRITEBIT(writer, (unsigned char)((value >> i) & 1)); + } + } +} + +/* This one is to use for adding huffman symbol, the value bits are written MSB first */ +static void writeBitsReversed(LodePNGBitWriter* writer, unsigned value, size_t nbits) { + size_t i; + for(i = 0; i != nbits; ++i) { + /* TODO: increase output size only once here rather than in each WRITEBIT */ + WRITEBIT(writer, (unsigned char)((value >> (nbits - 1u - i)) & 1u)); + } +} +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#ifdef LODEPNG_COMPILE_DECODER + +typedef struct { + const unsigned char* data; + size_t size; /*size of data in bytes*/ + size_t bitsize; /*size of data in bits, end of valid bp values, should be 8*size*/ + size_t bp; + unsigned buffer; /*buffer for reading bits. NOTE: 'unsigned' must support at least 32 bits*/ +} LodePNGBitReader; + +/* data size argument is in bytes. Returns error if size too large causing overflow */ +static unsigned LodePNGBitReader_init(LodePNGBitReader* reader, const unsigned char* data, size_t size) { + size_t temp; + reader->data = data; + reader->size = size; + /* size in bits, return error if overflow (if size_t is 32 bit this supports up to 500MB) */ + if(lodepng_mulofl(size, 8u, &reader->bitsize)) return 105; + /*ensure incremented bp can be compared to bitsize without overflow even when it would be incremented 32 too much and + trying to ensure 32 more bits*/ + if(lodepng_addofl(reader->bitsize, 64u, &temp)) return 105; + reader->bp = 0; + reader->buffer = 0; + return 0; /*ok*/ +} + +/* +ensureBits functions: +Ensures the reader can at least read nbits bits in one or more readBits calls, +safely even if not enough bits are available. +Returns 1 if there are enough bits available, 0 if not. +*/ + +/*See ensureBits documentation above. This one ensures exactly 1 bit */ +/*static unsigned ensureBits1(LodePNGBitReader* reader) { + if(reader->bp >= reader->bitsize) return 0; + reader->buffer = (unsigned)reader->data[reader->bp >> 3u] >> (reader->bp & 7u); + return 1; +}*/ + +/*See ensureBits documentation above. This one ensures up to 9 bits */ +static unsigned ensureBits9(LodePNGBitReader* reader, size_t nbits) { + size_t start = reader->bp >> 3u; + size_t size = reader->size; + if(start + 1u < size) { + reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u); + reader->buffer >>= (reader->bp & 7u); + return 1; + } else { + reader->buffer = 0; + if(start + 0u < size) reader->buffer |= reader->data[start + 0]; + reader->buffer >>= (reader->bp & 7u); + return reader->bp + nbits < reader->bitsize; + } +} + +/*See ensureBits documentation above. This one ensures up to 17 bits */ +static unsigned ensureBits17(LodePNGBitReader* reader, size_t nbits) { + size_t start = reader->bp >> 3u; + size_t size = reader->size; + if(start + 2u < size) { + reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | + ((unsigned)reader->data[start + 2] << 16u); + reader->buffer >>= (reader->bp & 7u); + return 1; + } else { + reader->buffer = 0; + if(start + 0u < size) reader->buffer |= reader->data[start + 0]; + if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); + reader->buffer >>= (reader->bp & 7u); + return reader->bp + nbits < reader->bitsize; + } +} + +/*See ensureBits documentation above. This one ensures up to 25 bits */ +static LODEPNG_INLINE unsigned ensureBits25(LodePNGBitReader* reader, size_t nbits) { + size_t start = reader->bp >> 3u; + size_t size = reader->size; + if(start + 3u < size) { + reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | + ((unsigned)reader->data[start + 2] << 16u) | ((unsigned)reader->data[start + 3] << 24u); + reader->buffer >>= (reader->bp & 7u); + return 1; + } else { + reader->buffer = 0; + if(start + 0u < size) reader->buffer |= reader->data[start + 0]; + if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); + if(start + 2u < size) reader->buffer |= ((unsigned)reader->data[start + 2] << 16u); + reader->buffer >>= (reader->bp & 7u); + return reader->bp + nbits < reader->bitsize; + } +} + +/*See ensureBits documentation above. This one ensures up to 32 bits */ +static LODEPNG_INLINE unsigned ensureBits32(LodePNGBitReader* reader, size_t nbits) { + size_t start = reader->bp >> 3u; + size_t size = reader->size; + if(start + 4u < size) { + reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | + ((unsigned)reader->data[start + 2] << 16u) | ((unsigned)reader->data[start + 3] << 24u); + reader->buffer >>= (reader->bp & 7u); + reader->buffer |= (((unsigned)reader->data[start + 4] << 24u) << (7u - (reader->bp & 7u))); + return 1; + } else { + reader->buffer = 0; + if(start + 0u < size) reader->buffer |= reader->data[start + 0]; + if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); + if(start + 2u < size) reader->buffer |= ((unsigned)reader->data[start + 2] << 16u); + if(start + 3u < size) reader->buffer |= ((unsigned)reader->data[start + 3] << 24u); + reader->buffer >>= (reader->bp & 7u); + return reader->bp + nbits < reader->bitsize; + } +} + +/* Get bits without advancing the bit pointer. Must have enough bits available with ensureBits */ +static unsigned peekBits(LodePNGBitReader* reader, size_t nbits) { + return reader->buffer & ((1u << nbits) - 1u); +} + +/* Must have enough bits available with ensureBits */ +static void advanceBits(LodePNGBitReader* reader, size_t nbits) { + reader->buffer >>= nbits; + reader->bp += nbits; +} + +/* Must have enough bits available with ensureBits */ +static unsigned readBits(LodePNGBitReader* reader, size_t nbits) { + unsigned result = peekBits(reader, nbits); + advanceBits(reader, nbits); + return result; +} +#endif /*LODEPNG_COMPILE_DECODER*/ + +static unsigned reverseBits(unsigned bits, unsigned num) { + /*TODO: implement faster lookup table based version when needed*/ + unsigned i, result = 0; + for(i = 0; i < num; i++) result |= ((bits >> (num - i - 1u)) & 1u) << i; + return result; +} + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Deflate - Huffman / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#define FIRST_LENGTH_CODE_INDEX 257 +#define LAST_LENGTH_CODE_INDEX 285 +/*256 literals, the end code, some length codes, and 2 unused codes*/ +#define NUM_DEFLATE_CODE_SYMBOLS 288 +/*the distance codes have their own symbols, 30 used, 2 unused*/ +#define NUM_DISTANCE_SYMBOLS 32 +/*the code length codes. 0-15: code lengths, 16: copy previous 3-6 times, 17: 3-10 zeros, 18: 11-138 zeros*/ +#define NUM_CODE_LENGTH_CODES 19 + +/*the base lengths represented by codes 257-285*/ +static const unsigned LENGTHBASE[29] + = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, + 67, 83, 99, 115, 131, 163, 195, 227, 258}; + +/*the extra bits used by codes 257-285 (added to base length)*/ +static const unsigned LENGTHEXTRA[29] + = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 5, 5, 5, 5, 0}; + +/*the base backwards distances (the bits of distance codes appear after length codes and use their own huffman tree)*/ +static const unsigned DISTANCEBASE[30] + = {1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, + 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; + +/*the extra bits of backwards distances (added to base)*/ +static const unsigned DISTANCEEXTRA[30] + = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, + 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; + +/*the order in which "code length alphabet code lengths" are stored, out of this +the huffman tree of the dynamic huffman tree lengths is generated*/ +static const unsigned CLCL_ORDER[NUM_CODE_LENGTH_CODES] + = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + +/* ////////////////////////////////////////////////////////////////////////// */ + +/* +Huffman tree struct, containing multiple representations of the tree +*/ +typedef struct HuffmanTree { + unsigned* codes; /*the huffman codes (bit patterns representing the symbols)*/ + unsigned* lengths; /*the lengths of the huffman codes*/ + unsigned maxbitlen; /*maximum number of bits a single code can get*/ + unsigned numcodes; /*number of symbols in the alphabet = number of codes*/ + /* for reading only */ + unsigned char* table_len; /*length of symbol from lookup table, or max length if secondary lookup needed*/ + unsigned short* table_value; /*value of symbol from lookup table, or pointer to secondary table if needed*/ +} HuffmanTree; + +static void HuffmanTree_init(HuffmanTree* tree) { + tree->codes = 0; + tree->lengths = 0; + tree->table_len = 0; + tree->table_value = 0; +} + +static void HuffmanTree_cleanup(HuffmanTree* tree) { + lodepng_free(tree->codes); + lodepng_free(tree->lengths); + lodepng_free(tree->table_len); + lodepng_free(tree->table_value); +} + +/* amount of bits for first huffman table lookup (aka root bits), see HuffmanTree_makeTable and huffmanDecodeSymbol.*/ +/* values 8u and 9u work the fastest */ +#define FIRSTBITS 9u + +/* a symbol value too big to represent any valid symbol, to indicate reading disallowed huffman bits combination, +which is possible in case of only 0 or 1 present symbols. */ +#define INVALIDSYMBOL 65535u + +/* make table for huffman decoding */ +static unsigned HuffmanTree_makeTable(HuffmanTree* tree) { + static const unsigned headsize = 1u << FIRSTBITS; /*size of the first table*/ + static const unsigned mask = (1u << FIRSTBITS) /*headsize*/ - 1u; + size_t i, numpresent, pointer, size; /*total table size*/ + unsigned* maxlens = (unsigned*)lodepng_malloc(headsize * sizeof(unsigned)); + if(!maxlens) return 83; /*alloc fail*/ + + /* compute maxlens: max total bit length of symbols sharing prefix in the first table*/ + for(i = 0; i < headsize; ++i) maxlens[i] = 0; + for(i = 0; i < tree->numcodes; i++) { + unsigned symbol = tree->codes[i]; + unsigned l = tree->lengths[i]; + unsigned index; + if(l <= FIRSTBITS) continue; /*symbols that fit in first table don't increase secondary table size*/ + /*get the FIRSTBITS MSBs, the MSBs of the symbol are encoded first. See later comment about the reversing*/ + index = reverseBits(symbol >> (l - FIRSTBITS), FIRSTBITS); + maxlens[index] = LODEPNG_MAX(maxlens[index], l); + } + /* compute total table size: size of first table plus all secondary tables for symbols longer than FIRSTBITS */ + size = headsize; + for(i = 0; i < headsize; ++i) { + unsigned l = maxlens[i]; + if(l > FIRSTBITS) size += (1u << (l - FIRSTBITS)); + } + tree->table_len = (unsigned char*)lodepng_malloc(size * sizeof(*tree->table_len)); + tree->table_value = (unsigned short*)lodepng_malloc(size * sizeof(*tree->table_value)); + if(!tree->table_len || !tree->table_value) { + lodepng_free(maxlens); + /* freeing tree->table values is done at a higher scope */ + return 83; /*alloc fail*/ + } + /*initialize with an invalid length to indicate unused entries*/ + for(i = 0; i < size; ++i) tree->table_len[i] = 16; + + /*fill in the first table for long symbols: max prefix size and pointer to secondary tables*/ + pointer = headsize; + for(i = 0; i < headsize; ++i) { + unsigned l = maxlens[i]; + if(l <= FIRSTBITS) continue; + tree->table_len[i] = l; + tree->table_value[i] = pointer; + pointer += (1u << (l - FIRSTBITS)); + } + lodepng_free(maxlens); + + /*fill in the first table for short symbols, or secondary table for long symbols*/ + numpresent = 0; + for(i = 0; i < tree->numcodes; ++i) { + unsigned l = tree->lengths[i]; + unsigned symbol = tree->codes[i]; /*the huffman bit pattern. i itself is the value.*/ + /*reverse bits, because the huffman bits are given in MSB first order but the bit reader reads LSB first*/ + unsigned reverse = reverseBits(symbol, l); + if(l == 0) continue; + numpresent++; + + if(l <= FIRSTBITS) { + /*short symbol, fully in first table, replicated num times if l < FIRSTBITS*/ + unsigned num = 1u << (FIRSTBITS - l); + unsigned j; + for(j = 0; j < num; ++j) { + /*bit reader will read the l bits of symbol first, the remaining FIRSTBITS - l bits go to the MSB's*/ + unsigned index = reverse | (j << l); + if(tree->table_len[index] != 16) return 55; /*invalid tree: long symbol shares prefix with short symbol*/ + tree->table_len[index] = l; + tree->table_value[index] = i; + } + } else { + /*long symbol, shares prefix with other long symbols in first lookup table, needs second lookup*/ + /*the FIRSTBITS MSBs of the symbol are the first table index*/ + unsigned index = reverse & mask; + unsigned maxlen = tree->table_len[index]; + /*log2 of secondary table length, should be >= l - FIRSTBITS*/ + unsigned tablelen = maxlen - FIRSTBITS; + unsigned start = tree->table_value[index]; /*starting index in secondary table*/ + unsigned num = 1u << (tablelen - (l - FIRSTBITS)); /*amount of entries of this symbol in secondary table*/ + unsigned j; + if(maxlen < l) return 55; /*invalid tree: long symbol shares prefix with short symbol*/ + for(j = 0; j < num; ++j) { + unsigned reverse2 = reverse >> FIRSTBITS; /* l - FIRSTBITS bits */ + unsigned index2 = start + (reverse2 | (j << (l - FIRSTBITS))); + tree->table_len[index2] = l; + tree->table_value[index2] = i; + } + } + } + + if(numpresent < 2) { + /* In case of exactly 1 symbol, in theory the huffman symbol needs 0 bits, + but deflate uses 1 bit instead. In case of 0 symbols, no symbols can + appear at all, but such huffman tree could still exist (e.g. if distance + codes are never used). In both cases, not all symbols of the table will be + filled in. Fill them in with an invalid symbol value so returning them from + huffmanDecodeSymbol will cause error. */ + for(i = 0; i < size; ++i) { + if(tree->table_len[i] == 16) { + /* As length, use a value smaller than FIRSTBITS for the head table, + and a value larger than FIRSTBITS for the secondary table, to ensure + valid behavior for advanceBits when reading this symbol. */ + tree->table_len[i] = (i < headsize) ? 1 : (FIRSTBITS + 1); + tree->table_value[i] = INVALIDSYMBOL; + } + } + } else { + /* A good huffman tree has N * 2 - 1 nodes, of which N - 1 are internal nodes. + If that is not the case (due to too long length codes), the table will not + have been fully used, and this is an error (not all bit combinations can be + decoded): an oversubscribed huffman tree, indicated by error 55. */ + for(i = 0; i < size; ++i) { + if(tree->table_len[i] == 16) return 55; + } + } + + return 0; +} + +/* +Second step for the ...makeFromLengths and ...makeFromFrequencies functions. +numcodes, lengths and maxbitlen must already be filled in correctly. return +value is error. +*/ +static unsigned HuffmanTree_makeFromLengths2(HuffmanTree* tree) { + unsigned* blcount; + unsigned* nextcode; + unsigned error = 0; + unsigned bits, n; + + tree->codes = (unsigned*)lodepng_malloc(tree->numcodes * sizeof(unsigned)); + blcount = (unsigned*)lodepng_malloc((tree->maxbitlen + 1) * sizeof(unsigned)); + nextcode = (unsigned*)lodepng_malloc((tree->maxbitlen + 1) * sizeof(unsigned)); + if(!tree->codes || !blcount || !nextcode) error = 83; /*alloc fail*/ + + if(!error) { + for(n = 0; n != tree->maxbitlen + 1; n++) blcount[n] = nextcode[n] = 0; + /*step 1: count number of instances of each code length*/ + for(bits = 0; bits != tree->numcodes; ++bits) ++blcount[tree->lengths[bits]]; + /*step 2: generate the nextcode values*/ + for(bits = 1; bits <= tree->maxbitlen; ++bits) { + nextcode[bits] = (nextcode[bits - 1] + blcount[bits - 1]) << 1u; + } + /*step 3: generate all the codes*/ + for(n = 0; n != tree->numcodes; ++n) { + if(tree->lengths[n] != 0) { + tree->codes[n] = nextcode[tree->lengths[n]]++; + /*remove superfluous bits from the code*/ + tree->codes[n] &= ((1u << tree->lengths[n]) - 1u); + } + } + } + + lodepng_free(blcount); + lodepng_free(nextcode); + + if(!error) error = HuffmanTree_makeTable(tree); + return error; +} + +/* +given the code lengths (as stored in the PNG file), generate the tree as defined +by Deflate. maxbitlen is the maximum bits that a code in the tree can have. +return value is error. +*/ +static unsigned HuffmanTree_makeFromLengths(HuffmanTree* tree, const unsigned* bitlen, + size_t numcodes, unsigned maxbitlen) { + unsigned i; + tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned)); + if(!tree->lengths) return 83; /*alloc fail*/ + for(i = 0; i != numcodes; ++i) tree->lengths[i] = bitlen[i]; + tree->numcodes = (unsigned)numcodes; /*number of symbols*/ + tree->maxbitlen = maxbitlen; + return HuffmanTree_makeFromLengths2(tree); +} + +#ifdef LODEPNG_COMPILE_ENCODER + +/*BPM: Boundary Package Merge, see "A Fast and Space-Economical Algorithm for Length-Limited Coding", +Jyrki Katajainen, Alistair Moffat, Andrew Turpin, 1995.*/ + +/*chain node for boundary package merge*/ +typedef struct BPMNode { + int weight; /*the sum of all weights in this chain*/ + unsigned index; /*index of this leaf node (called "count" in the paper)*/ + struct BPMNode* tail; /*the next nodes in this chain (null if last)*/ + int in_use; +} BPMNode; + +/*lists of chains*/ +typedef struct BPMLists { + /*memory pool*/ + unsigned memsize; + BPMNode* memory; + unsigned numfree; + unsigned nextfree; + BPMNode** freelist; + /*two heads of lookahead chains per list*/ + unsigned listsize; + BPMNode** chains0; + BPMNode** chains1; +} BPMLists; + +/*creates a new chain node with the given parameters, from the memory in the lists */ +static BPMNode* bpmnode_create(BPMLists* lists, int weight, unsigned index, BPMNode* tail) { + unsigned i; + BPMNode* result; + + /*memory full, so garbage collect*/ + if(lists->nextfree >= lists->numfree) { + /*mark only those that are in use*/ + for(i = 0; i != lists->memsize; ++i) lists->memory[i].in_use = 0; + for(i = 0; i != lists->listsize; ++i) { + BPMNode* node; + for(node = lists->chains0[i]; node != 0; node = node->tail) node->in_use = 1; + for(node = lists->chains1[i]; node != 0; node = node->tail) node->in_use = 1; + } + /*collect those that are free*/ + lists->numfree = 0; + for(i = 0; i != lists->memsize; ++i) { + if(!lists->memory[i].in_use) lists->freelist[lists->numfree++] = &lists->memory[i]; + } + lists->nextfree = 0; + } + + result = lists->freelist[lists->nextfree++]; + result->weight = weight; + result->index = index; + result->tail = tail; + return result; +} + +/*sort the leaves with stable mergesort*/ +static void bpmnode_sort(BPMNode* leaves, size_t num) { + BPMNode* mem = (BPMNode*)lodepng_malloc(sizeof(*leaves) * num); + size_t width, counter = 0; + for(width = 1; width < num; width *= 2) { + BPMNode* a = (counter & 1) ? mem : leaves; + BPMNode* b = (counter & 1) ? leaves : mem; + size_t p; + for(p = 0; p < num; p += 2 * width) { + size_t q = (p + width > num) ? num : (p + width); + size_t r = (p + 2 * width > num) ? num : (p + 2 * width); + size_t i = p, j = q, k; + for(k = p; k < r; k++) { + if(i < q && (j >= r || a[i].weight <= a[j].weight)) b[k] = a[i++]; + else b[k] = a[j++]; + } + } + counter++; + } + if(counter & 1) lodepng_memcpy(leaves, mem, sizeof(*leaves) * num); + lodepng_free(mem); +} + +/*Boundary Package Merge step, numpresent is the amount of leaves, and c is the current chain.*/ +static void boundaryPM(BPMLists* lists, BPMNode* leaves, size_t numpresent, int c, int num) { + unsigned lastindex = lists->chains1[c]->index; + + if(c == 0) { + if(lastindex >= numpresent) return; + lists->chains0[c] = lists->chains1[c]; + lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, 0); + } else { + /*sum of the weights of the head nodes of the previous lookahead chains.*/ + int sum = lists->chains0[c - 1]->weight + lists->chains1[c - 1]->weight; + lists->chains0[c] = lists->chains1[c]; + if(lastindex < numpresent && sum > leaves[lastindex].weight) { + lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, lists->chains1[c]->tail); + return; + } + lists->chains1[c] = bpmnode_create(lists, sum, lastindex, lists->chains1[c - 1]); + /*in the end we are only interested in the chain of the last list, so no + need to recurse if we're at the last one (this gives measurable speedup)*/ + if(num + 1 < (int)(2 * numpresent - 2)) { + boundaryPM(lists, leaves, numpresent, c - 1, num); + boundaryPM(lists, leaves, numpresent, c - 1, num); + } + } +} + +unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, + size_t numcodes, unsigned maxbitlen) { + unsigned error = 0; + unsigned i; + size_t numpresent = 0; /*number of symbols with non-zero frequency*/ + BPMNode* leaves; /*the symbols, only those with > 0 frequency*/ + + if(numcodes == 0) return 80; /*error: a tree of 0 symbols is not supposed to be made*/ + if((1u << maxbitlen) < (unsigned)numcodes) return 80; /*error: represent all symbols*/ + + leaves = (BPMNode*)lodepng_malloc(numcodes * sizeof(*leaves)); + if(!leaves) return 83; /*alloc fail*/ + + for(i = 0; i != numcodes; ++i) { + if(frequencies[i] > 0) { + leaves[numpresent].weight = (int)frequencies[i]; + leaves[numpresent].index = i; + ++numpresent; + } + } + + for(i = 0; i != numcodes; ++i) lengths[i] = 0; + + /*ensure at least two present symbols. There should be at least one symbol + according to RFC 1951 section 3.2.7. Some decoders incorrectly require two. To + make these work as well ensure there are at least two symbols. The + Package-Merge code below also doesn't work correctly if there's only one + symbol, it'd give it the theoretical 0 bits but in practice zlib wants 1 bit*/ + if(numpresent == 0) { + lengths[0] = lengths[1] = 1; /*note that for RFC 1951 section 3.2.7, only lengths[0] = 1 is needed*/ + } else if(numpresent == 1) { + lengths[leaves[0].index] = 1; + lengths[leaves[0].index == 0 ? 1 : 0] = 1; + } else { + BPMLists lists; + BPMNode* node; + + bpmnode_sort(leaves, numpresent); + + lists.listsize = maxbitlen; + lists.memsize = 2 * maxbitlen * (maxbitlen + 1); + lists.nextfree = 0; + lists.numfree = lists.memsize; + lists.memory = (BPMNode*)lodepng_malloc(lists.memsize * sizeof(*lists.memory)); + lists.freelist = (BPMNode**)lodepng_malloc(lists.memsize * sizeof(BPMNode*)); + lists.chains0 = (BPMNode**)lodepng_malloc(lists.listsize * sizeof(BPMNode*)); + lists.chains1 = (BPMNode**)lodepng_malloc(lists.listsize * sizeof(BPMNode*)); + if(!lists.memory || !lists.freelist || !lists.chains0 || !lists.chains1) error = 83; /*alloc fail*/ + + if(!error) { + for(i = 0; i != lists.memsize; ++i) lists.freelist[i] = &lists.memory[i]; + + bpmnode_create(&lists, leaves[0].weight, 1, 0); + bpmnode_create(&lists, leaves[1].weight, 2, 0); + + for(i = 0; i != lists.listsize; ++i) { + lists.chains0[i] = &lists.memory[0]; + lists.chains1[i] = &lists.memory[1]; + } + + /*each boundaryPM call adds one chain to the last list, and we need 2 * numpresent - 2 chains.*/ + for(i = 2; i != 2 * numpresent - 2; ++i) boundaryPM(&lists, leaves, numpresent, (int)maxbitlen - 1, (int)i); + + for(node = lists.chains1[maxbitlen - 1]; node; node = node->tail) { + for(i = 0; i != node->index; ++i) ++lengths[leaves[i].index]; + } + } + + lodepng_free(lists.memory); + lodepng_free(lists.freelist); + lodepng_free(lists.chains0); + lodepng_free(lists.chains1); + } + + lodepng_free(leaves); + return error; +} + +/*Create the Huffman tree given the symbol frequencies*/ +static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigned* frequencies, + size_t mincodes, size_t numcodes, unsigned maxbitlen) { + size_t i; + unsigned error = 0; + while(!frequencies[numcodes - 1] && numcodes > mincodes) --numcodes; /*trim zeroes*/ + tree->maxbitlen = maxbitlen; + tree->numcodes = (unsigned)numcodes; /*number of symbols*/ + tree->lengths = (unsigned*)lodepng_realloc(tree->lengths, numcodes * sizeof(unsigned)); + if(!tree->lengths) return 83; /*alloc fail*/ + /*initialize all lengths to 0*/ + for(i = 0; i < numcodes; i++) tree->lengths[i] = 0; + + error = lodepng_huffman_code_lengths(tree->lengths, frequencies, numcodes, maxbitlen); + if(!error) error = HuffmanTree_makeFromLengths2(tree); + return error; +} + +static unsigned HuffmanTree_getCode(const HuffmanTree* tree, unsigned index) { + return tree->codes[index]; +} + +static unsigned HuffmanTree_getLength(const HuffmanTree* tree, unsigned index) { + return tree->lengths[index]; +} +#endif /*LODEPNG_COMPILE_ENCODER*/ + +/*get the literal and length code tree of a deflated block with fixed tree, as per the deflate specification*/ +static unsigned generateFixedLitLenTree(HuffmanTree* tree) { + unsigned i, error = 0; + unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); + if(!bitlen) return 83; /*alloc fail*/ + + /*288 possible codes: 0-255=literals, 256=endcode, 257-285=lengthcodes, 286-287=unused*/ + for(i = 0; i <= 143; ++i) bitlen[i] = 8; + for(i = 144; i <= 255; ++i) bitlen[i] = 9; + for(i = 256; i <= 279; ++i) bitlen[i] = 7; + for(i = 280; i <= 287; ++i) bitlen[i] = 8; + + error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DEFLATE_CODE_SYMBOLS, 15); + + lodepng_free(bitlen); + return error; +} + +/*get the distance code tree of a deflated block with fixed tree, as specified in the deflate specification*/ +static unsigned generateFixedDistanceTree(HuffmanTree* tree) { + unsigned i, error = 0; + unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); + if(!bitlen) return 83; /*alloc fail*/ + + /*there are 32 distance codes, but 30-31 are unused*/ + for(i = 0; i != NUM_DISTANCE_SYMBOLS; ++i) bitlen[i] = 5; + error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DISTANCE_SYMBOLS, 15); + + lodepng_free(bitlen); + return error; +} + +#ifdef LODEPNG_COMPILE_DECODER + +/* +returns the code. The bit reader must already have been ensured at least 15 bits +*/ +static unsigned huffmanDecodeSymbol(LodePNGBitReader* reader, const HuffmanTree* codetree) { + unsigned short code = peekBits(reader, FIRSTBITS); + unsigned short l = codetree->table_len[code]; + unsigned short value = codetree->table_value[code]; + if(l <= FIRSTBITS) { + advanceBits(reader, l); + return value; + } else { + unsigned index2; + advanceBits(reader, FIRSTBITS); + index2 = value + peekBits(reader, l - FIRSTBITS); + advanceBits(reader, codetree->table_len[index2] - FIRSTBITS); + return codetree->table_value[index2]; + } +} +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_DECODER + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Inflator (Decompressor) / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*get the tree of a deflated block with fixed tree, as specified in the deflate specification*/ +static void getTreeInflateFixed(HuffmanTree* tree_ll, HuffmanTree* tree_d) { + /*TODO: check for out of memory errors*/ + generateFixedLitLenTree(tree_ll); + generateFixedDistanceTree(tree_d); +} + +/*get the tree of a deflated block with dynamic tree, the tree itself is also Huffman compressed with a known tree*/ +static unsigned getTreeInflateDynamic(HuffmanTree* tree_ll, HuffmanTree* tree_d, + LodePNGBitReader* reader) { + /*make sure that length values that aren't filled in will be 0, or a wrong tree will be generated*/ + unsigned error = 0; + unsigned n, HLIT, HDIST, HCLEN, i; + + /*see comments in deflateDynamic for explanation of the context and these variables, it is analogous*/ + unsigned* bitlen_ll = 0; /*lit,len code lengths*/ + unsigned* bitlen_d = 0; /*dist code lengths*/ + /*code length code lengths ("clcl"), the bit lengths of the huffman tree used to compress bitlen_ll and bitlen_d*/ + unsigned* bitlen_cl = 0; + HuffmanTree tree_cl; /*the code tree for code length codes (the huffman tree for compressed huffman trees)*/ + + if(!ensureBits17(reader, 14)) return 49; /*error: the bit pointer is or will go past the memory*/ + + /*number of literal/length codes + 257. Unlike the spec, the value 257 is added to it here already*/ + HLIT = readBits(reader, 5) + 257; + /*number of distance codes. Unlike the spec, the value 1 is added to it here already*/ + HDIST = readBits(reader, 5) + 1; + /*number of code length codes. Unlike the spec, the value 4 is added to it here already*/ + HCLEN = readBits(reader, 4) + 4; + + bitlen_cl = (unsigned*)lodepng_malloc(NUM_CODE_LENGTH_CODES * sizeof(unsigned)); + if(!bitlen_cl) return 83 /*alloc fail*/; + + HuffmanTree_init(&tree_cl); + + while(!error) { + /*read the code length codes out of 3 * (amount of code length codes) bits*/ + if(lodepng_gtofl(reader->bp, HCLEN * 3, reader->bitsize)) { + ERROR_BREAK(50); /*error: the bit pointer is or will go past the memory*/ + } + for(i = 0; i != HCLEN; ++i) { + ensureBits9(reader, 3); /*out of bounds already checked above */ + bitlen_cl[CLCL_ORDER[i]] = readBits(reader, 3); + } + for(i = HCLEN; i != NUM_CODE_LENGTH_CODES; ++i) { + bitlen_cl[CLCL_ORDER[i]] = 0; + } + + error = HuffmanTree_makeFromLengths(&tree_cl, bitlen_cl, NUM_CODE_LENGTH_CODES, 7); + if(error) break; + + /*now we can use this tree to read the lengths for the tree that this function will return*/ + bitlen_ll = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); + bitlen_d = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); + if(!bitlen_ll || !bitlen_d) ERROR_BREAK(83 /*alloc fail*/); + for(i = 0; i != NUM_DEFLATE_CODE_SYMBOLS; ++i) bitlen_ll[i] = 0; + for(i = 0; i != NUM_DISTANCE_SYMBOLS; ++i) bitlen_d[i] = 0; + + /*i is the current symbol we're reading in the part that contains the code lengths of lit/len and dist codes*/ + i = 0; + while(i < HLIT + HDIST) { + unsigned code; + ensureBits25(reader, 22); /* up to 15 bits for huffman code, up to 7 extra bits below*/ + code = huffmanDecodeSymbol(reader, &tree_cl); + if(code <= 15) /*a length code*/ { + if(i < HLIT) bitlen_ll[i] = code; + else bitlen_d[i - HLIT] = code; + ++i; + } else if(code == 16) /*repeat previous*/ { + unsigned replength = 3; /*read in the 2 bits that indicate repeat length (3-6)*/ + unsigned value; /*set value to the previous code*/ + + if(i == 0) ERROR_BREAK(54); /*can't repeat previous if i is 0*/ + + replength += readBits(reader, 2); + + if(i < HLIT + 1) value = bitlen_ll[i - 1]; + else value = bitlen_d[i - HLIT - 1]; + /*repeat this value in the next lengths*/ + for(n = 0; n < replength; ++n) { + if(i >= HLIT + HDIST) ERROR_BREAK(13); /*error: i is larger than the amount of codes*/ + if(i < HLIT) bitlen_ll[i] = value; + else bitlen_d[i - HLIT] = value; + ++i; + } + } else if(code == 17) /*repeat "0" 3-10 times*/ { + unsigned replength = 3; /*read in the bits that indicate repeat length*/ + replength += readBits(reader, 3); + + /*repeat this value in the next lengths*/ + for(n = 0; n < replength; ++n) { + if(i >= HLIT + HDIST) ERROR_BREAK(14); /*error: i is larger than the amount of codes*/ + + if(i < HLIT) bitlen_ll[i] = 0; + else bitlen_d[i - HLIT] = 0; + ++i; + } + } else if(code == 18) /*repeat "0" 11-138 times*/ { + unsigned replength = 11; /*read in the bits that indicate repeat length*/ + replength += readBits(reader, 7); + + /*repeat this value in the next lengths*/ + for(n = 0; n < replength; ++n) { + if(i >= HLIT + HDIST) ERROR_BREAK(15); /*error: i is larger than the amount of codes*/ + + if(i < HLIT) bitlen_ll[i] = 0; + else bitlen_d[i - HLIT] = 0; + ++i; + } + } else /*if(code == INVALIDSYMBOL)*/ { + ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ + } + /*check if any of the ensureBits above went out of bounds*/ + if(reader->bp > reader->bitsize) { + /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol + (10=no endcode, 11=wrong jump outside of tree)*/ + /* TODO: revise error codes 10,11,50: the above comment is no longer valid */ + ERROR_BREAK(50); /*error, bit pointer jumps past memory*/ + } + } + if(error) break; + + if(bitlen_ll[256] == 0) ERROR_BREAK(64); /*the length of the end code 256 must be larger than 0*/ + + /*now we've finally got HLIT and HDIST, so generate the code trees, and the function is done*/ + error = HuffmanTree_makeFromLengths(tree_ll, bitlen_ll, NUM_DEFLATE_CODE_SYMBOLS, 15); + if(error) break; + error = HuffmanTree_makeFromLengths(tree_d, bitlen_d, NUM_DISTANCE_SYMBOLS, 15); + + break; /*end of error-while*/ + } + + lodepng_free(bitlen_cl); + lodepng_free(bitlen_ll); + lodepng_free(bitlen_d); + HuffmanTree_cleanup(&tree_cl); + + return error; +} + +/*inflate a block with dynamic of fixed Huffman tree. btype must be 1 or 2.*/ +static unsigned inflateHuffmanBlock(ucvector* out, size_t* pos, LodePNGBitReader* reader, + unsigned btype) { + unsigned error = 0; + HuffmanTree tree_ll; /*the huffman tree for literal and length codes*/ + HuffmanTree tree_d; /*the huffman tree for distance codes*/ + + HuffmanTree_init(&tree_ll); + HuffmanTree_init(&tree_d); + + if(btype == 1) getTreeInflateFixed(&tree_ll, &tree_d); + else /*if(btype == 2)*/ error = getTreeInflateDynamic(&tree_ll, &tree_d, reader); + + while(!error) /*decode all symbols until end reached, breaks at end code*/ { + /*code_ll is literal, length or end code*/ + unsigned code_ll; + ensureBits25(reader, 20); /* up to 15 for the huffman symbol, up to 5 for the length extra bits */ + code_ll = huffmanDecodeSymbol(reader, &tree_ll); + if(code_ll <= 255) /*literal symbol*/ { + /*ucvector_push_back would do the same, but for some reason the two lines below run 10% faster*/ + if(!ucvector_resize(out, (*pos) + 1)) ERROR_BREAK(83 /*alloc fail*/); + out->data[*pos] = (unsigned char)code_ll; + ++(*pos); + } else if(code_ll >= FIRST_LENGTH_CODE_INDEX && code_ll <= LAST_LENGTH_CODE_INDEX) /*length code*/ { + unsigned code_d, distance; + unsigned numextrabits_l, numextrabits_d; /*extra bits for length and distance*/ + size_t start, backward, length; + + /*part 1: get length base*/ + length = LENGTHBASE[code_ll - FIRST_LENGTH_CODE_INDEX]; + + /*part 2: get extra bits and add the value of that to length*/ + numextrabits_l = LENGTHEXTRA[code_ll - FIRST_LENGTH_CODE_INDEX]; + if(numextrabits_l != 0) { + /* bits already ensured above */ + length += readBits(reader, numextrabits_l); + } + + /*part 3: get distance code*/ + ensureBits32(reader, 28); /* up to 15 for the huffman symbol, up to 13 for the extra bits */ + code_d = huffmanDecodeSymbol(reader, &tree_d); + if(code_d > 29) { + if(code_d <= 31) { + ERROR_BREAK(18); /*error: invalid distance code (30-31 are never used)*/ + } else /* if(code_d == INVALIDSYMBOL) */{ + ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ + } + } + distance = DISTANCEBASE[code_d]; + + /*part 4: get extra bits from distance*/ + numextrabits_d = DISTANCEEXTRA[code_d]; + if(numextrabits_d != 0) { + /* bits already ensured above */ + distance += readBits(reader, numextrabits_d); + } + + /*part 5: fill in all the out[n] values based on the length and dist*/ + start = (*pos); + if(distance > start) ERROR_BREAK(52); /*too long backward distance*/ + backward = start - distance; + + if(!ucvector_resize(out, (*pos) + length)) ERROR_BREAK(83 /*alloc fail*/); + if (distance < length) { + size_t forward; + lodepng_memcpy(out->data + *pos, out->data + backward, distance); + *pos += distance; + for(forward = distance; forward < length; ++forward) { + out->data[(*pos)++] = out->data[backward++]; + } + } else { + lodepng_memcpy(out->data + *pos, out->data + backward, length); + *pos += length; + } + } else if(code_ll == 256) { + break; /*end code, break the loop*/ + } else /*if(code_ll == INVALIDSYMBOL)*/ { + ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ + } + /*check if any of the ensureBits above went out of bounds*/ + if(reader->bp > reader->bitsize) { + /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol + (10=no endcode, 11=wrong jump outside of tree)*/ + /* TODO: revise error codes 10,11,50: the above comment is no longer valid */ + ERROR_BREAK(51); /*error, bit pointer jumps past memory*/ + } + } + + HuffmanTree_cleanup(&tree_ll); + HuffmanTree_cleanup(&tree_d); + + return error; +} + +static unsigned inflateNoCompression(ucvector* out, size_t* pos, + LodePNGBitReader* reader, const LodePNGDecompressSettings* settings) { + size_t bytepos; + size_t size = reader->size; + unsigned LEN, NLEN, error = 0; + + /*go to first boundary of byte*/ + bytepos = (reader->bp + 7u) >> 3u; + + /*read LEN (2 bytes) and NLEN (2 bytes)*/ + if(bytepos + 4 >= size) return 52; /*error, bit pointer will jump past memory*/ + LEN = (unsigned)reader->data[bytepos] + ((unsigned)reader->data[bytepos + 1] << 8u); bytepos += 2; + NLEN = (unsigned)reader->data[bytepos] + ((unsigned)reader->data[bytepos + 1] << 8u); bytepos += 2; + + /*check if 16-bit NLEN is really the one's complement of LEN*/ + if(!settings->ignore_nlen && LEN + NLEN != 65535) { + return 21; /*error: NLEN is not one's complement of LEN*/ + } + + if(!ucvector_resize(out, (*pos) + LEN)) return 83; /*alloc fail*/ + + /*read the literal data: LEN bytes are now stored in the out buffer*/ + if(bytepos + LEN > size) return 23; /*error: reading outside of in buffer*/ + + lodepng_memcpy(out->data + *pos, reader->data + bytepos, LEN); + *pos += LEN; + bytepos += LEN; + + reader->bp = bytepos << 3u; + + return error; +} + +static unsigned lodepng_inflatev(ucvector* out, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings) { + unsigned BFINAL = 0; + size_t pos = 0; /*byte position in the out buffer*/ + LodePNGBitReader reader; + unsigned error = LodePNGBitReader_init(&reader, in, insize); + + if(error) return error; + + while(!BFINAL) { + unsigned BTYPE; + if(!ensureBits9(&reader, 3)) return 52; /*error, bit pointer will jump past memory*/ + BFINAL = readBits(&reader, 1); + BTYPE = readBits(&reader, 2); + + if(BTYPE == 3) return 20; /*error: invalid BTYPE*/ + else if(BTYPE == 0) error = inflateNoCompression(out, &pos, &reader, settings); /*no compression*/ + else error = inflateHuffmanBlock(out, &pos, &reader, BTYPE); /*compression, BTYPE 01 or 10*/ + + if(error) return error; + } + + return error; +} + +unsigned lodepng_inflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings) { + unsigned error; + ucvector v; + ucvector_init_buffer(&v, *out, *outsize); + error = lodepng_inflatev(&v, in, insize, settings); + *out = v.data; + *outsize = v.size; + return error; +} + +static unsigned inflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings) { + if(settings->custom_inflate) { + return settings->custom_inflate(out, outsize, in, insize, settings); + } else { + return lodepng_inflate(out, outsize, in, insize, settings); + } +} + +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Deflator (Compressor) / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +static const size_t MAX_SUPPORTED_DEFLATE_LENGTH = 258; + +/*search the index in the array, that has the largest value smaller than or equal to the given value, +given array must be sorted (if no value is smaller, it returns the size of the given array)*/ +static size_t searchCodeIndex(const unsigned* array, size_t array_size, size_t value) { + /*binary search (only small gain over linear). TODO: use CPU log2 instruction for getting symbols instead*/ + size_t left = 1; + size_t right = array_size - 1; + + while(left <= right) { + size_t mid = (left + right) >> 1; + if (array[mid] >= value) right = mid - 1; + else left = mid + 1; + } + if(left >= array_size || array[left] > value) left--; + return left; +} + +static void addLengthDistance(uivector* values, size_t length, size_t distance) { + /*values in encoded vector are those used by deflate: + 0-255: literal bytes + 256: end + 257-285: length/distance pair (length code, followed by extra length bits, distance code, extra distance bits) + 286-287: invalid*/ + + unsigned length_code = (unsigned)searchCodeIndex(LENGTHBASE, 29, length); + unsigned extra_length = (unsigned)(length - LENGTHBASE[length_code]); + unsigned dist_code = (unsigned)searchCodeIndex(DISTANCEBASE, 30, distance); + unsigned extra_distance = (unsigned)(distance - DISTANCEBASE[dist_code]); + + uivector_push_back(values, length_code + FIRST_LENGTH_CODE_INDEX); + uivector_push_back(values, extra_length); + uivector_push_back(values, dist_code); + uivector_push_back(values, extra_distance); +} + +/*3 bytes of data get encoded into two bytes. The hash cannot use more than 3 +bytes as input because 3 is the minimum match length for deflate*/ +static const unsigned HASH_NUM_VALUES = 65536; +static const unsigned HASH_BIT_MASK = 65535; /*HASH_NUM_VALUES - 1, but C90 does not like that as initializer*/ + +typedef struct Hash { + int* head; /*hash value to head circular pos - can be outdated if went around window*/ + /*circular pos to prev circular pos*/ + unsigned short* chain; + int* val; /*circular pos to hash value*/ + + /*TODO: do this not only for zeros but for any repeated byte. However for PNG + it's always going to be the zeros that dominate, so not important for PNG*/ + int* headz; /*similar to head, but for chainz*/ + unsigned short* chainz; /*those with same amount of zeros*/ + unsigned short* zeros; /*length of zeros streak, used as a second hash chain*/ +} Hash; + +static unsigned hash_init(Hash* hash, unsigned windowsize) { + unsigned i; + hash->head = (int*)lodepng_malloc(sizeof(int) * HASH_NUM_VALUES); + hash->val = (int*)lodepng_malloc(sizeof(int) * windowsize); + hash->chain = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); + + hash->zeros = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); + hash->headz = (int*)lodepng_malloc(sizeof(int) * (MAX_SUPPORTED_DEFLATE_LENGTH + 1)); + hash->chainz = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); + + if(!hash->head || !hash->chain || !hash->val || !hash->headz|| !hash->chainz || !hash->zeros) { + return 83; /*alloc fail*/ + } + + /*initialize hash table*/ + for(i = 0; i != HASH_NUM_VALUES; ++i) hash->head[i] = -1; + for(i = 0; i != windowsize; ++i) hash->val[i] = -1; + for(i = 0; i != windowsize; ++i) hash->chain[i] = i; /*same value as index indicates uninitialized*/ + + for(i = 0; i <= MAX_SUPPORTED_DEFLATE_LENGTH; ++i) hash->headz[i] = -1; + for(i = 0; i != windowsize; ++i) hash->chainz[i] = i; /*same value as index indicates uninitialized*/ + + return 0; +} + +static void hash_cleanup(Hash* hash) { + lodepng_free(hash->head); + lodepng_free(hash->val); + lodepng_free(hash->chain); + + lodepng_free(hash->zeros); + lodepng_free(hash->headz); + lodepng_free(hash->chainz); +} + + + +static unsigned getHash(const unsigned char* data, size_t size, size_t pos) { + unsigned result = 0; + if(pos + 2 < size) { + /*A simple shift and xor hash is used. Since the data of PNGs is dominated + by zeroes due to the filters, a better hash does not have a significant + effect on speed in traversing the chain, and causes more time spend on + calculating the hash.*/ + result ^= ((unsigned)data[pos + 0] << 0u); + result ^= ((unsigned)data[pos + 1] << 4u); + result ^= ((unsigned)data[pos + 2] << 8u); + } else { + size_t amount, i; + if(pos >= size) return 0; + amount = size - pos; + for(i = 0; i != amount; ++i) result ^= ((unsigned)data[pos + i] << (i * 8u)); + } + return result & HASH_BIT_MASK; +} + +static unsigned countZeros(const unsigned char* data, size_t size, size_t pos) { + const unsigned char* start = data + pos; + const unsigned char* end = start + MAX_SUPPORTED_DEFLATE_LENGTH; + if(end > data + size) end = data + size; + data = start; + while(data != end && *data == 0) ++data; + /*subtracting two addresses returned as 32-bit number (max value is MAX_SUPPORTED_DEFLATE_LENGTH)*/ + return (unsigned)(data - start); +} + +/*wpos = pos & (windowsize - 1)*/ +static void updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned short numzeros) { + hash->val[wpos] = (int)hashval; + if(hash->head[hashval] != -1) hash->chain[wpos] = hash->head[hashval]; + hash->head[hashval] = (int)wpos; + + hash->zeros[wpos] = numzeros; + if(hash->headz[numzeros] != -1) hash->chainz[wpos] = hash->headz[numzeros]; + hash->headz[numzeros] = (int)wpos; +} + +/* +LZ77-encode the data. Return value is error code. The input are raw bytes, the output +is in the form of unsigned integers with codes representing for example literal bytes, or +length/distance pairs. +It uses a hash table technique to let it encode faster. When doing LZ77 encoding, a +sliding window (of windowsize) is used, and all past bytes in that window can be used as +the "dictionary". A brute force search through all possible distances would be slow, and +this hash technique is one out of several ways to speed this up. +*/ +static unsigned encodeLZ77(uivector* out, Hash* hash, + const unsigned char* in, size_t inpos, size_t insize, unsigned windowsize, + unsigned minmatch, unsigned nicematch, unsigned lazymatching) { + size_t pos; + unsigned i, error = 0; + /*for large window lengths, assume the user wants no compression loss. Otherwise, max hash chain length speedup.*/ + unsigned maxchainlength = windowsize >= 8192 ? windowsize : windowsize / 8u; + unsigned maxlazymatch = windowsize >= 8192 ? MAX_SUPPORTED_DEFLATE_LENGTH : 64; + + unsigned usezeros = 1; /*not sure if setting it to false for windowsize < 8192 is better or worse*/ + unsigned numzeros = 0; + + unsigned offset; /*the offset represents the distance in LZ77 terminology*/ + unsigned length; + unsigned lazy = 0; + unsigned lazylength = 0, lazyoffset = 0; + unsigned hashval; + unsigned current_offset, current_length; + unsigned prev_offset; + const unsigned char *lastptr, *foreptr, *backptr; + unsigned hashpos; + + if(windowsize == 0 || windowsize > 32768) return 60; /*error: windowsize smaller/larger than allowed*/ + if((windowsize & (windowsize - 1)) != 0) return 90; /*error: must be power of two*/ + + if(nicematch > MAX_SUPPORTED_DEFLATE_LENGTH) nicematch = MAX_SUPPORTED_DEFLATE_LENGTH; + + for(pos = inpos; pos < insize; ++pos) { + size_t wpos = pos & (windowsize - 1); /*position for in 'circular' hash buffers*/ + unsigned chainlength = 0; + + hashval = getHash(in, insize, pos); + + if(usezeros && hashval == 0) { + if(numzeros == 0) numzeros = countZeros(in, insize, pos); + else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; + } else { + numzeros = 0; + } + + updateHashChain(hash, wpos, hashval, numzeros); + + /*the length and offset found for the current position*/ + length = 0; + offset = 0; + + hashpos = hash->chain[wpos]; + + lastptr = &in[insize < pos + MAX_SUPPORTED_DEFLATE_LENGTH ? insize : pos + MAX_SUPPORTED_DEFLATE_LENGTH]; + + /*search for the longest string*/ + prev_offset = 0; + for(;;) { + if(chainlength++ >= maxchainlength) break; + current_offset = (unsigned)(hashpos <= wpos ? wpos - hashpos : wpos - hashpos + windowsize); + + if(current_offset < prev_offset) break; /*stop when went completely around the circular buffer*/ + prev_offset = current_offset; + if(current_offset > 0) { + /*test the next characters*/ + foreptr = &in[pos]; + backptr = &in[pos - current_offset]; + + /*common case in PNGs is lots of zeros. Quickly skip over them as a speedup*/ + if(numzeros >= 3) { + unsigned skip = hash->zeros[hashpos]; + if(skip > numzeros) skip = numzeros; + backptr += skip; + foreptr += skip; + } + + while(foreptr != lastptr && *backptr == *foreptr) /*maximum supported length by deflate is max length*/ { + ++backptr; + ++foreptr; + } + current_length = (unsigned)(foreptr - &in[pos]); + + if(current_length > length) { + length = current_length; /*the longest length*/ + offset = current_offset; /*the offset that is related to this longest length*/ + /*jump out once a length of max length is found (speed gain). This also jumps + out if length is MAX_SUPPORTED_DEFLATE_LENGTH*/ + if(current_length >= nicematch) break; + } + } + + if(hashpos == hash->chain[hashpos]) break; + + if(numzeros >= 3 && length > numzeros) { + hashpos = hash->chainz[hashpos]; + if(hash->zeros[hashpos] != numzeros) break; + } else { + hashpos = hash->chain[hashpos]; + /*outdated hash value, happens if particular value was not encountered in whole last window*/ + if(hash->val[hashpos] != (int)hashval) break; + } + } + + if(lazymatching) { + if(!lazy && length >= 3 && length <= maxlazymatch && length < MAX_SUPPORTED_DEFLATE_LENGTH) { + lazy = 1; + lazylength = length; + lazyoffset = offset; + continue; /*try the next byte*/ + } + if(lazy) { + lazy = 0; + if(pos == 0) ERROR_BREAK(81); + if(length > lazylength + 1) { + /*push the previous character as literal*/ + if(!uivector_push_back(out, in[pos - 1])) ERROR_BREAK(83 /*alloc fail*/); + } else { + length = lazylength; + offset = lazyoffset; + hash->head[hashval] = -1; /*the same hashchain update will be done, this ensures no wrong alteration*/ + hash->headz[numzeros] = -1; /*idem*/ + --pos; + } + } + } + if(length >= 3 && offset > windowsize) ERROR_BREAK(86 /*too big (or overflown negative) offset*/); + + /*encode it as length/distance pair or literal value*/ + if(length < 3) /*only lengths of 3 or higher are supported as length/distance pair*/ { + if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); + } else if(length < minmatch || (length == 3 && offset > 4096)) { + /*compensate for the fact that longer offsets have more extra bits, a + length of only 3 may be not worth it then*/ + if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); + } else { + addLengthDistance(out, length, offset); + for(i = 1; i < length; ++i) { + ++pos; + wpos = pos & (windowsize - 1); + hashval = getHash(in, insize, pos); + if(usezeros && hashval == 0) { + if(numzeros == 0) numzeros = countZeros(in, insize, pos); + else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; + } else { + numzeros = 0; + } + updateHashChain(hash, wpos, hashval, numzeros); + } + } + } /*end of the loop through each character of input*/ + + return error; +} + +/* /////////////////////////////////////////////////////////////////////////// */ + +static unsigned deflateNoCompression(ucvector* out, const unsigned char* data, size_t datasize) { + /*non compressed deflate block data: 1 bit BFINAL,2 bits BTYPE,(5 bits): it jumps to start of next byte, + 2 bytes LEN, 2 bytes NLEN, LEN bytes literal DATA*/ + + size_t i, j, numdeflateblocks = (datasize + 65534u) / 65535u; + unsigned datapos = 0; + for(i = 0; i != numdeflateblocks; ++i) { + unsigned BFINAL, BTYPE, LEN, NLEN; + unsigned char firstbyte; + + BFINAL = (i == numdeflateblocks - 1); + BTYPE = 0; + + firstbyte = (unsigned char)(BFINAL + ((BTYPE & 1u) << 1u) + ((BTYPE & 2u) << 1u)); + ucvector_push_back(out, firstbyte); + + LEN = 65535; + if(datasize - datapos < 65535u) LEN = (unsigned)datasize - datapos; + NLEN = 65535 - LEN; + + ucvector_push_back(out, (unsigned char)(LEN & 255)); + ucvector_push_back(out, (unsigned char)(LEN >> 8u)); + ucvector_push_back(out, (unsigned char)(NLEN & 255)); + ucvector_push_back(out, (unsigned char)(NLEN >> 8u)); + + /*Decompressed data*/ + for(j = 0; j < 65535 && datapos < datasize; ++j) { + ucvector_push_back(out, data[datapos++]); + } + } + + return 0; +} + +/* +write the lz77-encoded data, which has lit, len and dist codes, to compressed stream using huffman trees. +tree_ll: the tree for lit and len codes. +tree_d: the tree for distance codes. +*/ +static void writeLZ77data(LodePNGBitWriter* writer, const uivector* lz77_encoded, + const HuffmanTree* tree_ll, const HuffmanTree* tree_d) { + size_t i = 0; + for(i = 0; i != lz77_encoded->size; ++i) { + unsigned val = lz77_encoded->data[i]; + writeBitsReversed(writer, HuffmanTree_getCode(tree_ll, val), HuffmanTree_getLength(tree_ll, val)); + if(val > 256) /*for a length code, 3 more things have to be added*/ { + unsigned length_index = val - FIRST_LENGTH_CODE_INDEX; + unsigned n_length_extra_bits = LENGTHEXTRA[length_index]; + unsigned length_extra_bits = lz77_encoded->data[++i]; + + unsigned distance_code = lz77_encoded->data[++i]; + + unsigned distance_index = distance_code; + unsigned n_distance_extra_bits = DISTANCEEXTRA[distance_index]; + unsigned distance_extra_bits = lz77_encoded->data[++i]; + + writeBits(writer, length_extra_bits, n_length_extra_bits); + writeBitsReversed(writer, HuffmanTree_getCode(tree_d, distance_code), + HuffmanTree_getLength(tree_d, distance_code)); + writeBits(writer, distance_extra_bits, n_distance_extra_bits); + } + } +} + +/*Deflate for a block of type "dynamic", that is, with freely, optimally, created huffman trees*/ +static unsigned deflateDynamic(LodePNGBitWriter* writer, Hash* hash, + const unsigned char* data, size_t datapos, size_t dataend, + const LodePNGCompressSettings* settings, unsigned final) { + unsigned error = 0; + + /* + A block is compressed as follows: The PNG data is lz77 encoded, resulting in + literal bytes and length/distance pairs. This is then huffman compressed with + two huffman trees. One huffman tree is used for the lit and len values ("ll"), + another huffman tree is used for the dist values ("d"). These two trees are + stored using their code lengths, and to compress even more these code lengths + are also run-length encoded and huffman compressed. This gives a huffman tree + of code lengths "cl". The code lengths used to describe this third tree are + the code length code lengths ("clcl"). + */ + + /*The lz77 encoded data, represented with integers since there will also be length and distance codes in it*/ + uivector lz77_encoded; + HuffmanTree tree_ll; /*tree for lit,len values*/ + HuffmanTree tree_d; /*tree for distance codes*/ + HuffmanTree tree_cl; /*tree for encoding the code lengths representing tree_ll and tree_d*/ + uivector frequencies_ll; /*frequency of lit,len codes*/ + uivector frequencies_d; /*frequency of dist codes*/ + uivector frequencies_cl; /*frequency of code length codes*/ + uivector bitlen_lld; /*lit,len,dist code lengths (int bits), literally (without repeat codes).*/ + uivector bitlen_lld_e; /*bitlen_lld encoded with repeat codes (this is a rudimentary run length compression)*/ + /*bitlen_cl is the code length code lengths ("clcl"). The bit lengths of codes to represent tree_cl + (these are written as is in the file, it would be crazy to compress these using yet another huffman + tree that needs to be represented by yet another set of code lengths)*/ + uivector bitlen_cl; + size_t datasize = dataend - datapos; + + /* + Due to the huffman compression of huffman tree representations ("two levels"), there are some analogies: + bitlen_lld is to tree_cl what data is to tree_ll and tree_d. + bitlen_lld_e is to bitlen_lld what lz77_encoded is to data. + bitlen_cl is to bitlen_lld_e what bitlen_lld is to lz77_encoded. + */ + + unsigned BFINAL = final; + size_t numcodes_ll, numcodes_d, i; + unsigned HLIT, HDIST, HCLEN; + + uivector_init(&lz77_encoded); + HuffmanTree_init(&tree_ll); + HuffmanTree_init(&tree_d); + HuffmanTree_init(&tree_cl); + uivector_init(&frequencies_ll); + uivector_init(&frequencies_d); + uivector_init(&frequencies_cl); + uivector_init(&bitlen_lld); + uivector_init(&bitlen_lld_e); + uivector_init(&bitlen_cl); + + /*This while loop never loops due to a break at the end, it is here to + allow breaking out of it to the cleanup phase on error conditions.*/ + while(!error) { + if(settings->use_lz77) { + error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize, + settings->minmatch, settings->nicematch, settings->lazymatching); + if(error) break; + } else { + if(!uivector_resize(&lz77_encoded, datasize)) ERROR_BREAK(83 /*alloc fail*/); + for(i = datapos; i < dataend; ++i) lz77_encoded.data[i - datapos] = data[i]; /*no LZ77, but still will be Huffman compressed*/ + } + + if(!uivector_resizev(&frequencies_ll, 286, 0)) ERROR_BREAK(83 /*alloc fail*/); + if(!uivector_resizev(&frequencies_d, 30, 0)) ERROR_BREAK(83 /*alloc fail*/); + + /*Count the frequencies of lit, len and dist codes*/ + for(i = 0; i != lz77_encoded.size; ++i) { + unsigned symbol = lz77_encoded.data[i]; + ++frequencies_ll.data[symbol]; + if(symbol > 256) { + unsigned dist = lz77_encoded.data[i + 2]; + ++frequencies_d.data[dist]; + i += 3; + } + } + frequencies_ll.data[256] = 1; /*there will be exactly 1 end code, at the end of the block*/ + + /*Make both huffman trees, one for the lit and len codes, one for the dist codes*/ + error = HuffmanTree_makeFromFrequencies(&tree_ll, frequencies_ll.data, 257, frequencies_ll.size, 15); + if(error) break; + /*2, not 1, is chosen for mincodes: some buggy PNG decoders require at least 2 symbols in the dist tree*/ + error = HuffmanTree_makeFromFrequencies(&tree_d, frequencies_d.data, 2, frequencies_d.size, 15); + if(error) break; + + numcodes_ll = tree_ll.numcodes; if(numcodes_ll > 286) numcodes_ll = 286; + numcodes_d = tree_d.numcodes; if(numcodes_d > 30) numcodes_d = 30; + /*store the code lengths of both generated trees in bitlen_lld*/ + for(i = 0; i != numcodes_ll; ++i) uivector_push_back(&bitlen_lld, HuffmanTree_getLength(&tree_ll, (unsigned)i)); + for(i = 0; i != numcodes_d; ++i) uivector_push_back(&bitlen_lld, HuffmanTree_getLength(&tree_d, (unsigned)i)); + + /*run-length compress bitlen_ldd into bitlen_lld_e by using repeat codes 16 (copy length 3-6 times), + 17 (3-10 zeroes), 18 (11-138 zeroes)*/ + for(i = 0; i != (unsigned)bitlen_lld.size; ++i) { + unsigned j = 0; /*amount of repetitions*/ + while(i + j + 1 < (unsigned)bitlen_lld.size && bitlen_lld.data[i + j + 1] == bitlen_lld.data[i]) ++j; + + if(bitlen_lld.data[i] == 0 && j >= 2) /*repeat code for zeroes*/ { + ++j; /*include the first zero*/ + if(j <= 10) /*repeat code 17 supports max 10 zeroes*/ { + uivector_push_back(&bitlen_lld_e, 17); + uivector_push_back(&bitlen_lld_e, j - 3); + } else /*repeat code 18 supports max 138 zeroes*/ { + if(j > 138) j = 138; + uivector_push_back(&bitlen_lld_e, 18); + uivector_push_back(&bitlen_lld_e, j - 11); + } + i += (j - 1); + } else if(j >= 3) /*repeat code for value other than zero*/ { + size_t k; + unsigned num = j / 6u, rest = j % 6u; + uivector_push_back(&bitlen_lld_e, bitlen_lld.data[i]); + for(k = 0; k < num; ++k) { + uivector_push_back(&bitlen_lld_e, 16); + uivector_push_back(&bitlen_lld_e, 6 - 3); + } + if(rest >= 3) { + uivector_push_back(&bitlen_lld_e, 16); + uivector_push_back(&bitlen_lld_e, rest - 3); + } + else j -= rest; + i += j; + } else /*too short to benefit from repeat code*/ { + uivector_push_back(&bitlen_lld_e, bitlen_lld.data[i]); + } + } + + /*generate tree_cl, the huffmantree of huffmantrees*/ + + if(!uivector_resizev(&frequencies_cl, NUM_CODE_LENGTH_CODES, 0)) ERROR_BREAK(83 /*alloc fail*/); + for(i = 0; i != bitlen_lld_e.size; ++i) { + ++frequencies_cl.data[bitlen_lld_e.data[i]]; + /*after a repeat code come the bits that specify the number of repetitions, + those don't need to be in the frequencies_cl calculation*/ + if(bitlen_lld_e.data[i] >= 16) ++i; + } + + error = HuffmanTree_makeFromFrequencies(&tree_cl, frequencies_cl.data, + frequencies_cl.size, frequencies_cl.size, 7); + if(error) break; + + if(!uivector_resize(&bitlen_cl, tree_cl.numcodes)) ERROR_BREAK(83 /*alloc fail*/); + for(i = 0; i != tree_cl.numcodes; ++i) { + /*lengths of code length tree is in the order as specified by deflate*/ + bitlen_cl.data[i] = HuffmanTree_getLength(&tree_cl, CLCL_ORDER[i]); + } + while(bitlen_cl.data[bitlen_cl.size - 1] == 0 && bitlen_cl.size > 4) { + /*remove zeros at the end, but minimum size must be 4*/ + if(!uivector_resize(&bitlen_cl, bitlen_cl.size - 1)) ERROR_BREAK(83 /*alloc fail*/); + } + if(error) break; + + /* + Write everything into the output + + After the BFINAL and BTYPE, the dynamic block consists out of the following: + - 5 bits HLIT, 5 bits HDIST, 4 bits HCLEN + - (HCLEN+4)*3 bits code lengths of code length alphabet + - HLIT + 257 code lengths of lit/length alphabet (encoded using the code length + alphabet, + possible repetition codes 16, 17, 18) + - HDIST + 1 code lengths of distance alphabet (encoded using the code length + alphabet, + possible repetition codes 16, 17, 18) + - compressed data + - 256 (end code) + */ + + /*Write block type*/ + writeBits(writer, BFINAL, 1); + writeBits(writer, 0, 1); /*first bit of BTYPE "dynamic"*/ + writeBits(writer, 1, 1); /*second bit of BTYPE "dynamic"*/ + + /*write the HLIT, HDIST and HCLEN values*/ + HLIT = (unsigned)(numcodes_ll - 257); + HDIST = (unsigned)(numcodes_d - 1); + HCLEN = (unsigned)bitlen_cl.size - 4; + /*trim zeroes for HCLEN. HLIT and HDIST were already trimmed at tree creation*/ + while(!bitlen_cl.data[HCLEN + 4 - 1] && HCLEN > 0) --HCLEN; + writeBits(writer, HLIT, 5); + writeBits(writer, HDIST, 5); + writeBits(writer, HCLEN, 4); + + /*write the code lengths of the code length alphabet*/ + for(i = 0; i != HCLEN + 4; ++i) writeBits(writer, bitlen_cl.data[i], 3); + + /*write the lengths of the lit/len AND the dist alphabet*/ + for(i = 0; i != bitlen_lld_e.size; ++i) { + writeBitsReversed(writer, HuffmanTree_getCode(&tree_cl, bitlen_lld_e.data[i]), + HuffmanTree_getLength(&tree_cl, bitlen_lld_e.data[i])); + /*extra bits of repeat codes*/ + if(bitlen_lld_e.data[i] == 16) writeBits(writer, bitlen_lld_e.data[++i], 2); + else if(bitlen_lld_e.data[i] == 17) writeBits(writer, bitlen_lld_e.data[++i], 3); + else if(bitlen_lld_e.data[i] == 18) writeBits(writer, bitlen_lld_e.data[++i], 7); + } + + /*write the compressed data symbols*/ + writeLZ77data(writer, &lz77_encoded, &tree_ll, &tree_d); + /*error: the length of the end code 256 must be larger than 0*/ + if(HuffmanTree_getLength(&tree_ll, 256) == 0) ERROR_BREAK(64); + + /*write the end code*/ + writeBitsReversed(writer, HuffmanTree_getCode(&tree_ll, 256), HuffmanTree_getLength(&tree_ll, 256)); + + break; /*end of error-while*/ + } + + /*cleanup*/ + uivector_cleanup(&lz77_encoded); + HuffmanTree_cleanup(&tree_ll); + HuffmanTree_cleanup(&tree_d); + HuffmanTree_cleanup(&tree_cl); + uivector_cleanup(&frequencies_ll); + uivector_cleanup(&frequencies_d); + uivector_cleanup(&frequencies_cl); + uivector_cleanup(&bitlen_lld_e); + uivector_cleanup(&bitlen_lld); + uivector_cleanup(&bitlen_cl); + + return error; +} + +static unsigned deflateFixed(LodePNGBitWriter* writer, Hash* hash, + const unsigned char* data, + size_t datapos, size_t dataend, + const LodePNGCompressSettings* settings, unsigned final) { + HuffmanTree tree_ll; /*tree for literal values and length codes*/ + HuffmanTree tree_d; /*tree for distance codes*/ + + unsigned BFINAL = final; + unsigned error = 0; + size_t i; + + HuffmanTree_init(&tree_ll); + HuffmanTree_init(&tree_d); + + generateFixedLitLenTree(&tree_ll); + generateFixedDistanceTree(&tree_d); + + writeBits(writer, BFINAL, 1); + writeBits(writer, 1, 1); /*first bit of BTYPE*/ + writeBits(writer, 0, 1); /*second bit of BTYPE*/ + + if(settings->use_lz77) /*LZ77 encoded*/ { + uivector lz77_encoded; + uivector_init(&lz77_encoded); + error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize, + settings->minmatch, settings->nicematch, settings->lazymatching); + if(!error) writeLZ77data(writer, &lz77_encoded, &tree_ll, &tree_d); + uivector_cleanup(&lz77_encoded); + } else /*no LZ77, but still will be Huffman compressed*/ { + for(i = datapos; i < dataend; ++i) { + writeBitsReversed(writer, HuffmanTree_getCode(&tree_ll, data[i]), HuffmanTree_getLength(&tree_ll, data[i])); + } + } + /*add END code*/ + if(!error) writeBitsReversed(writer, HuffmanTree_getCode(&tree_ll, 256), HuffmanTree_getLength(&tree_ll, 256)); + + /*cleanup*/ + HuffmanTree_cleanup(&tree_ll); + HuffmanTree_cleanup(&tree_d); + + return error; +} + +static unsigned lodepng_deflatev(ucvector* out, const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings) { + unsigned error = 0; + size_t i, blocksize, numdeflateblocks; + Hash hash; + LodePNGBitWriter writer; + + LodePNGBitWriter_init(&writer, out); + + if(settings->btype > 2) return 61; + else if(settings->btype == 0) return deflateNoCompression(out, in, insize); + else if(settings->btype == 1) blocksize = insize; + else /*if(settings->btype == 2)*/ { + /*on PNGs, deflate blocks of 65-262k seem to give most dense encoding*/ + blocksize = insize / 8u + 8; + if(blocksize < 65536) blocksize = 65536; + if(blocksize > 262144) blocksize = 262144; + } + + numdeflateblocks = (insize + blocksize - 1) / blocksize; + if(numdeflateblocks == 0) numdeflateblocks = 1; + + error = hash_init(&hash, settings->windowsize); + if(error) return error; + + for(i = 0; i != numdeflateblocks && !error; ++i) { + unsigned final = (i == numdeflateblocks - 1); + size_t start = i * blocksize; + size_t end = start + blocksize; + if(end > insize) end = insize; + + if(settings->btype == 1) error = deflateFixed(&writer, &hash, in, start, end, settings, final); + else if(settings->btype == 2) error = deflateDynamic(&writer, &hash, in, start, end, settings, final); + } + + hash_cleanup(&hash); + + return error; +} + +unsigned lodepng_deflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings) { + unsigned error; + ucvector v; + ucvector_init_buffer(&v, *out, *outsize); + error = lodepng_deflatev(&v, in, insize, settings); + *out = v.data; + *outsize = v.size; + return error; +} + +static unsigned deflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings) { + if(settings->custom_deflate) { + return settings->custom_deflate(out, outsize, in, insize, settings); + } else { + return lodepng_deflate(out, outsize, in, insize, settings); + } +} + +#endif /*LODEPNG_COMPILE_DECODER*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Adler32 / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +static unsigned update_adler32(unsigned adler, const unsigned char* data, unsigned len) { + unsigned s1 = adler & 0xffffu; + unsigned s2 = (adler >> 16u) & 0xffffu; + + while(len != 0u) { + unsigned i; + /*at least 5552 sums can be done before the sums overflow, saving a lot of module divisions*/ + unsigned amount = len > 5552u ? 5552u : len; + len -= amount; + for(i = 0; i != amount; ++i) { + s1 += (*data++); + s2 += s1; + } + s1 %= 65521u; + s2 %= 65521u; + } + + return (s2 << 16u) | s1; +} + +/*Return the adler32 of the bytes data[0..len-1]*/ +static unsigned adler32(const unsigned char* data, unsigned len) { + return update_adler32(1u, data, len); +} + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Zlib / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_DECODER + +unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGDecompressSettings* settings) { + unsigned error = 0; + unsigned CM, CINFO, FDICT; + + if(insize < 2) return 53; /*error, size of zlib data too small*/ + /*read information from zlib header*/ + if((in[0] * 256 + in[1]) % 31 != 0) { + /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/ + return 24; + } + + CM = in[0] & 15; + CINFO = (in[0] >> 4) & 15; + /*FCHECK = in[1] & 31;*/ /*FCHECK is already tested above*/ + FDICT = (in[1] >> 5) & 1; + /*FLEVEL = (in[1] >> 6) & 3;*/ /*FLEVEL is not used here*/ + + if(CM != 8 || CINFO > 7) { + /*error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec*/ + return 25; + } + if(FDICT != 0) { + /*error: the specification of PNG says about the zlib stream: + "The additional flags shall not specify a preset dictionary."*/ + return 26; + } + + error = inflate(out, outsize, in + 2, insize - 2, settings); + if(error) return error; + + if(!settings->ignore_adler32) { + unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]); + unsigned checksum = adler32(*out, (unsigned)(*outsize)); + if(checksum != ADLER32) return 58; /*error, adler checksum not correct, data must be corrupted*/ + } + + return 0; /*no error*/ +} + +static unsigned zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGDecompressSettings* settings) { + if(settings->custom_zlib) { + return settings->custom_zlib(out, outsize, in, insize, settings); + } else { + return lodepng_zlib_decompress(out, outsize, in, insize, settings); + } +} + +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER + +unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGCompressSettings* settings) { + size_t i; + unsigned error; + unsigned char* deflatedata = 0; + size_t deflatesize = 0; + + error = deflate(&deflatedata, &deflatesize, in, insize, settings); + + *out = NULL; + *outsize = 0; + if(!error) { + *outsize = deflatesize + 6; + *out = (unsigned char*)lodepng_malloc(*outsize); + if(!*out) error = 83; /*alloc fail*/ + } + + if(!error) { + unsigned ADLER32 = adler32(in, (unsigned)insize); + /*zlib data: 1 byte CMF (CM+CINFO), 1 byte FLG, deflate data, 4 byte ADLER32 checksum of the Decompressed data*/ + unsigned CMF = 120; /*0b01111000: CM 8, CINFO 7. With CINFO 7, any window size up to 32768 can be used.*/ + unsigned FLEVEL = 0; + unsigned FDICT = 0; + unsigned CMFFLG = 256 * CMF + FDICT * 32 + FLEVEL * 64; + unsigned FCHECK = 31 - CMFFLG % 31; + CMFFLG += FCHECK; + + (*out)[0] = (unsigned char)(CMFFLG >> 8); + (*out)[1] = (unsigned char)(CMFFLG & 255); + for(i = 0; i != deflatesize; ++i) (*out)[i + 2] = deflatedata[i]; + lodepng_set32bitInt(&(*out)[*outsize - 4], ADLER32); + } + + lodepng_free(deflatedata); + return error; +} + +/* compress using the default or custom zlib function */ +static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGCompressSettings* settings) { + if(settings->custom_zlib) { + return settings->custom_zlib(out, outsize, in, insize, settings); + } else { + return lodepng_zlib_compress(out, outsize, in, insize, settings); + } +} + +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#else /*no LODEPNG_COMPILE_ZLIB*/ + +#ifdef LODEPNG_COMPILE_DECODER +static unsigned zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGDecompressSettings* settings) { + if(!settings->custom_zlib) return 87; /*no custom zlib function provided */ + return settings->custom_zlib(out, outsize, in, insize, settings); +} +#endif /*LODEPNG_COMPILE_DECODER*/ +#ifdef LODEPNG_COMPILE_ENCODER +static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGCompressSettings* settings) { + if(!settings->custom_zlib) return 87; /*no custom zlib function provided */ + return settings->custom_zlib(out, outsize, in, insize, settings); +} +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#endif /*LODEPNG_COMPILE_ZLIB*/ + +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_ENCODER + +/*this is a good tradeoff between speed and compression ratio*/ +#define DEFAULT_WINDOWSIZE 2048 + +void lodepng_compress_settings_init(LodePNGCompressSettings* settings) { + /*compress with dynamic huffman tree (not in the mathematical sense, just not the predefined one)*/ + settings->btype = 2; + settings->use_lz77 = 1; + settings->windowsize = DEFAULT_WINDOWSIZE; + settings->minmatch = 3; + settings->nicematch = 128; + settings->lazymatching = 1; + + settings->custom_zlib = 0; + settings->custom_deflate = 0; + settings->custom_context = 0; +} + +const LodePNGCompressSettings lodepng_default_compress_settings = {2, 1, DEFAULT_WINDOWSIZE, 3, 128, 1, 0, 0, 0}; + + +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#ifdef LODEPNG_COMPILE_DECODER + +void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings) { + settings->ignore_adler32 = 0; + settings->ignore_nlen = 0; + + settings->custom_zlib = 0; + settings->custom_inflate = 0; + settings->custom_context = 0; +} + +const LodePNGDecompressSettings lodepng_default_decompress_settings = {0, 0, 0, 0, 0}; + +#endif /*LODEPNG_COMPILE_DECODER*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* // End of Zlib related code. Begin of PNG related code. // */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_PNG + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / CRC32 / */ +/* ////////////////////////////////////////////////////////////////////////// */ + + +#ifndef LODEPNG_NO_COMPILE_CRC +/* CRC polynomial: 0xedb88320 */ +static unsigned lodepng_crc32_table[256] = { + 0u, 1996959894u, 3993919788u, 2567524794u, 124634137u, 1886057615u, 3915621685u, 2657392035u, + 249268274u, 2044508324u, 3772115230u, 2547177864u, 162941995u, 2125561021u, 3887607047u, 2428444049u, + 498536548u, 1789927666u, 4089016648u, 2227061214u, 450548861u, 1843258603u, 4107580753u, 2211677639u, + 325883990u, 1684777152u, 4251122042u, 2321926636u, 335633487u, 1661365465u, 4195302755u, 2366115317u, + 997073096u, 1281953886u, 3579855332u, 2724688242u, 1006888145u, 1258607687u, 3524101629u, 2768942443u, + 901097722u, 1119000684u, 3686517206u, 2898065728u, 853044451u, 1172266101u, 3705015759u, 2882616665u, + 651767980u, 1373503546u, 3369554304u, 3218104598u, 565507253u, 1454621731u, 3485111705u, 3099436303u, + 671266974u, 1594198024u, 3322730930u, 2970347812u, 795835527u, 1483230225u, 3244367275u, 3060149565u, + 1994146192u, 31158534u, 2563907772u, 4023717930u, 1907459465u, 112637215u, 2680153253u, 3904427059u, + 2013776290u, 251722036u, 2517215374u, 3775830040u, 2137656763u, 141376813u, 2439277719u, 3865271297u, + 1802195444u, 476864866u, 2238001368u, 4066508878u, 1812370925u, 453092731u, 2181625025u, 4111451223u, + 1706088902u, 314042704u, 2344532202u, 4240017532u, 1658658271u, 366619977u, 2362670323u, 4224994405u, + 1303535960u, 984961486u, 2747007092u, 3569037538u, 1256170817u, 1037604311u, 2765210733u, 3554079995u, + 1131014506u, 879679996u, 2909243462u, 3663771856u, 1141124467u, 855842277u, 2852801631u, 3708648649u, + 1342533948u, 654459306u, 3188396048u, 3373015174u, 1466479909u, 544179635u, 3110523913u, 3462522015u, + 1591671054u, 702138776u, 2966460450u, 3352799412u, 1504918807u, 783551873u, 3082640443u, 3233442989u, + 3988292384u, 2596254646u, 62317068u, 1957810842u, 3939845945u, 2647816111u, 81470997u, 1943803523u, + 3814918930u, 2489596804u, 225274430u, 2053790376u, 3826175755u, 2466906013u, 167816743u, 2097651377u, + 4027552580u, 2265490386u, 503444072u, 1762050814u, 4150417245u, 2154129355u, 426522225u, 1852507879u, + 4275313526u, 2312317920u, 282753626u, 1742555852u, 4189708143u, 2394877945u, 397917763u, 1622183637u, + 3604390888u, 2714866558u, 953729732u, 1340076626u, 3518719985u, 2797360999u, 1068828381u, 1219638859u, + 3624741850u, 2936675148u, 906185462u, 1090812512u, 3747672003u, 2825379669u, 829329135u, 1181335161u, + 3412177804u, 3160834842u, 628085408u, 1382605366u, 3423369109u, 3138078467u, 570562233u, 1426400815u, + 3317316542u, 2998733608u, 733239954u, 1555261956u, 3268935591u, 3050360625u, 752459403u, 1541320221u, + 2607071920u, 3965973030u, 1969922972u, 40735498u, 2617837225u, 3943577151u, 1913087877u, 83908371u, + 2512341634u, 3803740692u, 2075208622u, 213261112u, 2463272603u, 3855990285u, 2094854071u, 198958881u, + 2262029012u, 4057260610u, 1759359992u, 534414190u, 2176718541u, 4139329115u, 1873836001u, 414664567u, + 2282248934u, 4279200368u, 1711684554u, 285281116u, 2405801727u, 4167216745u, 1634467795u, 376229701u, + 2685067896u, 3608007406u, 1308918612u, 956543938u, 2808555105u, 3495958263u, 1231636301u, 1047427035u, + 2932959818u, 3654703836u, 1088359270u, 936918000u, 2847714899u, 3736837829u, 1202900863u, 817233897u, + 3183342108u, 3401237130u, 1404277552u, 615818150u, 3134207493u, 3453421203u, 1423857449u, 601450431u, + 3009837614u, 3294710456u, 1567103746u, 711928724u, 3020668471u, 3272380065u, 1510334235u, 755167117u +}; + +/*Return the CRC of the bytes buf[0..len-1].*/ +unsigned lodepng_crc32(const unsigned char* data, size_t length) { + unsigned r = 0xffffffffu; + size_t i; + for(i = 0; i < length; ++i) { + r = lodepng_crc32_table[(r ^ data[i]) & 0xffu] ^ (r >> 8u); + } + return r ^ 0xffffffffu; +} +#else /* !LODEPNG_NO_COMPILE_CRC */ +unsigned lodepng_crc32(const unsigned char* data, size_t length); +#endif /* !LODEPNG_NO_COMPILE_CRC */ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Reading and writing PNG color channel bits / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/* The color channel bits of less-than-8-bit pixels are read with the MSB of bytes first, +so LodePNGBitWriter and LodePNGBitReader can't be used for those. */ + +static unsigned char readBitFromReversedStream(size_t* bitpointer, const unsigned char* bitstream) { + unsigned char result = (unsigned char)((bitstream[(*bitpointer) >> 3] >> (7 - ((*bitpointer) & 0x7))) & 1); + ++(*bitpointer); + return result; +} + +/* TODO: make this faster */ +static unsigned readBitsFromReversedStream(size_t* bitpointer, const unsigned char* bitstream, size_t nbits) { + unsigned result = 0; + size_t i; + for(i = 0 ; i < nbits; ++i) { + result <<= 1u; + result |= (unsigned)readBitFromReversedStream(bitpointer, bitstream); + } + return result; +} + +static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bitstream, unsigned char bit) { + /*the current bit in bitstream may be 0 or 1 for this to work*/ + if(bit == 0) bitstream[(*bitpointer) >> 3u] &= (unsigned char)(~(1u << (7u - ((*bitpointer) & 7u)))); + else bitstream[(*bitpointer) >> 3u] |= (1u << (7u - ((*bitpointer) & 7u))); + ++(*bitpointer); +} + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / PNG chunks / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +unsigned lodepng_chunk_length(const unsigned char* chunk) { + return lodepng_read32bitInt(&chunk[0]); +} + +void lodepng_chunk_type(char type[5], const unsigned char* chunk) { + unsigned i; + for(i = 0; i != 4; ++i) type[i] = (char)chunk[4 + i]; + type[4] = 0; /*null termination char*/ +} + +unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type) { + if(lodepng_strlen(type) != 4) return 0; + return (chunk[4] == type[0] && chunk[5] == type[1] && chunk[6] == type[2] && chunk[7] == type[3]); +} + +unsigned char lodepng_chunk_ancillary(const unsigned char* chunk) { + return((chunk[4] & 32) != 0); +} + +unsigned char lodepng_chunk_private(const unsigned char* chunk) { + return((chunk[6] & 32) != 0); +} + +unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk) { + return((chunk[7] & 32) != 0); +} + +unsigned char* lodepng_chunk_data(unsigned char* chunk) { + return &chunk[8]; +} + +const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk) { + return &chunk[8]; +} + +unsigned lodepng_chunk_check_crc(const unsigned char* chunk) { + unsigned length = lodepng_chunk_length(chunk); + unsigned CRC = lodepng_read32bitInt(&chunk[length + 8]); + /*the CRC is taken of the data and the 4 chunk type letters, not the length*/ + unsigned checksum = lodepng_crc32(&chunk[4], length + 4); + if(CRC != checksum) return 1; + else return 0; +} + +void lodepng_chunk_generate_crc(unsigned char* chunk) { + unsigned length = lodepng_chunk_length(chunk); + unsigned CRC = lodepng_crc32(&chunk[4], length + 4); + lodepng_set32bitInt(chunk + 8 + length, CRC); +} + +unsigned char* lodepng_chunk_next(unsigned char* chunk) { + if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47 + && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) { + /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */ + return chunk + 8; + } else { + unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12; + return chunk + total_chunk_length; + } +} + +const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk) { + if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47 + && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) { + /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */ + return chunk + 8; + } else { + unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12; + return chunk + total_chunk_length; + } +} + +unsigned char* lodepng_chunk_find(unsigned char* chunk, const unsigned char* end, const char type[5]) { + for(;;) { + if(chunk + 12 >= end) return 0; + if(lodepng_chunk_type_equals(chunk, type)) return chunk; + chunk = lodepng_chunk_next(chunk); + } +} + +const unsigned char* lodepng_chunk_find_const(const unsigned char* chunk, const unsigned char* end, const char type[5]) { + for(;;) { + if(chunk + 12 >= end) return 0; + if(lodepng_chunk_type_equals(chunk, type)) return chunk; + chunk = lodepng_chunk_next_const(chunk); + } +} + +unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk) { + unsigned i; + unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12; + unsigned char *chunk_start, *new_buffer; + size_t new_length = (*outlength) + total_chunk_length; + if(new_length < total_chunk_length || new_length < (*outlength)) return 77; /*integer overflow happened*/ + + new_buffer = (unsigned char*)lodepng_realloc(*out, new_length); + if(!new_buffer) return 83; /*alloc fail*/ + (*out) = new_buffer; + (*outlength) = new_length; + chunk_start = &(*out)[new_length - total_chunk_length]; + + for(i = 0; i != total_chunk_length; ++i) chunk_start[i] = chunk[i]; + + return 0; +} + +unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length, + const char* type, const unsigned char* data) { + unsigned i; + unsigned char *chunk, *new_buffer; + size_t new_length = (*outlength) + length + 12; + if(new_length < length + 12 || new_length < (*outlength)) return 77; /*integer overflow happened*/ + new_buffer = (unsigned char*)lodepng_realloc(*out, new_length); + if(!new_buffer) return 83; /*alloc fail*/ + (*out) = new_buffer; + (*outlength) = new_length; + chunk = &(*out)[(*outlength) - length - 12]; + + /*1: length*/ + lodepng_set32bitInt(chunk, (unsigned)length); + + /*2: chunk name (4 letters)*/ + chunk[4] = (unsigned char)type[0]; + chunk[5] = (unsigned char)type[1]; + chunk[6] = (unsigned char)type[2]; + chunk[7] = (unsigned char)type[3]; + + /*3: the data*/ + for(i = 0; i != length; ++i) chunk[8 + i] = data[i]; + + /*4: CRC (of the chunkname characters and the data)*/ + lodepng_chunk_generate_crc(chunk); + + return 0; +} + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Color types, channels, bits / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*checks if the colortype is valid and the bitdepth bd is allowed for this colortype. +Return value is a LodePNG error code.*/ +static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) { + switch(colortype) { + case LCT_GREY: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break; + case LCT_RGB: if(!( bd == 8 || bd == 16)) return 37; break; + case LCT_PALETTE: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 )) return 37; break; + case LCT_GREY_ALPHA: if(!( bd == 8 || bd == 16)) return 37; break; + case LCT_RGBA: if(!( bd == 8 || bd == 16)) return 37; break; + default: return 31; /* invalid color type */ + } + return 0; /*allowed color type / bits combination*/ +} + +static unsigned getNumColorChannels(LodePNGColorType colortype) { + switch(colortype) { + case LCT_GREY: return 1; + case LCT_RGB: return 3; + case LCT_PALETTE: return 1; + case LCT_GREY_ALPHA: return 2; + case LCT_RGBA: return 4; + default: return 0; /*invalid color type*/ + } +} + +static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth) { + /*bits per pixel is amount of channels * bits per channel*/ + return getNumColorChannels(colortype) * bitdepth; +} + +/* ////////////////////////////////////////////////////////////////////////// */ + +void lodepng_color_mode_init(LodePNGColorMode* info) { + info->key_defined = 0; + info->key_r = info->key_g = info->key_b = 0; + info->colortype = LCT_RGBA; + info->bitdepth = 8; + info->palette = 0; + info->palettesize = 0; +} + +void lodepng_color_mode_alloc_palette(LodePNGColorMode* info) { + size_t i; + /*room for 256 colors with 4 bytes each. Using realloc to avoid leak if it is being overwritten*/ + info->palette = (unsigned char*)lodepng_realloc(info->palette, 1024); + if(!info->palette) return; /*alloc fail*/ + for(i = 0; i != 256; ++i) { + /*Initialize all unused colors with black, the value used for invalid palette indices. + This is an error according to the PNG spec, but common PNG decoders make it black instead. + That makes color conversion slightly faster due to no error handling needed.*/ + info->palette[i * 4 + 0] = 0; + info->palette[i * 4 + 1] = 0; + info->palette[i * 4 + 2] = 0; + info->palette[i * 4 + 3] = 255; + } +} + +void lodepng_color_mode_cleanup(LodePNGColorMode* info) { + lodepng_palette_clear(info); +} + +unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source) { + size_t i; + lodepng_color_mode_cleanup(dest); + *dest = *source; + if(source->palette) { + dest->palette = (unsigned char*)lodepng_malloc(1024); + if(!dest->palette && source->palettesize) return 83; /*alloc fail*/ + for(i = 0; i != source->palettesize * 4; ++i) dest->palette[i] = source->palette[i]; + } + return 0; +} + +LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype, unsigned bitdepth) { + LodePNGColorMode result; + lodepng_color_mode_init(&result); + result.colortype = colortype; + result.bitdepth = bitdepth; + return result; +} + +static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColorMode* b) { + size_t i; + if(a->colortype != b->colortype) return 0; + if(a->bitdepth != b->bitdepth) return 0; + if(a->key_defined != b->key_defined) return 0; + if(a->key_defined) { + if(a->key_r != b->key_r) return 0; + if(a->key_g != b->key_g) return 0; + if(a->key_b != b->key_b) return 0; + } + if(a->palettesize != b->palettesize) return 0; + for(i = 0; i != a->palettesize * 4; ++i) { + if(a->palette[i] != b->palette[i]) return 0; + } + return 1; +} + +void lodepng_palette_clear(LodePNGColorMode* info) { + if(info->palette) lodepng_free(info->palette); + info->palette = 0; + info->palettesize = 0; +} + +unsigned lodepng_palette_add(LodePNGColorMode* info, + unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + if(!info->palette) /*allocate palette if empty*/ { + lodepng_color_mode_alloc_palette(info); + if(!info->palette) return 83; /*alloc fail*/ + } + if(info->palettesize >= 256) { + return 108; /*too many palette values*/ + } + info->palette[4 * info->palettesize + 0] = r; + info->palette[4 * info->palettesize + 1] = g; + info->palette[4 * info->palettesize + 2] = b; + info->palette[4 * info->palettesize + 3] = a; + ++info->palettesize; + return 0; +} + +/*calculate bits per pixel out of colortype and bitdepth*/ +unsigned lodepng_get_bpp(const LodePNGColorMode* info) { + return lodepng_get_bpp_lct(info->colortype, info->bitdepth); +} + +unsigned lodepng_get_channels(const LodePNGColorMode* info) { + return getNumColorChannels(info->colortype); +} + +unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info) { + return info->colortype == LCT_GREY || info->colortype == LCT_GREY_ALPHA; +} + +unsigned lodepng_is_alpha_type(const LodePNGColorMode* info) { + return (info->colortype & 4) != 0; /*4 or 6*/ +} + +unsigned lodepng_is_palette_type(const LodePNGColorMode* info) { + return info->colortype == LCT_PALETTE; +} + +unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info) { + size_t i; + for(i = 0; i != info->palettesize; ++i) { + if(info->palette[i * 4 + 3] < 255) return 1; + } + return 0; +} + +unsigned lodepng_can_have_alpha(const LodePNGColorMode* info) { + return info->key_defined + || lodepng_is_alpha_type(info) + || lodepng_has_palette_alpha(info); +} + +static size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { + size_t bpp = lodepng_get_bpp_lct(colortype, bitdepth); + size_t n = (size_t)w * (size_t)h; + return ((n / 8u) * bpp) + ((n & 7u) * bpp + 7u) / 8u; +} + +size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color) { + return lodepng_get_raw_size_lct(w, h, color->colortype, color->bitdepth); +} + + +#ifdef LODEPNG_COMPILE_PNG +#ifdef LODEPNG_COMPILE_DECODER + +/*in an idat chunk, each scanline is a multiple of 8 bits, unlike the lodepng output buffer, +and in addition has one extra byte per line: the filter byte. So this gives a larger +result than lodepng_get_raw_size. */ +static size_t lodepng_get_raw_size_idat(unsigned w, unsigned h, const LodePNGColorMode* color) { + size_t bpp = lodepng_get_bpp(color); + /* + 1 for the filter byte, and possibly plus padding bits per line */ + size_t line = ((size_t)(w / 8u) * bpp) + 1u + ((w & 7u) * bpp + 7u) / 8u; + return (size_t)h * line; +} + +/*Safely checks whether size_t overflow can be caused due to amount of pixels. +This check is overcautious rather than precise. If this check indicates no overflow, +you can safely compute in a size_t (but not an unsigned): +-(size_t)w * (size_t)h * 8 +-amount of bytes in IDAT (including filter, padding and Adam7 bytes) +-amount of bytes in raw color model +Returns 1 if overflow possible, 0 if not. +*/ +static int lodepng_pixel_overflow(unsigned w, unsigned h, + const LodePNGColorMode* pngcolor, const LodePNGColorMode* rawcolor) { + size_t bpp = LODEPNG_MAX(lodepng_get_bpp(pngcolor), lodepng_get_bpp(rawcolor)); + size_t numpixels, total; + size_t line; /* bytes per line in worst case */ + + if(lodepng_mulofl((size_t)w, (size_t)h, &numpixels)) return 1; + if(lodepng_mulofl(numpixels, 8, &total)) return 1; /* bit pointer with 8-bit color, or 8 bytes per channel color */ + + /* Bytes per scanline with the expression "(w / 8u) * bpp) + ((w & 7u) * bpp + 7u) / 8u" */ + if(lodepng_mulofl((size_t)(w / 8u), bpp, &line)) return 1; + if(lodepng_addofl(line, ((w & 7u) * bpp + 7u) / 8u, &line)) return 1; + + if(lodepng_addofl(line, 5, &line)) return 1; /* 5 bytes overhead per line: 1 filterbyte, 4 for Adam7 worst case */ + if(lodepng_mulofl(line, h, &total)) return 1; /* Total bytes in worst case */ + + return 0; /* no overflow */ +} +#endif /*LODEPNG_COMPILE_DECODER*/ +#endif /*LODEPNG_COMPILE_PNG*/ + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + +static void LodePNGUnknownChunks_init(LodePNGInfo* info) { + unsigned i; + for(i = 0; i != 3; ++i) info->unknown_chunks_data[i] = 0; + for(i = 0; i != 3; ++i) info->unknown_chunks_size[i] = 0; +} + +static void LodePNGUnknownChunks_cleanup(LodePNGInfo* info) { + unsigned i; + for(i = 0; i != 3; ++i) lodepng_free(info->unknown_chunks_data[i]); +} + +static unsigned LodePNGUnknownChunks_copy(LodePNGInfo* dest, const LodePNGInfo* src) { + unsigned i; + + LodePNGUnknownChunks_cleanup(dest); + + for(i = 0; i != 3; ++i) { + size_t j; + dest->unknown_chunks_size[i] = src->unknown_chunks_size[i]; + dest->unknown_chunks_data[i] = (unsigned char*)lodepng_malloc(src->unknown_chunks_size[i]); + if(!dest->unknown_chunks_data[i] && dest->unknown_chunks_size[i]) return 83; /*alloc fail*/ + for(j = 0; j < src->unknown_chunks_size[i]; ++j) { + dest->unknown_chunks_data[i][j] = src->unknown_chunks_data[i][j]; + } + } + + return 0; +} + +/******************************************************************************/ + +static void LodePNGText_init(LodePNGInfo* info) { + info->text_num = 0; + info->text_keys = NULL; + info->text_strings = NULL; +} + +static void LodePNGText_cleanup(LodePNGInfo* info) { + size_t i; + for(i = 0; i != info->text_num; ++i) { + string_cleanup(&info->text_keys[i]); + string_cleanup(&info->text_strings[i]); + } + lodepng_free(info->text_keys); + lodepng_free(info->text_strings); +} + +static unsigned LodePNGText_copy(LodePNGInfo* dest, const LodePNGInfo* source) { + size_t i = 0; + dest->text_keys = 0; + dest->text_strings = 0; + dest->text_num = 0; + for(i = 0; i != source->text_num; ++i) { + CERROR_TRY_RETURN(lodepng_add_text(dest, source->text_keys[i], source->text_strings[i])); + } + return 0; +} + +void lodepng_clear_text(LodePNGInfo* info) { + LodePNGText_cleanup(info); +} + +unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str) { + char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1))); + char** new_strings = (char**)(lodepng_realloc(info->text_strings, sizeof(char*) * (info->text_num + 1))); + if(!new_keys || !new_strings) { + lodepng_free(new_keys); + lodepng_free(new_strings); + return 83; /*alloc fail*/ + } + + ++info->text_num; + info->text_keys = new_keys; + info->text_strings = new_strings; + + info->text_keys[info->text_num - 1] = alloc_string(key); + info->text_strings[info->text_num - 1] = alloc_string(str); + + return 0; +} + +/******************************************************************************/ + +static void LodePNGIText_init(LodePNGInfo* info) { + info->itext_num = 0; + info->itext_keys = NULL; + info->itext_langtags = NULL; + info->itext_transkeys = NULL; + info->itext_strings = NULL; +} + +static void LodePNGIText_cleanup(LodePNGInfo* info) { + size_t i; + for(i = 0; i != info->itext_num; ++i) { + string_cleanup(&info->itext_keys[i]); + string_cleanup(&info->itext_langtags[i]); + string_cleanup(&info->itext_transkeys[i]); + string_cleanup(&info->itext_strings[i]); + } + lodepng_free(info->itext_keys); + lodepng_free(info->itext_langtags); + lodepng_free(info->itext_transkeys); + lodepng_free(info->itext_strings); +} + +static unsigned LodePNGIText_copy(LodePNGInfo* dest, const LodePNGInfo* source) { + size_t i = 0; + dest->itext_keys = 0; + dest->itext_langtags = 0; + dest->itext_transkeys = 0; + dest->itext_strings = 0; + dest->itext_num = 0; + for(i = 0; i != source->itext_num; ++i) { + CERROR_TRY_RETURN(lodepng_add_itext(dest, source->itext_keys[i], source->itext_langtags[i], + source->itext_transkeys[i], source->itext_strings[i])); + } + return 0; +} + +void lodepng_clear_itext(LodePNGInfo* info) { + LodePNGIText_cleanup(info); +} + +unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, + const char* transkey, const char* str) { + char** new_keys = (char**)(lodepng_realloc(info->itext_keys, sizeof(char*) * (info->itext_num + 1))); + char** new_langtags = (char**)(lodepng_realloc(info->itext_langtags, sizeof(char*) * (info->itext_num + 1))); + char** new_transkeys = (char**)(lodepng_realloc(info->itext_transkeys, sizeof(char*) * (info->itext_num + 1))); + char** new_strings = (char**)(lodepng_realloc(info->itext_strings, sizeof(char*) * (info->itext_num + 1))); + if(!new_keys || !new_langtags || !new_transkeys || !new_strings) { + lodepng_free(new_keys); + lodepng_free(new_langtags); + lodepng_free(new_transkeys); + lodepng_free(new_strings); + return 83; /*alloc fail*/ + } + + ++info->itext_num; + info->itext_keys = new_keys; + info->itext_langtags = new_langtags; + info->itext_transkeys = new_transkeys; + info->itext_strings = new_strings; + + info->itext_keys[info->itext_num - 1] = alloc_string(key); + info->itext_langtags[info->itext_num - 1] = alloc_string(langtag); + info->itext_transkeys[info->itext_num - 1] = alloc_string(transkey); + info->itext_strings[info->itext_num - 1] = alloc_string(str); + + return 0; +} + +/* same as set but does not delete */ +static unsigned lodepng_assign_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) { + if(profile_size == 0) return 100; /*invalid ICC profile size*/ + + info->iccp_name = alloc_string(name); + info->iccp_profile = (unsigned char*)lodepng_malloc(profile_size); + + if(!info->iccp_name || !info->iccp_profile) return 83; /*alloc fail*/ + + lodepng_memcpy(info->iccp_profile, profile, profile_size); + info->iccp_profile_size = profile_size; + + return 0; /*ok*/ +} + +unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) { + if(info->iccp_name) lodepng_clear_icc(info); + info->iccp_defined = 1; + + return lodepng_assign_icc(info, name, profile, profile_size); +} + +void lodepng_clear_icc(LodePNGInfo* info) { + string_cleanup(&info->iccp_name); + lodepng_free(info->iccp_profile); + info->iccp_profile = NULL; + info->iccp_profile_size = 0; + info->iccp_defined = 0; +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +void lodepng_info_init(LodePNGInfo* info) { + lodepng_color_mode_init(&info->color); + info->interlace_method = 0; + info->compression_method = 0; + info->filter_method = 0; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + info->background_defined = 0; + info->background_r = info->background_g = info->background_b = 0; + + LodePNGText_init(info); + LodePNGIText_init(info); + + info->time_defined = 0; + info->phys_defined = 0; + + info->gama_defined = 0; + info->chrm_defined = 0; + info->srgb_defined = 0; + info->iccp_defined = 0; + info->iccp_name = NULL; + info->iccp_profile = NULL; + + LodePNGUnknownChunks_init(info); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} + +void lodepng_info_cleanup(LodePNGInfo* info) { + lodepng_color_mode_cleanup(&info->color); +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + LodePNGText_cleanup(info); + LodePNGIText_cleanup(info); + + lodepng_clear_icc(info); + + LodePNGUnknownChunks_cleanup(info); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} + +unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source) { + lodepng_info_cleanup(dest); + *dest = *source; + lodepng_color_mode_init(&dest->color); + CERROR_TRY_RETURN(lodepng_color_mode_copy(&dest->color, &source->color)); + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + CERROR_TRY_RETURN(LodePNGText_copy(dest, source)); + CERROR_TRY_RETURN(LodePNGIText_copy(dest, source)); + if(source->iccp_defined) { + CERROR_TRY_RETURN(lodepng_assign_icc(dest, source->iccp_name, source->iccp_profile, source->iccp_profile_size)); + } + + LodePNGUnknownChunks_init(dest); + CERROR_TRY_RETURN(LodePNGUnknownChunks_copy(dest, source)); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + return 0; +} + +/* ////////////////////////////////////////////////////////////////////////// */ + +/*index: bitgroup index, bits: bitgroup size(1, 2 or 4), in: bitgroup value, out: octet array to add bits to*/ +static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in) { + unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1; /*8 / bits - 1*/ + /*p = the partial index in the byte, e.g. with 4 palettebits it is 0 for first half or 1 for second half*/ + unsigned p = index & m; + in &= (1u << bits) - 1u; /*filter out any other bits of the input value*/ + in = in << (bits * (m - p)); + if(p == 0) out[index * bits / 8u] = in; + else out[index * bits / 8u] |= in; +} + +typedef struct ColorTree ColorTree; + +/* +One node of a color tree +This is the data structure used to count the number of unique colors and to get a palette +index for a color. It's like an octree, but because the alpha channel is used too, each +node has 16 instead of 8 children. +*/ +struct ColorTree { + ColorTree* children[16]; /*up to 16 pointers to ColorTree of next level*/ + int index; /*the payload. Only has a meaningful value if this is in the last level*/ +}; + +static void color_tree_init(ColorTree* tree) { + int i; + for(i = 0; i != 16; ++i) tree->children[i] = 0; + tree->index = -1; +} + +static void color_tree_cleanup(ColorTree* tree) { + int i; + for(i = 0; i != 16; ++i) { + if(tree->children[i]) { + color_tree_cleanup(tree->children[i]); + lodepng_free(tree->children[i]); + } + } +} + +/*returns -1 if color not present, its index otherwise*/ +static int color_tree_get(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + int bit = 0; + for(bit = 0; bit < 8; ++bit) { + int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1); + if(!tree->children[i]) return -1; + else tree = tree->children[i]; + } + return tree ? tree->index : -1; +} + +#ifdef LODEPNG_COMPILE_ENCODER +static int color_tree_has(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + return color_tree_get(tree, r, g, b, a) >= 0; +} +#endif /*LODEPNG_COMPILE_ENCODER*/ + +/*color is not allowed to already exist. +Index should be >= 0 (it's signed to be compatible with using -1 for "doesn't exist")*/ +static void color_tree_add(ColorTree* tree, + unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) { + int bit; + for(bit = 0; bit < 8; ++bit) { + int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1); + if(!tree->children[i]) { + tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree)); + color_tree_init(tree->children[i]); + } + tree = tree->children[i]; + } + tree->index = (int)index; +} + +/*put a pixel, given its RGBA color, into image of any color type*/ +static unsigned rgba8ToPixel(unsigned char* out, size_t i, + const LodePNGColorMode* mode, ColorTree* tree /*for palette*/, + unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + if(mode->colortype == LCT_GREY) { + unsigned char gray = r; /*((unsigned short)r + g + b) / 3u;*/ + if(mode->bitdepth == 8) out[i] = gray; + else if(mode->bitdepth == 16) out[i * 2 + 0] = out[i * 2 + 1] = gray; + else { + /*take the most significant bits of gray*/ + gray = ((unsigned)gray >> (8u - mode->bitdepth)) & ((1u << mode->bitdepth) - 1u); + addColorBits(out, i, mode->bitdepth, gray); + } + } else if(mode->colortype == LCT_RGB) { + if(mode->bitdepth == 8) { + out[i * 3 + 0] = r; + out[i * 3 + 1] = g; + out[i * 3 + 2] = b; + } else { + out[i * 6 + 0] = out[i * 6 + 1] = r; + out[i * 6 + 2] = out[i * 6 + 3] = g; + out[i * 6 + 4] = out[i * 6 + 5] = b; + } + } else if(mode->colortype == LCT_PALETTE) { + int index = color_tree_get(tree, r, g, b, a); + if(index < 0) return 82; /*color not in palette*/ + if(mode->bitdepth == 8) out[i] = index; + else addColorBits(out, i, mode->bitdepth, (unsigned)index); + } else if(mode->colortype == LCT_GREY_ALPHA) { + unsigned char gray = r; /*((unsigned short)r + g + b) / 3u;*/ + if(mode->bitdepth == 8) { + out[i * 2 + 0] = gray; + out[i * 2 + 1] = a; + } else if(mode->bitdepth == 16) { + out[i * 4 + 0] = out[i * 4 + 1] = gray; + out[i * 4 + 2] = out[i * 4 + 3] = a; + } + } else if(mode->colortype == LCT_RGBA) { + if(mode->bitdepth == 8) { + out[i * 4 + 0] = r; + out[i * 4 + 1] = g; + out[i * 4 + 2] = b; + out[i * 4 + 3] = a; + } else { + out[i * 8 + 0] = out[i * 8 + 1] = r; + out[i * 8 + 2] = out[i * 8 + 3] = g; + out[i * 8 + 4] = out[i * 8 + 5] = b; + out[i * 8 + 6] = out[i * 8 + 7] = a; + } + } + + return 0; /*no error*/ +} + +/*put a pixel, given its RGBA16 color, into image of any color 16-bitdepth type*/ +static void rgba16ToPixel(unsigned char* out, size_t i, + const LodePNGColorMode* mode, + unsigned short r, unsigned short g, unsigned short b, unsigned short a) { + if(mode->colortype == LCT_GREY) { + unsigned short gray = r; /*((unsigned)r + g + b) / 3u;*/ + out[i * 2 + 0] = (gray >> 8) & 255; + out[i * 2 + 1] = gray & 255; + } else if(mode->colortype == LCT_RGB) { + out[i * 6 + 0] = (r >> 8) & 255; + out[i * 6 + 1] = r & 255; + out[i * 6 + 2] = (g >> 8) & 255; + out[i * 6 + 3] = g & 255; + out[i * 6 + 4] = (b >> 8) & 255; + out[i * 6 + 5] = b & 255; + } else if(mode->colortype == LCT_GREY_ALPHA) { + unsigned short gray = r; /*((unsigned)r + g + b) / 3u;*/ + out[i * 4 + 0] = (gray >> 8) & 255; + out[i * 4 + 1] = gray & 255; + out[i * 4 + 2] = (a >> 8) & 255; + out[i * 4 + 3] = a & 255; + } else if(mode->colortype == LCT_RGBA) { + out[i * 8 + 0] = (r >> 8) & 255; + out[i * 8 + 1] = r & 255; + out[i * 8 + 2] = (g >> 8) & 255; + out[i * 8 + 3] = g & 255; + out[i * 8 + 4] = (b >> 8) & 255; + out[i * 8 + 5] = b & 255; + out[i * 8 + 6] = (a >> 8) & 255; + out[i * 8 + 7] = a & 255; + } +} + +/*Get RGBA8 color of pixel with index i (y * width + x) from the raw image with given color type.*/ +static void getPixelColorRGBA8(unsigned char* r, unsigned char* g, + unsigned char* b, unsigned char* a, + const unsigned char* in, size_t i, + const LodePNGColorMode* mode) { + if(mode->colortype == LCT_GREY) { + if(mode->bitdepth == 8) { + *r = *g = *b = in[i]; + if(mode->key_defined && *r == mode->key_r) *a = 0; + else *a = 255; + } else if(mode->bitdepth == 16) { + *r = *g = *b = in[i * 2 + 0]; + if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; + else *a = 255; + } else { + unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ + size_t j = i * mode->bitdepth; + unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); + *r = *g = *b = (value * 255) / highest; + if(mode->key_defined && value == mode->key_r) *a = 0; + else *a = 255; + } + } else if(mode->colortype == LCT_RGB) { + if(mode->bitdepth == 8) { + *r = in[i * 3 + 0]; *g = in[i * 3 + 1]; *b = in[i * 3 + 2]; + if(mode->key_defined && *r == mode->key_r && *g == mode->key_g && *b == mode->key_b) *a = 0; + else *a = 255; + } else { + *r = in[i * 6 + 0]; + *g = in[i * 6 + 2]; + *b = in[i * 6 + 4]; + if(mode->key_defined && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r + && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g + && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; + else *a = 255; + } + } else if(mode->colortype == LCT_PALETTE) { + unsigned index; + if(mode->bitdepth == 8) index = in[i]; + else { + size_t j = i * mode->bitdepth; + index = readBitsFromReversedStream(&j, in, mode->bitdepth); + } + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + *r = mode->palette[index * 4 + 0]; + *g = mode->palette[index * 4 + 1]; + *b = mode->palette[index * 4 + 2]; + *a = mode->palette[index * 4 + 3]; + } else if(mode->colortype == LCT_GREY_ALPHA) { + if(mode->bitdepth == 8) { + *r = *g = *b = in[i * 2 + 0]; + *a = in[i * 2 + 1]; + } else { + *r = *g = *b = in[i * 4 + 0]; + *a = in[i * 4 + 2]; + } + } else if(mode->colortype == LCT_RGBA) { + if(mode->bitdepth == 8) { + *r = in[i * 4 + 0]; + *g = in[i * 4 + 1]; + *b = in[i * 4 + 2]; + *a = in[i * 4 + 3]; + } else { + *r = in[i * 8 + 0]; + *g = in[i * 8 + 2]; + *b = in[i * 8 + 4]; + *a = in[i * 8 + 6]; + } + } +} + +/*Similar to getPixelColorRGBA8, but with all the for loops inside of the color +mode test cases, optimized to convert the colors much faster, when converting +to the common case of RGBA with 8 bit per channel. buffer must be RGBA with +enough memory.*/ +static void getPixelColorsRGBA8(unsigned char* LODEPNG_RESTRICT buffer, size_t numpixels, + const unsigned char* LODEPNG_RESTRICT in, + const LodePNGColorMode* mode) { + unsigned num_channels = 4; + size_t i; + if(mode->colortype == LCT_GREY) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i]; + buffer[3] = 255; + } + if(mode->key_defined) { + buffer -= numpixels * num_channels; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + if(buffer[0] == mode->key_r) buffer[3] = 0; + } + } + } else if(mode->bitdepth == 16) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 2]; + buffer[3] = mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r ? 0 : 255; + } + } else { + unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ + size_t j = 0; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); + buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest; + buffer[3] = mode->key_defined && value == mode->key_r ? 0 : 255; + } + } + } else if(mode->colortype == LCT_RGB) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + lodepng_memcpy(buffer, &in[i * 3], 3); + buffer[3] = 255; + } + if(mode->key_defined) { + buffer -= numpixels * num_channels; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + if(buffer[0] == mode->key_r && buffer[1]== mode->key_g && buffer[2] == mode->key_b) buffer[3] = 0; + } + } + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = in[i * 6 + 0]; + buffer[1] = in[i * 6 + 2]; + buffer[2] = in[i * 6 + 4]; + buffer[3] = mode->key_defined + && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r + && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g + && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b ? 0 : 255; + } + } + } else if(mode->colortype == LCT_PALETTE) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned index = in[i]; + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + lodepng_memcpy(buffer, &mode->palette[index * 4], 4); + } + } else { + size_t j = 0; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + lodepng_memcpy(buffer, &mode->palette[index * 4], 4); + } + } + } else if(mode->colortype == LCT_GREY_ALPHA) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; + buffer[3] = in[i * 2 + 1]; + } + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; + buffer[3] = in[i * 4 + 2]; + } + } + } else if(mode->colortype == LCT_RGBA) { + if(mode->bitdepth == 8) { + lodepng_memcpy(buffer, in, numpixels * 4); + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = in[i * 8 + 0]; + buffer[1] = in[i * 8 + 2]; + buffer[2] = in[i * 8 + 4]; + buffer[3] = in[i * 8 + 6]; + } + } + } +} + +/*Similar to getPixelColorsRGBA8, but with 3-channel RGB output.*/ +static void getPixelColorsRGB8(unsigned char* LODEPNG_RESTRICT buffer, size_t numpixels, + const unsigned char* LODEPNG_RESTRICT in, + const LodePNGColorMode* mode) { + const unsigned num_channels = 3; + size_t i; + if(mode->colortype == LCT_GREY) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i]; + } + } else if(mode->bitdepth == 16) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 2]; + } + } else { + unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ + size_t j = 0; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); + buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest; + } + } + } else if(mode->colortype == LCT_RGB) { + if(mode->bitdepth == 8) { + lodepng_memcpy(buffer, in, numpixels * 3); + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = in[i * 6 + 0]; + buffer[1] = in[i * 6 + 2]; + buffer[2] = in[i * 6 + 4]; + } + } + } else if(mode->colortype == LCT_PALETTE) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned index = in[i]; + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + lodepng_memcpy(buffer, &mode->palette[index * 4], 3); + } + } else { + size_t j = 0; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + lodepng_memcpy(buffer, &mode->palette[index * 4], 3); + } + } + } else if(mode->colortype == LCT_GREY_ALPHA) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; + } + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; + } + } + } else if(mode->colortype == LCT_RGBA) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + lodepng_memcpy(buffer, &in[i * 4], 3); + } + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = in[i * 8 + 0]; + buffer[1] = in[i * 8 + 2]; + buffer[2] = in[i * 8 + 4]; + } + } + } +} + +/*Get RGBA16 color of pixel with index i (y * width + x) from the raw image with +given color type, but the given color type must be 16-bit itself.*/ +static void getPixelColorRGBA16(unsigned short* r, unsigned short* g, unsigned short* b, unsigned short* a, + const unsigned char* in, size_t i, const LodePNGColorMode* mode) { + if(mode->colortype == LCT_GREY) { + *r = *g = *b = 256 * in[i * 2 + 0] + in[i * 2 + 1]; + if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; + else *a = 65535; + } else if(mode->colortype == LCT_RGB) { + *r = 256u * in[i * 6 + 0] + in[i * 6 + 1]; + *g = 256u * in[i * 6 + 2] + in[i * 6 + 3]; + *b = 256u * in[i * 6 + 4] + in[i * 6 + 5]; + if(mode->key_defined + && 256u * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r + && 256u * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g + && 256u * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; + else *a = 65535; + } else if(mode->colortype == LCT_GREY_ALPHA) { + *r = *g = *b = 256u * in[i * 4 + 0] + in[i * 4 + 1]; + *a = 256u * in[i * 4 + 2] + in[i * 4 + 3]; + } else if(mode->colortype == LCT_RGBA) { + *r = 256u * in[i * 8 + 0] + in[i * 8 + 1]; + *g = 256u * in[i * 8 + 2] + in[i * 8 + 3]; + *b = 256u * in[i * 8 + 4] + in[i * 8 + 5]; + *a = 256u * in[i * 8 + 6] + in[i * 8 + 7]; + } +} + +unsigned lodepng_convert(unsigned char* out, const unsigned char* in, + const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, + unsigned w, unsigned h) { + size_t i; + ColorTree tree; + size_t numpixels = (size_t)w * (size_t)h; + unsigned error = 0; + + if(mode_in->colortype == LCT_PALETTE && !mode_in->palette) { + return 107; /* error: must provide palette if input mode is palette */ + } + + if(lodepng_color_mode_equal(mode_out, mode_in)) { + size_t numbytes = lodepng_get_raw_size(w, h, mode_in); + for(i = 0; i != numbytes; ++i) out[i] = in[i]; + return 0; + } + + if(mode_out->colortype == LCT_PALETTE) { + size_t palettesize = mode_out->palettesize; + const unsigned char* palette = mode_out->palette; + size_t palsize = (size_t)1u << mode_out->bitdepth; + /*if the user specified output palette but did not give the values, assume + they want the values of the input color type (assuming that one is palette). + Note that we never create a new palette ourselves.*/ + if(palettesize == 0) { + palettesize = mode_in->palettesize; + palette = mode_in->palette; + /*if the input was also palette with same bitdepth, then the color types are also + equal, so copy literally. This to preserve the exact indices that were in the PNG + even in case there are duplicate colors in the palette.*/ + if (mode_in->colortype == LCT_PALETTE && mode_in->bitdepth == mode_out->bitdepth) { + size_t numbytes = lodepng_get_raw_size(w, h, mode_in); + for(i = 0; i != numbytes; ++i) out[i] = in[i]; + return 0; + } + } + if(palettesize < palsize) palsize = palettesize; + color_tree_init(&tree); + for(i = 0; i != palsize; ++i) { + const unsigned char* p = &palette[i * 4]; + color_tree_add(&tree, p[0], p[1], p[2], p[3], (unsigned)i); + } + } + + if(mode_in->bitdepth == 16 && mode_out->bitdepth == 16) { + for(i = 0; i != numpixels; ++i) { + unsigned short r = 0, g = 0, b = 0, a = 0; + getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); + rgba16ToPixel(out, i, mode_out, r, g, b, a); + } + } else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGBA) { + getPixelColorsRGBA8(out, numpixels, in, mode_in); + } else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGB) { + getPixelColorsRGB8(out, numpixels, in, mode_in); + } else { + unsigned char r = 0, g = 0, b = 0, a = 0; + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); + error = rgba8ToPixel(out, i, mode_out, &tree, r, g, b, a); + if (error) break; + } + } + + if(mode_out->colortype == LCT_PALETTE) { + color_tree_cleanup(&tree); + } + + return error; +} + + +/* Converts a single rgb color without alpha from one type to another, color bits truncated to +their bitdepth. In case of single channel (gray or palette), only the r channel is used. Slow +function, do not use to process all pixels of an image. Alpha channel not supported on purpose: +this is for bKGD, supporting alpha may prevent it from finding a color in the palette, from the +specification it looks like bKGD should ignore the alpha values of the palette since it can use +any palette index but doesn't have an alpha channel. Idem with ignoring color key. */ +unsigned lodepng_convert_rgb( + unsigned* r_out, unsigned* g_out, unsigned* b_out, + unsigned r_in, unsigned g_in, unsigned b_in, + const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in) { + unsigned r = 0, g = 0, b = 0; + unsigned mul = 65535 / ((1u << mode_in->bitdepth) - 1u); /*65535, 21845, 4369, 257, 1*/ + unsigned shift = 16 - mode_out->bitdepth; + + if(mode_in->colortype == LCT_GREY || mode_in->colortype == LCT_GREY_ALPHA) { + r = g = b = r_in * mul; + } else if(mode_in->colortype == LCT_RGB || mode_in->colortype == LCT_RGBA) { + r = r_in * mul; + g = g_in * mul; + b = b_in * mul; + } else if(mode_in->colortype == LCT_PALETTE) { + if(r_in >= mode_in->palettesize) return 82; + r = mode_in->palette[r_in * 4 + 0] * 257u; + g = mode_in->palette[r_in * 4 + 1] * 257u; + b = mode_in->palette[r_in * 4 + 2] * 257u; + } else { + return 31; + } + + /* now convert to output format */ + if(mode_out->colortype == LCT_GREY || mode_out->colortype == LCT_GREY_ALPHA) { + *r_out = r >> shift ; + } else if(mode_out->colortype == LCT_RGB || mode_out->colortype == LCT_RGBA) { + *r_out = r >> shift ; + *g_out = g >> shift ; + *b_out = b >> shift ; + } else if(mode_out->colortype == LCT_PALETTE) { + unsigned i; + /* a 16-bit color cannot be in the palette */ + if((r >> 8) != (r & 255) || (g >> 8) != (g & 255) || (b >> 8) != (b & 255)) return 82; + for(i = 0; i < mode_out->palettesize; i++) { + unsigned j = i * 4; + if((r >> 8) == mode_out->palette[j + 0] && (g >> 8) == mode_out->palette[j + 1] && + (b >> 8) == mode_out->palette[j + 2]) { + *r_out = i; + return 0; + } + } + return 82; + } else { + return 31; + } + + return 0; +} + +#ifdef LODEPNG_COMPILE_ENCODER + +void lodepng_color_stats_init(LodePNGColorStats* stats) { + /*stats*/ + stats->colored = 0; + stats->key = 0; + stats->key_r = stats->key_g = stats->key_b = 0; + stats->alpha = 0; + stats->numcolors = 0; + stats->bits = 1; + stats->numpixels = 0; + /*settings*/ + stats->allow_palette = 1; + stats->allow_greyscale = 1; +} + +/*function used for debug purposes with C++*/ +/*void printColorStats(LodePNGColorStats* p) { + std::cout << "colored: " << (int)p->colored << ", "; + std::cout << "key: " << (int)p->key << ", "; + std::cout << "key_r: " << (int)p->key_r << ", "; + std::cout << "key_g: " << (int)p->key_g << ", "; + std::cout << "key_b: " << (int)p->key_b << ", "; + std::cout << "alpha: " << (int)p->alpha << ", "; + std::cout << "numcolors: " << (int)p->numcolors << ", "; + std::cout << "bits: " << (int)p->bits << std::endl; +}*/ + +/*Returns how many bits needed to represent given value (max 8 bit)*/ +static unsigned getValueRequiredBits(unsigned char value) { + if(value == 0 || value == 255) return 1; + /*The scaling of 2-bit and 4-bit values uses multiples of 85 and 17*/ + if(value % 17 == 0) return value % 85 == 0 ? 2 : 4; + return 8; +} + +/*stats must already have been inited. */ +void lodepng_compute_color_stats(LodePNGColorStats* stats, + const unsigned char* in, unsigned w, unsigned h, + const LodePNGColorMode* mode_in) { + size_t i; + ColorTree tree; + size_t numpixels = (size_t)w * (size_t)h; + + /* mark things as done already if it would be impossible to have a more expensive case */ + unsigned colored_done = lodepng_is_greyscale_type(mode_in) ? 1 : 0; + unsigned alpha_done = lodepng_can_have_alpha(mode_in) ? 0 : 1; + unsigned numcolors_done = 0; + unsigned bpp = lodepng_get_bpp(mode_in); + unsigned bits_done = (stats->bits == 1 && bpp == 1) ? 1 : 0; + unsigned sixteen = 0; /* whether the input image is 16 bit */ + unsigned maxnumcolors = 257; + if(bpp <= 8) maxnumcolors = LODEPNG_MIN(257, stats->numcolors + (1u << bpp)); + + stats->numpixels += numpixels; + + /*if palette not allowed, no need to compute numcolors*/ + if(!stats->allow_palette) numcolors_done = 1; + + color_tree_init(&tree); + + /*If the stats was already filled in from previous data, fill its palette in tree + and mark things as done already if we know they are the most expensive case already*/ + if(stats->alpha) alpha_done = 1; + if(stats->colored) colored_done = 1; + if(stats->bits == 16) numcolors_done = 1; + if(stats->bits >= bpp) bits_done = 1; + if(stats->numcolors >= maxnumcolors) numcolors_done = 1; + + if(!numcolors_done) { + for(i = 0; i < stats->numcolors; i++) { + const unsigned char* color = &stats->palette[i * 4]; + color_tree_add(&tree, color[0], color[1], color[2], color[3], i); + } + } + + /*Check if the 16-bit input is truly 16-bit*/ + if(mode_in->bitdepth == 16 && !sixteen) { + unsigned short r, g, b, a; + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); + if((r & 255) != ((r >> 8) & 255) || (g & 255) != ((g >> 8) & 255) || + (b & 255) != ((b >> 8) & 255) || (a & 255) != ((a >> 8) & 255)) /*first and second byte differ*/ { + stats->bits = 16; + sixteen = 1; + bits_done = 1; + numcolors_done = 1; /*counting colors no longer useful, palette doesn't support 16-bit*/ + break; + } + } + } + + if(sixteen) { + unsigned short r = 0, g = 0, b = 0, a = 0; + + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); + + if(!colored_done && (r != g || r != b)) { + stats->colored = 1; + colored_done = 1; + } + + if(!alpha_done) { + unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b); + if(a != 65535 && (a != 0 || (stats->key && !matchkey))) { + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + } else if(a == 0 && !stats->alpha && !stats->key) { + stats->key = 1; + stats->key_r = r; + stats->key_g = g; + stats->key_b = b; + } else if(a == 65535 && stats->key && matchkey) { + /* Color key cannot be used if an opaque pixel also has that RGB color. */ + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + } + } + if(alpha_done && numcolors_done && colored_done && bits_done) break; + } + + if(stats->key && !stats->alpha) { + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); + if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) { + /* Color key cannot be used if an opaque pixel also has that RGB color. */ + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + } + } + } + } else /* < 16-bit */ { + unsigned char r = 0, g = 0, b = 0, a = 0; + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); + + if(!bits_done && stats->bits < 8) { + /*only r is checked, < 8 bits is only relevant for grayscale*/ + unsigned bits = getValueRequiredBits(r); + if(bits > stats->bits) stats->bits = bits; + } + bits_done = (stats->bits >= bpp); + + if(!colored_done && (r != g || r != b)) { + stats->colored = 1; + colored_done = 1; + if(stats->bits < 8) stats->bits = 8; /*PNG has no colored modes with less than 8-bit per channel*/ + } + + if(!alpha_done) { + unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b); + if(a != 255 && (a != 0 || (stats->key && !matchkey))) { + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ + } else if(a == 0 && !stats->alpha && !stats->key) { + stats->key = 1; + stats->key_r = r; + stats->key_g = g; + stats->key_b = b; + } else if(a == 255 && stats->key && matchkey) { + /* Color key cannot be used if an opaque pixel also has that RGB color. */ + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ + } + } + + if(!numcolors_done) { + if(!color_tree_has(&tree, r, g, b, a)) { + color_tree_add(&tree, r, g, b, a, stats->numcolors); + if(stats->numcolors < 256) { + unsigned char* p = stats->palette; + unsigned n = stats->numcolors; + p[n * 4 + 0] = r; + p[n * 4 + 1] = g; + p[n * 4 + 2] = b; + p[n * 4 + 3] = a; + } + ++stats->numcolors; + numcolors_done = stats->numcolors >= maxnumcolors; + } + } + + if(alpha_done && numcolors_done && colored_done && bits_done) break; + } + + if(stats->key && !stats->alpha) { + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); + if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) { + /* Color key cannot be used if an opaque pixel also has that RGB color. */ + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ + } + } + } + + /*make the stats's key always 16-bit for consistency - repeat each byte twice*/ + stats->key_r += (stats->key_r << 8); + stats->key_g += (stats->key_g << 8); + stats->key_b += (stats->key_b << 8); + } + + color_tree_cleanup(&tree); +} + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +/*Adds a single color to the color stats. The stats must already have been inited. The color must be given as 16-bit +(with 2 bytes repeating for 8-bit and 65535 for opaque alpha channel). This function is expensive, do not call it for +all pixels of an image but only for a few additional values. */ +static void lodepng_color_stats_add(LodePNGColorStats* stats, + unsigned r, unsigned g, unsigned b, unsigned a) { + unsigned char image[8]; + LodePNGColorMode mode; + lodepng_color_mode_init(&mode); + image[0] = r >> 8; image[1] = r; image[2] = g >> 8; image[3] = g; + image[4] = b >> 8; image[5] = b; image[6] = a >> 8; image[7] = a; + mode.bitdepth = 16; + mode.colortype = LCT_RGBA; + lodepng_compute_color_stats(stats, image, 1, 1, &mode); + lodepng_color_mode_cleanup(&mode); +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +/*Computes a minimal PNG color model that can contain all colors as indicated by the stats. +The stats should be computed with lodepng_compute_color_stats. +mode_in is raw color profile of the image the stats were computed on, to copy palette order from when relevant. +Minimal PNG color model means the color type and bit depth that gives smallest amount of bits in the output image, +e.g. gray if only grayscale pixels, palette if less than 256 colors, color key if only single transparent color, ... +This is used if auto_convert is enabled (it is by default). +*/ +static unsigned auto_choose_color(LodePNGColorMode* mode_out, + const LodePNGColorMode* mode_in, + const LodePNGColorStats* stats) { + unsigned error = 0; + unsigned palettebits; + size_t i, n; + size_t numpixels = stats->numpixels; + unsigned palette_ok, gray_ok; + + unsigned alpha = stats->alpha; + unsigned key = stats->key; + unsigned bits = stats->bits; + + mode_out->key_defined = 0; + + if(key && numpixels <= 16) { + alpha = 1; /*too few pixels to justify tRNS chunk overhead*/ + key = 0; + if(bits < 8) bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ + } + + gray_ok = !stats->colored; + if(!stats->allow_greyscale) gray_ok = 0; + if(!gray_ok && bits < 8) bits = 8; + + n = stats->numcolors; + palettebits = n <= 2 ? 1 : (n <= 4 ? 2 : (n <= 16 ? 4 : 8)); + palette_ok = n <= 256 && bits <= 8 && n != 0; /*n==0 means likely numcolors wasn't computed*/ + if(numpixels < n * 2) palette_ok = 0; /*don't add palette overhead if image has only a few pixels*/ + if(gray_ok && !alpha && bits <= palettebits) palette_ok = 0; /*gray is less overhead*/ + if(!stats->allow_palette) palette_ok = 0; + + if(palette_ok) { + const unsigned char* p = stats->palette; + lodepng_palette_clear(mode_out); /*remove potential earlier palette*/ + for(i = 0; i != stats->numcolors; ++i) { + error = lodepng_palette_add(mode_out, p[i * 4 + 0], p[i * 4 + 1], p[i * 4 + 2], p[i * 4 + 3]); + if(error) break; + } + + mode_out->colortype = LCT_PALETTE; + mode_out->bitdepth = palettebits; + + if(mode_in->colortype == LCT_PALETTE && mode_in->palettesize >= mode_out->palettesize + && mode_in->bitdepth == mode_out->bitdepth) { + /*If input should have same palette colors, keep original to preserve its order and prevent conversion*/ + lodepng_color_mode_cleanup(mode_out); + lodepng_color_mode_copy(mode_out, mode_in); + } + } else /*8-bit or 16-bit per channel*/ { + mode_out->bitdepth = bits; + mode_out->colortype = alpha ? (gray_ok ? LCT_GREY_ALPHA : LCT_RGBA) + : (gray_ok ? LCT_GREY : LCT_RGB); + if(key) { + unsigned mask = (1u << mode_out->bitdepth) - 1u; /*stats always uses 16-bit, mask converts it*/ + mode_out->key_r = stats->key_r & mask; + mode_out->key_g = stats->key_g & mask; + mode_out->key_b = stats->key_b & mask; + mode_out->key_defined = 1; + } + } + + return error; +} + +#endif /* #ifdef LODEPNG_COMPILE_ENCODER */ + +/* +Paeth predictor, used by PNG filter type 4 +The parameters are of type short, but should come from unsigned chars, the shorts +are only needed to make the paeth calculation correct. +*/ +static unsigned char paethPredictor(short a, short b, short c) { + short pa = LODEPNG_ABS(b - c); + short pb = LODEPNG_ABS(a - c); + short pc = LODEPNG_ABS(a + b - c - c); + /* return input value associated with smallest of pa, pb, pc (with certain priority if equal) */ + if(pb < pa) { a = b; pa = pb; } + return (pc < pa) ? c : a; +} + +/*shared values used by multiple Adam7 related functions*/ + +static const unsigned ADAM7_IX[7] = { 0, 4, 0, 2, 0, 1, 0 }; /*x start values*/ +static const unsigned ADAM7_IY[7] = { 0, 0, 4, 0, 2, 0, 1 }; /*y start values*/ +static const unsigned ADAM7_DX[7] = { 8, 8, 4, 4, 2, 2, 1 }; /*x delta values*/ +static const unsigned ADAM7_DY[7] = { 8, 8, 8, 4, 4, 2, 2 }; /*y delta values*/ + +/* +Outputs various dimensions and positions in the image related to the Adam7 reduced images. +passw: output containing the width of the 7 passes +passh: output containing the height of the 7 passes +filter_passstart: output containing the index of the start and end of each + reduced image with filter bytes +padded_passstart output containing the index of the start and end of each + reduced image when without filter bytes but with padded scanlines +passstart: output containing the index of the start and end of each reduced + image without padding between scanlines, but still padding between the images +w, h: width and height of non-interlaced image +bpp: bits per pixel +"padded" is only relevant if bpp is less than 8 and a scanline or image does not + end at a full byte +*/ +static void Adam7_getpassvalues(unsigned passw[7], unsigned passh[7], size_t filter_passstart[8], + size_t padded_passstart[8], size_t passstart[8], unsigned w, unsigned h, unsigned bpp) { + /*the passstart values have 8 values: the 8th one indicates the byte after the end of the 7th (= last) pass*/ + unsigned i; + + /*calculate width and height in pixels of each pass*/ + for(i = 0; i != 7; ++i) { + passw[i] = (w + ADAM7_DX[i] - ADAM7_IX[i] - 1) / ADAM7_DX[i]; + passh[i] = (h + ADAM7_DY[i] - ADAM7_IY[i] - 1) / ADAM7_DY[i]; + if(passw[i] == 0) passh[i] = 0; + if(passh[i] == 0) passw[i] = 0; + } + + filter_passstart[0] = padded_passstart[0] = passstart[0] = 0; + for(i = 0; i != 7; ++i) { + /*if passw[i] is 0, it's 0 bytes, not 1 (no filtertype-byte)*/ + filter_passstart[i + 1] = filter_passstart[i] + + ((passw[i] && passh[i]) ? passh[i] * (1u + (passw[i] * bpp + 7u) / 8u) : 0); + /*bits padded if needed to fill full byte at end of each scanline*/ + padded_passstart[i + 1] = padded_passstart[i] + passh[i] * ((passw[i] * bpp + 7u) / 8u); + /*only padded at end of reduced image*/ + passstart[i + 1] = passstart[i] + (passh[i] * passw[i] * bpp + 7u) / 8u; + } +} + +#ifdef LODEPNG_COMPILE_DECODER + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / PNG Decoder / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*read the information from the header and store it in the LodePNGInfo. return value is error*/ +unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state, + const unsigned char* in, size_t insize) { + unsigned width, height; + LodePNGInfo* info = &state->info_png; + if(insize == 0 || in == 0) { + CERROR_RETURN_ERROR(state->error, 48); /*error: the given data is empty*/ + } + if(insize < 33) { + CERROR_RETURN_ERROR(state->error, 27); /*error: the data length is smaller than the length of a PNG header*/ + } + + /*when decoding a new PNG image, make sure all parameters created after previous decoding are reset*/ + /* TODO: remove this. One should use a new LodePNGState for new sessions */ + lodepng_info_cleanup(info); + lodepng_info_init(info); + + if(in[0] != 137 || in[1] != 80 || in[2] != 78 || in[3] != 71 + || in[4] != 13 || in[5] != 10 || in[6] != 26 || in[7] != 10) { + CERROR_RETURN_ERROR(state->error, 28); /*error: the first 8 bytes are not the correct PNG signature*/ + } + if(lodepng_chunk_length(in + 8) != 13) { + CERROR_RETURN_ERROR(state->error, 94); /*error: header size must be 13 bytes*/ + } + if(!lodepng_chunk_type_equals(in + 8, "IHDR")) { + CERROR_RETURN_ERROR(state->error, 29); /*error: it doesn't start with a IHDR chunk!*/ + } + + /*read the values given in the header*/ + width = lodepng_read32bitInt(&in[16]); + height = lodepng_read32bitInt(&in[20]); + /*TODO: remove the undocumented feature that allows to give null pointers to width or height*/ + if(w) *w = width; + if(h) *h = height; + info->color.bitdepth = in[24]; + info->color.colortype = (LodePNGColorType)in[25]; + info->compression_method = in[26]; + info->filter_method = in[27]; + info->interlace_method = in[28]; + + /*errors returned only after the parsing so other values are still output*/ + + /*error: invalid image size*/ + if(width == 0 || height == 0) CERROR_RETURN_ERROR(state->error, 93); + /*error: invalid colortype or bitdepth combination*/ + state->error = checkColorValidity(info->color.colortype, info->color.bitdepth); + if(state->error) return state->error; + /*error: only compression method 0 is allowed in the specification*/ + if(info->compression_method != 0) CERROR_RETURN_ERROR(state->error, 32); + /*error: only filter method 0 is allowed in the specification*/ + if(info->filter_method != 0) CERROR_RETURN_ERROR(state->error, 33); + /*error: only interlace methods 0 and 1 exist in the specification*/ + if(info->interlace_method > 1) CERROR_RETURN_ERROR(state->error, 34); + + if(!state->decoder.ignore_crc) { + unsigned CRC = lodepng_read32bitInt(&in[29]); + unsigned checksum = lodepng_crc32(&in[12], 17); + if(CRC != checksum) { + CERROR_RETURN_ERROR(state->error, 57); /*invalid CRC*/ + } + } + + return state->error; +} + +static unsigned unfilterScanline(unsigned char* recon, const unsigned char* scanline, const unsigned char* precon, + size_t bytewidth, unsigned char filterType, size_t length) { + /* + For PNG filter method 0 + unfilter a PNG image scanline by scanline. when the pixels are smaller than 1 byte, + the filter works byte per byte (bytewidth = 1) + precon is the previous unfiltered scanline, recon the result, scanline the current one + the incoming scanlines do NOT include the filtertype byte, that one is given in the parameter filterType instead + recon and scanline MAY be the same memory address! precon must be disjoint. + */ + + size_t i; + switch(filterType) { + case 0: + for(i = 0; i != length; ++i) recon[i] = scanline[i]; + break; + case 1: + for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i]; + for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + recon[i - bytewidth]; + break; + case 2: + if(precon) { + for(i = 0; i != length; ++i) recon[i] = scanline[i] + precon[i]; + } else { + for(i = 0; i != length; ++i) recon[i] = scanline[i]; + } + break; + case 3: + if(precon) { + for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i] + (precon[i] >> 1u); + for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + ((recon[i - bytewidth] + precon[i]) >> 1u); + } else { + for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i]; + for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + (recon[i - bytewidth] >> 1u); + } + break; + case 4: + if(precon) { + for(i = 0; i != bytewidth; ++i) { + recon[i] = (scanline[i] + precon[i]); /*paethPredictor(0, precon[i], 0) is always precon[i]*/ + } + + /* Unroll independent paths of the paeth predictor. A 6x and 8x version would also be possible but that + adds too much code. Whether this actually speeds anything up at all depends on compiler and settings. */ + if(bytewidth >= 4) { + for(; i + 3 < length; i += 4) { + size_t j = i - bytewidth; + unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1], s2 = scanline[i + 2], s3 = scanline[i + 3]; + unsigned char r0 = recon[j + 0], r1 = recon[j + 1], r2 = recon[j + 2], r3 = recon[j + 3]; + unsigned char p0 = precon[i + 0], p1 = precon[i + 1], p2 = precon[i + 2], p3 = precon[i + 3]; + unsigned char q0 = precon[j + 0], q1 = precon[j + 1], q2 = precon[j + 2], q3 = precon[j + 3]; + recon[i + 0] = s0 + paethPredictor(r0, p0, q0); + recon[i + 1] = s1 + paethPredictor(r1, p1, q1); + recon[i + 2] = s2 + paethPredictor(r2, p2, q2); + recon[i + 3] = s3 + paethPredictor(r3, p3, q3); + } + } else if(bytewidth >= 3) { + for(; i + 2 < length; i += 3) { + size_t j = i - bytewidth; + unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1], s2 = scanline[i + 2]; + unsigned char r0 = recon[j + 0], r1 = recon[j + 1], r2 = recon[j + 2]; + unsigned char p0 = precon[i + 0], p1 = precon[i + 1], p2 = precon[i + 2]; + unsigned char q0 = precon[j + 0], q1 = precon[j + 1], q2 = precon[j + 2]; + recon[i + 0] = s0 + paethPredictor(r0, p0, q0); + recon[i + 1] = s1 + paethPredictor(r1, p1, q1); + recon[i + 2] = s2 + paethPredictor(r2, p2, q2); + } + } else if(bytewidth >= 2) { + for(; i + 1 < length; i += 2) { + size_t j = i - bytewidth; + unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1]; + unsigned char r0 = recon[j + 0], r1 = recon[j + 1]; + unsigned char p0 = precon[i + 0], p1 = precon[i + 1]; + unsigned char q0 = precon[j + 0], q1 = precon[j + 1]; + recon[i + 0] = s0 + paethPredictor(r0, p0, q0); + recon[i + 1] = s1 + paethPredictor(r1, p1, q1); + } + } + + for(; i != length; ++i) { + recon[i] = (scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[i - bytewidth])); + } + } else { + for(i = 0; i != bytewidth; ++i) { + recon[i] = scanline[i]; + } + for(i = bytewidth; i < length; ++i) { + /*paethPredictor(recon[i - bytewidth], 0, 0) is always recon[i - bytewidth]*/ + recon[i] = (scanline[i] + recon[i - bytewidth]); + } + } + break; + default: return 36; /*error: nonexistent filter type given*/ + } + return 0; +} + +static unsigned unfilter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { + /* + For PNG filter method 0 + this function unfilters a single image (e.g. without interlacing this is called once, with Adam7 seven times) + out must have enough bytes allocated already, in must have the scanlines + 1 filtertype byte per scanline + w and h are image dimensions or dimensions of reduced image, bpp is bits per pixel + in and out are allowed to be the same memory address (but aren't the same size since in has the extra filter bytes) + */ + + unsigned y; + unsigned char* prevline = 0; + + /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/ + size_t bytewidth = (bpp + 7u) / 8u; + size_t linebytes = (w * bpp + 7u) / 8u; + + for(y = 0; y < h; ++y) { + size_t outindex = linebytes * y; + size_t inindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ + unsigned char filterType = in[inindex]; + + CERROR_TRY_RETURN(unfilterScanline(&out[outindex], &in[inindex + 1], prevline, bytewidth, filterType, linebytes)); + + prevline = &out[outindex]; + } + + return 0; +} + +/* +in: Adam7 interlaced image, with no padding bits between scanlines, but between + reduced images so that each reduced image starts at a byte. +out: the same pixels, but re-ordered so that they're now a non-interlaced image with size w*h +bpp: bits per pixel +out has the following size in bits: w * h * bpp. +in is possibly bigger due to padding bits between reduced images. +out must be big enough AND must be 0 everywhere if bpp < 8 in the current implementation +(because that's likely a little bit faster) +NOTE: comments about padding bits are only relevant if bpp < 8 +*/ +static void Adam7_deinterlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { + unsigned passw[7], passh[7]; + size_t filter_passstart[8], padded_passstart[8], passstart[8]; + unsigned i; + + Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); + + if(bpp >= 8) { + for(i = 0; i != 7; ++i) { + unsigned x, y, b; + size_t bytewidth = bpp / 8u; + for(y = 0; y < passh[i]; ++y) + for(x = 0; x < passw[i]; ++x) { + size_t pixelinstart = passstart[i] + (y * passw[i] + x) * bytewidth; + size_t pixeloutstart = ((ADAM7_IY[i] + y * ADAM7_DY[i]) * w + ADAM7_IX[i] + x * ADAM7_DX[i]) * bytewidth; + for(b = 0; b < bytewidth; ++b) { + out[pixeloutstart + b] = in[pixelinstart + b]; + } + } + } + } else /*bpp < 8: Adam7 with pixels < 8 bit is a bit trickier: with bit pointers*/ { + for(i = 0; i != 7; ++i) { + unsigned x, y, b; + unsigned ilinebits = bpp * passw[i]; + unsigned olinebits = bpp * w; + size_t obp, ibp; /*bit pointers (for out and in buffer)*/ + for(y = 0; y < passh[i]; ++y) + for(x = 0; x < passw[i]; ++x) { + ibp = (8 * passstart[i]) + (y * ilinebits + x * bpp); + obp = (ADAM7_IY[i] + y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + x * ADAM7_DX[i]) * bpp; + for(b = 0; b < bpp; ++b) { + unsigned char bit = readBitFromReversedStream(&ibp, in); + setBitOfReversedStream(&obp, out, bit); + } + } + } + } +} + +static void removePaddingBits(unsigned char* out, const unsigned char* in, + size_t olinebits, size_t ilinebits, unsigned h) { + /* + After filtering there are still padding bits if scanlines have non multiple of 8 bit amounts. They need + to be removed (except at last scanline of (Adam7-reduced) image) before working with pure image buffers + for the Adam7 code, the color convert code and the output to the user. + in and out are allowed to be the same buffer, in may also be higher but still overlapping; in must + have >= ilinebits*h bits, out must have >= olinebits*h bits, olinebits must be <= ilinebits + also used to move bits after earlier such operations happened, e.g. in a sequence of reduced images from Adam7 + only useful if (ilinebits - olinebits) is a value in the range 1..7 + */ + unsigned y; + size_t diff = ilinebits - olinebits; + size_t ibp = 0, obp = 0; /*input and output bit pointers*/ + for(y = 0; y < h; ++y) { + size_t x; + for(x = 0; x < olinebits; ++x) { + unsigned char bit = readBitFromReversedStream(&ibp, in); + setBitOfReversedStream(&obp, out, bit); + } + ibp += diff; + } +} + +/*out must be buffer big enough to contain full image, and in must contain the full decompressed data from +the IDAT chunks (with filter index bytes and possible padding bits) +return value is error*/ +static unsigned postProcessScanlines(unsigned char* out, unsigned char* in, + unsigned w, unsigned h, const LodePNGInfo* info_png) { + /* + This function converts the filtered-padded-interlaced data into pure 2D image buffer with the PNG's colortype. + Steps: + *) if no Adam7: 1) unfilter 2) remove padding bits (= possible extra bits per scanline if bpp < 8) + *) if adam7: 1) 7x unfilter 2) 7x remove padding bits 3) Adam7_deinterlace + NOTE: the in buffer will be overwritten with intermediate data! + */ + unsigned bpp = lodepng_get_bpp(&info_png->color); + if(bpp == 0) return 31; /*error: invalid colortype*/ + + if(info_png->interlace_method == 0) { + if(bpp < 8 && w * bpp != ((w * bpp + 7u) / 8u) * 8u) { + CERROR_TRY_RETURN(unfilter(in, in, w, h, bpp)); + removePaddingBits(out, in, w * bpp, ((w * bpp + 7u) / 8u) * 8u, h); + } + /*we can immediately filter into the out buffer, no other steps needed*/ + else CERROR_TRY_RETURN(unfilter(out, in, w, h, bpp)); + } else /*interlace_method is 1 (Adam7)*/ { + unsigned passw[7], passh[7]; size_t filter_passstart[8], padded_passstart[8], passstart[8]; + unsigned i; + + Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); + + for(i = 0; i != 7; ++i) { + CERROR_TRY_RETURN(unfilter(&in[padded_passstart[i]], &in[filter_passstart[i]], passw[i], passh[i], bpp)); + /*TODO: possible efficiency improvement: if in this reduced image the bits fit nicely in 1 scanline, + move bytes instead of bits or move not at all*/ + if(bpp < 8) { + /*remove padding bits in scanlines; after this there still may be padding + bits between the different reduced images: each reduced image still starts nicely at a byte*/ + removePaddingBits(&in[passstart[i]], &in[padded_passstart[i]], passw[i] * bpp, + ((passw[i] * bpp + 7u) / 8u) * 8u, passh[i]); + } + } + + Adam7_deinterlace(out, in, w, h, bpp); + } + + return 0; +} + +static unsigned readChunk_PLTE(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) { + unsigned pos = 0, i; + color->palettesize = chunkLength / 3u; + if(color->palettesize == 0 || color->palettesize > 256) return 38; /*error: palette too small or big*/ + lodepng_color_mode_alloc_palette(color); + if(!color->palette && color->palettesize) { + color->palettesize = 0; + return 83; /*alloc fail*/ + } + + for(i = 0; i != color->palettesize; ++i) { + color->palette[4 * i + 0] = data[pos++]; /*R*/ + color->palette[4 * i + 1] = data[pos++]; /*G*/ + color->palette[4 * i + 2] = data[pos++]; /*B*/ + color->palette[4 * i + 3] = 255; /*alpha*/ + } + + return 0; /* OK */ +} + +static unsigned readChunk_tRNS(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) { + unsigned i; + if(color->colortype == LCT_PALETTE) { + /*error: more alpha values given than there are palette entries*/ + if(chunkLength > color->palettesize) return 39; + + for(i = 0; i != chunkLength; ++i) color->palette[4 * i + 3] = data[i]; + } else if(color->colortype == LCT_GREY) { + /*error: this chunk must be 2 bytes for grayscale image*/ + if(chunkLength != 2) return 30; + + color->key_defined = 1; + color->key_r = color->key_g = color->key_b = 256u * data[0] + data[1]; + } else if(color->colortype == LCT_RGB) { + /*error: this chunk must be 6 bytes for RGB image*/ + if(chunkLength != 6) return 41; + + color->key_defined = 1; + color->key_r = 256u * data[0] + data[1]; + color->key_g = 256u * data[2] + data[3]; + color->key_b = 256u * data[4] + data[5]; + } + else return 42; /*error: tRNS chunk not allowed for other color models*/ + + return 0; /* OK */ +} + + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +/*background color chunk (bKGD)*/ +static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(info->color.colortype == LCT_PALETTE) { + /*error: this chunk must be 1 byte for indexed color image*/ + if(chunkLength != 1) return 43; + + /*error: invalid palette index, or maybe this chunk appeared before PLTE*/ + if(data[0] >= info->color.palettesize) return 103; + + info->background_defined = 1; + info->background_r = info->background_g = info->background_b = data[0]; + } else if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) { + /*error: this chunk must be 2 bytes for grayscale image*/ + if(chunkLength != 2) return 44; + + /*the values are truncated to bitdepth in the PNG file*/ + info->background_defined = 1; + info->background_r = info->background_g = info->background_b = 256u * data[0] + data[1]; + } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) { + /*error: this chunk must be 6 bytes for grayscale image*/ + if(chunkLength != 6) return 45; + + /*the values are truncated to bitdepth in the PNG file*/ + info->background_defined = 1; + info->background_r = 256u * data[0] + data[1]; + info->background_g = 256u * data[2] + data[3]; + info->background_b = 256u * data[4] + data[5]; + } + + return 0; /* OK */ +} + +/*text chunk (tEXt)*/ +static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + unsigned error = 0; + char *key = 0, *str = 0; + unsigned i; + + while(!error) /*not really a while loop, only used to break on error*/ { + unsigned length, string2_begin; + + length = 0; + while(length < chunkLength && data[length] != 0) ++length; + /*even though it's not allowed by the standard, no error is thrown if + there's no null termination char, if the text is empty*/ + if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ + + key = (char*)lodepng_malloc(length + 1); + if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ + + key[length] = 0; + for(i = 0; i != length; ++i) key[i] = (char)data[i]; + + string2_begin = length + 1; /*skip keyword null terminator*/ + + length = (unsigned)(chunkLength < string2_begin ? 0 : chunkLength - string2_begin); + str = (char*)lodepng_malloc(length + 1); + if(!str) CERROR_BREAK(error, 83); /*alloc fail*/ + + str[length] = 0; + for(i = 0; i != length; ++i) str[i] = (char)data[string2_begin + i]; + + error = lodepng_add_text(info, key, str); + + break; + } + + lodepng_free(key); + lodepng_free(str); + + return error; +} + +/*compressed text chunk (zTXt)*/ +static unsigned readChunk_zTXt(LodePNGInfo* info, const LodePNGDecompressSettings* zlibsettings, + const unsigned char* data, size_t chunkLength) { + unsigned error = 0; + unsigned i; + + unsigned length, string2_begin; + char *key = 0; + ucvector decoded; + + ucvector_init(&decoded); + + while(!error) /*not really a while loop, only used to break on error*/ { + for(length = 0; length < chunkLength && data[length] != 0; ++length) ; + if(length + 2 >= chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ + if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ + + key = (char*)lodepng_malloc(length + 1); + if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ + + key[length] = 0; + for(i = 0; i != length; ++i) key[i] = (char)data[i]; + + if(data[length + 1] != 0) CERROR_BREAK(error, 72); /*the 0 byte indicating compression must be 0*/ + + string2_begin = length + 2; + if(string2_begin > chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ + + length = (unsigned)chunkLength - string2_begin; + /*will fail if zlib error, e.g. if length is too small*/ + error = zlib_decompress(&decoded.data, &decoded.size, + &data[string2_begin], + length, zlibsettings); + if(error) break; + ucvector_push_back(&decoded, 0); + + error = lodepng_add_text(info, key, (char*)decoded.data); + + break; + } + + lodepng_free(key); + ucvector_cleanup(&decoded); + + return error; +} + +/*international text chunk (iTXt)*/ +static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecompressSettings* zlibsettings, + const unsigned char* data, size_t chunkLength) { + unsigned error = 0; + unsigned i; + + unsigned length, begin, compressed; + char *key = 0, *langtag = 0, *transkey = 0; + ucvector decoded; + ucvector_init(&decoded); /* TODO: only use in case of compressed text */ + + while(!error) /*not really a while loop, only used to break on error*/ { + /*Quick check if the chunk length isn't too small. Even without check + it'd still fail with other error checks below if it's too short. This just gives a different error code.*/ + if(chunkLength < 5) CERROR_BREAK(error, 30); /*iTXt chunk too short*/ + + /*read the key*/ + for(length = 0; length < chunkLength && data[length] != 0; ++length) ; + if(length + 3 >= chunkLength) CERROR_BREAK(error, 75); /*no null termination char, corrupt?*/ + if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ + + key = (char*)lodepng_malloc(length + 1); + if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ + + key[length] = 0; + for(i = 0; i != length; ++i) key[i] = (char)data[i]; + + /*read the compression method*/ + compressed = data[length + 1]; + if(data[length + 2] != 0) CERROR_BREAK(error, 72); /*the 0 byte indicating compression must be 0*/ + + /*even though it's not allowed by the standard, no error is thrown if + there's no null termination char, if the text is empty for the next 3 texts*/ + + /*read the langtag*/ + begin = length + 3; + length = 0; + for(i = begin; i < chunkLength && data[i] != 0; ++i) ++length; + + langtag = (char*)lodepng_malloc(length + 1); + if(!langtag) CERROR_BREAK(error, 83); /*alloc fail*/ + + langtag[length] = 0; + for(i = 0; i != length; ++i) langtag[i] = (char)data[begin + i]; + + /*read the transkey*/ + begin += length + 1; + length = 0; + for(i = begin; i < chunkLength && data[i] != 0; ++i) ++length; + + transkey = (char*)lodepng_malloc(length + 1); + if(!transkey) CERROR_BREAK(error, 83); /*alloc fail*/ + + transkey[length] = 0; + for(i = 0; i != length; ++i) transkey[i] = (char)data[begin + i]; + + /*read the actual text*/ + begin += length + 1; + + length = (unsigned)chunkLength < begin ? 0 : (unsigned)chunkLength - begin; + + if(compressed) { + /*will fail if zlib error, e.g. if length is too small*/ + error = zlib_decompress(&decoded.data, &decoded.size, + &data[begin], + length, zlibsettings); + if(error) break; + if(decoded.allocsize < decoded.size) decoded.allocsize = decoded.size; + ucvector_push_back(&decoded, 0); + } else { + if(!ucvector_resize(&decoded, length + 1)) CERROR_BREAK(error, 83 /*alloc fail*/); + + decoded.data[length] = 0; + for(i = 0; i != length; ++i) decoded.data[i] = data[begin + i]; + } + + error = lodepng_add_itext(info, key, langtag, transkey, (char*)decoded.data); + + break; + } + + lodepng_free(key); + lodepng_free(langtag); + lodepng_free(transkey); + ucvector_cleanup(&decoded); + + return error; +} + +static unsigned readChunk_tIME(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 7) return 73; /*invalid tIME chunk size*/ + + info->time_defined = 1; + info->time.year = 256u * data[0] + data[1]; + info->time.month = data[2]; + info->time.day = data[3]; + info->time.hour = data[4]; + info->time.minute = data[5]; + info->time.second = data[6]; + + return 0; /* OK */ +} + +static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/ + + info->phys_defined = 1; + info->phys_x = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3]; + info->phys_y = 16777216u * data[4] + 65536u * data[5] + 256u * data[6] + data[7]; + info->phys_unit = data[8]; + + return 0; /* OK */ +} + +static unsigned readChunk_gAMA(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 4) return 96; /*invalid gAMA chunk size*/ + + info->gama_defined = 1; + info->gama_gamma = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3]; + + return 0; /* OK */ +} + +static unsigned readChunk_cHRM(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 32) return 97; /*invalid cHRM chunk size*/ + + info->chrm_defined = 1; + info->chrm_white_x = 16777216u * data[ 0] + 65536u * data[ 1] + 256u * data[ 2] + data[ 3]; + info->chrm_white_y = 16777216u * data[ 4] + 65536u * data[ 5] + 256u * data[ 6] + data[ 7]; + info->chrm_red_x = 16777216u * data[ 8] + 65536u * data[ 9] + 256u * data[10] + data[11]; + info->chrm_red_y = 16777216u * data[12] + 65536u * data[13] + 256u * data[14] + data[15]; + info->chrm_green_x = 16777216u * data[16] + 65536u * data[17] + 256u * data[18] + data[19]; + info->chrm_green_y = 16777216u * data[20] + 65536u * data[21] + 256u * data[22] + data[23]; + info->chrm_blue_x = 16777216u * data[24] + 65536u * data[25] + 256u * data[26] + data[27]; + info->chrm_blue_y = 16777216u * data[28] + 65536u * data[29] + 256u * data[30] + data[31]; + + return 0; /* OK */ +} + +static unsigned readChunk_sRGB(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 1) return 98; /*invalid sRGB chunk size (this one is never ignored)*/ + + info->srgb_defined = 1; + info->srgb_intent = data[0]; + + return 0; /* OK */ +} + +static unsigned readChunk_iCCP(LodePNGInfo* info, const LodePNGDecompressSettings* zlibsettings, + const unsigned char* data, size_t chunkLength) { + unsigned error = 0; + unsigned i; + + unsigned length, string2_begin; + ucvector decoded; + + info->iccp_defined = 1; + if(info->iccp_name) lodepng_clear_icc(info); + + for(length = 0; length < chunkLength && data[length] != 0; ++length) ; + if(length + 2 >= chunkLength) return 75; /*no null termination, corrupt?*/ + if(length < 1 || length > 79) return 89; /*keyword too short or long*/ + + info->iccp_name = (char*)lodepng_malloc(length + 1); + if(!info->iccp_name) return 83; /*alloc fail*/ + + info->iccp_name[length] = 0; + for(i = 0; i != length; ++i) info->iccp_name[i] = (char)data[i]; + + if(data[length + 1] != 0) return 72; /*the 0 byte indicating compression must be 0*/ + + string2_begin = length + 2; + if(string2_begin > chunkLength) return 75; /*no null termination, corrupt?*/ + + length = (unsigned)chunkLength - string2_begin; + ucvector_init(&decoded); + error = zlib_decompress(&decoded.data, &decoded.size, + &data[string2_begin], + length, zlibsettings); + if(!error) { + if(decoded.size) { + info->iccp_profile_size = decoded.size; + info->iccp_profile = (unsigned char*)lodepng_malloc(decoded.size); + if(info->iccp_profile) { + lodepng_memcpy(info->iccp_profile, decoded.data, decoded.size); + } else { + error = 83; /* alloc fail */ + } + } else { + error = 100; /*invalid ICC profile size*/ + } + } + ucvector_cleanup(&decoded); + return error; +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos, + const unsigned char* in, size_t insize) { + const unsigned char* chunk = in + pos; + unsigned chunkLength; + const unsigned char* data; + unsigned unhandled = 0; + unsigned error = 0; + + if (pos + 4 > insize) return 30; + chunkLength = lodepng_chunk_length(chunk); + if(chunkLength > 2147483647) return 63; + data = lodepng_chunk_data_const(chunk); + if(data + chunkLength + 4 > in + insize) return 30; + + if(lodepng_chunk_type_equals(chunk, "PLTE")) { + error = readChunk_PLTE(&state->info_png.color, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "tRNS")) { + error = readChunk_tRNS(&state->info_png.color, data, chunkLength); +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + } else if(lodepng_chunk_type_equals(chunk, "bKGD")) { + error = readChunk_bKGD(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "tEXt")) { + error = readChunk_tEXt(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "zTXt")) { + error = readChunk_zTXt(&state->info_png, &state->decoder.zlibsettings, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "iTXt")) { + error = readChunk_iTXt(&state->info_png, &state->decoder.zlibsettings, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "tIME")) { + error = readChunk_tIME(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "pHYs")) { + error = readChunk_pHYs(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "gAMA")) { + error = readChunk_gAMA(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "cHRM")) { + error = readChunk_cHRM(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "sRGB")) { + error = readChunk_sRGB(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "iCCP")) { + error = readChunk_iCCP(&state->info_png, &state->decoder.zlibsettings, data, chunkLength); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } else { + /* unhandled chunk is ok (is not an error) */ + unhandled = 1; + } + + if(!error && !unhandled && !state->decoder.ignore_crc) { + if(lodepng_chunk_check_crc(chunk)) return 57; /*invalid CRC*/ + } + + return error; +} + +/*read a PNG, the result will be in the same color type as the PNG (hence "generic")*/ +static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h, + LodePNGState* state, + const unsigned char* in, size_t insize) { + unsigned char IEND = 0; + const unsigned char* chunk; + size_t i; + ucvector idat; /*the data from idat chunks*/ + unsigned char* scanlines = 0; + size_t scanlines_size = 0, expected_size = 0; + size_t outsize = 0; + + /*for unknown chunk order*/ + unsigned unknown = 0; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + unsigned critical_pos = 1; /*1 = after IHDR, 2 = after PLTE, 3 = after IDAT*/ +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + + + /* safe output values in case error happens */ + *out = 0; + *w = *h = 0; + + state->error = lodepng_inspect(w, h, state, in, insize); /*reads header and resets other parameters in state->info_png*/ + if(state->error) return; + + if(lodepng_pixel_overflow(*w, *h, &state->info_png.color, &state->info_raw)) { + CERROR_RETURN(state->error, 92); /*overflow possible due to amount of pixels*/ + } + + ucvector_init(&idat); + chunk = &in[33]; /*first byte of the first chunk after the header*/ + + /*loop through the chunks, ignoring unknown chunks and stopping at IEND chunk. + IDAT data is put at the start of the in buffer*/ + while(!IEND && !state->error) { + unsigned chunkLength; + const unsigned char* data; /*the data in the chunk*/ + + /*error: size of the in buffer too small to contain next chunk*/ + if((size_t)((chunk - in) + 12) > insize || chunk < in) { + if(state->decoder.ignore_end) break; /*other errors may still happen though*/ + CERROR_BREAK(state->error, 30); + } + + /*length of the data of the chunk, excluding the length bytes, chunk type and CRC bytes*/ + chunkLength = lodepng_chunk_length(chunk); + /*error: chunk length larger than the max PNG chunk size*/ + if(chunkLength > 2147483647) { + if(state->decoder.ignore_end) break; /*other errors may still happen though*/ + CERROR_BREAK(state->error, 63); + } + + if((size_t)((chunk - in) + chunkLength + 12) > insize || (chunk + chunkLength + 12) < in) { + CERROR_BREAK(state->error, 64); /*error: size of the in buffer too small to contain next chunk*/ + } + + data = lodepng_chunk_data_const(chunk); + + unknown = 0; + + /*IDAT chunk, containing compressed image data*/ + if(lodepng_chunk_type_equals(chunk, "IDAT")) { + size_t oldsize = idat.size; + size_t newsize; + if(lodepng_addofl(oldsize, chunkLength, &newsize)) CERROR_BREAK(state->error, 95); + if(!ucvector_resize(&idat, newsize)) CERROR_BREAK(state->error, 83 /*alloc fail*/); + for(i = 0; i != chunkLength; ++i) idat.data[oldsize + i] = data[i]; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + critical_pos = 3; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } else if(lodepng_chunk_type_equals(chunk, "IEND")) { + /*IEND chunk*/ + IEND = 1; + } else if(lodepng_chunk_type_equals(chunk, "PLTE")) { + /*palette chunk (PLTE)*/ + state->error = readChunk_PLTE(&state->info_png.color, data, chunkLength); + if(state->error) break; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + critical_pos = 2; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } else if(lodepng_chunk_type_equals(chunk, "tRNS")) { + /*palette transparency chunk (tRNS). Even though this one is an ancillary chunk , it is still compiled + in without 'LODEPNG_COMPILE_ANCILLARY_CHUNKS' because it contains essential color information that + affects the alpha channel of pixels. */ + state->error = readChunk_tRNS(&state->info_png.color, data, chunkLength); + if(state->error) break; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*background color chunk (bKGD)*/ + } else if(lodepng_chunk_type_equals(chunk, "bKGD")) { + state->error = readChunk_bKGD(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "tEXt")) { + /*text chunk (tEXt)*/ + if(state->decoder.read_text_chunks) { + state->error = readChunk_tEXt(&state->info_png, data, chunkLength); + if(state->error) break; + } + } else if(lodepng_chunk_type_equals(chunk, "zTXt")) { + /*compressed text chunk (zTXt)*/ + if(state->decoder.read_text_chunks) { + state->error = readChunk_zTXt(&state->info_png, &state->decoder.zlibsettings, data, chunkLength); + if(state->error) break; + } + } else if(lodepng_chunk_type_equals(chunk, "iTXt")) { + /*international text chunk (iTXt)*/ + if(state->decoder.read_text_chunks) { + state->error = readChunk_iTXt(&state->info_png, &state->decoder.zlibsettings, data, chunkLength); + if(state->error) break; + } + } else if(lodepng_chunk_type_equals(chunk, "tIME")) { + state->error = readChunk_tIME(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "pHYs")) { + state->error = readChunk_pHYs(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "gAMA")) { + state->error = readChunk_gAMA(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "cHRM")) { + state->error = readChunk_cHRM(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "sRGB")) { + state->error = readChunk_sRGB(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "iCCP")) { + state->error = readChunk_iCCP(&state->info_png, &state->decoder.zlibsettings, data, chunkLength); + if(state->error) break; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } else /*it's not an implemented chunk type, so ignore it: skip over the data*/ { + /*error: unknown critical chunk (5th bit of first byte of chunk type is 0)*/ + if(!state->decoder.ignore_critical && !lodepng_chunk_ancillary(chunk)) { + CERROR_BREAK(state->error, 69); + } + + unknown = 1; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + if(state->decoder.remember_unknown_chunks) { + state->error = lodepng_chunk_append(&state->info_png.unknown_chunks_data[critical_pos - 1], + &state->info_png.unknown_chunks_size[critical_pos - 1], chunk); + if(state->error) break; + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } + + if(!state->decoder.ignore_crc && !unknown) /*check CRC if wanted, only on known chunk types*/ { + if(lodepng_chunk_check_crc(chunk)) CERROR_BREAK(state->error, 57); /*invalid CRC*/ + } + + if(!IEND) chunk = lodepng_chunk_next_const(chunk); + } + + if (state->info_png.color.colortype == LCT_PALETTE + && !state->info_png.color.palette) { + state->error = 106; /* error: PNG file must have PLTE chunk if color type is palette */ + } + + /*predict output size, to allocate exact size for output buffer to avoid more dynamic allocation. + If the decompressed size does not match the prediction, the image must be corrupt.*/ + if(state->info_png.interlace_method == 0) { + expected_size = lodepng_get_raw_size_idat(*w, *h, &state->info_png.color); + } else { + /*Adam-7 interlaced: expected size is the sum of the 7 sub-images sizes*/ + const LodePNGColorMode* color = &state->info_png.color; + expected_size = 0; + expected_size += lodepng_get_raw_size_idat((*w + 7) >> 3, (*h + 7) >> 3, color); + if(*w > 4) expected_size += lodepng_get_raw_size_idat((*w + 3) >> 3, (*h + 7) >> 3, color); + expected_size += lodepng_get_raw_size_idat((*w + 3) >> 2, (*h + 3) >> 3, color); + if(*w > 2) expected_size += lodepng_get_raw_size_idat((*w + 1) >> 2, (*h + 3) >> 2, color); + expected_size += lodepng_get_raw_size_idat((*w + 1) >> 1, (*h + 1) >> 2, color); + if(*w > 1) expected_size += lodepng_get_raw_size_idat((*w + 0) >> 1, (*h + 1) >> 1, color); + expected_size += lodepng_get_raw_size_idat((*w + 0), (*h + 0) >> 1, color); + } + if(!state->error) { + /* This allocated data will be realloced by zlib_decompress, initially at + smaller size again. But the fact that it's already allocated at full size + here speeds the multiple reallocs up. TODO: make zlib_decompress support + receiving already allocated buffer with expected size instead. */ + scanlines = (unsigned char*)lodepng_malloc(expected_size); + if(!scanlines) state->error = 83; /*alloc fail*/ + scanlines_size = 0; + } + if(!state->error) { + state->error = zlib_decompress(&scanlines, &scanlines_size, idat.data, + idat.size, &state->decoder.zlibsettings); + if(!state->error && scanlines_size != expected_size) state->error = 91; /*decompressed size doesn't match prediction*/ + } + ucvector_cleanup(&idat); + + if(!state->error) { + outsize = lodepng_get_raw_size(*w, *h, &state->info_png.color); + *out = (unsigned char*)lodepng_malloc(outsize); + if(!*out) state->error = 83; /*alloc fail*/ + } + if(!state->error) { + for(i = 0; i < outsize; i++) (*out)[i] = 0; + state->error = postProcessScanlines(*out, scanlines, *w, *h, &state->info_png); + } + lodepng_free(scanlines); +} + +unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, + LodePNGState* state, + const unsigned char* in, size_t insize) { + *out = 0; + decodeGeneric(out, w, h, state, in, insize); + if(state->error) return state->error; + if(!state->decoder.color_convert || lodepng_color_mode_equal(&state->info_raw, &state->info_png.color)) { + /*same color type, no copying or converting of data needed*/ + /*store the info_png color settings on the info_raw so that the info_raw still reflects what colortype + the raw image has to the end user*/ + if(!state->decoder.color_convert) { + state->error = lodepng_color_mode_copy(&state->info_raw, &state->info_png.color); + if(state->error) return state->error; + } + } else { /*color conversion needed*/ + unsigned char* data = *out; + size_t outsize; + + /*TODO: check if this works according to the statement in the documentation: "The converter can convert + from grayscale input color type, to 8-bit grayscale or grayscale with alpha"*/ + if(!(state->info_raw.colortype == LCT_RGB || state->info_raw.colortype == LCT_RGBA) + && !(state->info_raw.bitdepth == 8)) { + return 56; /*unsupported color mode conversion*/ + } + + outsize = lodepng_get_raw_size(*w, *h, &state->info_raw); + *out = (unsigned char*)lodepng_malloc(outsize); + if(!(*out)) { + state->error = 83; /*alloc fail*/ + } + else state->error = lodepng_convert(*out, data, &state->info_raw, + &state->info_png.color, *w, *h); + lodepng_free(data); + } + return state->error; +} + +unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, + size_t insize, LodePNGColorType colortype, unsigned bitdepth) { + unsigned error; + LodePNGState state; + lodepng_state_init(&state); + state.info_raw.colortype = colortype; + state.info_raw.bitdepth = bitdepth; + error = lodepng_decode(out, w, h, &state, in, insize); + lodepng_state_cleanup(&state); + return error; +} + +unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) { + return lodepng_decode_memory(out, w, h, in, insize, LCT_RGBA, 8); +} + +unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) { + return lodepng_decode_memory(out, w, h, in, insize, LCT_RGB, 8); +} + +#ifdef LODEPNG_COMPILE_DISK +unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename, + LodePNGColorType colortype, unsigned bitdepth) { + unsigned char* buffer = 0; + size_t buffersize; + unsigned error; + /* safe output values in case error happens */ + *out = 0; + *w = *h = 0; + error = lodepng_load_file(&buffer, &buffersize, filename); + if(!error) error = lodepng_decode_memory(out, w, h, buffer, buffersize, colortype, bitdepth); + lodepng_free(buffer); + return error; +} + +unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename) { + return lodepng_decode_file(out, w, h, filename, LCT_RGBA, 8); +} + +unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename) { + return lodepng_decode_file(out, w, h, filename, LCT_RGB, 8); +} +#endif /*LODEPNG_COMPILE_DISK*/ + +void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings) { + settings->color_convert = 1; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + settings->read_text_chunks = 1; + settings->remember_unknown_chunks = 0; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + settings->ignore_crc = 0; + settings->ignore_critical = 0; + settings->ignore_end = 0; + lodepng_decompress_settings_init(&settings->zlibsettings); +} + +#endif /*LODEPNG_COMPILE_DECODER*/ + +#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) + +void lodepng_state_init(LodePNGState* state) { +#ifdef LODEPNG_COMPILE_DECODER + lodepng_decoder_settings_init(&state->decoder); +#endif /*LODEPNG_COMPILE_DECODER*/ +#ifdef LODEPNG_COMPILE_ENCODER + lodepng_encoder_settings_init(&state->encoder); +#endif /*LODEPNG_COMPILE_ENCODER*/ + lodepng_color_mode_init(&state->info_raw); + lodepng_info_init(&state->info_png); + state->error = 1; +} + +void lodepng_state_cleanup(LodePNGState* state) { + lodepng_color_mode_cleanup(&state->info_raw); + lodepng_info_cleanup(&state->info_png); +} + +void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source) { + lodepng_state_cleanup(dest); + *dest = *source; + lodepng_color_mode_init(&dest->info_raw); + lodepng_info_init(&dest->info_png); + dest->error = lodepng_color_mode_copy(&dest->info_raw, &source->info_raw); if(dest->error) return; + dest->error = lodepng_info_copy(&dest->info_png, &source->info_png); if(dest->error) return; +} + +#endif /* defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) */ + +#ifdef LODEPNG_COMPILE_ENCODER + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / PNG Encoder / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*chunkName must be string of 4 characters*/ +static unsigned addChunk(ucvector* out, const char* chunkName, const unsigned char* data, size_t length) { + CERROR_TRY_RETURN(lodepng_chunk_create(&out->data, &out->size, (unsigned)length, chunkName, data)); + out->allocsize = out->size; /*fix the allocsize again*/ + return 0; +} + +static void writeSignature(ucvector* out) { + /*8 bytes PNG signature, aka the magic bytes*/ + ucvector_push_back(out, 137); + ucvector_push_back(out, 80); + ucvector_push_back(out, 78); + ucvector_push_back(out, 71); + ucvector_push_back(out, 13); + ucvector_push_back(out, 10); + ucvector_push_back(out, 26); + ucvector_push_back(out, 10); +} + +static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) { + unsigned char data[13]; + + lodepng_set32bitInt(data + 0, w); /*width*/ + lodepng_set32bitInt(data + 4, h); /*height*/ + data[8] = (unsigned char)bitdepth; /*bit depth*/ + data[9] = (unsigned char)colortype; /*color type*/ + data[10] = 0; /*compression method*/ + data[11] = 0; /*filter method*/ + data[12] = interlace_method; /*interlace method*/ + + return addChunk(out, "IHDR", data, sizeof(data)); +} + +static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info) { + unsigned error = 0; + size_t i; + ucvector PLTE; + ucvector_init(&PLTE); + for(i = 0; i != info->palettesize * 4; ++i) { + /*add all channels except alpha channel*/ + if(i % 4 != 3) ucvector_push_back(&PLTE, info->palette[i]); + } + error = addChunk(out, "PLTE", PLTE.data, PLTE.size); + ucvector_cleanup(&PLTE); + + return error; +} + +static unsigned addChunk_tRNS(ucvector* out, const LodePNGColorMode* info) { + unsigned error = 0; + size_t i; + ucvector tRNS; + ucvector_init(&tRNS); + if(info->colortype == LCT_PALETTE) { + size_t amount = info->palettesize; + /*the tail of palette values that all have 255 as alpha, does not have to be encoded*/ + for(i = info->palettesize; i != 0; --i) { + if(info->palette[4 * (i - 1) + 3] == 255) --amount; + else break; + } + /*add only alpha channel*/ + for(i = 0; i != amount; ++i) ucvector_push_back(&tRNS, info->palette[4 * i + 3]); + } else if(info->colortype == LCT_GREY) { + if(info->key_defined) { + ucvector_push_back(&tRNS, (unsigned char)(info->key_r >> 8)); + ucvector_push_back(&tRNS, (unsigned char)(info->key_r & 255)); + } + } else if(info->colortype == LCT_RGB) { + if(info->key_defined) { + ucvector_push_back(&tRNS, (unsigned char)(info->key_r >> 8)); + ucvector_push_back(&tRNS, (unsigned char)(info->key_r & 255)); + ucvector_push_back(&tRNS, (unsigned char)(info->key_g >> 8)); + ucvector_push_back(&tRNS, (unsigned char)(info->key_g & 255)); + ucvector_push_back(&tRNS, (unsigned char)(info->key_b >> 8)); + ucvector_push_back(&tRNS, (unsigned char)(info->key_b & 255)); + } + } + + error = addChunk(out, "tRNS", tRNS.data, tRNS.size); + ucvector_cleanup(&tRNS); + + return error; +} + +static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t datasize, + LodePNGCompressSettings* zlibsettings) { + ucvector zlibdata; + unsigned error = 0; + + /*compress with the Zlib compressor*/ + ucvector_init(&zlibdata); + error = zlib_compress(&zlibdata.data, &zlibdata.size, data, datasize, zlibsettings); + if(!error) error = addChunk(out, "IDAT", zlibdata.data, zlibdata.size); + ucvector_cleanup(&zlibdata); + + return error; +} + +static unsigned addChunk_IEND(ucvector* out) { + unsigned error = 0; + error = addChunk(out, "IEND", 0, 0); + return error; +} + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + +static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const char* textstring) { + unsigned error = 0; + size_t i; + ucvector text; + ucvector_init(&text); + for(i = 0; keyword[i] != 0; ++i) ucvector_push_back(&text, (unsigned char)keyword[i]); + if(i < 1 || i > 79) return 89; /*error: invalid keyword size*/ + ucvector_push_back(&text, 0); /*0 termination char*/ + for(i = 0; textstring[i] != 0; ++i) ucvector_push_back(&text, (unsigned char)textstring[i]); + error = addChunk(out, "tEXt", text.data, text.size); + ucvector_cleanup(&text); + + return error; +} + +static unsigned addChunk_zTXt(ucvector* out, const char* keyword, const char* textstring, + LodePNGCompressSettings* zlibsettings) { + unsigned error = 0; + ucvector data, compressed; + size_t i, textsize = lodepng_strlen(textstring); + + ucvector_init(&data); + ucvector_init(&compressed); + for(i = 0; keyword[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)keyword[i]); + if(i < 1 || i > 79) return 89; /*error: invalid keyword size*/ + ucvector_push_back(&data, 0); /*0 termination char*/ + ucvector_push_back(&data, 0); /*compression method: 0*/ + + error = zlib_compress(&compressed.data, &compressed.size, + (const unsigned char*)textstring, textsize, zlibsettings); + if(!error) { + for(i = 0; i != compressed.size; ++i) ucvector_push_back(&data, compressed.data[i]); + error = addChunk(out, "zTXt", data.data, data.size); + } + + ucvector_cleanup(&compressed); + ucvector_cleanup(&data); + return error; +} + +static unsigned addChunk_iTXt(ucvector* out, unsigned compressed, const char* keyword, const char* langtag, + const char* transkey, const char* textstring, LodePNGCompressSettings* zlibsettings) { + unsigned error = 0; + ucvector data; + size_t i, textsize = lodepng_strlen(textstring); + + ucvector_init(&data); + + for(i = 0; keyword[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)keyword[i]); + if(i < 1 || i > 79) return 89; /*error: invalid keyword size*/ + ucvector_push_back(&data, 0); /*null termination char*/ + ucvector_push_back(&data, compressed ? 1 : 0); /*compression flag*/ + ucvector_push_back(&data, 0); /*compression method*/ + for(i = 0; langtag[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)langtag[i]); + ucvector_push_back(&data, 0); /*null termination char*/ + for(i = 0; transkey[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)transkey[i]); + ucvector_push_back(&data, 0); /*null termination char*/ + + if(compressed) { + ucvector compressed_data; + ucvector_init(&compressed_data); + error = zlib_compress(&compressed_data.data, &compressed_data.size, + (const unsigned char*)textstring, textsize, zlibsettings); + if(!error) { + for(i = 0; i != compressed_data.size; ++i) ucvector_push_back(&data, compressed_data.data[i]); + } + ucvector_cleanup(&compressed_data); + } else /*not compressed*/ { + for(i = 0; textstring[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)textstring[i]); + } + + if(!error) error = addChunk(out, "iTXt", data.data, data.size); + ucvector_cleanup(&data); + return error; +} + +static unsigned addChunk_bKGD(ucvector* out, const LodePNGInfo* info) { + unsigned char data[6]; + size_t size = 0; + if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) { + data[0] = (unsigned char)(info->background_r >> 8); + data[1] = (unsigned char)(info->background_r & 255); + size = 2; + } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) { + data[0] = (unsigned char)(info->background_r >> 8); + data[1] = (unsigned char)(info->background_r & 255); + data[2] = (unsigned char)(info->background_g >> 8); + data[3] = (unsigned char)(info->background_g & 255); + data[4] = (unsigned char)(info->background_b >> 8); + data[5] = (unsigned char)(info->background_b & 255); + size = 6; + } else if(info->color.colortype == LCT_PALETTE) { + data[0] =(unsigned char)(info->background_r & 255); /*palette index*/ + size = 1; + } + return addChunk(out, "bKGD", data, size); +} + +static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time) { + unsigned char data[7]; + data[0] = (unsigned char)(time->year >> 8); + data[1] = (unsigned char)(time->year & 255); + data[2] = (unsigned char)time->month; + data[3] = (unsigned char)time->day; + data[4] = (unsigned char)time->hour; + data[5] = (unsigned char)time->minute; + data[6] = (unsigned char)time->second; + return addChunk(out, "tIME", data, sizeof(data)); +} + +static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info) { + unsigned char data[9]; + lodepng_set32bitInt(data + 0, info->phys_x); + lodepng_set32bitInt(data + 4, info->phys_y); data[8] = info->phys_unit; + return addChunk(out, "pHYs", data, sizeof(data)); +} + +static unsigned addChunk_gAMA(ucvector* out, const LodePNGInfo* info) { + unsigned char data[4]; + lodepng_set32bitInt(data, info->gama_gamma); + return addChunk(out, "gAMA", data, sizeof(data)); +} + +static unsigned addChunk_cHRM(ucvector* out, const LodePNGInfo* info) { + unsigned char data[32]; + lodepng_set32bitInt(data + 0, info->chrm_white_x); + lodepng_set32bitInt(data + 4, info->chrm_white_y); + lodepng_set32bitInt(data + 8, info->chrm_red_x); + lodepng_set32bitInt(data + 12, info->chrm_red_y); + lodepng_set32bitInt(data + 16, info->chrm_green_x); + lodepng_set32bitInt(data + 20, info->chrm_green_y); + lodepng_set32bitInt(data + 24, info->chrm_blue_x); + lodepng_set32bitInt(data + 28, info->chrm_blue_y); + return addChunk(out, "cHRM", data, sizeof(data)); +} + +static unsigned addChunk_sRGB(ucvector* out, const LodePNGInfo* info) { + unsigned char data = info->srgb_intent; + return addChunk(out, "sRGB", &data, 1); +} + +static unsigned addChunk_iCCP(ucvector* out, const LodePNGInfo* info, LodePNGCompressSettings* zlibsettings) { + unsigned error = 0; + ucvector data, compressed; + size_t i; + + ucvector_init(&data); + ucvector_init(&compressed); + for(i = 0; info->iccp_name[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)info->iccp_name[i]); + if(i < 1 || i > 79) return 89; /*error: invalid keyword size*/ + ucvector_push_back(&data, 0); /*0 termination char*/ + ucvector_push_back(&data, 0); /*compression method: 0*/ + + error = zlib_compress(&compressed.data, &compressed.size, + info->iccp_profile, info->iccp_profile_size, zlibsettings); + if(!error) { + for(i = 0; i != compressed.size; ++i) ucvector_push_back(&data, compressed.data[i]); + error = addChunk(out, "iCCP", data.data, data.size); + } + + ucvector_cleanup(&compressed); + ucvector_cleanup(&data); + return error; +} + +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +static void filterScanline(unsigned char* out, const unsigned char* scanline, const unsigned char* prevline, + size_t length, size_t bytewidth, unsigned char filterType) { + size_t i; + switch(filterType) { + case 0: /*None*/ + for(i = 0; i != length; ++i) out[i] = scanline[i]; + break; + case 1: /*Sub*/ + for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; + for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - scanline[i - bytewidth]; + break; + case 2: /*Up*/ + if(prevline) { + for(i = 0; i != length; ++i) out[i] = scanline[i] - prevline[i]; + } else { + for(i = 0; i != length; ++i) out[i] = scanline[i]; + } + break; + case 3: /*Average*/ + if(prevline) { + for(i = 0; i != bytewidth; ++i) out[i] = scanline[i] - (prevline[i] >> 1); + for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - ((scanline[i - bytewidth] + prevline[i]) >> 1); + } else { + for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; + for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - (scanline[i - bytewidth] >> 1); + } + break; + case 4: /*Paeth*/ + if(prevline) { + /*paethPredictor(0, prevline[i], 0) is always prevline[i]*/ + for(i = 0; i != bytewidth; ++i) out[i] = (scanline[i] - prevline[i]); + for(i = bytewidth; i < length; ++i) { + out[i] = (scanline[i] - paethPredictor(scanline[i - bytewidth], prevline[i], prevline[i - bytewidth])); + } + } else { + for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; + /*paethPredictor(scanline[i - bytewidth], 0, 0) is always scanline[i - bytewidth]*/ + for(i = bytewidth; i < length; ++i) out[i] = (scanline[i] - scanline[i - bytewidth]); + } + break; + default: return; /*nonexistent filter type given*/ + } +} + +/* integer binary logarithm */ +static size_t ilog2(size_t i) { + size_t result = 0; + while(i >= 65536) { result += 16; i >>= 16; } + while(i >= 256) { result += 8; i >>= 8; } + while(i >= 16) { result += 4; i >>= 4; } + while(i >= 2) { result += 1; i >>= 1; } + return result; +} + +/* integer approximation for i * log2(i), helper function for LFS_ENTROPY */ +static size_t ilog2i(size_t i) { + size_t l; + if(i == 0) return 0; + l = ilog2(i); + /* approximate i*log2(i): l is integer logarithm, ((i - (1u << l)) << 1u) + linearly approximates the missing fractional part multiplied by i */ + return i * l + ((i - (1u << l)) << 1u); +} + +static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, + const LodePNGColorMode* info, const LodePNGEncoderSettings* settings) { + /* + For PNG filter method 0 + out must be a buffer with as size: h + (w * h * bpp + 7u) / 8u, because there are + the scanlines with 1 extra byte per scanline + */ + + unsigned bpp = lodepng_get_bpp(info); + /*the width of a scanline in bytes, not including the filter type*/ + size_t linebytes = (w * bpp + 7u) / 8u; + /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/ + size_t bytewidth = (bpp + 7u) / 8u; + const unsigned char* prevline = 0; + unsigned x, y; + unsigned error = 0; + LodePNGFilterStrategy strategy = settings->filter_strategy; + + /* + There is a heuristic called the minimum sum of absolute differences heuristic, suggested by the PNG standard: + * If the image type is Palette, or the bit depth is smaller than 8, then do not filter the image (i.e. + use fixed filtering, with the filter None). + * (The other case) If the image type is Grayscale or RGB (with or without Alpha), and the bit depth is + not smaller than 8, then use adaptive filtering heuristic as follows: independently for each row, apply + all five filters and select the filter that produces the smallest sum of absolute values per row. + This heuristic is used if filter strategy is LFS_MINSUM and filter_palette_zero is true. + + If filter_palette_zero is true and filter_strategy is not LFS_MINSUM, the above heuristic is followed, + but for "the other case", whatever strategy filter_strategy is set to instead of the minimum sum + heuristic is used. + */ + if(settings->filter_palette_zero && + (info->colortype == LCT_PALETTE || info->bitdepth < 8)) strategy = LFS_ZERO; + + if(bpp == 0) return 31; /*error: invalid color type*/ + + if(strategy >= LFS_ZERO && strategy <= LFS_FOUR) { + unsigned char type = (unsigned char)strategy; + for(y = 0; y != h; ++y) { + size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ + size_t inindex = linebytes * y; + out[outindex] = type; /*filter type byte*/ + filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); + prevline = &in[inindex]; + } + } else if(strategy == LFS_MINSUM) { + /*adaptive filtering*/ + unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ + size_t smallest = 0; + unsigned char type, bestType = 0; + + for(type = 0; type != 5; ++type) { + attempt[type] = (unsigned char*)lodepng_malloc(linebytes); + if(!attempt[type]) return 83; /*alloc fail*/ + } + + if(!error) { + for(y = 0; y != h; ++y) { + /*try the 5 filter types*/ + for(type = 0; type != 5; ++type) { + size_t sum = 0; + filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); + + /*calculate the sum of the result*/ + if(type == 0) { + for(x = 0; x != linebytes; ++x) sum += (unsigned char)(attempt[type][x]); + } else { + for(x = 0; x != linebytes; ++x) { + /*For differences, each byte should be treated as signed, values above 127 are negative + (converted to signed char). Filtertype 0 isn't a difference though, so use unsigned there. + This means filtertype 0 is almost never chosen, but that is justified.*/ + unsigned char s = attempt[type][x]; + sum += s < 128 ? s : (255U - s); + } + } + + /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ + if(type == 0 || sum < smallest) { + bestType = type; + smallest = sum; + } + } + + prevline = &in[y * linebytes]; + + /*now fill the out values*/ + out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ + for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; + } + } + + for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); + } else if(strategy == LFS_ENTROPY) { + unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ + size_t bestSum = 0; + unsigned type, bestType = 0; + unsigned count[256]; + + for(type = 0; type != 5; ++type) { + attempt[type] = (unsigned char*)lodepng_malloc(linebytes); + if(!attempt[type]) return 83; /*alloc fail*/ + } + + for(y = 0; y != h; ++y) { + /*try the 5 filter types*/ + for(type = 0; type != 5; ++type) { + size_t sum = 0; + filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); + for(x = 0; x != 256; ++x) count[x] = 0; + for(x = 0; x != linebytes; ++x) ++count[attempt[type][x]]; + ++count[type]; /*the filter type itself is part of the scanline*/ + for(x = 0; x != 256; ++x) { + sum += ilog2i(count[x]); + } + /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ + if(type == 0 || sum > bestSum) { + bestType = type; + bestSum = sum; + } + } + + prevline = &in[y * linebytes]; + + /*now fill the out values*/ + out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ + for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; + } + + for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); + } else if(strategy == LFS_PREDEFINED) { + for(y = 0; y != h; ++y) { + size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ + size_t inindex = linebytes * y; + unsigned char type = settings->predefined_filters[y]; + out[outindex] = type; /*filter type byte*/ + filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); + prevline = &in[inindex]; + } + } else if(strategy == LFS_BRUTE_FORCE) { + /*brute force filter chooser. + deflate the scanline after every filter attempt to see which one deflates best. + This is very slow and gives only slightly smaller, sometimes even larger, result*/ + size_t size[5]; + unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ + size_t smallest = 0; + unsigned type = 0, bestType = 0; + unsigned char* dummy; + LodePNGCompressSettings zlibsettings = settings->zlibsettings; + /*use fixed tree on the attempts so that the tree is not adapted to the filtertype on purpose, + to simulate the true case where the tree is the same for the whole image. Sometimes it gives + better result with dynamic tree anyway. Using the fixed tree sometimes gives worse, but in rare + cases better compression. It does make this a bit less slow, so it's worth doing this.*/ + zlibsettings.btype = 1; + /*a custom encoder likely doesn't read the btype setting and is optimized for complete PNG + images only, so disable it*/ + zlibsettings.custom_zlib = 0; + zlibsettings.custom_deflate = 0; + for(type = 0; type != 5; ++type) { + attempt[type] = (unsigned char*)lodepng_malloc(linebytes); + if(!attempt[type]) return 83; /*alloc fail*/ + } + for(y = 0; y != h; ++y) /*try the 5 filter types*/ { + for(type = 0; type != 5; ++type) { + unsigned testsize = (unsigned)linebytes; + /*if(testsize > 8) testsize /= 8;*/ /*it already works good enough by testing a part of the row*/ + + filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); + size[type] = 0; + dummy = 0; + zlib_compress(&dummy, &size[type], attempt[type], testsize, &zlibsettings); + lodepng_free(dummy); + /*check if this is smallest size (or if type == 0 it's the first case so always store the values)*/ + if(type == 0 || size[type] < smallest) { + bestType = type; + smallest = size[type]; + } + } + prevline = &in[y * linebytes]; + out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ + for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; + } + for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); + } + else return 88; /* unknown filter strategy */ + + return error; +} + +static void addPaddingBits(unsigned char* out, const unsigned char* in, + size_t olinebits, size_t ilinebits, unsigned h) { + /*The opposite of the removePaddingBits function + olinebits must be >= ilinebits*/ + unsigned y; + size_t diff = olinebits - ilinebits; + size_t obp = 0, ibp = 0; /*bit pointers*/ + for(y = 0; y != h; ++y) { + size_t x; + for(x = 0; x < ilinebits; ++x) { + unsigned char bit = readBitFromReversedStream(&ibp, in); + setBitOfReversedStream(&obp, out, bit); + } + /*obp += diff; --> no, fill in some value in the padding bits too, to avoid + "Use of uninitialised value of size ###" warning from valgrind*/ + for(x = 0; x != diff; ++x) setBitOfReversedStream(&obp, out, 0); + } +} + +/* +in: non-interlaced image with size w*h +out: the same pixels, but re-ordered according to PNG's Adam7 interlacing, with + no padding bits between scanlines, but between reduced images so that each + reduced image starts at a byte. +bpp: bits per pixel +there are no padding bits, not between scanlines, not between reduced images +in has the following size in bits: w * h * bpp. +out is possibly bigger due to padding bits between reduced images +NOTE: comments about padding bits are only relevant if bpp < 8 +*/ +static void Adam7_interlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { + unsigned passw[7], passh[7]; + size_t filter_passstart[8], padded_passstart[8], passstart[8]; + unsigned i; + + Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); + + if(bpp >= 8) { + for(i = 0; i != 7; ++i) { + unsigned x, y, b; + size_t bytewidth = bpp / 8u; + for(y = 0; y < passh[i]; ++y) + for(x = 0; x < passw[i]; ++x) { + size_t pixelinstart = ((ADAM7_IY[i] + y * ADAM7_DY[i]) * w + ADAM7_IX[i] + x * ADAM7_DX[i]) * bytewidth; + size_t pixeloutstart = passstart[i] + (y * passw[i] + x) * bytewidth; + for(b = 0; b < bytewidth; ++b) { + out[pixeloutstart + b] = in[pixelinstart + b]; + } + } + } + } else /*bpp < 8: Adam7 with pixels < 8 bit is a bit trickier: with bit pointers*/ { + for(i = 0; i != 7; ++i) { + unsigned x, y, b; + unsigned ilinebits = bpp * passw[i]; + unsigned olinebits = bpp * w; + size_t obp, ibp; /*bit pointers (for out and in buffer)*/ + for(y = 0; y < passh[i]; ++y) + for(x = 0; x < passw[i]; ++x) { + ibp = (ADAM7_IY[i] + y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + x * ADAM7_DX[i]) * bpp; + obp = (8 * passstart[i]) + (y * ilinebits + x * bpp); + for(b = 0; b < bpp; ++b) { + unsigned char bit = readBitFromReversedStream(&ibp, in); + setBitOfReversedStream(&obp, out, bit); + } + } + } + } +} + +/*out must be buffer big enough to contain uncompressed IDAT chunk data, and in must contain the full image. +return value is error**/ +static unsigned preProcessScanlines(unsigned char** out, size_t* outsize, const unsigned char* in, + unsigned w, unsigned h, + const LodePNGInfo* info_png, const LodePNGEncoderSettings* settings) { + /* + This function converts the pure 2D image with the PNG's colortype, into filtered-padded-interlaced data. Steps: + *) if no Adam7: 1) add padding bits (= possible extra bits per scanline if bpp < 8) 2) filter + *) if adam7: 1) Adam7_interlace 2) 7x add padding bits 3) 7x filter + */ + unsigned bpp = lodepng_get_bpp(&info_png->color); + unsigned error = 0; + + if(info_png->interlace_method == 0) { + *outsize = h + (h * ((w * bpp + 7u) / 8u)); /*image size plus an extra byte per scanline + possible padding bits*/ + *out = (unsigned char*)lodepng_malloc(*outsize); + if(!(*out) && (*outsize)) error = 83; /*alloc fail*/ + + if(!error) { + /*non multiple of 8 bits per scanline, padding bits needed per scanline*/ + if(bpp < 8 && w * bpp != ((w * bpp + 7u) / 8u) * 8u) { + unsigned char* padded = (unsigned char*)lodepng_malloc(h * ((w * bpp + 7u) / 8u)); + if(!padded) error = 83; /*alloc fail*/ + if(!error) { + addPaddingBits(padded, in, ((w * bpp + 7u) / 8u) * 8u, w * bpp, h); + error = filter(*out, padded, w, h, &info_png->color, settings); + } + lodepng_free(padded); + } else { + /*we can immediately filter into the out buffer, no other steps needed*/ + error = filter(*out, in, w, h, &info_png->color, settings); + } + } + } else /*interlace_method is 1 (Adam7)*/ { + unsigned passw[7], passh[7]; + size_t filter_passstart[8], padded_passstart[8], passstart[8]; + unsigned char* adam7; + + Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); + + *outsize = filter_passstart[7]; /*image size plus an extra byte per scanline + possible padding bits*/ + *out = (unsigned char*)lodepng_malloc(*outsize); + if(!(*out)) error = 83; /*alloc fail*/ + + adam7 = (unsigned char*)lodepng_malloc(passstart[7]); + if(!adam7 && passstart[7]) error = 83; /*alloc fail*/ + + if(!error) { + unsigned i; + + Adam7_interlace(adam7, in, w, h, bpp); + for(i = 0; i != 7; ++i) { + if(bpp < 8) { + unsigned char* padded = (unsigned char*)lodepng_malloc(padded_passstart[i + 1] - padded_passstart[i]); + if(!padded) ERROR_BREAK(83); /*alloc fail*/ + addPaddingBits(padded, &adam7[passstart[i]], + ((passw[i] * bpp + 7u) / 8u) * 8u, passw[i] * bpp, passh[i]); + error = filter(&(*out)[filter_passstart[i]], padded, + passw[i], passh[i], &info_png->color, settings); + lodepng_free(padded); + } else { + error = filter(&(*out)[filter_passstart[i]], &adam7[padded_passstart[i]], + passw[i], passh[i], &info_png->color, settings); + } + + if(error) break; + } + } + + lodepng_free(adam7); + } + + return error; +} + +/* +palette must have 4 * palettesize bytes allocated, and given in format RGBARGBARGBARGBA... +returns 0 if the palette is opaque, +returns 1 if the palette has a single color with alpha 0 ==> color key +returns 2 if the palette is semi-translucent. +*/ +static unsigned getPaletteTranslucency(const unsigned char* palette, size_t palettesize) { + size_t i; + unsigned key = 0; + unsigned r = 0, g = 0, b = 0; /*the value of the color with alpha 0, so long as color keying is possible*/ + for(i = 0; i != palettesize; ++i) { + if(!key && palette[4 * i + 3] == 0) { + r = palette[4 * i + 0]; g = palette[4 * i + 1]; b = palette[4 * i + 2]; + key = 1; + i = (size_t)(-1); /*restart from beginning, to detect earlier opaque colors with key's value*/ + } + else if(palette[4 * i + 3] != 255) return 2; + /*when key, no opaque RGB may have key's RGB*/ + else if(key && r == palette[i * 4 + 0] && g == palette[i * 4 + 1] && b == palette[i * 4 + 2]) return 2; + } + return key; +} + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +static unsigned addUnknownChunks(ucvector* out, unsigned char* data, size_t datasize) { + unsigned char* inchunk = data; + while((size_t)(inchunk - data) < datasize) { + CERROR_TRY_RETURN(lodepng_chunk_append(&out->data, &out->size, inchunk)); + out->allocsize = out->size; /*fix the allocsize again*/ + inchunk = lodepng_chunk_next(inchunk); + } + return 0; +} + +static unsigned isGrayICCProfile(const unsigned char* profile, unsigned size) { + /* + It is a gray profile if bytes 16-19 are "GRAY", rgb profile if bytes 16-19 + are "RGB ". We do not perform any full parsing of the ICC profile here, other + than check those 4 bytes to grayscale profile. Other than that, validity of + the profile is not checked. This is needed only because the PNG specification + requires using a non-gray color model if there is an ICC profile with "RGB " + (sadly limiting compression opportunities if the input data is grayscale RGB + data), and requires using a gray color model if it is "GRAY". + */ + if(size < 20) return 0; + return profile[16] == 'G' && profile[17] == 'R' && profile[18] == 'A' && profile[19] == 'Y'; +} + +static unsigned isRGBICCProfile(const unsigned char* profile, unsigned size) { + /* See comment in isGrayICCProfile*/ + if(size < 20) return 0; + return profile[16] == 'R' && profile[17] == 'G' && profile[18] == 'B' && profile[19] == ' '; +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +unsigned lodepng_encode(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h, + LodePNGState* state) { + unsigned char* data = 0; /*uncompressed version of the IDAT chunk data*/ + size_t datasize = 0; + ucvector outv; + LodePNGInfo info; + const LodePNGInfo* info_png = &state->info_png; + + ucvector_init(&outv); + lodepng_info_init(&info); + + /*provide some proper output values if error will happen*/ + *out = 0; + *outsize = 0; + state->error = 0; + + /*check input values validity*/ + if((info_png->color.colortype == LCT_PALETTE || state->encoder.force_palette) + && (info_png->color.palettesize == 0 || info_png->color.palettesize > 256)) { + state->error = 68; /*invalid palette size, it is only allowed to be 1-256*/ + goto cleanup; + } + if(state->encoder.zlibsettings.btype > 2) { + state->error = 61; /*error: nonexistent btype*/ + goto cleanup; + } + if(info_png->interlace_method > 1) { + state->error = 71; /*error: nonexistent interlace mode*/ + goto cleanup; + } + state->error = checkColorValidity(info_png->color.colortype, info_png->color.bitdepth); + if(state->error) goto cleanup; /*error: nonexistent color type given*/ + state->error = checkColorValidity(state->info_raw.colortype, state->info_raw.bitdepth); + if(state->error) goto cleanup; /*error: nonexistent color type given*/ + + /* color convert and compute scanline filter types */ + lodepng_info_copy(&info, &state->info_png); + if(state->encoder.auto_convert) { + LodePNGColorStats stats; + lodepng_color_stats_init(&stats); +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + if(info_png->iccp_defined && + isGrayICCProfile(info_png->iccp_profile, info_png->iccp_profile_size)) { + /*the PNG specification does not allow to use palette with a GRAY ICC profile, even + if the palette has only gray colors, so disallow it.*/ + stats.allow_palette = 0; + } + if(info_png->iccp_defined && + isRGBICCProfile(info_png->iccp_profile, info_png->iccp_profile_size)) { + /*the PNG specification does not allow to use grayscale color with RGB ICC profile, so disallow gray.*/ + stats.allow_greyscale = 0; + } +#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ + lodepng_compute_color_stats(&stats, image, w, h, &state->info_raw); +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + if(info_png->background_defined) { + /*the background chunk's color must be taken into account as well*/ + unsigned r = 0, g = 0, b = 0; + LodePNGColorMode mode16 = lodepng_color_mode_make(LCT_RGB, 16); + lodepng_convert_rgb(&r, &g, &b, info_png->background_r, info_png->background_g, info_png->background_b, &mode16, &info_png->color); + lodepng_color_stats_add(&stats, r, g, b, 65535); + } +#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ + state->error = auto_choose_color(&info.color, &state->info_raw, &stats); + if(state->error) goto cleanup; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*also convert the background chunk*/ + if(info_png->background_defined) { + if(lodepng_convert_rgb(&info.background_r, &info.background_g, &info.background_b, + info_png->background_r, info_png->background_g, info_png->background_b, &info.color, &info_png->color)) { + state->error = 104; + goto cleanup; + } + } +#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ + } +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + if(info_png->iccp_defined) { + unsigned gray_icc = isGrayICCProfile(info_png->iccp_profile, info_png->iccp_profile_size); + unsigned rgb_icc = isRGBICCProfile(info_png->iccp_profile, info_png->iccp_profile_size); + unsigned gray_png = info.color.colortype == LCT_GREY || info.color.colortype == LCT_GREY_ALPHA; + if(!gray_icc && !rgb_icc) { + state->error = 100; /* Disallowed profile color type for PNG */ + goto cleanup; + } + if(gray_icc != gray_png) { + /*Not allowed to use RGB/RGBA/palette with GRAY ICC profile or vice versa, + or in case of auto_convert, it wasn't possible to find appropriate model*/ + state->error = state->encoder.auto_convert ? 102 : 101; + goto cleanup; + } + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + if(!lodepng_color_mode_equal(&state->info_raw, &info.color)) { + unsigned char* converted; + size_t size = ((size_t)w * (size_t)h * (size_t)lodepng_get_bpp(&info.color) + 7u) / 8u; + + converted = (unsigned char*)lodepng_malloc(size); + if(!converted && size) state->error = 83; /*alloc fail*/ + if(!state->error) { + state->error = lodepng_convert(converted, image, &info.color, &state->info_raw, w, h); + } + if(!state->error) preProcessScanlines(&data, &datasize, converted, w, h, &info, &state->encoder); + lodepng_free(converted); + if(state->error) goto cleanup; + } + else preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder); + + /* output all PNG chunks */ { +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + size_t i; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + /*write signature and chunks*/ + writeSignature(&outv); + /*IHDR*/ + addChunk_IHDR(&outv, w, h, info.color.colortype, info.color.bitdepth, info.interlace_method); +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*unknown chunks between IHDR and PLTE*/ + if(info.unknown_chunks_data[0]) { + state->error = addUnknownChunks(&outv, info.unknown_chunks_data[0], info.unknown_chunks_size[0]); + if(state->error) goto cleanup; + } + /*color profile chunks must come before PLTE */ + if(info.iccp_defined) addChunk_iCCP(&outv, &info, &state->encoder.zlibsettings); + if(info.srgb_defined) addChunk_sRGB(&outv, &info); + if(info.gama_defined) addChunk_gAMA(&outv, &info); + if(info.chrm_defined) addChunk_cHRM(&outv, &info); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + /*PLTE*/ + if(info.color.colortype == LCT_PALETTE) { + addChunk_PLTE(&outv, &info.color); + } + if(state->encoder.force_palette && (info.color.colortype == LCT_RGB || info.color.colortype == LCT_RGBA)) { + addChunk_PLTE(&outv, &info.color); + } + /*tRNS*/ + if(info.color.colortype == LCT_PALETTE && getPaletteTranslucency(info.color.palette, info.color.palettesize) != 0) { + addChunk_tRNS(&outv, &info.color); + } + if((info.color.colortype == LCT_GREY || info.color.colortype == LCT_RGB) && info.color.key_defined) { + addChunk_tRNS(&outv, &info.color); + } +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*bKGD (must come between PLTE and the IDAt chunks*/ + if(info.background_defined) { + state->error = addChunk_bKGD(&outv, &info); + if(state->error) goto cleanup; + } + /*pHYs (must come before the IDAT chunks)*/ + if(info.phys_defined) addChunk_pHYs(&outv, &info); + + /*unknown chunks between PLTE and IDAT*/ + if(info.unknown_chunks_data[1]) { + state->error = addUnknownChunks(&outv, info.unknown_chunks_data[1], info.unknown_chunks_size[1]); + if(state->error) goto cleanup; + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + /*IDAT (multiple IDAT chunks must be consecutive)*/ + state->error = addChunk_IDAT(&outv, data, datasize, &state->encoder.zlibsettings); + if(state->error) goto cleanup; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*tIME*/ + if(info.time_defined) addChunk_tIME(&outv, &info.time); + /*tEXt and/or zTXt*/ + for(i = 0; i != info.text_num; ++i) { + if(lodepng_strlen(info.text_keys[i]) > 79) { + state->error = 66; /*text chunk too large*/ + goto cleanup; + } + if(lodepng_strlen(info.text_keys[i]) < 1) { + state->error = 67; /*text chunk too small*/ + goto cleanup; + } + if(state->encoder.text_compression) { + addChunk_zTXt(&outv, info.text_keys[i], info.text_strings[i], &state->encoder.zlibsettings); + } else { + addChunk_tEXt(&outv, info.text_keys[i], info.text_strings[i]); + } + } + /*LodePNG version id in text chunk*/ + if(state->encoder.add_id) { + unsigned already_added_id_text = 0; + for(i = 0; i != info.text_num; ++i) { + const char* k = info.text_keys[i]; + /* Could use strcmp, but we're not calling or reimplementing this C library function for this use only */ + if(k[0] == 'L' && k[1] == 'o' && k[2] == 'd' && k[3] == 'e' && + k[4] == 'P' && k[5] == 'N' && k[6] == 'G' && k[7] == '\0') { + already_added_id_text = 1; + break; + } + } + if(already_added_id_text == 0) { + addChunk_tEXt(&outv, "LodePNG", LODEPNG_VERSION_STRING); /*it's shorter as tEXt than as zTXt chunk*/ + } + } + /*iTXt*/ + for(i = 0; i != info.itext_num; ++i) { + if(lodepng_strlen(info.itext_keys[i]) > 79) { + state->error = 66; /*text chunk too large*/ + goto cleanup; + } + if(lodepng_strlen(info.itext_keys[i]) < 1) { + state->error = 67; /*text chunk too small*/ + goto cleanup; + } + addChunk_iTXt(&outv, state->encoder.text_compression, + info.itext_keys[i], info.itext_langtags[i], info.itext_transkeys[i], info.itext_strings[i], + &state->encoder.zlibsettings); + } + + /*unknown chunks between IDAT and IEND*/ + if(info.unknown_chunks_data[2]) { + state->error = addUnknownChunks(&outv, info.unknown_chunks_data[2], info.unknown_chunks_size[2]); + if(state->error) goto cleanup; + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + addChunk_IEND(&outv); + } + +cleanup: + lodepng_info_cleanup(&info); + lodepng_free(data); + + /*instead of cleaning the vector up, give it to the output*/ + *out = outv.data; + *outsize = outv.size; + + return state->error; +} + +unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image, + unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { + unsigned error; + LodePNGState state; + lodepng_state_init(&state); + state.info_raw.colortype = colortype; + state.info_raw.bitdepth = bitdepth; + state.info_png.color.colortype = colortype; + state.info_png.color.bitdepth = bitdepth; + lodepng_encode(out, outsize, image, w, h, &state); + error = state.error; + lodepng_state_cleanup(&state); + return error; +} + +unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h) { + return lodepng_encode_memory(out, outsize, image, w, h, LCT_RGBA, 8); +} + +unsigned lodepng_encode24(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h) { + return lodepng_encode_memory(out, outsize, image, w, h, LCT_RGB, 8); +} + +#ifdef LODEPNG_COMPILE_DISK +unsigned lodepng_encode_file(const char* filename, const unsigned char* image, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + unsigned char* buffer; + size_t buffersize; + unsigned error = lodepng_encode_memory(&buffer, &buffersize, image, w, h, colortype, bitdepth); + if(!error) error = lodepng_save_file(buffer, buffersize, filename); + lodepng_free(buffer); + return error; +} + +unsigned lodepng_encode32_file(const char* filename, const unsigned char* image, unsigned w, unsigned h) { + return lodepng_encode_file(filename, image, w, h, LCT_RGBA, 8); +} + +unsigned lodepng_encode24_file(const char* filename, const unsigned char* image, unsigned w, unsigned h) { + return lodepng_encode_file(filename, image, w, h, LCT_RGB, 8); +} +#endif /*LODEPNG_COMPILE_DISK*/ + +void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings) { + lodepng_compress_settings_init(&settings->zlibsettings); + settings->filter_palette_zero = 1; + settings->filter_strategy = LFS_MINSUM; + settings->auto_convert = 1; + settings->force_palette = 0; + settings->predefined_filters = 0; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + settings->add_id = 0; + settings->text_compression = 1; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} + +#endif /*LODEPNG_COMPILE_ENCODER*/ +#endif /*LODEPNG_COMPILE_PNG*/ + +#ifdef LODEPNG_COMPILE_ERROR_TEXT +/* +This returns the description of a numerical error code in English. This is also +the documentation of all the error codes. +*/ +const char* lodepng_error_text(unsigned code) { + switch(code) { + case 0: return "no error, everything went ok"; + case 1: return "nothing done yet"; /*the Encoder/Decoder has done nothing yet, error checking makes no sense yet*/ + case 10: return "end of input memory reached without huffman end code"; /*while huffman decoding*/ + case 11: return "error in code tree made it jump outside of huffman tree"; /*while huffman decoding*/ + case 13: return "problem while processing dynamic deflate block"; + case 14: return "problem while processing dynamic deflate block"; + case 15: return "problem while processing dynamic deflate block"; + /*this error could happen if there are only 0 or 1 symbols present in the huffman code:*/ + case 16: return "nonexistent code while processing dynamic deflate block"; + case 17: return "end of out buffer memory reached while inflating"; + case 18: return "invalid distance code while inflating"; + case 19: return "end of out buffer memory reached while inflating"; + case 20: return "invalid deflate block BTYPE encountered while decoding"; + case 21: return "NLEN is not ones complement of LEN in a deflate block"; + + /*end of out buffer memory reached while inflating: + This can happen if the inflated deflate data is longer than the amount of bytes required to fill up + all the pixels of the image, given the color depth and image dimensions. Something that doesn't + happen in a normal, well encoded, PNG image.*/ + case 22: return "end of out buffer memory reached while inflating"; + case 23: return "end of in buffer memory reached while inflating"; + case 24: return "invalid FCHECK in zlib header"; + case 25: return "invalid compression method in zlib header"; + case 26: return "FDICT encountered in zlib header while it's not used for PNG"; + case 27: return "PNG file is smaller than a PNG header"; + /*Checks the magic file header, the first 8 bytes of the PNG file*/ + case 28: return "incorrect PNG signature, it's no PNG or corrupted"; + case 29: return "first chunk is not the header chunk"; + case 30: return "chunk length too large, chunk broken off at end of file"; + case 31: return "illegal PNG color type or bpp"; + case 32: return "illegal PNG compression method"; + case 33: return "illegal PNG filter method"; + case 34: return "illegal PNG interlace method"; + case 35: return "chunk length of a chunk is too large or the chunk too small"; + case 36: return "illegal PNG filter type encountered"; + case 37: return "illegal bit depth for this color type given"; + case 38: return "the palette is too small or too big"; /*0, or more than 256 colors*/ + case 39: return "tRNS chunk before PLTE or has more entries than palette size"; + case 40: return "tRNS chunk has wrong size for grayscale image"; + case 41: return "tRNS chunk has wrong size for RGB image"; + case 42: return "tRNS chunk appeared while it was not allowed for this color type"; + case 43: return "bKGD chunk has wrong size for palette image"; + case 44: return "bKGD chunk has wrong size for grayscale image"; + case 45: return "bKGD chunk has wrong size for RGB image"; + case 48: return "empty input buffer given to decoder. Maybe caused by non-existing file?"; + case 49: return "jumped past memory while generating dynamic huffman tree"; + case 50: return "jumped past memory while generating dynamic huffman tree"; + case 51: return "jumped past memory while inflating huffman block"; + case 52: return "jumped past memory while inflating"; + case 53: return "size of zlib data too small"; + case 54: return "repeat symbol in tree while there was no value symbol yet"; + /*jumped past tree while generating huffman tree, this could be when the + tree will have more leaves than symbols after generating it out of the + given lengths. They call this an oversubscribed dynamic bit lengths tree in zlib.*/ + case 55: return "jumped past tree while generating huffman tree"; + case 56: return "given output image colortype or bitdepth not supported for color conversion"; + case 57: return "invalid CRC encountered (checking CRC can be disabled)"; + case 58: return "invalid ADLER32 encountered (checking ADLER32 can be disabled)"; + case 59: return "requested color conversion not supported"; + case 60: return "invalid window size given in the settings of the encoder (must be 0-32768)"; + case 61: return "invalid BTYPE given in the settings of the encoder (only 0, 1 and 2 are allowed)"; + /*LodePNG leaves the choice of RGB to grayscale conversion formula to the user.*/ + case 62: return "conversion from color to grayscale not supported"; + /*(2^31-1)*/ + case 63: return "length of a chunk too long, max allowed for PNG is 2147483647 bytes per chunk"; + /*this would result in the inability of a deflated block to ever contain an end code. It must be at least 1.*/ + case 64: return "the length of the END symbol 256 in the Huffman tree is 0"; + case 66: return "the length of a text chunk keyword given to the encoder is longer than the maximum of 79 bytes"; + case 67: return "the length of a text chunk keyword given to the encoder is smaller than the minimum of 1 byte"; + case 68: return "tried to encode a PLTE chunk with a palette that has less than 1 or more than 256 colors"; + case 69: return "unknown chunk type with 'critical' flag encountered by the decoder"; + case 71: return "nonexistent interlace mode given to encoder (must be 0 or 1)"; + case 72: return "while decoding, nonexistent compression method encountering in zTXt or iTXt chunk (it must be 0)"; + case 73: return "invalid tIME chunk size"; + case 74: return "invalid pHYs chunk size"; + /*length could be wrong, or data chopped off*/ + case 75: return "no null termination char found while decoding text chunk"; + case 76: return "iTXt chunk too short to contain required bytes"; + case 77: return "integer overflow in buffer size"; + case 78: return "failed to open file for reading"; /*file doesn't exist or couldn't be opened for reading*/ + case 79: return "failed to open file for writing"; + case 80: return "tried creating a tree of 0 symbols"; + case 81: return "lazy matching at pos 0 is impossible"; + case 82: return "color conversion to palette requested while a color isn't in palette, or index out of bounds"; + case 83: return "memory allocation failed"; + case 84: return "given image too small to contain all pixels to be encoded"; + case 86: return "impossible offset in lz77 encoding (internal bug)"; + case 87: return "must provide custom zlib function pointer if LODEPNG_COMPILE_ZLIB is not defined"; + case 88: return "invalid filter strategy given for LodePNGEncoderSettings.filter_strategy"; + case 89: return "text chunk keyword too short or long: must have size 1-79"; + /*the windowsize in the LodePNGCompressSettings. Requiring POT(==> & instead of %) makes encoding 12% faster.*/ + case 90: return "windowsize must be a power of two"; + case 91: return "invalid decompressed idat size"; + case 92: return "integer overflow due to too many pixels"; + case 93: return "zero width or height is invalid"; + case 94: return "header chunk must have a size of 13 bytes"; + case 95: return "integer overflow with combined idat chunk size"; + case 96: return "invalid gAMA chunk size"; + case 97: return "invalid cHRM chunk size"; + case 98: return "invalid sRGB chunk size"; + case 99: return "invalid sRGB rendering intent"; + case 100: return "invalid ICC profile color type, the PNG specification only allows RGB or GRAY"; + case 101: return "PNG specification does not allow RGB ICC profile on gray color types and vice versa"; + case 102: return "not allowed to set grayscale ICC profile with colored pixels by PNG specification"; + case 103: return "invalid palette index in bKGD chunk. Maybe it came before PLTE chunk?"; + case 104: return "invalid bKGD color while encoding (e.g. palette index out of range)"; + case 105: return "integer overflow of bitsize"; + case 106: return "PNG file must have PLTE chunk if color type is palette"; + case 107: return "color convert from palette mode requested without setting the palette data in it"; + case 108: return "tried to add more than 256 values to a palette"; + } + return "unknown error code"; +} +#endif /*LODEPNG_COMPILE_ERROR_TEXT*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* // C++ Wrapper // */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_CPP +namespace lodepng { + +#ifdef LODEPNG_COMPILE_DISK +unsigned load_file(std::vector& buffer, const std::string& filename) { + long size = lodepng_filesize(filename.c_str()); + if(size < 0) return 78; + buffer.resize((size_t)size); + return size == 0 ? 0 : lodepng_buffer_file(&buffer[0], (size_t)size, filename.c_str()); +} + +/*write given buffer to the file, overwriting the file, it doesn't append to it.*/ +unsigned save_file(const std::vector& buffer, const std::string& filename) { + return lodepng_save_file(buffer.empty() ? 0 : &buffer[0], buffer.size(), filename.c_str()); +} +#endif /* LODEPNG_COMPILE_DISK */ + +#ifdef LODEPNG_COMPILE_ZLIB +#ifdef LODEPNG_COMPILE_DECODER +unsigned decompress(std::vector& out, const unsigned char* in, size_t insize, + const LodePNGDecompressSettings& settings) { + unsigned char* buffer = 0; + size_t buffersize = 0; + unsigned error = zlib_decompress(&buffer, &buffersize, in, insize, &settings); + if(buffer) { + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned decompress(std::vector& out, const std::vector& in, + const LodePNGDecompressSettings& settings) { + return decompress(out, in.empty() ? 0 : &in[0], in.size(), settings); +} +#endif /* LODEPNG_COMPILE_DECODER */ + +#ifdef LODEPNG_COMPILE_ENCODER +unsigned compress(std::vector& out, const unsigned char* in, size_t insize, + const LodePNGCompressSettings& settings) { + unsigned char* buffer = 0; + size_t buffersize = 0; + unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings); + if(buffer) { + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned compress(std::vector& out, const std::vector& in, + const LodePNGCompressSettings& settings) { + return compress(out, in.empty() ? 0 : &in[0], in.size(), settings); +} +#endif /* LODEPNG_COMPILE_ENCODER */ +#endif /* LODEPNG_COMPILE_ZLIB */ + + +#ifdef LODEPNG_COMPILE_PNG + +State::State() { + lodepng_state_init(this); +} + +State::State(const State& other) { + lodepng_state_init(this); + lodepng_state_copy(this, &other); +} + +State::~State() { + lodepng_state_cleanup(this); +} + +State& State::operator=(const State& other) { + lodepng_state_copy(this, &other); + return *this; +} + +#ifdef LODEPNG_COMPILE_DECODER + +unsigned decode(std::vector& out, unsigned& w, unsigned& h, const unsigned char* in, + size_t insize, LodePNGColorType colortype, unsigned bitdepth) { + unsigned char* buffer; + unsigned error = lodepng_decode_memory(&buffer, &w, &h, in, insize, colortype, bitdepth); + if(buffer && !error) { + State state; + state.info_raw.colortype = colortype; + state.info_raw.bitdepth = bitdepth; + size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw); + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + const std::vector& in, LodePNGColorType colortype, unsigned bitdepth) { + return decode(out, w, h, in.empty() ? 0 : &in[0], (unsigned)in.size(), colortype, bitdepth); +} + +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + State& state, + const unsigned char* in, size_t insize) { + unsigned char* buffer = NULL; + unsigned error = lodepng_decode(&buffer, &w, &h, &state, in, insize); + if(buffer && !error) { + size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw); + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + } + lodepng_free(buffer); + return error; +} + +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + State& state, + const std::vector& in) { + return decode(out, w, h, state, in.empty() ? 0 : &in[0], in.size()); +} + +#ifdef LODEPNG_COMPILE_DISK +unsigned decode(std::vector& out, unsigned& w, unsigned& h, const std::string& filename, + LodePNGColorType colortype, unsigned bitdepth) { + std::vector buffer; + /* safe output values in case error happens */ + w = h = 0; + unsigned error = load_file(buffer, filename); + if(error) return error; + return decode(out, w, h, buffer, colortype, bitdepth); +} +#endif /* LODEPNG_COMPILE_DECODER */ +#endif /* LODEPNG_COMPILE_DISK */ + +#ifdef LODEPNG_COMPILE_ENCODER +unsigned encode(std::vector& out, const unsigned char* in, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + unsigned char* buffer; + size_t buffersize; + unsigned error = lodepng_encode_memory(&buffer, &buffersize, in, w, h, colortype, bitdepth); + if(buffer) { + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned encode(std::vector& out, + const std::vector& in, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; + return encode(out, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); +} + +unsigned encode(std::vector& out, + const unsigned char* in, unsigned w, unsigned h, + State& state) { + unsigned char* buffer; + size_t buffersize; + unsigned error = lodepng_encode(&buffer, &buffersize, in, w, h, &state); + if(buffer) { + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned encode(std::vector& out, + const std::vector& in, unsigned w, unsigned h, + State& state) { + if(lodepng_get_raw_size(w, h, &state.info_raw) > in.size()) return 84; + return encode(out, in.empty() ? 0 : &in[0], w, h, state); +} + +#ifdef LODEPNG_COMPILE_DISK +unsigned encode(const std::string& filename, + const unsigned char* in, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + std::vector buffer; + unsigned error = encode(buffer, in, w, h, colortype, bitdepth); + if(!error) error = save_file(buffer, filename); + return error; +} + +unsigned encode(const std::string& filename, + const std::vector& in, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; + return encode(filename, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); +} +#endif /* LODEPNG_COMPILE_DISK */ +#endif /* LODEPNG_COMPILE_ENCODER */ +#endif /* LODEPNG_COMPILE_PNG */ +} /* namespace lodepng */ +#endif /*LODEPNG_COMPILE_CPP*/ diff --git a/desktop_version/lodepng/lodepng.h b/desktop_version/lodepng/lodepng.h new file mode 100644 index 00000000..c0fa4073 --- /dev/null +++ b/desktop_version/lodepng/lodepng.h @@ -0,0 +1,1941 @@ +/* +LodePNG version 20191109 + +Copyright (c) 2005-2019 Lode Vandevenne + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef LODEPNG_H +#define LODEPNG_H + +#include /*for size_t*/ + +extern const char* LODEPNG_VERSION_STRING; + +/* +The following #defines are used to create code sections. They can be disabled +to disable code sections, which can give faster compile time and smaller binary. +The "NO_COMPILE" defines are designed to be used to pass as defines to the +compiler command to disable them without modifying this header, e.g. +-DLODEPNG_NO_COMPILE_ZLIB for gcc. +In addition to those below, you can also define LODEPNG_NO_COMPILE_CRC to +allow implementing a custom lodepng_crc32. +*/ +/*deflate & zlib. If disabled, you must specify alternative zlib functions in +the custom_zlib field of the compress and decompress settings*/ +#ifndef LODEPNG_NO_COMPILE_ZLIB +#define LODEPNG_COMPILE_ZLIB +#endif + +/*png encoder and png decoder*/ +#ifndef LODEPNG_NO_COMPILE_PNG +#define LODEPNG_COMPILE_PNG +#endif + +/*deflate&zlib decoder and png decoder*/ +#ifndef LODEPNG_NO_COMPILE_DECODER +#define LODEPNG_COMPILE_DECODER +#endif + +/*deflate&zlib encoder and png encoder*/ +#ifndef LODEPNG_NO_COMPILE_ENCODER +#define LODEPNG_COMPILE_ENCODER +#endif + +/*the optional built in harddisk file loading and saving functions*/ +#ifndef LODEPNG_NO_COMPILE_DISK +#define LODEPNG_COMPILE_DISK +#endif + +/*support for chunks other than IHDR, IDAT, PLTE, tRNS, IEND: ancillary and unknown chunks*/ +#ifndef LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS +#define LODEPNG_COMPILE_ANCILLARY_CHUNKS +#endif + +/*ability to convert error numerical codes to English text string*/ +#ifndef LODEPNG_NO_COMPILE_ERROR_TEXT +#define LODEPNG_COMPILE_ERROR_TEXT +#endif + +/*Compile the default allocators (C's free, malloc and realloc). If you disable this, +you can define the functions lodepng_free, lodepng_malloc and lodepng_realloc in your +source files with custom allocators.*/ +#ifndef LODEPNG_NO_COMPILE_ALLOCATORS +#define LODEPNG_COMPILE_ALLOCATORS +#endif + +/*compile the C++ version (you can disable the C++ wrapper here even when compiling for C++)*/ +#ifdef __cplusplus +#ifndef LODEPNG_NO_COMPILE_CPP +#define LODEPNG_COMPILE_CPP +#endif +#endif + +#ifdef LODEPNG_COMPILE_CPP +#include +#include +#endif /*LODEPNG_COMPILE_CPP*/ + +#ifdef LODEPNG_COMPILE_PNG +/*The PNG color types (also used for raw image).*/ +typedef enum LodePNGColorType { + LCT_GREY = 0, /*grayscale: 1,2,4,8,16 bit*/ + LCT_RGB = 2, /*RGB: 8,16 bit*/ + LCT_PALETTE = 3, /*palette: 1,2,4,8 bit*/ + LCT_GREY_ALPHA = 4, /*grayscale with alpha: 8,16 bit*/ + LCT_RGBA = 6, /*RGB with alpha: 8,16 bit*/ + /*LCT_MAX_OCTET_VALUE lets the compiler allow this enum to represent any invalid + byte value from 0 to 255 that could be present in an invalid PNG file header. Do + not use, compare with or set the name LCT_MAX_OCTET_VALUE, instead either use + the valid color type names above, or numeric values like 1 or 7 when checking for + particular disallowed color type byte values, or cast to integer to print it.*/ + LCT_MAX_OCTET_VALUE = 255 +} LodePNGColorType; + +#ifdef LODEPNG_COMPILE_DECODER +/* +Converts PNG data in memory to raw pixel data. +out: Output parameter. Pointer to buffer that will contain the raw pixel data. + After decoding, its size is w * h * (bytes per pixel) bytes larger than + initially. Bytes per pixel depends on colortype and bitdepth. + Must be freed after usage with free(*out). + Note: for 16-bit per channel colors, uses big endian format like PNG does. +w: Output parameter. Pointer to width of pixel data. +h: Output parameter. Pointer to height of pixel data. +in: Memory buffer with the PNG file. +insize: size of the in buffer. +colortype: the desired color type for the raw output image. See explanation on PNG color types. +bitdepth: the desired bit depth for the raw output image. See explanation on PNG color types. +Return value: LodePNG error code (0 means no error). +*/ +unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, + const unsigned char* in, size_t insize, + LodePNGColorType colortype, unsigned bitdepth); + +/*Same as lodepng_decode_memory, but always decodes to 32-bit RGBA raw image*/ +unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, + const unsigned char* in, size_t insize); + +/*Same as lodepng_decode_memory, but always decodes to 24-bit RGB raw image*/ +unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, + const unsigned char* in, size_t insize); + +#ifdef LODEPNG_COMPILE_DISK +/* +Load PNG from disk, from file with given name. +Same as the other decode functions, but instead takes a filename as input. +*/ +unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, + const char* filename, + LodePNGColorType colortype, unsigned bitdepth); + +/*Same as lodepng_decode_file, but always decodes to 32-bit RGBA raw image.*/ +unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigned* h, + const char* filename); + +/*Same as lodepng_decode_file, but always decodes to 24-bit RGB raw image.*/ +unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigned* h, + const char* filename); +#endif /*LODEPNG_COMPILE_DISK*/ +#endif /*LODEPNG_COMPILE_DECODER*/ + + +#ifdef LODEPNG_COMPILE_ENCODER +/* +Converts raw pixel data into a PNG image in memory. The colortype and bitdepth + of the output PNG image cannot be chosen, they are automatically determined + by the colortype, bitdepth and content of the input pixel data. + Note: for 16-bit per channel colors, needs big endian format like PNG does. +out: Output parameter. Pointer to buffer that will contain the PNG image data. + Must be freed after usage with free(*out). +outsize: Output parameter. Pointer to the size in bytes of the out buffer. +image: The raw pixel data to encode. The size of this buffer should be + w * h * (bytes per pixel), bytes per pixel depends on colortype and bitdepth. +w: width of the raw pixel data in pixels. +h: height of the raw pixel data in pixels. +colortype: the color type of the raw input image. See explanation on PNG color types. +bitdepth: the bit depth of the raw input image. See explanation on PNG color types. +Return value: LodePNG error code (0 means no error). +*/ +unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth); + +/*Same as lodepng_encode_memory, but always encodes from 32-bit RGBA raw image.*/ +unsigned lodepng_encode32(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h); + +/*Same as lodepng_encode_memory, but always encodes from 24-bit RGB raw image.*/ +unsigned lodepng_encode24(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h); + +#ifdef LODEPNG_COMPILE_DISK +/* +Converts raw pixel data into a PNG file on disk. +Same as the other encode functions, but instead takes a filename as output. +NOTE: This overwrites existing files without warning! +*/ +unsigned lodepng_encode_file(const char* filename, + const unsigned char* image, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth); + +/*Same as lodepng_encode_file, but always encodes from 32-bit RGBA raw image.*/ +unsigned lodepng_encode32_file(const char* filename, + const unsigned char* image, unsigned w, unsigned h); + +/*Same as lodepng_encode_file, but always encodes from 24-bit RGB raw image.*/ +unsigned lodepng_encode24_file(const char* filename, + const unsigned char* image, unsigned w, unsigned h); +#endif /*LODEPNG_COMPILE_DISK*/ +#endif /*LODEPNG_COMPILE_ENCODER*/ + + +#ifdef LODEPNG_COMPILE_CPP +namespace lodepng { +#ifdef LODEPNG_COMPILE_DECODER +/*Same as lodepng_decode_memory, but decodes to an std::vector. The colortype +is the format to output the pixels to. Default is RGBA 8-bit per channel.*/ +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + const unsigned char* in, size_t insize, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + const std::vector& in, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +#ifdef LODEPNG_COMPILE_DISK +/* +Converts PNG file from disk to raw pixel data in memory. +Same as the other decode functions, but instead takes a filename as input. +*/ +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + const std::string& filename, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +#endif /* LODEPNG_COMPILE_DISK */ +#endif /* LODEPNG_COMPILE_DECODER */ + +#ifdef LODEPNG_COMPILE_ENCODER +/*Same as lodepng_encode_memory, but encodes to an std::vector. colortype +is that of the raw input data. The output PNG color type will be auto chosen.*/ +unsigned encode(std::vector& out, + const unsigned char* in, unsigned w, unsigned h, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +unsigned encode(std::vector& out, + const std::vector& in, unsigned w, unsigned h, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +#ifdef LODEPNG_COMPILE_DISK +/* +Converts 32-bit RGBA raw pixel data into a PNG file on disk. +Same as the other encode functions, but instead takes a filename as output. +NOTE: This overwrites existing files without warning! +*/ +unsigned encode(const std::string& filename, + const unsigned char* in, unsigned w, unsigned h, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +unsigned encode(const std::string& filename, + const std::vector& in, unsigned w, unsigned h, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +#endif /* LODEPNG_COMPILE_DISK */ +#endif /* LODEPNG_COMPILE_ENCODER */ +} /* namespace lodepng */ +#endif /*LODEPNG_COMPILE_CPP*/ +#endif /*LODEPNG_COMPILE_PNG*/ + +#ifdef LODEPNG_COMPILE_ERROR_TEXT +/*Returns an English description of the numerical error code.*/ +const char* lodepng_error_text(unsigned code); +#endif /*LODEPNG_COMPILE_ERROR_TEXT*/ + +#ifdef LODEPNG_COMPILE_DECODER +/*Settings for zlib decompression*/ +typedef struct LodePNGDecompressSettings LodePNGDecompressSettings; +struct LodePNGDecompressSettings { + /* Check LodePNGDecoderSettings for more ignorable errors such as ignore_crc */ + unsigned ignore_adler32; /*if 1, continue and don't give an error message if the Adler32 checksum is corrupted*/ + unsigned ignore_nlen; /*ignore complement of len checksum in uncompressed blocks*/ + + /*use custom zlib decoder instead of built in one (default: null)*/ + unsigned (*custom_zlib)(unsigned char**, size_t*, + const unsigned char*, size_t, + const LodePNGDecompressSettings*); + /*use custom deflate decoder instead of built in one (default: null) + if custom_zlib is not null, custom_inflate is ignored (the zlib format uses deflate)*/ + unsigned (*custom_inflate)(unsigned char**, size_t*, + const unsigned char*, size_t, + const LodePNGDecompressSettings*); + + const void* custom_context; /*optional custom settings for custom functions*/ +}; + +extern const LodePNGDecompressSettings lodepng_default_decompress_settings; +void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings); +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER +/* +Settings for zlib compression. Tweaking these settings tweaks the balance +between speed and compression ratio. +*/ +typedef struct LodePNGCompressSettings LodePNGCompressSettings; +struct LodePNGCompressSettings /*deflate = compress*/ { + /*LZ77 related settings*/ + unsigned btype; /*the block type for LZ (0, 1, 2 or 3, see zlib standard). Should be 2 for proper compression.*/ + unsigned use_lz77; /*whether or not to use LZ77. Should be 1 for proper compression.*/ + unsigned windowsize; /*must be a power of two <= 32768. higher compresses more but is slower. Default value: 2048.*/ + unsigned minmatch; /*minimum lz77 length. 3 is normally best, 6 can be better for some PNGs. Default: 0*/ + unsigned nicematch; /*stop searching if >= this length found. Set to 258 for best compression. Default: 128*/ + unsigned lazymatching; /*use lazy matching: better compression but a bit slower. Default: true*/ + + /*use custom zlib encoder instead of built in one (default: null)*/ + unsigned (*custom_zlib)(unsigned char**, size_t*, + const unsigned char*, size_t, + const LodePNGCompressSettings*); + /*use custom deflate encoder instead of built in one (default: null) + if custom_zlib is used, custom_deflate is ignored since only the built in + zlib function will call custom_deflate*/ + unsigned (*custom_deflate)(unsigned char**, size_t*, + const unsigned char*, size_t, + const LodePNGCompressSettings*); + + const void* custom_context; /*optional custom settings for custom functions*/ +}; + +extern const LodePNGCompressSettings lodepng_default_compress_settings; +void lodepng_compress_settings_init(LodePNGCompressSettings* settings); +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#ifdef LODEPNG_COMPILE_PNG +/* +Color mode of an image. Contains all information required to decode the pixel +bits to RGBA colors. This information is the same as used in the PNG file +format, and is used both for PNG and raw image data in LodePNG. +*/ +typedef struct LodePNGColorMode { + /*header (IHDR)*/ + LodePNGColorType colortype; /*color type, see PNG standard or documentation further in this header file*/ + unsigned bitdepth; /*bits per sample, see PNG standard or documentation further in this header file*/ + + /* + palette (PLTE and tRNS) + + Dynamically allocated with the colors of the palette, including alpha. + This field may not be allocated directly, use lodepng_color_mode_init first, + then lodepng_palette_add per color to correctly initialize it (to ensure size + of exactly 1024 bytes). + + The alpha channels must be set as well, set them to 255 for opaque images. + + When decoding, by default you can ignore this palette, since LodePNG already + fills the palette colors in the pixels of the raw RGBA output. + + The palette is only supported for color type 3. + */ + unsigned char* palette; /*palette in RGBARGBA... order. When allocated, must be either 0, or have size 1024*/ + size_t palettesize; /*palette size in number of colors (amount of bytes is 4 * palettesize)*/ + + /* + transparent color key (tRNS) + + This color uses the same bit depth as the bitdepth value in this struct, which can be 1-bit to 16-bit. + For grayscale PNGs, r, g and b will all 3 be set to the same. + + When decoding, by default you can ignore this information, since LodePNG sets + pixels with this key to transparent already in the raw RGBA output. + + The color key is only supported for color types 0 and 2. + */ + unsigned key_defined; /*is a transparent color key given? 0 = false, 1 = true*/ + unsigned key_r; /*red/grayscale component of color key*/ + unsigned key_g; /*green component of color key*/ + unsigned key_b; /*blue component of color key*/ +} LodePNGColorMode; + +/*init, cleanup and copy functions to use with this struct*/ +void lodepng_color_mode_init(LodePNGColorMode* info); +void lodepng_color_mode_cleanup(LodePNGColorMode* info); +/*return value is error code (0 means no error)*/ +unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source); +/* Makes a temporary LodePNGColorMode that does not need cleanup (no palette) */ +LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype, unsigned bitdepth); + +void lodepng_palette_clear(LodePNGColorMode* info); +/*add 1 color to the palette*/ +unsigned lodepng_palette_add(LodePNGColorMode* info, + unsigned char r, unsigned char g, unsigned char b, unsigned char a); + +/*get the total amount of bits per pixel, based on colortype and bitdepth in the struct*/ +unsigned lodepng_get_bpp(const LodePNGColorMode* info); +/*get the amount of color channels used, based on colortype in the struct. +If a palette is used, it counts as 1 channel.*/ +unsigned lodepng_get_channels(const LodePNGColorMode* info); +/*is it a grayscale type? (only colortype 0 or 4)*/ +unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info); +/*has it got an alpha channel? (only colortype 2 or 6)*/ +unsigned lodepng_is_alpha_type(const LodePNGColorMode* info); +/*has it got a palette? (only colortype 3)*/ +unsigned lodepng_is_palette_type(const LodePNGColorMode* info); +/*only returns true if there is a palette and there is a value in the palette with alpha < 255. +Loops through the palette to check this.*/ +unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info); +/* +Check if the given color info indicates the possibility of having non-opaque pixels in the PNG image. +Returns true if the image can have translucent or invisible pixels (it still be opaque if it doesn't use such pixels). +Returns false if the image can only have opaque pixels. +In detail, it returns true only if it's a color type with alpha, or has a palette with non-opaque values, +or if "key_defined" is true. +*/ +unsigned lodepng_can_have_alpha(const LodePNGColorMode* info); +/*Returns the byte size of a raw image buffer with given width, height and color mode*/ +size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color); + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +/*The information of a Time chunk in PNG.*/ +typedef struct LodePNGTime { + unsigned year; /*2 bytes used (0-65535)*/ + unsigned month; /*1-12*/ + unsigned day; /*1-31*/ + unsigned hour; /*0-23*/ + unsigned minute; /*0-59*/ + unsigned second; /*0-60 (to allow for leap seconds)*/ +} LodePNGTime; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +/*Information about the PNG image, except pixels, width and height.*/ +typedef struct LodePNGInfo { + /*header (IHDR), palette (PLTE) and transparency (tRNS) chunks*/ + unsigned compression_method;/*compression method of the original file. Always 0.*/ + unsigned filter_method; /*filter method of the original file*/ + unsigned interlace_method; /*interlace method of the original file: 0=none, 1=Adam7*/ + LodePNGColorMode color; /*color type and bits, palette and transparency of the PNG file*/ + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /* + Suggested background color chunk (bKGD) + + This uses the same color mode and bit depth as the PNG (except no alpha channel), + with values truncated to the bit depth in the unsigned integer. + + For grayscale and palette PNGs, the value is stored in background_r. The values + in background_g and background_b are then unused. + + So when decoding, you may get these in a different color mode than the one you requested + for the raw pixels. + + When encoding with auto_convert, you must use the color model defined in info_png.color for + these values. The encoder normally ignores info_png.color when auto_convert is on, but will + use it to interpret these values (and convert copies of them to its chosen color model). + + When encoding, avoid setting this to an expensive color, such as a non-gray value + when the image is gray, or the compression will be worse since it will be forced to + write the PNG with a more expensive color mode (when auto_convert is on). + + The decoder does not use this background color to edit the color of pixels. This is a + completely optional metadata feature. + */ + unsigned background_defined; /*is a suggested background color given?*/ + unsigned background_r; /*red/gray/palette component of suggested background color*/ + unsigned background_g; /*green component of suggested background color*/ + unsigned background_b; /*blue component of suggested background color*/ + + /* + non-international text chunks (tEXt and zTXt) + + The char** arrays each contain num strings. The actual messages are in + text_strings, while text_keys are keywords that give a short description what + the actual text represents, e.g. Title, Author, Description, or anything else. + + All the string fields below including keys, names and language tags are null terminated. + The PNG specification uses null characters for the keys, names and tags, and forbids null + characters to appear in the main text which is why we can use null termination everywhere here. + + A keyword is minimum 1 character and maximum 79 characters long. It's + discouraged to use a single line length longer than 79 characters for texts. + + Don't allocate these text buffers yourself. Use the init/cleanup functions + correctly and use lodepng_add_text and lodepng_clear_text. + */ + size_t text_num; /*the amount of texts in these char** buffers (there may be more texts in itext)*/ + char** text_keys; /*the keyword of a text chunk (e.g. "Comment")*/ + char** text_strings; /*the actual text*/ + + /* + international text chunks (iTXt) + Similar to the non-international text chunks, but with additional strings + "langtags" and "transkeys". + */ + size_t itext_num; /*the amount of international texts in this PNG*/ + char** itext_keys; /*the English keyword of the text chunk (e.g. "Comment")*/ + char** itext_langtags; /*language tag for this text's language, ISO/IEC 646 string, e.g. ISO 639 language tag*/ + char** itext_transkeys; /*keyword translated to the international language - UTF-8 string*/ + char** itext_strings; /*the actual international text - UTF-8 string*/ + + /*time chunk (tIME)*/ + unsigned time_defined; /*set to 1 to make the encoder generate a tIME chunk*/ + LodePNGTime time; + + /*phys chunk (pHYs)*/ + unsigned phys_defined; /*if 0, there is no pHYs chunk and the values below are undefined, if 1 else there is one*/ + unsigned phys_x; /*pixels per unit in x direction*/ + unsigned phys_y; /*pixels per unit in y direction*/ + unsigned phys_unit; /*may be 0 (unknown unit) or 1 (metre)*/ + + /* + Color profile related chunks: gAMA, cHRM, sRGB, iCPP + + LodePNG does not apply any color conversions on pixels in the encoder or decoder and does not interpret these color + profile values. It merely passes on the information. If you wish to use color profiles and convert colors, please + use these values with a color management library. + + See the PNG, ICC and sRGB specifications for more information about the meaning of these values. + */ + + /* gAMA chunk: optional, overridden by sRGB or iCCP if those are present. */ + unsigned gama_defined; /* Whether a gAMA chunk is present (0 = not present, 1 = present). */ + unsigned gama_gamma; /* Gamma exponent times 100000 */ + + /* cHRM chunk: optional, overridden by sRGB or iCCP if those are present. */ + unsigned chrm_defined; /* Whether a cHRM chunk is present (0 = not present, 1 = present). */ + unsigned chrm_white_x; /* White Point x times 100000 */ + unsigned chrm_white_y; /* White Point y times 100000 */ + unsigned chrm_red_x; /* Red x times 100000 */ + unsigned chrm_red_y; /* Red y times 100000 */ + unsigned chrm_green_x; /* Green x times 100000 */ + unsigned chrm_green_y; /* Green y times 100000 */ + unsigned chrm_blue_x; /* Blue x times 100000 */ + unsigned chrm_blue_y; /* Blue y times 100000 */ + + /* + sRGB chunk: optional. May not appear at the same time as iCCP. + If gAMA is also present gAMA must contain value 45455. + If cHRM is also present cHRM must contain respectively 31270,32900,64000,33000,30000,60000,15000,6000. + */ + unsigned srgb_defined; /* Whether an sRGB chunk is present (0 = not present, 1 = present). */ + unsigned srgb_intent; /* Rendering intent: 0=perceptual, 1=rel. colorimetric, 2=saturation, 3=abs. colorimetric */ + + /* + iCCP chunk: optional. May not appear at the same time as sRGB. + + LodePNG does not parse or use the ICC profile (except its color space header field for an edge case), a + separate library to handle the ICC data (not included in LodePNG) format is needed to use it for color + management and conversions. + + For encoding, if iCCP is present, gAMA and cHRM are recommended to be added as well with values that match the ICC + profile as closely as possible, if you wish to do this you should provide the correct values for gAMA and cHRM and + enable their '_defined' flags since LodePNG will not automatically compute them from the ICC profile. + + For encoding, the ICC profile is required by the PNG specification to be an "RGB" profile for non-gray + PNG color types and a "GRAY" profile for gray PNG color types. If you disable auto_convert, you must ensure + the ICC profile type matches your requested color type, else the encoder gives an error. If auto_convert is + enabled (the default), and the ICC profile is not a good match for the pixel data, this will result in an encoder + error if the pixel data has non-gray pixels for a GRAY profile, or a silent less-optimal compression of the pixel + data if the pixels could be encoded as grayscale but the ICC profile is RGB. + + To avoid this do not set an ICC profile in the image unless there is a good reason for it, and when doing so + make sure you compute it carefully to avoid the above problems. + */ + unsigned iccp_defined; /* Whether an iCCP chunk is present (0 = not present, 1 = present). */ + char* iccp_name; /* Null terminated string with profile name, 1-79 bytes */ + /* + The ICC profile in iccp_profile_size bytes. + Don't allocate this buffer yourself. Use the init/cleanup functions + correctly and use lodepng_set_icc and lodepng_clear_icc. + */ + unsigned char* iccp_profile; + unsigned iccp_profile_size; /* The size of iccp_profile in bytes */ + + /* End of color profile related chunks */ + + + /* + unknown chunks: chunks not known by LodePNG, passed on byte for byte. + + There are 3 buffers, one for each position in the PNG where unknown chunks can appear. + Each buffer contains all unknown chunks for that position consecutively. + The 3 positions are: + 0: between IHDR and PLTE, 1: between PLTE and IDAT, 2: between IDAT and IEND. + + For encoding, do not store critical chunks or known chunks that are enabled with a "_defined" flag + above in here, since the encoder will blindly follow this and could then encode an invalid PNG file + (such as one with two IHDR chunks or the disallowed combination of sRGB with iCCP). But do use + this if you wish to store an ancillary chunk that is not supported by LodePNG (such as sPLT or hIST), + or any non-standard PNG chunk. + + Do not allocate or traverse this data yourself. Use the chunk traversing functions declared + later, such as lodepng_chunk_next and lodepng_chunk_append, to read/write this struct. + */ + unsigned char* unknown_chunks_data[3]; + size_t unknown_chunks_size[3]; /*size in bytes of the unknown chunks, given for protection*/ +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} LodePNGInfo; + +/*init, cleanup and copy functions to use with this struct*/ +void lodepng_info_init(LodePNGInfo* info); +void lodepng_info_cleanup(LodePNGInfo* info); +/*return value is error code (0 means no error)*/ +unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source); + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str); /*push back both texts at once*/ +void lodepng_clear_text(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/ + +unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, + const char* transkey, const char* str); /*push back the 4 texts of 1 chunk at once*/ +void lodepng_clear_itext(LodePNGInfo* info); /*use this to clear the itexts again after you filled them in*/ + +/*replaces if exists*/ +unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size); +void lodepng_clear_icc(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/ +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +/* +Converts raw buffer from one color type to another color type, based on +LodePNGColorMode structs to describe the input and output color type. +See the reference manual at the end of this header file to see which color conversions are supported. +return value = LodePNG error code (0 if all went ok, an error if the conversion isn't supported) +The out buffer must have size (w * h * bpp + 7) / 8, where bpp is the bits per pixel +of the output color type (lodepng_get_bpp). +For < 8 bpp images, there should not be padding bits at the end of scanlines. +For 16-bit per channel colors, uses big endian format like PNG does. +Return value is LodePNG error code +*/ +unsigned lodepng_convert(unsigned char* out, const unsigned char* in, + const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, + unsigned w, unsigned h); + +#ifdef LODEPNG_COMPILE_DECODER +/* +Settings for the decoder. This contains settings for the PNG and the Zlib +decoder, but not the Info settings from the Info structs. +*/ +typedef struct LodePNGDecoderSettings { + LodePNGDecompressSettings zlibsettings; /*in here is the setting to ignore Adler32 checksums*/ + + /* Check LodePNGDecompressSettings for more ignorable errors such as ignore_adler32 */ + unsigned ignore_crc; /*ignore CRC checksums*/ + unsigned ignore_critical; /*ignore unknown critical chunks*/ + unsigned ignore_end; /*ignore issues at end of file if possible (missing IEND chunk, too large chunk, ...)*/ + /* TODO: make a system involving warnings with levels and a strict mode instead. Other potentially recoverable + errors: srgb rendering intent value, size of content of ancillary chunks, more than 79 characters for some + strings, placement/combination rules for ancillary chunks, crc of unknown chunks, allowed characters + in string keys, etc... */ + + unsigned color_convert; /*whether to convert the PNG to the color type you want. Default: yes*/ + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + unsigned read_text_chunks; /*if false but remember_unknown_chunks is true, they're stored in the unknown chunks*/ + /*store all bytes from unknown chunks in the LodePNGInfo (off by default, useful for a png editor)*/ + unsigned remember_unknown_chunks; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} LodePNGDecoderSettings; + +void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings); +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER +/*automatically use color type with less bits per pixel if losslessly possible. Default: AUTO*/ +typedef enum LodePNGFilterStrategy { + /*every filter at zero*/ + LFS_ZERO = 0, + /*every filter at 1, 2, 3 or 4 (paeth), unlike LFS_ZERO not a good choice, but for testing*/ + LFS_ONE = 1, + LFS_TWO = 2, + LFS_THREE = 3, + LFS_FOUR = 4, + /*Use filter that gives minimum sum, as described in the official PNG filter heuristic.*/ + LFS_MINSUM, + /*Use the filter type that gives smallest Shannon entropy for this scanline. Depending + on the image, this is better or worse than minsum.*/ + LFS_ENTROPY, + /* + Brute-force-search PNG filters by compressing each filter for each scanline. + Experimental, very slow, and only rarely gives better compression than MINSUM. + */ + LFS_BRUTE_FORCE, + /*use predefined_filters buffer: you specify the filter type for each scanline*/ + LFS_PREDEFINED +} LodePNGFilterStrategy; + +/*Gives characteristics about the integer RGBA colors of the image (count, alpha channel usage, bit depth, ...), +which helps decide which color model to use for encoding. +Used internally by default if "auto_convert" is enabled. Public because it's useful for custom algorithms.*/ +typedef struct LodePNGColorStats { + unsigned colored; /*not grayscale*/ + unsigned key; /*image is not opaque and color key is possible instead of full alpha*/ + unsigned short key_r; /*key values, always as 16-bit, in 8-bit case the byte is duplicated, e.g. 65535 means 255*/ + unsigned short key_g; + unsigned short key_b; + unsigned alpha; /*image is not opaque and alpha channel or alpha palette required*/ + unsigned numcolors; /*amount of colors, up to 257. Not valid if bits == 16 or allow_palette is disabled.*/ + unsigned char palette[1024]; /*Remembers up to the first 256 RGBA colors, in no particular order, only valid when numcolors is valid*/ + unsigned bits; /*bits per channel (not for palette). 1,2 or 4 for grayscale only. 16 if 16-bit per channel required.*/ + size_t numpixels; + + /*user settings for computing/using the stats*/ + unsigned allow_palette; /*default 1. if 0, disallow choosing palette colortype in auto_choose_color, and don't count numcolors*/ + unsigned allow_greyscale; /*default 1. if 0, choose RGB or RGBA even if the image only has gray colors*/ +} LodePNGColorStats; + +void lodepng_color_stats_init(LodePNGColorStats* stats); + +/*Get a LodePNGColorStats of the image. The stats must already have been inited.*/ +void lodepng_compute_color_stats(LodePNGColorStats* stats, + const unsigned char* image, unsigned w, unsigned h, + const LodePNGColorMode* mode_in); + +/*Settings for the encoder.*/ +typedef struct LodePNGEncoderSettings { + LodePNGCompressSettings zlibsettings; /*settings for the zlib encoder, such as window size, ...*/ + + unsigned auto_convert; /*automatically choose output PNG color type. Default: true*/ + + /*If true, follows the official PNG heuristic: if the PNG uses a palette or lower than + 8 bit depth, set all filters to zero. Otherwise use the filter_strategy. Note that to + completely follow the official PNG heuristic, filter_palette_zero must be true and + filter_strategy must be LFS_MINSUM*/ + unsigned filter_palette_zero; + /*Which filter strategy to use when not using zeroes due to filter_palette_zero. + Set filter_palette_zero to 0 to ensure always using your chosen strategy. Default: LFS_MINSUM*/ + LodePNGFilterStrategy filter_strategy; + /*used if filter_strategy is LFS_PREDEFINED. In that case, this must point to a buffer with + the same length as the amount of scanlines in the image, and each value must <= 5. You + have to cleanup this buffer, LodePNG will never free it. Don't forget that filter_palette_zero + must be set to 0 to ensure this is also used on palette or low bitdepth images.*/ + const unsigned char* predefined_filters; + + /*force creating a PLTE chunk if colortype is 2 or 6 (= a suggested palette). + If colortype is 3, PLTE is _always_ created.*/ + unsigned force_palette; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*add LodePNG identifier and version as a text chunk, for debugging*/ + unsigned add_id; + /*encode text chunks as zTXt chunks instead of tEXt chunks, and use compression in iTXt chunks*/ + unsigned text_compression; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} LodePNGEncoderSettings; + +void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings); +#endif /*LODEPNG_COMPILE_ENCODER*/ + + +#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) +/*The settings, state and information for extended encoding and decoding.*/ +typedef struct LodePNGState { +#ifdef LODEPNG_COMPILE_DECODER + LodePNGDecoderSettings decoder; /*the decoding settings*/ +#endif /*LODEPNG_COMPILE_DECODER*/ +#ifdef LODEPNG_COMPILE_ENCODER + LodePNGEncoderSettings encoder; /*the encoding settings*/ +#endif /*LODEPNG_COMPILE_ENCODER*/ + LodePNGColorMode info_raw; /*specifies the format in which you would like to get the raw pixel buffer*/ + LodePNGInfo info_png; /*info of the PNG image obtained after decoding*/ + unsigned error; +} LodePNGState; + +/*init, cleanup and copy functions to use with this struct*/ +void lodepng_state_init(LodePNGState* state); +void lodepng_state_cleanup(LodePNGState* state); +void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source); +#endif /* defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) */ + +#ifdef LODEPNG_COMPILE_DECODER +/* +Same as lodepng_decode_memory, but uses a LodePNGState to allow custom settings and +getting much more information about the PNG image and color mode. +*/ +unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, + LodePNGState* state, + const unsigned char* in, size_t insize); + +/* +Read the PNG header, but not the actual data. This returns only the information +that is in the IHDR chunk of the PNG, such as width, height and color type. The +information is placed in the info_png field of the LodePNGState. +*/ +unsigned lodepng_inspect(unsigned* w, unsigned* h, + LodePNGState* state, + const unsigned char* in, size_t insize); +#endif /*LODEPNG_COMPILE_DECODER*/ + +/* +Reads one metadata chunk (other than IHDR) of the PNG file and outputs what it +read in the state. Returns error code on failure. +Use lodepng_inspect first with a new state, then e.g. lodepng_chunk_find_const +to find the desired chunk type, and if non null use lodepng_inspect_chunk (with +chunk_pointer - start_of_file as pos). +Supports most metadata chunks from the PNG standard (gAMA, bKGD, tEXt, ...). +Ignores unsupported, unknown, non-metadata or IHDR chunks (without error). +Requirements: &in[pos] must point to start of a chunk, must use regular +lodepng_inspect first since format of most other chunks depends on IHDR, and if +there is a PLTE chunk, that one must be inspected before tRNS or bKGD. +*/ +unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos, + const unsigned char* in, size_t insize); + +#ifdef LODEPNG_COMPILE_ENCODER +/*This function allocates the out buffer with standard malloc and stores the size in *outsize.*/ +unsigned lodepng_encode(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h, + LodePNGState* state); +#endif /*LODEPNG_COMPILE_ENCODER*/ + +/* +The lodepng_chunk functions are normally not needed, except to traverse the +unknown chunks stored in the LodePNGInfo struct, or add new ones to it. +It also allows traversing the chunks of an encoded PNG file yourself. + +The chunk pointer always points to the beginning of the chunk itself, that is +the first byte of the 4 length bytes. + +In the PNG file format, chunks have the following format: +-4 bytes length: length of the data of the chunk in bytes (chunk itself is 12 bytes longer) +-4 bytes chunk type (ASCII a-z,A-Z only, see below) +-length bytes of data (may be 0 bytes if length was 0) +-4 bytes of CRC, computed on chunk name + data + +The first chunk starts at the 8th byte of the PNG file, the entire rest of the file +exists out of concatenated chunks with the above format. + +PNG standard chunk ASCII naming conventions: +-First byte: uppercase = critical, lowercase = ancillary +-Second byte: uppercase = public, lowercase = private +-Third byte: must be uppercase +-Fourth byte: uppercase = unsafe to copy, lowercase = safe to copy +*/ + +/* +Gets the length of the data of the chunk. Total chunk length has 12 bytes more. +There must be at least 4 bytes to read from. If the result value is too large, +it may be corrupt data. +*/ +unsigned lodepng_chunk_length(const unsigned char* chunk); + +/*puts the 4-byte type in null terminated string*/ +void lodepng_chunk_type(char type[5], const unsigned char* chunk); + +/*check if the type is the given type*/ +unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type); + +/*0: it's one of the critical chunk types, 1: it's an ancillary chunk (see PNG standard)*/ +unsigned char lodepng_chunk_ancillary(const unsigned char* chunk); + +/*0: public, 1: private (see PNG standard)*/ +unsigned char lodepng_chunk_private(const unsigned char* chunk); + +/*0: the chunk is unsafe to copy, 1: the chunk is safe to copy (see PNG standard)*/ +unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk); + +/*get pointer to the data of the chunk, where the input points to the header of the chunk*/ +unsigned char* lodepng_chunk_data(unsigned char* chunk); +const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk); + +/*returns 0 if the crc is correct, 1 if it's incorrect (0 for OK as usual!)*/ +unsigned lodepng_chunk_check_crc(const unsigned char* chunk); + +/*generates the correct CRC from the data and puts it in the last 4 bytes of the chunk*/ +void lodepng_chunk_generate_crc(unsigned char* chunk); + +/* +Iterate to next chunks, allows iterating through all chunks of the PNG file. +Input must be at the beginning of a chunk (result of a previous lodepng_chunk_next call, +or the 8th byte of a PNG file which always has the first chunk), or alternatively may +point to the first byte of the PNG file (which is not a chunk but the magic header, the +function will then skip over it and return the first real chunk). +Expects at least 8 readable bytes of memory in the input pointer. +Will output pointer to the start of the next chunk or the end of the file if there +is no more chunk after this. Start this process at the 8th byte of the PNG file. +In a non-corrupt PNG file, the last chunk should have name "IEND". +*/ +unsigned char* lodepng_chunk_next(unsigned char* chunk); +const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk); + +/*Finds the first chunk with the given type in the range [chunk, end), or returns NULL if not found.*/ +unsigned char* lodepng_chunk_find(unsigned char* chunk, const unsigned char* end, const char type[5]); +const unsigned char* lodepng_chunk_find_const(const unsigned char* chunk, const unsigned char* end, const char type[5]); + +/* +Appends chunk to the data in out. The given chunk should already have its chunk header. +The out variable and outlength are updated to reflect the new reallocated buffer. +Returns error code (0 if it went ok) +*/ +unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk); + +/* +Appends new chunk to out. The chunk to append is given by giving its length, type +and data separately. The type is a 4-letter string. +The out variable and outlength are updated to reflect the new reallocated buffer. +Returne error code (0 if it went ok) +*/ +unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length, + const char* type, const unsigned char* data); + + +/*Calculate CRC32 of buffer*/ +unsigned lodepng_crc32(const unsigned char* buf, size_t len); +#endif /*LODEPNG_COMPILE_PNG*/ + + +#ifdef LODEPNG_COMPILE_ZLIB +/* +This zlib part can be used independently to zlib compress and decompress a +buffer. It cannot be used to create gzip files however, and it only supports the +part of zlib that is required for PNG, it does not support dictionaries. +*/ + +#ifdef LODEPNG_COMPILE_DECODER +/*Inflate a buffer. Inflate is the decompression step of deflate. Out buffer must be freed after use.*/ +unsigned lodepng_inflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings); + +/* +Decompresses Zlib data. Reallocates the out buffer and appends the data. The +data must be according to the zlib specification. +Either, *out must be NULL and *outsize must be 0, or, *out must be a valid +buffer and *outsize its size in bytes. out must be freed by user after usage. +*/ +unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings); +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER +/* +Compresses data with Zlib. Reallocates the out buffer and appends the data. +Zlib adds a small header and trailer around the deflate data. +The data is output in the format of the zlib specification. +Either, *out must be NULL and *outsize must be 0, or, *out must be a valid +buffer and *outsize its size in bytes. out must be freed by user after usage. +*/ +unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings); + +/* +Find length-limited Huffman code for given frequencies. This function is in the +public interface only for tests, it's used internally by lodepng_deflate. +*/ +unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, + size_t numcodes, unsigned maxbitlen); + +/*Compress a buffer with deflate. See RFC 1951. Out buffer must be freed after use.*/ +unsigned lodepng_deflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings); + +#endif /*LODEPNG_COMPILE_ENCODER*/ +#endif /*LODEPNG_COMPILE_ZLIB*/ + +#ifdef LODEPNG_COMPILE_DISK +/* +Load a file from disk into buffer. The function allocates the out buffer, and +after usage you should free it. +out: output parameter, contains pointer to loaded buffer. +outsize: output parameter, size of the allocated out buffer +filename: the path to the file to load +return value: error code (0 means ok) +*/ +unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename); + +/* +Save a file from buffer to disk. Warning, if it exists, this function overwrites +the file without warning! +buffer: the buffer to write +buffersize: size of the buffer to write +filename: the path to the file to save to +return value: error code (0 means ok) +*/ +unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename); +#endif /*LODEPNG_COMPILE_DISK*/ + +#ifdef LODEPNG_COMPILE_CPP +/* The LodePNG C++ wrapper uses std::vectors instead of manually allocated memory buffers. */ +namespace lodepng { +#ifdef LODEPNG_COMPILE_PNG +class State : public LodePNGState { + public: + State(); + State(const State& other); + ~State(); + State& operator=(const State& other); +}; + +#ifdef LODEPNG_COMPILE_DECODER +/* Same as other lodepng::decode, but using a State for more settings and information. */ +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + State& state, + const unsigned char* in, size_t insize); +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + State& state, + const std::vector& in); +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER +/* Same as other lodepng::encode, but using a State for more settings and information. */ +unsigned encode(std::vector& out, + const unsigned char* in, unsigned w, unsigned h, + State& state); +unsigned encode(std::vector& out, + const std::vector& in, unsigned w, unsigned h, + State& state); +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#ifdef LODEPNG_COMPILE_DISK +/* +Load a file from disk into an std::vector. +return value: error code (0 means ok) +*/ +unsigned load_file(std::vector& buffer, const std::string& filename); + +/* +Save the binary data in an std::vector to a file on disk. The file is overwritten +without warning. +*/ +unsigned save_file(const std::vector& buffer, const std::string& filename); +#endif /* LODEPNG_COMPILE_DISK */ +#endif /* LODEPNG_COMPILE_PNG */ + +#ifdef LODEPNG_COMPILE_ZLIB +#ifdef LODEPNG_COMPILE_DECODER +/* Zlib-decompress an unsigned char buffer */ +unsigned decompress(std::vector& out, const unsigned char* in, size_t insize, + const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings); + +/* Zlib-decompress an std::vector */ +unsigned decompress(std::vector& out, const std::vector& in, + const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings); +#endif /* LODEPNG_COMPILE_DECODER */ + +#ifdef LODEPNG_COMPILE_ENCODER +/* Zlib-compress an unsigned char buffer */ +unsigned compress(std::vector& out, const unsigned char* in, size_t insize, + const LodePNGCompressSettings& settings = lodepng_default_compress_settings); + +/* Zlib-compress an std::vector */ +unsigned compress(std::vector& out, const std::vector& in, + const LodePNGCompressSettings& settings = lodepng_default_compress_settings); +#endif /* LODEPNG_COMPILE_ENCODER */ +#endif /* LODEPNG_COMPILE_ZLIB */ +} /* namespace lodepng */ +#endif /*LODEPNG_COMPILE_CPP*/ + +/* +TODO: +[.] test if there are no memory leaks or security exploits - done a lot but needs to be checked often +[.] check compatibility with various compilers - done but needs to be redone for every newer version +[X] converting color to 16-bit per channel types +[X] support color profile chunk types (but never let them touch RGB values by default) +[ ] support all public PNG chunk types (almost done except sBIT, sPLT and hIST) +[ ] make sure encoder generates no chunks with size > (2^31)-1 +[ ] partial decoding (stream processing) +[X] let the "isFullyOpaque" function check color keys and transparent palettes too +[X] better name for the variables "codes", "codesD", "codelengthcodes", "clcl" and "lldl" +[ ] allow treating some errors like warnings, when image is recoverable (e.g. 69, 57, 58) +[ ] make warnings like: oob palette, checksum fail, data after iend, wrong/unknown crit chunk, no null terminator in text, ... +[ ] error messages with line numbers (and version) +[ ] errors in state instead of as return code? +[ ] new errors/warnings like suspiciously big decompressed ztxt or iccp chunk +[ ] let the C++ wrapper catch exceptions coming from the standard library and return LodePNG error codes +[ ] allow user to provide custom color conversion functions, e.g. for premultiplied alpha, padding bits or not, ... +[ ] allow user to give data (void*) to custom allocator +[ ] provide alternatives for C library functions not present on some platforms (memcpy, ...) +[ ] rename "grey" to "gray" everywhere since "color" also uses US spelling (keep "grey" copies for backwards compatibility) +*/ + +#endif /*LODEPNG_H inclusion guard*/ + +/* +LodePNG Documentation +--------------------- + +0. table of contents +-------------------- + + 1. about + 1.1. supported features + 1.2. features not supported + 2. C and C++ version + 3. security + 4. decoding + 5. encoding + 6. color conversions + 6.1. PNG color types + 6.2. color conversions + 6.3. padding bits + 6.4. A note about 16-bits per channel and endianness + 7. error values + 8. chunks and PNG editing + 9. compiler support + 10. examples + 10.1. decoder C++ example + 10.2. decoder C example + 11. state settings reference + 12. changes + 13. contact information + + +1. about +-------- + +PNG is a file format to store raster images losslessly with good compression, +supporting different color types and alpha channel. + +LodePNG is a PNG codec according to the Portable Network Graphics (PNG) +Specification (Second Edition) - W3C Recommendation 10 November 2003. + +The specifications used are: + +*) Portable Network Graphics (PNG) Specification (Second Edition): + http://www.w3.org/TR/2003/REC-PNG-20031110 +*) RFC 1950 ZLIB Compressed Data Format version 3.3: + http://www.gzip.org/zlib/rfc-zlib.html +*) RFC 1951 DEFLATE Compressed Data Format Specification ver 1.3: + http://www.gzip.org/zlib/rfc-deflate.html + +The most recent version of LodePNG can currently be found at +http://lodev.org/lodepng/ + +LodePNG works both in C (ISO C90) and C++, with a C++ wrapper that adds +extra functionality. + +LodePNG exists out of two files: +-lodepng.h: the header file for both C and C++ +-lodepng.c(pp): give it the name lodepng.c or lodepng.cpp (or .cc) depending on your usage + +If you want to start using LodePNG right away without reading this doc, get the +examples from the LodePNG website to see how to use it in code, or check the +smaller examples in chapter 13 here. + +LodePNG is simple but only supports the basic requirements. To achieve +simplicity, the following design choices were made: There are no dependencies +on any external library. There are functions to decode and encode a PNG with +a single function call, and extended versions of these functions taking a +LodePNGState struct allowing to specify or get more information. By default +the colors of the raw image are always RGB or RGBA, no matter what color type +the PNG file uses. To read and write files, there are simple functions to +convert the files to/from buffers in memory. + +This all makes LodePNG suitable for loading textures in games, demos and small +programs, ... It's less suitable for full fledged image editors, loading PNGs +over network (it requires all the image data to be available before decoding can +begin), life-critical systems, ... + +1.1. supported features +----------------------- + +The following features are supported by the decoder: + +*) decoding of PNGs with any color type, bit depth and interlace mode, to a 24- or 32-bit color raw image, + or the same color type as the PNG +*) encoding of PNGs, from any raw image to 24- or 32-bit color, or the same color type as the raw image +*) Adam7 interlace and deinterlace for any color type +*) loading the image from harddisk or decoding it from a buffer from other sources than harddisk +*) support for alpha channels, including RGBA color model, translucent palettes and color keying +*) zlib decompression (inflate) +*) zlib compression (deflate) +*) CRC32 and ADLER32 checksums +*) colorimetric color profile conversions: currently experimentally available in lodepng_util.cpp only, + plus alternatively ability to pass on chroma/gamma/ICC profile information to other color management system. +*) handling of unknown chunks, allowing making a PNG editor that stores custom and unknown chunks. +*) the following chunks are supported by both encoder and decoder: + IHDR: header information + PLTE: color palette + IDAT: pixel data + IEND: the final chunk + tRNS: transparency for palettized images + tEXt: textual information + zTXt: compressed textual information + iTXt: international textual information + bKGD: suggested background color + pHYs: physical dimensions + tIME: modification time + cHRM: RGB chromaticities + gAMA: RGB gamma correction + iCCP: ICC color profile + sRGB: rendering intent + +1.2. features not supported +--------------------------- + +The following features are _not_ supported: + +*) some features needed to make a conformant PNG-Editor might be still missing. +*) partial loading/stream processing. All data must be available and is processed in one call. +*) The following public chunks are not (yet) supported but treated as unknown chunks by LodePNG: + sBIT + hIST + sPLT + + +2. C and C++ version +-------------------- + +The C version uses buffers allocated with alloc that you need to free() +yourself. You need to use init and cleanup functions for each struct whenever +using a struct from the C version to avoid exploits and memory leaks. + +The C++ version has extra functions with std::vectors in the interface and the +lodepng::State class which is a LodePNGState with constructor and destructor. + +These files work without modification for both C and C++ compilers because all +the additional C++ code is in "#ifdef __cplusplus" blocks that make C-compilers +ignore it, and the C code is made to compile both with strict ISO C90 and C++. + +To use the C++ version, you need to rename the source file to lodepng.cpp +(instead of lodepng.c), and compile it with a C++ compiler. + +To use the C version, you need to rename the source file to lodepng.c (instead +of lodepng.cpp), and compile it with a C compiler. + + +3. Security +----------- + +Even if carefully designed, it's always possible that LodePNG contains possible +exploits. If you discover one, please let me know, and it will be fixed. + +When using LodePNG, care has to be taken with the C version of LodePNG, as well +as the C-style structs when working with C++. The following conventions are used +for all C-style structs: + +-if a struct has a corresponding init function, always call the init function when making a new one +-if a struct has a corresponding cleanup function, call it before the struct disappears to avoid memory leaks +-if a struct has a corresponding copy function, use the copy function instead of "=". + The destination must also be inited already. + + +4. Decoding +----------- + +Decoding converts a PNG compressed image to a raw pixel buffer. + +Most documentation on using the decoder is at its declarations in the header +above. For C, simple decoding can be done with functions such as +lodepng_decode32, and more advanced decoding can be done with the struct +LodePNGState and lodepng_decode. For C++, all decoding can be done with the +various lodepng::decode functions, and lodepng::State can be used for advanced +features. + +When using the LodePNGState, it uses the following fields for decoding: +*) LodePNGInfo info_png: it stores extra information about the PNG (the input) in here +*) LodePNGColorMode info_raw: here you can say what color mode of the raw image (the output) you want to get +*) LodePNGDecoderSettings decoder: you can specify a few extra settings for the decoder to use + +LodePNGInfo info_png +-------------------- + +After decoding, this contains extra information of the PNG image, except the actual +pixels, width and height because these are already gotten directly from the decoder +functions. + +It contains for example the original color type of the PNG image, text comments, +suggested background color, etc... More details about the LodePNGInfo struct are +at its declaration documentation. + +LodePNGColorMode info_raw +------------------------- + +When decoding, here you can specify which color type you want +the resulting raw image to be. If this is different from the colortype of the +PNG, then the decoder will automatically convert the result. This conversion +always works, except if you want it to convert a color PNG to grayscale or to +a palette with missing colors. + +By default, 32-bit color is used for the result. + +LodePNGDecoderSettings decoder +------------------------------ + +The settings can be used to ignore the errors created by invalid CRC and Adler32 +chunks, and to disable the decoding of tEXt chunks. + +There's also a setting color_convert, true by default. If false, no conversion +is done, the resulting data will be as it was in the PNG (after decompression) +and you'll have to puzzle the colors of the pixels together yourself using the +color type information in the LodePNGInfo. + + +5. Encoding +----------- + +Encoding converts a raw pixel buffer to a PNG compressed image. + +Most documentation on using the encoder is at its declarations in the header +above. For C, simple encoding can be done with functions such as +lodepng_encode32, and more advanced decoding can be done with the struct +LodePNGState and lodepng_encode. For C++, all encoding can be done with the +various lodepng::encode functions, and lodepng::State can be used for advanced +features. + +Like the decoder, the encoder can also give errors. However it gives less errors +since the encoder input is trusted, the decoder input (a PNG image that could +be forged by anyone) is not trusted. + +When using the LodePNGState, it uses the following fields for encoding: +*) LodePNGInfo info_png: here you specify how you want the PNG (the output) to be. +*) LodePNGColorMode info_raw: here you say what color type of the raw image (the input) has +*) LodePNGEncoderSettings encoder: you can specify a few settings for the encoder to use + +LodePNGInfo info_png +-------------------- + +When encoding, you use this the opposite way as when decoding: for encoding, +you fill in the values you want the PNG to have before encoding. By default it's +not needed to specify a color type for the PNG since it's automatically chosen, +but it's possible to choose it yourself given the right settings. + +The encoder will not always exactly match the LodePNGInfo struct you give, +it tries as close as possible. Some things are ignored by the encoder. The +encoder uses, for example, the following settings from it when applicable: +colortype and bitdepth, text chunks, time chunk, the color key, the palette, the +background color, the interlace method, unknown chunks, ... + +When encoding to a PNG with colortype 3, the encoder will generate a PLTE chunk. +If the palette contains any colors for which the alpha channel is not 255 (so +there are translucent colors in the palette), it'll add a tRNS chunk. + +LodePNGColorMode info_raw +------------------------- + +You specify the color type of the raw image that you give to the input here, +including a possible transparent color key and palette you happen to be using in +your raw image data. + +By default, 32-bit color is assumed, meaning your input has to be in RGBA +format with 4 bytes (unsigned chars) per pixel. + +LodePNGEncoderSettings encoder +------------------------------ + +The following settings are supported (some are in sub-structs): +*) auto_convert: when this option is enabled, the encoder will +automatically choose the smallest possible color mode (including color key) that +can encode the colors of all pixels without information loss. +*) btype: the block type for LZ77. 0 = uncompressed, 1 = fixed huffman tree, + 2 = dynamic huffman tree (best compression). Should be 2 for proper + compression. +*) use_lz77: whether or not to use LZ77 for compressed block types. Should be + true for proper compression. +*) windowsize: the window size used by the LZ77 encoder (1 - 32768). Has value + 2048 by default, but can be set to 32768 for better, but slow, compression. +*) force_palette: if colortype is 2 or 6, you can make the encoder write a PLTE + chunk if force_palette is true. This can used as suggested palette to convert + to by viewers that don't support more than 256 colors (if those still exist) +*) add_id: add text chunk "Encoder: LodePNG " to the image. +*) text_compression: default 1. If 1, it'll store texts as zTXt instead of tEXt chunks. + zTXt chunks use zlib compression on the text. This gives a smaller result on + large texts but a larger result on small texts (such as a single program name). + It's all tEXt or all zTXt though, there's no separate setting per text yet. + + +6. color conversions +-------------------- + +An important thing to note about LodePNG, is that the color type of the PNG, and +the color type of the raw image, are completely independent. By default, when +you decode a PNG, you get the result as a raw image in the color type you want, +no matter whether the PNG was encoded with a palette, grayscale or RGBA color. +And if you encode an image, by default LodePNG will automatically choose the PNG +color type that gives good compression based on the values of colors and amount +of colors in the image. It can be configured to let you control it instead as +well, though. + +To be able to do this, LodePNG does conversions from one color mode to another. +It can convert from almost any color type to any other color type, except the +following conversions: RGB to grayscale is not supported, and converting to a +palette when the palette doesn't have a required color is not supported. This is +not supported on purpose: this is information loss which requires a color +reduction algorithm that is beyond the scope of a PNG encoder (yes, RGB to gray +is easy, but there are multiple ways if you want to give some channels more +weight). + +By default, when decoding, you get the raw image in 32-bit RGBA or 24-bit RGB +color, no matter what color type the PNG has. And by default when encoding, +LodePNG automatically picks the best color model for the output PNG, and expects +the input image to be 32-bit RGBA or 24-bit RGB. So, unless you want to control +the color format of the images yourself, you can skip this chapter. + +6.1. PNG color types +-------------------- + +A PNG image can have many color types, ranging from 1-bit color to 64-bit color, +as well as palettized color modes. After the zlib decompression and unfiltering +in the PNG image is done, the raw pixel data will have that color type and thus +a certain amount of bits per pixel. If you want the output raw image after +decoding to have another color type, a conversion is done by LodePNG. + +The PNG specification gives the following color types: + +0: grayscale, bit depths 1, 2, 4, 8, 16 +2: RGB, bit depths 8 and 16 +3: palette, bit depths 1, 2, 4 and 8 +4: grayscale with alpha, bit depths 8 and 16 +6: RGBA, bit depths 8 and 16 + +Bit depth is the amount of bits per pixel per color channel. So the total amount +of bits per pixel is: amount of channels * bitdepth. + +6.2. color conversions +---------------------- + +As explained in the sections about the encoder and decoder, you can specify +color types and bit depths in info_png and info_raw to change the default +behaviour. + +If, when decoding, you want the raw image to be something else than the default, +you need to set the color type and bit depth you want in the LodePNGColorMode, +or the parameters colortype and bitdepth of the simple decoding function. + +If, when encoding, you use another color type than the default in the raw input +image, you need to specify its color type and bit depth in the LodePNGColorMode +of the raw image, or use the parameters colortype and bitdepth of the simple +encoding function. + +If, when encoding, you don't want LodePNG to choose the output PNG color type +but control it yourself, you need to set auto_convert in the encoder settings +to false, and specify the color type you want in the LodePNGInfo of the +encoder (including palette: it can generate a palette if auto_convert is true, +otherwise not). + +If the input and output color type differ (whether user chosen or auto chosen), +LodePNG will do a color conversion, which follows the rules below, and may +sometimes result in an error. + +To avoid some confusion: +-the decoder converts from PNG to raw image +-the encoder converts from raw image to PNG +-the colortype and bitdepth in LodePNGColorMode info_raw, are those of the raw image +-the colortype and bitdepth in the color field of LodePNGInfo info_png, are those of the PNG +-when encoding, the color type in LodePNGInfo is ignored if auto_convert + is enabled, it is automatically generated instead +-when decoding, the color type in LodePNGInfo is set by the decoder to that of the original + PNG image, but it can be ignored since the raw image has the color type you requested instead +-if the color type of the LodePNGColorMode and PNG image aren't the same, a conversion + between the color types is done if the color types are supported. If it is not + supported, an error is returned. If the types are the same, no conversion is done. +-even though some conversions aren't supported, LodePNG supports loading PNGs from any + colortype and saving PNGs to any colortype, sometimes it just requires preparing + the raw image correctly before encoding. +-both encoder and decoder use the same color converter. + +The function lodepng_convert does the color conversion. It is available in the +interface but normally isn't needed since the encoder and decoder already call +it. + +Non supported color conversions: +-color to grayscale when non-gray pixels are present: no error is thrown, but +the result will look ugly because only the red channel is taken (it assumes all +three channels are the same in this case so ignores green and blue). The reason +no error is given is to allow converting from three-channel grayscale images to +one-channel even if there are numerical imprecisions. +-anything to palette when the palette does not have an exact match for a from-color +in it: in this case an error is thrown + +Supported color conversions: +-anything to 8-bit RGB, 8-bit RGBA, 16-bit RGB, 16-bit RGBA +-any gray or gray+alpha, to gray or gray+alpha +-anything to a palette, as long as the palette has the requested colors in it +-removing alpha channel +-higher to smaller bitdepth, and vice versa + +If you want no color conversion to be done (e.g. for speed or control): +-In the encoder, you can make it save a PNG with any color type by giving the +raw color mode and LodePNGInfo the same color mode, and setting auto_convert to +false. +-In the decoder, you can make it store the pixel data in the same color type +as the PNG has, by setting the color_convert setting to false. Settings in +info_raw are then ignored. + +6.3. padding bits +----------------- + +In the PNG file format, if a less than 8-bit per pixel color type is used and the scanlines +have a bit amount that isn't a multiple of 8, then padding bits are used so that each +scanline starts at a fresh byte. But that is NOT true for the LodePNG raw input and output. +The raw input image you give to the encoder, and the raw output image you get from the decoder +will NOT have these padding bits, e.g. in the case of a 1-bit image with a width +of 7 pixels, the first pixel of the second scanline will the 8th bit of the first byte, +not the first bit of a new byte. + +6.4. A note about 16-bits per channel and endianness +---------------------------------------------------- + +LodePNG uses unsigned char arrays for 16-bit per channel colors too, just like +for any other color format. The 16-bit values are stored in big endian (most +significant byte first) in these arrays. This is the opposite order of the +little endian used by x86 CPU's. + +LodePNG always uses big endian because the PNG file format does so internally. +Conversions to other formats than PNG uses internally are not supported by +LodePNG on purpose, there are myriads of formats, including endianness of 16-bit +colors, the order in which you store R, G, B and A, and so on. Supporting and +converting to/from all that is outside the scope of LodePNG. + +This may mean that, depending on your use case, you may want to convert the big +endian output of LodePNG to little endian with a for loop. This is certainly not +always needed, many applications and libraries support big endian 16-bit colors +anyway, but it means you cannot simply cast the unsigned char* buffer to an +unsigned short* buffer on x86 CPUs. + + +7. error values +--------------- + +All functions in LodePNG that return an error code, return 0 if everything went +OK, or a non-zero code if there was an error. + +The meaning of the LodePNG error values can be retrieved with the function +lodepng_error_text: given the numerical error code, it returns a description +of the error in English as a string. + +Check the implementation of lodepng_error_text to see the meaning of each code. + + +8. chunks and PNG editing +------------------------- + +If you want to add extra chunks to a PNG you encode, or use LodePNG for a PNG +editor that should follow the rules about handling of unknown chunks, or if your +program is able to read other types of chunks than the ones handled by LodePNG, +then that's possible with the chunk functions of LodePNG. + +A PNG chunk has the following layout: + +4 bytes length +4 bytes type name +length bytes data +4 bytes CRC + +8.1. iterating through chunks +----------------------------- + +If you have a buffer containing the PNG image data, then the first chunk (the +IHDR chunk) starts at byte number 8 of that buffer. The first 8 bytes are the +signature of the PNG and are not part of a chunk. But if you start at byte 8 +then you have a chunk, and can check the following things of it. + +NOTE: none of these functions check for memory buffer boundaries. To avoid +exploits, always make sure the buffer contains all the data of the chunks. +When using lodepng_chunk_next, make sure the returned value is within the +allocated memory. + +unsigned lodepng_chunk_length(const unsigned char* chunk): + +Get the length of the chunk's data. The total chunk length is this length + 12. + +void lodepng_chunk_type(char type[5], const unsigned char* chunk): +unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type): + +Get the type of the chunk or compare if it's a certain type + +unsigned char lodepng_chunk_critical(const unsigned char* chunk): +unsigned char lodepng_chunk_private(const unsigned char* chunk): +unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk): + +Check if the chunk is critical in the PNG standard (only IHDR, PLTE, IDAT and IEND are). +Check if the chunk is private (public chunks are part of the standard, private ones not). +Check if the chunk is safe to copy. If it's not, then, when modifying data in a critical +chunk, unsafe to copy chunks of the old image may NOT be saved in the new one if your +program doesn't handle that type of unknown chunk. + +unsigned char* lodepng_chunk_data(unsigned char* chunk): +const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk): + +Get a pointer to the start of the data of the chunk. + +unsigned lodepng_chunk_check_crc(const unsigned char* chunk): +void lodepng_chunk_generate_crc(unsigned char* chunk): + +Check if the crc is correct or generate a correct one. + +unsigned char* lodepng_chunk_next(unsigned char* chunk): +const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk): + +Iterate to the next chunk. This works if you have a buffer with consecutive chunks. Note that these +functions do no boundary checking of the allocated data whatsoever, so make sure there is enough +data available in the buffer to be able to go to the next chunk. + +unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk): +unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length, + const char* type, const unsigned char* data): + +These functions are used to create new chunks that are appended to the data in *out that has +length *outlength. The append function appends an existing chunk to the new data. The create +function creates a new chunk with the given parameters and appends it. Type is the 4-letter +name of the chunk. + +8.2. chunks in info_png +----------------------- + +The LodePNGInfo struct contains fields with the unknown chunk in it. It has 3 +buffers (each with size) to contain 3 types of unknown chunks: +the ones that come before the PLTE chunk, the ones that come between the PLTE +and the IDAT chunks, and the ones that come after the IDAT chunks. +It's necessary to make the distinction between these 3 cases because the PNG +standard forces to keep the ordering of unknown chunks compared to the critical +chunks, but does not force any other ordering rules. + +info_png.unknown_chunks_data[0] is the chunks before PLTE +info_png.unknown_chunks_data[1] is the chunks after PLTE, before IDAT +info_png.unknown_chunks_data[2] is the chunks after IDAT + +The chunks in these 3 buffers can be iterated through and read by using the same +way described in the previous subchapter. + +When using the decoder to decode a PNG, you can make it store all unknown chunks +if you set the option settings.remember_unknown_chunks to 1. By default, this +option is off (0). + +The encoder will always encode unknown chunks that are stored in the info_png. +If you need it to add a particular chunk that isn't known by LodePNG, you can +use lodepng_chunk_append or lodepng_chunk_create to the chunk data in +info_png.unknown_chunks_data[x]. + +Chunks that are known by LodePNG should not be added in that way. E.g. to make +LodePNG add a bKGD chunk, set background_defined to true and add the correct +parameters there instead. + + +9. compiler support +------------------- + +No libraries other than the current standard C library are needed to compile +LodePNG. For the C++ version, only the standard C++ library is needed on top. +Add the files lodepng.c(pp) and lodepng.h to your project, include +lodepng.h where needed, and your program can read/write PNG files. + +It is compatible with C90 and up, and C++03 and up. + +If performance is important, use optimization when compiling! For both the +encoder and decoder, this makes a large difference. + +Make sure that LodePNG is compiled with the same compiler of the same version +and with the same settings as the rest of the program, or the interfaces with +std::vectors and std::strings in C++ can be incompatible. + +CHAR_BITS must be 8 or higher, because LodePNG uses unsigned chars for octets. + +*) gcc and g++ + +LodePNG is developed in gcc so this compiler is natively supported. It gives no +warnings with compiler options "-Wall -Wextra -pedantic -ansi", with gcc and g++ +version 4.7.1 on Linux, 32-bit and 64-bit. + +*) Clang + +Fully supported and warning-free. + +*) Mingw + +The Mingw compiler (a port of gcc for Windows) should be fully supported by +LodePNG. + +*) Visual Studio and Visual C++ Express Edition + +LodePNG should be warning-free with warning level W4. Two warnings were disabled +with pragmas though: warning 4244 about implicit conversions, and warning 4996 +where it wants to use a non-standard function fopen_s instead of the standard C +fopen. + +Visual Studio may want "stdafx.h" files to be included in each source file and +give an error "unexpected end of file while looking for precompiled header". +This is not standard C++ and will not be added to the stock LodePNG. You can +disable it for lodepng.cpp only by right clicking it, Properties, C/C++, +Precompiled Headers, and set it to Not Using Precompiled Headers there. + +NOTE: Modern versions of VS should be fully supported, but old versions, e.g. +VS6, are not guaranteed to work. + +*) Compilers on Macintosh + +LodePNG has been reported to work both with gcc and LLVM for Macintosh, both for +C and C++. + +*) Other Compilers + +If you encounter problems on any compilers, feel free to let me know and I may +try to fix it if the compiler is modern and standards compliant. + + +10. examples +------------ + +This decoder example shows the most basic usage of LodePNG. More complex +examples can be found on the LodePNG website. + +10.1. decoder C++ example +------------------------- + +#include "lodepng.h" +#include + +int main(int argc, char *argv[]) { + const char* filename = argc > 1 ? argv[1] : "test.png"; + + //load and decode + std::vector image; + unsigned width, height; + unsigned error = lodepng::decode(image, width, height, filename); + + //if there's an error, display it + if(error) std::cout << "decoder error " << error << ": " << lodepng_error_text(error) << std::endl; + + //the pixels are now in the vector "image", 4 bytes per pixel, ordered RGBARGBA..., use it as texture, draw it, ... +} + +10.2. decoder C example +----------------------- + +#include "lodepng.h" + +int main(int argc, char *argv[]) { + unsigned error; + unsigned char* image; + size_t width, height; + const char* filename = argc > 1 ? argv[1] : "test.png"; + + error = lodepng_decode32_file(&image, &width, &height, filename); + + if(error) printf("decoder error %u: %s\n", error, lodepng_error_text(error)); + + / * use image here * / + + free(image); + return 0; +} + +11. state settings reference +---------------------------- + +A quick reference of some settings to set on the LodePNGState + +For decoding: + +state.decoder.zlibsettings.ignore_adler32: ignore ADLER32 checksums +state.decoder.zlibsettings.custom_...: use custom inflate function +state.decoder.ignore_crc: ignore CRC checksums +state.decoder.ignore_critical: ignore unknown critical chunks +state.decoder.ignore_end: ignore missing IEND chunk. May fail if this corruption causes other errors +state.decoder.color_convert: convert internal PNG color to chosen one +state.decoder.read_text_chunks: whether to read in text metadata chunks +state.decoder.remember_unknown_chunks: whether to read in unknown chunks +state.info_raw.colortype: desired color type for decoded image +state.info_raw.bitdepth: desired bit depth for decoded image +state.info_raw....: more color settings, see struct LodePNGColorMode +state.info_png....: no settings for decoder but ouput, see struct LodePNGInfo + +For encoding: + +state.encoder.zlibsettings.btype: disable compression by setting it to 0 +state.encoder.zlibsettings.use_lz77: use LZ77 in compression +state.encoder.zlibsettings.windowsize: tweak LZ77 windowsize +state.encoder.zlibsettings.minmatch: tweak min LZ77 length to match +state.encoder.zlibsettings.nicematch: tweak LZ77 match where to stop searching +state.encoder.zlibsettings.lazymatching: try one more LZ77 matching +state.encoder.zlibsettings.custom_...: use custom deflate function +state.encoder.auto_convert: choose optimal PNG color type, if 0 uses info_png +state.encoder.filter_palette_zero: PNG filter strategy for palette +state.encoder.filter_strategy: PNG filter strategy to encode with +state.encoder.force_palette: add palette even if not encoding to one +state.encoder.add_id: add LodePNG identifier and version as a text chunk +state.encoder.text_compression: use compressed text chunks for metadata +state.info_raw.colortype: color type of raw input image you provide +state.info_raw.bitdepth: bit depth of raw input image you provide +state.info_raw: more color settings, see struct LodePNGColorMode +state.info_png.color.colortype: desired color type if auto_convert is false +state.info_png.color.bitdepth: desired bit depth if auto_convert is false +state.info_png.color....: more color settings, see struct LodePNGColorMode +state.info_png....: more PNG related settings, see struct LodePNGInfo + + +12. changes +----------- + +The version number of LodePNG is the date of the change given in the format +yyyymmdd. + +Some changes aren't backwards compatible. Those are indicated with a (!) +symbol. + +Not all changes are listed here, the commit history in github lists more: +https://github.com/lvandeve/lodepng + +*) 14 aug 2019: around 25% faster decoding thanks to huffman lookup tables. +*) 15 jun 2019 (!): auto_choose_color API changed (for bugfix: don't use palette + if gray ICC profile) and non-ICC LodePNGColorProfile renamed to LodePNGColorStats. +*) 30 dec 2018: code style changes only: removed newlines before opening braces. +*) 10 sep 2018: added way to inspect metadata chunks without full decoding. +*) 19 aug 2018 (!): fixed color mode bKGD is encoded with and made it use + palette index in case of palette. +*) 10 aug 2018 (!): added support for gAMA, cHRM, sRGB and iCCP chunks. This + change is backwards compatible unless you relied on unknown_chunks for those. +*) 11 jun 2018: less restrictive check for pixel size integer overflow +*) 14 jan 2018: allow optionally ignoring a few more recoverable errors +*) 17 sep 2017: fix memory leak for some encoder input error cases +*) 27 nov 2016: grey+alpha auto color model detection bugfix +*) 18 apr 2016: Changed qsort to custom stable sort (for platforms w/o qsort). +*) 09 apr 2016: Fixed colorkey usage detection, and better file loading (within + the limits of pure C90). +*) 08 dec 2015: Made load_file function return error if file can't be opened. +*) 24 okt 2015: Bugfix with decoding to palette output. +*) 18 apr 2015: Boundary PM instead of just package-merge for faster encoding. +*) 24 aug 2014: Moved to github +*) 23 aug 2014: Reduced needless memory usage of decoder. +*) 28 jun 2014: Removed fix_png setting, always support palette OOB for + simplicity. Made ColorProfile public. +*) 09 jun 2014: Faster encoder by fixing hash bug and more zeros optimization. +*) 22 dec 2013: Power of two windowsize required for optimization. +*) 15 apr 2013: Fixed bug with LAC_ALPHA and color key. +*) 25 mar 2013: Added an optional feature to ignore some PNG errors (fix_png). +*) 11 mar 2013 (!): Bugfix with custom free. Changed from "my" to "lodepng_" + prefix for the custom allocators and made it possible with a new #define to + use custom ones in your project without needing to change lodepng's code. +*) 28 jan 2013: Bugfix with color key. +*) 27 okt 2012: Tweaks in text chunk keyword length error handling. +*) 8 okt 2012 (!): Added new filter strategy (entropy) and new auto color mode. + (no palette). Better deflate tree encoding. New compression tweak settings. + Faster color conversions while decoding. Some internal cleanups. +*) 23 sep 2012: Reduced warnings in Visual Studio a little bit. +*) 1 sep 2012 (!): Removed #define's for giving custom (de)compression functions + and made it work with function pointers instead. +*) 23 jun 2012: Added more filter strategies. Made it easier to use custom alloc + and free functions and toggle #defines from compiler flags. Small fixes. +*) 6 may 2012 (!): Made plugging in custom zlib/deflate functions more flexible. +*) 22 apr 2012 (!): Made interface more consistent, renaming a lot. Removed + redundant C++ codec classes. Reduced amount of structs. Everything changed, + but it is cleaner now imho and functionality remains the same. Also fixed + several bugs and shrunk the implementation code. Made new samples. +*) 6 nov 2011 (!): By default, the encoder now automatically chooses the best + PNG color model and bit depth, based on the amount and type of colors of the + raw image. For this, autoLeaveOutAlphaChannel replaced by auto_choose_color. +*) 9 okt 2011: simpler hash chain implementation for the encoder. +*) 8 sep 2011: lz77 encoder lazy matching instead of greedy matching. +*) 23 aug 2011: tweaked the zlib compression parameters after benchmarking. + A bug with the PNG filtertype heuristic was fixed, so that it chooses much + better ones (it's quite significant). A setting to do an experimental, slow, + brute force search for PNG filter types is added. +*) 17 aug 2011 (!): changed some C zlib related function names. +*) 16 aug 2011: made the code less wide (max 120 characters per line). +*) 17 apr 2011: code cleanup. Bugfixes. Convert low to 16-bit per sample colors. +*) 21 feb 2011: fixed compiling for C90. Fixed compiling with sections disabled. +*) 11 dec 2010: encoding is made faster, based on suggestion by Peter Eastman + to optimize long sequences of zeros. +*) 13 nov 2010: added LodePNG_InfoColor_hasPaletteAlpha and + LodePNG_InfoColor_canHaveAlpha functions for convenience. +*) 7 nov 2010: added LodePNG_error_text function to get error code description. +*) 30 okt 2010: made decoding slightly faster +*) 26 okt 2010: (!) changed some C function and struct names (more consistent). + Reorganized the documentation and the declaration order in the header. +*) 08 aug 2010: only changed some comments and external samples. +*) 05 jul 2010: fixed bug thanks to warnings in the new gcc version. +*) 14 mar 2010: fixed bug where too much memory was allocated for char buffers. +*) 02 sep 2008: fixed bug where it could create empty tree that linux apps could + read by ignoring the problem but windows apps couldn't. +*) 06 jun 2008: added more error checks for out of memory cases. +*) 26 apr 2008: added a few more checks here and there to ensure more safety. +*) 06 mar 2008: crash with encoding of strings fixed +*) 02 feb 2008: support for international text chunks added (iTXt) +*) 23 jan 2008: small cleanups, and #defines to divide code in sections +*) 20 jan 2008: support for unknown chunks allowing using LodePNG for an editor. +*) 18 jan 2008: support for tIME and pHYs chunks added to encoder and decoder. +*) 17 jan 2008: ability to encode and decode compressed zTXt chunks added + Also various fixes, such as in the deflate and the padding bits code. +*) 13 jan 2008: Added ability to encode Adam7-interlaced images. Improved + filtering code of encoder. +*) 07 jan 2008: (!) changed LodePNG to use ISO C90 instead of C++. A + C++ wrapper around this provides an interface almost identical to before. + Having LodePNG be pure ISO C90 makes it more portable. The C and C++ code + are together in these files but it works both for C and C++ compilers. +*) 29 dec 2007: (!) changed most integer types to unsigned int + other tweaks +*) 30 aug 2007: bug fixed which makes this Borland C++ compatible +*) 09 aug 2007: some VS2005 warnings removed again +*) 21 jul 2007: deflate code placed in new namespace separate from zlib code +*) 08 jun 2007: fixed bug with 2- and 4-bit color, and small interlaced images +*) 04 jun 2007: improved support for Visual Studio 2005: crash with accessing + invalid std::vector element [0] fixed, and level 3 and 4 warnings removed +*) 02 jun 2007: made the encoder add a tag with version by default +*) 27 may 2007: zlib and png code separated (but still in the same file), + simple encoder/decoder functions added for more simple usage cases +*) 19 may 2007: minor fixes, some code cleaning, new error added (error 69), + moved some examples from here to lodepng_examples.cpp +*) 12 may 2007: palette decoding bug fixed +*) 24 apr 2007: changed the license from BSD to the zlib license +*) 11 mar 2007: very simple addition: ability to encode bKGD chunks. +*) 04 mar 2007: (!) tEXt chunk related fixes, and support for encoding + palettized PNG images. Plus little interface change with palette and texts. +*) 03 mar 2007: Made it encode dynamic Huffman shorter with repeat codes. + Fixed a bug where the end code of a block had length 0 in the Huffman tree. +*) 26 feb 2007: Huffman compression with dynamic trees (BTYPE 2) now implemented + and supported by the encoder, resulting in smaller PNGs at the output. +*) 27 jan 2007: Made the Adler-32 test faster so that a timewaste is gone. +*) 24 jan 2007: gave encoder an error interface. Added color conversion from any + greyscale type to 8-bit greyscale with or without alpha. +*) 21 jan 2007: (!) Totally changed the interface. It allows more color types + to convert to and is more uniform. See the manual for how it works now. +*) 07 jan 2007: Some cleanup & fixes, and a few changes over the last days: + encode/decode custom tEXt chunks, separate classes for zlib & deflate, and + at last made the decoder give errors for incorrect Adler32 or Crc. +*) 01 jan 2007: Fixed bug with encoding PNGs with less than 8 bits per channel. +*) 29 dec 2006: Added support for encoding images without alpha channel, and + cleaned out code as well as making certain parts faster. +*) 28 dec 2006: Added "Settings" to the encoder. +*) 26 dec 2006: The encoder now does LZ77 encoding and produces much smaller files now. + Removed some code duplication in the decoder. Fixed little bug in an example. +*) 09 dec 2006: (!) Placed output parameters of public functions as first parameter. + Fixed a bug of the decoder with 16-bit per color. +*) 15 okt 2006: Changed documentation structure +*) 09 okt 2006: Encoder class added. It encodes a valid PNG image from the + given image buffer, however for now it's not compressed. +*) 08 sep 2006: (!) Changed to interface with a Decoder class +*) 30 jul 2006: (!) LodePNG_InfoPng , width and height are now retrieved in different + way. Renamed decodePNG to decodePNGGeneric. +*) 29 jul 2006: (!) Changed the interface: image info is now returned as a + struct of type LodePNG::LodePNG_Info, instead of a vector, which was a bit clumsy. +*) 28 jul 2006: Cleaned the code and added new error checks. + Corrected terminology "deflate" into "inflate". +*) 23 jun 2006: Added SDL example in the documentation in the header, this + example allows easy debugging by displaying the PNG and its transparency. +*) 22 jun 2006: (!) Changed way to obtain error value. Added + loadFile function for convenience. Made decodePNG32 faster. +*) 21 jun 2006: (!) Changed type of info vector to unsigned. + Changed position of palette in info vector. Fixed an important bug that + happened on PNGs with an uncompressed block. +*) 16 jun 2006: Internally changed unsigned into unsigned where + needed, and performed some optimizations. +*) 07 jun 2006: (!) Renamed functions to decodePNG and placed them + in LodePNG namespace. Changed the order of the parameters. Rewrote the + documentation in the header. Renamed files to lodepng.cpp and lodepng.h +*) 22 apr 2006: Optimized and improved some code +*) 07 sep 2005: (!) Changed to std::vector interface +*) 12 aug 2005: Initial release (C++, decoder only) + + +13. contact information +----------------------- + +Feel free to contact me with suggestions, problems, comments, ... concerning +LodePNG. If you encounter a PNG image that doesn't work properly with this +decoder, feel free to send it and I'll use it to find and fix the problem. + +My email address is (puzzle the account and domain together with an @ symbol): +Domain: gmail dot com. +Account: lode dot vandevenne. + + +Copyright (c) 2005-2019 Lode Vandevenne +*/ diff --git a/desktop_version/physfs/LICENSE.txt b/desktop_version/physfs/LICENSE.txt new file mode 100644 index 00000000..8658ea43 --- /dev/null +++ b/desktop_version/physfs/LICENSE.txt @@ -0,0 +1,23 @@ + + Copyright (c) 2001-2019 Ryan C. Gordon and others. + + This software is provided 'as-is', without any express or implied warranty. + In no event will the authors be held liable for any damages arising from + the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software in a + product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. + + Ryan C. Gordon + diff --git a/desktop_version/physfs/README.txt b/desktop_version/physfs/README.txt new file mode 100644 index 00000000..2c24a503 --- /dev/null +++ b/desktop_version/physfs/README.txt @@ -0,0 +1,9 @@ + +PhysicsFS; a portable, flexible file i/o abstraction. + + https://icculus.org/physfs/ + +Please see the docs directory for documentation. + +Please see LICENSE.txt for licensing information. + diff --git a/desktop_version/physfs/physfs.c b/desktop_version/physfs/physfs.c new file mode 100644 index 00000000..fdb1405d --- /dev/null +++ b/desktop_version/physfs/physfs.c @@ -0,0 +1,3318 @@ +/** + * PhysicsFS; a portable, flexible file i/o abstraction. + * + * Documentation is in physfs.h. It's verbose, honest. :) + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon. + */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_internal.h" + +#if defined(_MSC_VER) +#include + +/* this code came from https://stackoverflow.com/a/8712996 */ +int __PHYSFS_msvc_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) +{ + int count = -1; + + if (size != 0) + count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap); + if (count == -1) + count = _vscprintf(format, ap); + + return count; +} + +int __PHYSFS_msvc_snprintf(char *outBuf, size_t size, const char *format, ...) +{ + int count; + va_list ap; + + va_start(ap, format); + count = __PHYSFS_msvc_vsnprintf(outBuf, size, format, ap); + va_end(ap); + + return count; +} +#endif + + +typedef struct __PHYSFS_DIRHANDLE__ +{ + void *opaque; /* Instance data unique to the archiver. */ + char *dirName; /* Path to archive in platform-dependent notation. */ + char *mountPoint; /* Mountpoint in virtual file tree. */ + const PHYSFS_Archiver *funcs; /* Ptr to archiver info for this handle. */ + struct __PHYSFS_DIRHANDLE__ *next; /* linked list stuff. */ +} DirHandle; + + +typedef struct __PHYSFS_FILEHANDLE__ +{ + PHYSFS_Io *io; /* Instance data unique to the archiver for this file. */ + PHYSFS_uint8 forReading; /* Non-zero if reading, zero if write/append */ + const DirHandle *dirHandle; /* Archiver instance that created this */ + PHYSFS_uint8 *buffer; /* Buffer, if set (NULL otherwise). Don't touch! */ + size_t bufsize; /* Bufsize, if set (0 otherwise). Don't touch! */ + size_t buffill; /* Buffer fill size. Don't touch! */ + size_t bufpos; /* Buffer position. Don't touch! */ + struct __PHYSFS_FILEHANDLE__ *next; /* linked list stuff. */ +} FileHandle; + + +typedef struct __PHYSFS_ERRSTATETYPE__ +{ + void *tid; + PHYSFS_ErrorCode code; + struct __PHYSFS_ERRSTATETYPE__ *next; +} ErrState; + + +/* General PhysicsFS state ... */ +static int initialized = 0; +static ErrState *errorStates = NULL; +static DirHandle *searchPath = NULL; +static DirHandle *writeDir = NULL; +static FileHandle *openWriteList = NULL; +static FileHandle *openReadList = NULL; +static char *baseDir = NULL; +static char *userDir = NULL; +static char *prefDir = NULL; +static int allowSymLinks = 0; +static PHYSFS_Archiver **archivers = NULL; +static PHYSFS_ArchiveInfo **archiveInfo = NULL; +static volatile size_t numArchivers = 0; + +/* mutexes ... */ +static void *errorLock = NULL; /* protects error message list. */ +static void *stateLock = NULL; /* protects other PhysFS static state. */ + +/* allocator ... */ +static int externalAllocator = 0; +PHYSFS_Allocator allocator; + + +#ifdef PHYSFS_NEED_ATOMIC_OP_FALLBACK +static inline int __PHYSFS_atomicAdd(int *ptrval, const int val) +{ + int retval; + __PHYSFS_platformGrabMutex(stateLock); + retval = *ptrval; + *ptrval = retval + val; + __PHYSFS_platformReleaseMutex(stateLock); + return retval; +} /* __PHYSFS_atomicAdd */ + +int __PHYSFS_ATOMIC_INCR(int *ptrval) +{ + return __PHYSFS_atomicAdd(ptrval, 1); +} /* __PHYSFS_ATOMIC_INCR */ + +int __PHYSFS_ATOMIC_DECR(int *ptrval) +{ + return __PHYSFS_atomicAdd(ptrval, -1); +} /* __PHYSFS_ATOMIC_DECR */ +#endif + + + +/* PHYSFS_Io implementation for i/o to physical filesystem... */ + +/* !!! FIXME: maybe refcount the paths in a string pool? */ +typedef struct __PHYSFS_NativeIoInfo +{ + void *handle; + const char *path; + int mode; /* 'r', 'w', or 'a' */ +} NativeIoInfo; + +static PHYSFS_sint64 nativeIo_read(PHYSFS_Io *io, void *buf, PHYSFS_uint64 len) +{ + NativeIoInfo *info = (NativeIoInfo *) io->opaque; + return __PHYSFS_platformRead(info->handle, buf, len); +} /* nativeIo_read */ + +static PHYSFS_sint64 nativeIo_write(PHYSFS_Io *io, const void *buffer, + PHYSFS_uint64 len) +{ + NativeIoInfo *info = (NativeIoInfo *) io->opaque; + return __PHYSFS_platformWrite(info->handle, buffer, len); +} /* nativeIo_write */ + +static int nativeIo_seek(PHYSFS_Io *io, PHYSFS_uint64 offset) +{ + NativeIoInfo *info = (NativeIoInfo *) io->opaque; + return __PHYSFS_platformSeek(info->handle, offset); +} /* nativeIo_seek */ + +static PHYSFS_sint64 nativeIo_tell(PHYSFS_Io *io) +{ + NativeIoInfo *info = (NativeIoInfo *) io->opaque; + return __PHYSFS_platformTell(info->handle); +} /* nativeIo_tell */ + +static PHYSFS_sint64 nativeIo_length(PHYSFS_Io *io) +{ + NativeIoInfo *info = (NativeIoInfo *) io->opaque; + return __PHYSFS_platformFileLength(info->handle); +} /* nativeIo_length */ + +static PHYSFS_Io *nativeIo_duplicate(PHYSFS_Io *io) +{ + NativeIoInfo *info = (NativeIoInfo *) io->opaque; + return __PHYSFS_createNativeIo(info->path, info->mode); +} /* nativeIo_duplicate */ + +static int nativeIo_flush(PHYSFS_Io *io) +{ + NativeIoInfo *info = (NativeIoInfo *) io->opaque; + return __PHYSFS_platformFlush(info->handle); +} /* nativeIo_flush */ + +static void nativeIo_destroy(PHYSFS_Io *io) +{ + NativeIoInfo *info = (NativeIoInfo *) io->opaque; + __PHYSFS_platformClose(info->handle); + allocator.Free((void *) info->path); + allocator.Free(info); + allocator.Free(io); +} /* nativeIo_destroy */ + +static const PHYSFS_Io __PHYSFS_nativeIoInterface = +{ + CURRENT_PHYSFS_IO_API_VERSION, NULL, + nativeIo_read, + nativeIo_write, + nativeIo_seek, + nativeIo_tell, + nativeIo_length, + nativeIo_duplicate, + nativeIo_flush, + nativeIo_destroy +}; + +PHYSFS_Io *__PHYSFS_createNativeIo(const char *path, const int mode) +{ + PHYSFS_Io *io = NULL; + NativeIoInfo *info = NULL; + void *handle = NULL; + char *pathdup = NULL; + + assert((mode == 'r') || (mode == 'w') || (mode == 'a')); + + io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + GOTO_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed); + info = (NativeIoInfo *) allocator.Malloc(sizeof (NativeIoInfo)); + GOTO_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed); + pathdup = (char *) allocator.Malloc(strlen(path) + 1); + GOTO_IF(!pathdup, PHYSFS_ERR_OUT_OF_MEMORY, createNativeIo_failed); + + if (mode == 'r') + handle = __PHYSFS_platformOpenRead(path); + else if (mode == 'w') + handle = __PHYSFS_platformOpenWrite(path); + else if (mode == 'a') + handle = __PHYSFS_platformOpenAppend(path); + + GOTO_IF_ERRPASS(!handle, createNativeIo_failed); + + strcpy(pathdup, path); + info->handle = handle; + info->path = pathdup; + info->mode = mode; + memcpy(io, &__PHYSFS_nativeIoInterface, sizeof (*io)); + io->opaque = info; + return io; + +createNativeIo_failed: + if (handle != NULL) __PHYSFS_platformClose(handle); + if (pathdup != NULL) allocator.Free(pathdup); + if (info != NULL) allocator.Free(info); + if (io != NULL) allocator.Free(io); + return NULL; +} /* __PHYSFS_createNativeIo */ + + +/* PHYSFS_Io implementation for i/o to a memory buffer... */ + +typedef struct __PHYSFS_MemoryIoInfo +{ + const PHYSFS_uint8 *buf; + PHYSFS_uint64 len; + PHYSFS_uint64 pos; + PHYSFS_Io *parent; + int refcount; + void (*destruct)(void *); +} MemoryIoInfo; + +static PHYSFS_sint64 memoryIo_read(PHYSFS_Io *io, void *buf, PHYSFS_uint64 len) +{ + MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; + const PHYSFS_uint64 avail = info->len - info->pos; + assert(avail <= info->len); + + if (avail == 0) + return 0; /* we're at EOF; nothing to do. */ + + if (len > avail) + len = avail; + + memcpy(buf, info->buf + info->pos, (size_t) len); + info->pos += len; + return len; +} /* memoryIo_read */ + +static PHYSFS_sint64 memoryIo_write(PHYSFS_Io *io, const void *buffer, + PHYSFS_uint64 len) +{ + BAIL(PHYSFS_ERR_OPEN_FOR_READING, -1); +} /* memoryIo_write */ + +static int memoryIo_seek(PHYSFS_Io *io, PHYSFS_uint64 offset) +{ + MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; + BAIL_IF(offset > info->len, PHYSFS_ERR_PAST_EOF, 0); + info->pos = offset; + return 1; +} /* memoryIo_seek */ + +static PHYSFS_sint64 memoryIo_tell(PHYSFS_Io *io) +{ + const MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; + return (PHYSFS_sint64) info->pos; +} /* memoryIo_tell */ + +static PHYSFS_sint64 memoryIo_length(PHYSFS_Io *io) +{ + const MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; + return (PHYSFS_sint64) info->len; +} /* memoryIo_length */ + +static PHYSFS_Io *memoryIo_duplicate(PHYSFS_Io *io) +{ + MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; + MemoryIoInfo *newinfo = NULL; + PHYSFS_Io *parent = info->parent; + PHYSFS_Io *retval = NULL; + + /* avoid deep copies. */ + assert((!parent) || (!((MemoryIoInfo *) parent->opaque)->parent) ); + + /* share the buffer between duplicates. */ + if (parent != NULL) /* dup the parent, increment its refcount. */ + return parent->duplicate(parent); + + /* we're the parent. */ + + retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + newinfo = (MemoryIoInfo *) allocator.Malloc(sizeof (MemoryIoInfo)); + if (!newinfo) + { + allocator.Free(retval); + BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); + } /* if */ + + __PHYSFS_ATOMIC_INCR(&info->refcount); + + memset(newinfo, '\0', sizeof (*info)); + newinfo->buf = info->buf; + newinfo->len = info->len; + newinfo->pos = 0; + newinfo->parent = io; + newinfo->refcount = 0; + newinfo->destruct = NULL; + + memcpy(retval, io, sizeof (*retval)); + retval->opaque = newinfo; + return retval; +} /* memoryIo_duplicate */ + +static int memoryIo_flush(PHYSFS_Io *io) { return 1; /* it's read-only. */ } + +static void memoryIo_destroy(PHYSFS_Io *io) +{ + MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; + PHYSFS_Io *parent = info->parent; + + if (parent != NULL) + { + assert(info->buf == ((MemoryIoInfo *) info->parent->opaque)->buf); + assert(info->len == ((MemoryIoInfo *) info->parent->opaque)->len); + assert(info->refcount == 0); + assert(info->destruct == NULL); + allocator.Free(info); + allocator.Free(io); + parent->destroy(parent); /* decrements refcount. */ + return; + } /* if */ + + /* we _are_ the parent. */ + assert(info->refcount > 0); /* even in a race, we hold a reference. */ + + if (__PHYSFS_ATOMIC_DECR(&info->refcount) == 0) + { + void (*destruct)(void *) = info->destruct; + void *buf = (void *) info->buf; + io->opaque = NULL; /* kill this here in case of race. */ + allocator.Free(info); + allocator.Free(io); + if (destruct != NULL) + destruct(buf); + } /* if */ +} /* memoryIo_destroy */ + + +static const PHYSFS_Io __PHYSFS_memoryIoInterface = +{ + CURRENT_PHYSFS_IO_API_VERSION, NULL, + memoryIo_read, + memoryIo_write, + memoryIo_seek, + memoryIo_tell, + memoryIo_length, + memoryIo_duplicate, + memoryIo_flush, + memoryIo_destroy +}; + +PHYSFS_Io *__PHYSFS_createMemoryIo(const void *buf, PHYSFS_uint64 len, + void (*destruct)(void *)) +{ + PHYSFS_Io *io = NULL; + MemoryIoInfo *info = NULL; + + io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + GOTO_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, createMemoryIo_failed); + info = (MemoryIoInfo *) allocator.Malloc(sizeof (MemoryIoInfo)); + GOTO_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, createMemoryIo_failed); + + memset(info, '\0', sizeof (*info)); + info->buf = (const PHYSFS_uint8 *) buf; + info->len = len; + info->pos = 0; + info->parent = NULL; + info->refcount = 1; + info->destruct = destruct; + + memcpy(io, &__PHYSFS_memoryIoInterface, sizeof (*io)); + io->opaque = info; + return io; + +createMemoryIo_failed: + if (info != NULL) allocator.Free(info); + if (io != NULL) allocator.Free(io); + return NULL; +} /* __PHYSFS_createMemoryIo */ + + +/* PHYSFS_Io implementation for i/o to a PHYSFS_File... */ + +static PHYSFS_sint64 handleIo_read(PHYSFS_Io *io, void *buf, PHYSFS_uint64 len) +{ + return PHYSFS_readBytes((PHYSFS_File *) io->opaque, buf, len); +} /* handleIo_read */ + +static PHYSFS_sint64 handleIo_write(PHYSFS_Io *io, const void *buffer, + PHYSFS_uint64 len) +{ + return PHYSFS_writeBytes((PHYSFS_File *) io->opaque, buffer, len); +} /* handleIo_write */ + +static int handleIo_seek(PHYSFS_Io *io, PHYSFS_uint64 offset) +{ + return PHYSFS_seek((PHYSFS_File *) io->opaque, offset); +} /* handleIo_seek */ + +static PHYSFS_sint64 handleIo_tell(PHYSFS_Io *io) +{ + return PHYSFS_tell((PHYSFS_File *) io->opaque); +} /* handleIo_tell */ + +static PHYSFS_sint64 handleIo_length(PHYSFS_Io *io) +{ + return PHYSFS_fileLength((PHYSFS_File *) io->opaque); +} /* handleIo_length */ + +static PHYSFS_Io *handleIo_duplicate(PHYSFS_Io *io) +{ + /* + * There's no duplicate at the PHYSFS_File level, so we break the + * abstraction. We're allowed to: we're physfs.c! + */ + FileHandle *origfh = (FileHandle *) io->opaque; + FileHandle *newfh = (FileHandle *) allocator.Malloc(sizeof (FileHandle)); + PHYSFS_Io *retval = NULL; + + GOTO_IF(!newfh, PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed); + memset(newfh, '\0', sizeof (*newfh)); + + retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed); + +#if 0 /* we don't buffer the duplicate, at least not at the moment. */ + if (origfh->buffer != NULL) + { + newfh->buffer = (PHYSFS_uint8 *) allocator.Malloc(origfh->bufsize); + if (!newfh->buffer) + GOTO(PHYSFS_ERR_OUT_OF_MEMORY, handleIo_dupe_failed); + newfh->bufsize = origfh->bufsize; + } /* if */ +#endif + + newfh->io = origfh->io->duplicate(origfh->io); + GOTO_IF_ERRPASS(!newfh->io, handleIo_dupe_failed); + + newfh->forReading = origfh->forReading; + newfh->dirHandle = origfh->dirHandle; + + __PHYSFS_platformGrabMutex(stateLock); + if (newfh->forReading) + { + newfh->next = openReadList; + openReadList = newfh; + } /* if */ + else + { + newfh->next = openWriteList; + openWriteList = newfh; + } /* else */ + __PHYSFS_platformReleaseMutex(stateLock); + + memcpy(retval, io, sizeof (PHYSFS_Io)); + retval->opaque = newfh; + return retval; + +handleIo_dupe_failed: + if (newfh) + { + if (newfh->io != NULL) newfh->io->destroy(newfh->io); + if (newfh->buffer != NULL) allocator.Free(newfh->buffer); + allocator.Free(newfh); + } /* if */ + + return NULL; +} /* handleIo_duplicate */ + +static int handleIo_flush(PHYSFS_Io *io) +{ + return PHYSFS_flush((PHYSFS_File *) io->opaque); +} /* handleIo_flush */ + +static void handleIo_destroy(PHYSFS_Io *io) +{ + if (io->opaque != NULL) + PHYSFS_close((PHYSFS_File *) io->opaque); + allocator.Free(io); +} /* handleIo_destroy */ + +static const PHYSFS_Io __PHYSFS_handleIoInterface = +{ + CURRENT_PHYSFS_IO_API_VERSION, NULL, + handleIo_read, + handleIo_write, + handleIo_seek, + handleIo_tell, + handleIo_length, + handleIo_duplicate, + handleIo_flush, + handleIo_destroy +}; + +static PHYSFS_Io *__PHYSFS_createHandleIo(PHYSFS_File *f) +{ + PHYSFS_Io *io = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + BAIL_IF(!io, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + memcpy(io, &__PHYSFS_handleIoInterface, sizeof (*io)); + io->opaque = f; + return io; +} /* __PHYSFS_createHandleIo */ + + +/* functions ... */ + +typedef struct +{ + char **list; + PHYSFS_uint32 size; + PHYSFS_ErrorCode errcode; +} EnumStringListCallbackData; + +static void enumStringListCallback(void *data, const char *str) +{ + void *ptr; + char *newstr; + EnumStringListCallbackData *pecd = (EnumStringListCallbackData *) data; + + if (pecd->errcode) + return; + + ptr = allocator.Realloc(pecd->list, (pecd->size + 2) * sizeof (char *)); + newstr = (char *) allocator.Malloc(strlen(str) + 1); + if (ptr != NULL) + pecd->list = (char **) ptr; + + if ((ptr == NULL) || (newstr == NULL)) + { + pecd->errcode = PHYSFS_ERR_OUT_OF_MEMORY; + pecd->list[pecd->size] = NULL; + PHYSFS_freeList(pecd->list); + return; + } /* if */ + + strcpy(newstr, str); + pecd->list[pecd->size] = newstr; + pecd->size++; +} /* enumStringListCallback */ + + +static char **doEnumStringList(void (*func)(PHYSFS_StringCallback, void *)) +{ + EnumStringListCallbackData ecd; + memset(&ecd, '\0', sizeof (ecd)); + ecd.list = (char **) allocator.Malloc(sizeof (char *)); + BAIL_IF(!ecd.list, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + func(enumStringListCallback, &ecd); + + if (ecd.errcode) + { + PHYSFS_setErrorCode(ecd.errcode); + return NULL; + } /* if */ + + ecd.list[ecd.size] = NULL; + return ecd.list; +} /* doEnumStringList */ + + +static void __PHYSFS_bubble_sort(void *a, size_t lo, size_t hi, + int (*cmpfn)(void *, size_t, size_t), + void (*swapfn)(void *, size_t, size_t)) +{ + size_t i; + int sorted; + + do + { + sorted = 1; + for (i = lo; i < hi; i++) + { + if (cmpfn(a, i, i + 1) > 0) + { + swapfn(a, i, i + 1); + sorted = 0; + } /* if */ + } /* for */ + } while (!sorted); +} /* __PHYSFS_bubble_sort */ + + +static void __PHYSFS_quick_sort(void *a, size_t lo, size_t hi, + int (*cmpfn)(void *, size_t, size_t), + void (*swapfn)(void *, size_t, size_t)) +{ + size_t i; + size_t j; + size_t v; + + if ((hi - lo) <= PHYSFS_QUICKSORT_THRESHOLD) + __PHYSFS_bubble_sort(a, lo, hi, cmpfn, swapfn); + else + { + i = (hi + lo) / 2; + + if (cmpfn(a, lo, i) > 0) swapfn(a, lo, i); + if (cmpfn(a, lo, hi) > 0) swapfn(a, lo, hi); + if (cmpfn(a, i, hi) > 0) swapfn(a, i, hi); + + j = hi - 1; + swapfn(a, i, j); + i = lo; + v = j; + while (1) + { + while(cmpfn(a, ++i, v) < 0) { /* do nothing */ } + while(cmpfn(a, --j, v) > 0) { /* do nothing */ } + if (j < i) + break; + swapfn(a, i, j); + } /* while */ + if (i != (hi-1)) + swapfn(a, i, hi-1); + __PHYSFS_quick_sort(a, lo, j, cmpfn, swapfn); + __PHYSFS_quick_sort(a, i+1, hi, cmpfn, swapfn); + } /* else */ +} /* __PHYSFS_quick_sort */ + + +void __PHYSFS_sort(void *entries, size_t max, + int (*cmpfn)(void *, size_t, size_t), + void (*swapfn)(void *, size_t, size_t)) +{ + /* + * Quicksort w/ Bubblesort fallback algorithm inspired by code from here: + * https://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html + */ + if (max > 0) + __PHYSFS_quick_sort(entries, 0, max - 1, cmpfn, swapfn); +} /* __PHYSFS_sort */ + + +static ErrState *findErrorForCurrentThread(void) +{ + ErrState *i; + void *tid; + + if (errorLock != NULL) + __PHYSFS_platformGrabMutex(errorLock); + + if (errorStates != NULL) + { + tid = __PHYSFS_platformGetThreadID(); + + for (i = errorStates; i != NULL; i = i->next) + { + if (i->tid == tid) + { + if (errorLock != NULL) + __PHYSFS_platformReleaseMutex(errorLock); + return i; + } /* if */ + } /* for */ + } /* if */ + + if (errorLock != NULL) + __PHYSFS_platformReleaseMutex(errorLock); + + return NULL; /* no error available. */ +} /* findErrorForCurrentThread */ + + +/* this doesn't reset the error state. */ +static inline PHYSFS_ErrorCode currentErrorCode(void) +{ + const ErrState *err = findErrorForCurrentThread(); + return err ? err->code : PHYSFS_ERR_OK; +} /* currentErrorCode */ + + +PHYSFS_ErrorCode PHYSFS_getLastErrorCode(void) +{ + ErrState *err = findErrorForCurrentThread(); + const PHYSFS_ErrorCode retval = (err) ? err->code : PHYSFS_ERR_OK; + if (err) + err->code = PHYSFS_ERR_OK; + return retval; +} /* PHYSFS_getLastErrorCode */ + + +PHYSFS_DECL const char *PHYSFS_getErrorByCode(PHYSFS_ErrorCode code) +{ + switch (code) + { + case PHYSFS_ERR_OK: return "no error"; + case PHYSFS_ERR_OTHER_ERROR: return "unknown error"; + case PHYSFS_ERR_OUT_OF_MEMORY: return "out of memory"; + case PHYSFS_ERR_NOT_INITIALIZED: return "not initialized"; + case PHYSFS_ERR_IS_INITIALIZED: return "already initialized"; + case PHYSFS_ERR_ARGV0_IS_NULL: return "argv[0] is NULL"; + case PHYSFS_ERR_UNSUPPORTED: return "unsupported"; + case PHYSFS_ERR_PAST_EOF: return "past end of file"; + case PHYSFS_ERR_FILES_STILL_OPEN: return "files still open"; + case PHYSFS_ERR_INVALID_ARGUMENT: return "invalid argument"; + case PHYSFS_ERR_NOT_MOUNTED: return "not mounted"; + case PHYSFS_ERR_NOT_FOUND: return "not found"; + case PHYSFS_ERR_SYMLINK_FORBIDDEN: return "symlinks are forbidden"; + case PHYSFS_ERR_NO_WRITE_DIR: return "write directory is not set"; + case PHYSFS_ERR_OPEN_FOR_READING: return "file open for reading"; + case PHYSFS_ERR_OPEN_FOR_WRITING: return "file open for writing"; + case PHYSFS_ERR_NOT_A_FILE: return "not a file"; + case PHYSFS_ERR_READ_ONLY: return "read-only filesystem"; + case PHYSFS_ERR_CORRUPT: return "corrupted"; + case PHYSFS_ERR_SYMLINK_LOOP: return "infinite symbolic link loop"; + case PHYSFS_ERR_IO: return "i/o error"; + case PHYSFS_ERR_PERMISSION: return "permission denied"; + case PHYSFS_ERR_NO_SPACE: return "no space available for writing"; + case PHYSFS_ERR_BAD_FILENAME: return "filename is illegal or insecure"; + case PHYSFS_ERR_BUSY: return "tried to modify a file the OS needs"; + case PHYSFS_ERR_DIR_NOT_EMPTY: return "directory isn't empty"; + case PHYSFS_ERR_OS_ERROR: return "OS reported an error"; + case PHYSFS_ERR_DUPLICATE: return "duplicate resource"; + case PHYSFS_ERR_BAD_PASSWORD: return "bad password"; + case PHYSFS_ERR_APP_CALLBACK: return "app callback reported error"; + } /* switch */ + + return NULL; /* don't know this error code. */ +} /* PHYSFS_getErrorByCode */ + + +void PHYSFS_setErrorCode(PHYSFS_ErrorCode errcode) +{ + ErrState *err; + + if (!errcode) + return; + + err = findErrorForCurrentThread(); + if (err == NULL) + { + err = (ErrState *) allocator.Malloc(sizeof (ErrState)); + if (err == NULL) + return; /* uhh...? */ + + memset(err, '\0', sizeof (ErrState)); + err->tid = __PHYSFS_platformGetThreadID(); + + if (errorLock != NULL) + __PHYSFS_platformGrabMutex(errorLock); + + err->next = errorStates; + errorStates = err; + + if (errorLock != NULL) + __PHYSFS_platformReleaseMutex(errorLock); + } /* if */ + + err->code = errcode; +} /* PHYSFS_setErrorCode */ + + +const char *PHYSFS_getLastError(void) +{ + const PHYSFS_ErrorCode err = PHYSFS_getLastErrorCode(); + return (err) ? PHYSFS_getErrorByCode(err) : NULL; +} /* PHYSFS_getLastError */ + + +/* MAKE SURE that errorLock is held before calling this! */ +static void freeErrorStates(void) +{ + ErrState *i; + ErrState *next; + + for (i = errorStates; i != NULL; i = next) + { + next = i->next; + allocator.Free(i); + } /* for */ + + errorStates = NULL; +} /* freeErrorStates */ + + +void PHYSFS_getLinkedVersion(PHYSFS_Version *ver) +{ + if (ver != NULL) + { + ver->major = PHYSFS_VER_MAJOR; + ver->minor = PHYSFS_VER_MINOR; + ver->patch = PHYSFS_VER_PATCH; + } /* if */ +} /* PHYSFS_getLinkedVersion */ + + +static const char *find_filename_extension(const char *fname) +{ + const char *retval = NULL; + if (fname != NULL) + { + const char *p = strchr(fname, '.'); + retval = p; + + while (p != NULL) + { + p = strchr(p + 1, '.'); + if (p != NULL) + retval = p; + } /* while */ + + if (retval != NULL) + retval++; /* skip '.' */ + } /* if */ + + return retval; +} /* find_filename_extension */ + + +static DirHandle *tryOpenDir(PHYSFS_Io *io, const PHYSFS_Archiver *funcs, + const char *d, int forWriting, int *_claimed) +{ + DirHandle *retval = NULL; + void *opaque = NULL; + + if (io != NULL) + BAIL_IF_ERRPASS(!io->seek(io, 0), NULL); + + opaque = funcs->openArchive(io, d, forWriting, _claimed); + if (opaque != NULL) + { + retval = (DirHandle *) allocator.Malloc(sizeof (DirHandle)); + if (retval == NULL) + funcs->closeArchive(opaque); + else + { + memset(retval, '\0', sizeof (DirHandle)); + retval->mountPoint = NULL; + retval->funcs = funcs; + retval->opaque = opaque; + } /* else */ + } /* if */ + + return retval; +} /* tryOpenDir */ + + +static DirHandle *openDirectory(PHYSFS_Io *io, const char *d, int forWriting) +{ + DirHandle *retval = NULL; + PHYSFS_Archiver **i; + const char *ext; + int created_io = 0; + int claimed = 0; + PHYSFS_ErrorCode errcode; + + assert((io != NULL) || (d != NULL)); + + if (io == NULL) + { + /* file doesn't exist, etc? Just fail out. */ + PHYSFS_Stat statbuf; + BAIL_IF_ERRPASS(!__PHYSFS_platformStat(d, &statbuf, 1), NULL); + + /* DIR gets first shot (unlike the rest, it doesn't deal with files). */ + if (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY) + { + retval = tryOpenDir(io, &__PHYSFS_Archiver_DIR, d, forWriting, &claimed); + if (retval || claimed) + return retval; + } /* if */ + + io = __PHYSFS_createNativeIo(d, forWriting ? 'w' : 'r'); + BAIL_IF_ERRPASS(!io, NULL); + created_io = 1; + } /* if */ + + ext = find_filename_extension(d); + if (ext != NULL) + { + /* Look for archivers with matching file extensions first... */ + for (i = archivers; (*i != NULL) && (retval == NULL) && !claimed; i++) + { + if (PHYSFS_utf8stricmp(ext, (*i)->info.extension) == 0) + retval = tryOpenDir(io, *i, d, forWriting, &claimed); + } /* for */ + + /* failing an exact file extension match, try all the others... */ + for (i = archivers; (*i != NULL) && (retval == NULL) && !claimed; i++) + { + if (PHYSFS_utf8stricmp(ext, (*i)->info.extension) != 0) + retval = tryOpenDir(io, *i, d, forWriting, &claimed); + } /* for */ + } /* if */ + + else /* no extension? Try them all. */ + { + for (i = archivers; (*i != NULL) && (retval == NULL) && !claimed; i++) + retval = tryOpenDir(io, *i, d, forWriting, &claimed); + } /* else */ + + errcode = currentErrorCode(); + + if ((!retval) && (created_io)) + io->destroy(io); + + BAIL_IF(!retval, claimed ? errcode : PHYSFS_ERR_UNSUPPORTED, NULL); + return retval; +} /* openDirectory */ + + +/* + * Make a platform-independent path string sane. Doesn't actually check the + * file hierarchy, it just cleans up the string. + * (dst) must be a buffer at least as big as (src), as this is where the + * cleaned up string is deposited. + * If there are illegal bits in the path (".." entries, etc) then we + * return zero and (dst) is undefined. Non-zero if the path was sanitized. + */ +static int sanitizePlatformIndependentPath(const char *src, char *dst) +{ + char *prev; + char ch; + + while (*src == '/') /* skip initial '/' chars... */ + src++; + + /* Make sure the entire string isn't "." or ".." */ + if ((strcmp(src, ".") == 0) || (strcmp(src, "..") == 0)) + BAIL(PHYSFS_ERR_BAD_FILENAME, 0); + + prev = dst; + do + { + ch = *(src++); + + if ((ch == ':') || (ch == '\\')) /* illegal chars in a physfs path. */ + BAIL(PHYSFS_ERR_BAD_FILENAME, 0); + + if (ch == '/') /* path separator. */ + { + *dst = '\0'; /* "." and ".." are illegal pathnames. */ + if ((strcmp(prev, ".") == 0) || (strcmp(prev, "..") == 0)) + BAIL(PHYSFS_ERR_BAD_FILENAME, 0); + + while (*src == '/') /* chop out doubles... */ + src++; + + if (*src == '\0') /* ends with a pathsep? */ + break; /* we're done, don't add final pathsep to dst. */ + + prev = dst + 1; + } /* if */ + + *(dst++) = ch; + } while (ch != '\0'); + + return 1; +} /* sanitizePlatformIndependentPath */ + + +/* + * Figure out if (fname) is part of (h)'s mountpoint. (fname) must be an + * output from sanitizePlatformIndependentPath(), so that it is in a known + * state. + * + * This only finds legitimate segments of a mountpoint. If the mountpoint is + * "/a/b/c" and (fname) is "/a/b/c", "/", or "/a/b/c/d", then the results are + * all zero. "/a/b" will succeed, though. + */ +static int partOfMountPoint(DirHandle *h, char *fname) +{ + int rc; + size_t len, mntpntlen; + + if (h->mountPoint == NULL) + return 0; + else if (*fname == '\0') + return 1; + + len = strlen(fname); + mntpntlen = strlen(h->mountPoint); + if (len > mntpntlen) /* can't be a subset of mountpoint. */ + return 0; + + /* if true, must be not a match or a complete match, but not a subset. */ + if ((len + 1) == mntpntlen) + return 0; + + rc = strncmp(fname, h->mountPoint, len); /* !!! FIXME: case insensitive? */ + if (rc != 0) + return 0; /* not a match. */ + + /* make sure /a/b matches /a/b/ and not /a/bc ... */ + return h->mountPoint[len] == '/'; +} /* partOfMountPoint */ + + +static DirHandle *createDirHandle(PHYSFS_Io *io, const char *newDir, + const char *mountPoint, int forWriting) +{ + DirHandle *dirHandle = NULL; + char *tmpmntpnt = NULL; + + assert(newDir != NULL); /* should have caught this higher up. */ + + if (mountPoint != NULL) + { + const size_t len = strlen(mountPoint) + 1; + tmpmntpnt = (char *) __PHYSFS_smallAlloc(len); + GOTO_IF(!tmpmntpnt, PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle); + if (!sanitizePlatformIndependentPath(mountPoint, tmpmntpnt)) + goto badDirHandle; + mountPoint = tmpmntpnt; /* sanitized version. */ + } /* if */ + + dirHandle = openDirectory(io, newDir, forWriting); + GOTO_IF_ERRPASS(!dirHandle, badDirHandle); + + dirHandle->dirName = (char *) allocator.Malloc(strlen(newDir) + 1); + GOTO_IF(!dirHandle->dirName, PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle); + strcpy(dirHandle->dirName, newDir); + + if ((mountPoint != NULL) && (*mountPoint != '\0')) + { + dirHandle->mountPoint = (char *)allocator.Malloc(strlen(mountPoint)+2); + if (!dirHandle->mountPoint) + GOTO(PHYSFS_ERR_OUT_OF_MEMORY, badDirHandle); + strcpy(dirHandle->mountPoint, mountPoint); + strcat(dirHandle->mountPoint, "/"); + } /* if */ + + __PHYSFS_smallFree(tmpmntpnt); + return dirHandle; + +badDirHandle: + if (dirHandle != NULL) + { + dirHandle->funcs->closeArchive(dirHandle->opaque); + allocator.Free(dirHandle->dirName); + allocator.Free(dirHandle->mountPoint); + allocator.Free(dirHandle); + } /* if */ + + __PHYSFS_smallFree(tmpmntpnt); + return NULL; +} /* createDirHandle */ + + +/* MAKE SURE you've got the stateLock held before calling this! */ +static int freeDirHandle(DirHandle *dh, FileHandle *openList) +{ + FileHandle *i; + + if (dh == NULL) + return 1; + + for (i = openList; i != NULL; i = i->next) + BAIL_IF(i->dirHandle == dh, PHYSFS_ERR_FILES_STILL_OPEN, 0); + + dh->funcs->closeArchive(dh->opaque); + allocator.Free(dh->dirName); + allocator.Free(dh->mountPoint); + allocator.Free(dh); + return 1; +} /* freeDirHandle */ + + +static char *calculateBaseDir(const char *argv0) +{ + const char dirsep = __PHYSFS_platformDirSeparator; + char *retval = NULL; + char *ptr = NULL; + + /* Give the platform layer first shot at this. */ + retval = __PHYSFS_platformCalcBaseDir(argv0); + if (retval != NULL) + return retval; + + /* We need argv0 to go on. */ + BAIL_IF(argv0 == NULL, PHYSFS_ERR_ARGV0_IS_NULL, NULL); + + ptr = strrchr(argv0, dirsep); + if (ptr != NULL) + { + const size_t size = ((size_t) (ptr - argv0)) + 1; + retval = (char *) allocator.Malloc(size + 1); + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + memcpy(retval, argv0, size); + retval[size] = '\0'; + return retval; + } /* if */ + + /* argv0 wasn't helpful. */ + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, NULL); +} /* calculateBaseDir */ + + +static int initializeMutexes(void) +{ + errorLock = __PHYSFS_platformCreateMutex(); + if (errorLock == NULL) + goto initializeMutexes_failed; + + stateLock = __PHYSFS_platformCreateMutex(); + if (stateLock == NULL) + goto initializeMutexes_failed; + + return 1; /* success. */ + +initializeMutexes_failed: + if (errorLock != NULL) + __PHYSFS_platformDestroyMutex(errorLock); + + if (stateLock != NULL) + __PHYSFS_platformDestroyMutex(stateLock); + + errorLock = stateLock = NULL; + return 0; /* failed. */ +} /* initializeMutexes */ + + +static int doRegisterArchiver(const PHYSFS_Archiver *_archiver); + +static int initStaticArchivers(void) +{ + #define REGISTER_STATIC_ARCHIVER(arc) { \ + if (!doRegisterArchiver(&__PHYSFS_Archiver_##arc)) { \ + return 0; \ + } \ + } + + #if PHYSFS_SUPPORTS_ZIP + REGISTER_STATIC_ARCHIVER(ZIP); + #endif + #if PHYSFS_SUPPORTS_7Z + SZIP_global_init(); + REGISTER_STATIC_ARCHIVER(7Z); + #endif + #if PHYSFS_SUPPORTS_GRP + REGISTER_STATIC_ARCHIVER(GRP); + #endif + #if PHYSFS_SUPPORTS_QPAK + REGISTER_STATIC_ARCHIVER(QPAK); + #endif + #if PHYSFS_SUPPORTS_HOG + REGISTER_STATIC_ARCHIVER(HOG); + #endif + #if PHYSFS_SUPPORTS_MVL + REGISTER_STATIC_ARCHIVER(MVL); + #endif + #if PHYSFS_SUPPORTS_WAD + REGISTER_STATIC_ARCHIVER(WAD); + #endif + #if PHYSFS_SUPPORTS_SLB + REGISTER_STATIC_ARCHIVER(SLB); + #endif + #if PHYSFS_SUPPORTS_ISO9660 + REGISTER_STATIC_ARCHIVER(ISO9660); + #endif + #if PHYSFS_SUPPORTS_VDF + REGISTER_STATIC_ARCHIVER(VDF) + #endif + + #undef REGISTER_STATIC_ARCHIVER + + return 1; +} /* initStaticArchivers */ + + +static void setDefaultAllocator(void); +static int doDeinit(void); + +int PHYSFS_init(const char *argv0) +{ + BAIL_IF(initialized, PHYSFS_ERR_IS_INITIALIZED, 0); + + if (!externalAllocator) + setDefaultAllocator(); + + if ((allocator.Init != NULL) && (!allocator.Init())) return 0; + + if (!__PHYSFS_platformInit()) + { + if (allocator.Deinit != NULL) allocator.Deinit(); + return 0; + } /* if */ + + /* everything below here can be cleaned up safely by doDeinit(). */ + + if (!initializeMutexes()) goto initFailed; + + baseDir = calculateBaseDir(argv0); + if (!baseDir) goto initFailed; + + userDir = __PHYSFS_platformCalcUserDir(); + if (!userDir) goto initFailed; + + /* Platform layer is required to append a dirsep. */ + assert(baseDir[strlen(baseDir) - 1] == __PHYSFS_platformDirSeparator); + assert(userDir[strlen(userDir) - 1] == __PHYSFS_platformDirSeparator); + + if (!initStaticArchivers()) goto initFailed; + + initialized = 1; + + /* This makes sure that the error subsystem is initialized. */ + PHYSFS_setErrorCode(PHYSFS_getLastErrorCode()); + + return 1; + +initFailed: + doDeinit(); + return 0; +} /* PHYSFS_init */ + + +/* MAKE SURE you hold stateLock before calling this! */ +static int closeFileHandleList(FileHandle **list) +{ + FileHandle *i; + FileHandle *next = NULL; + + for (i = *list; i != NULL; i = next) + { + PHYSFS_Io *io = i->io; + next = i->next; + + if (io->flush && !io->flush(io)) + { + *list = i; + return 0; + } /* if */ + + io->destroy(io); + allocator.Free(i); + } /* for */ + + *list = NULL; + return 1; +} /* closeFileHandleList */ + + +/* MAKE SURE you hold the stateLock before calling this! */ +static void freeSearchPath(void) +{ + DirHandle *i; + DirHandle *next = NULL; + + closeFileHandleList(&openReadList); + + if (searchPath != NULL) + { + for (i = searchPath; i != NULL; i = next) + { + next = i->next; + freeDirHandle(i, openReadList); + } /* for */ + searchPath = NULL; + } /* if */ +} /* freeSearchPath */ + + +/* MAKE SURE you hold stateLock before calling this! */ +static int archiverInUse(const PHYSFS_Archiver *arc, const DirHandle *list) +{ + const DirHandle *i; + for (i = list; i != NULL; i = i->next) + { + if (i->funcs == arc) + return 1; + } /* for */ + + return 0; /* not in use */ +} /* archiverInUse */ + + +/* MAKE SURE you hold stateLock before calling this! */ +static int doDeregisterArchiver(const size_t idx) +{ + const size_t len = (numArchivers - idx) * sizeof (void *); + PHYSFS_ArchiveInfo *info = archiveInfo[idx]; + PHYSFS_Archiver *arc = archivers[idx]; + + /* make sure nothing is still using this archiver */ + if (archiverInUse(arc, searchPath) || archiverInUse(arc, writeDir)) + BAIL(PHYSFS_ERR_FILES_STILL_OPEN, 0); + + allocator.Free((void *) info->extension); + allocator.Free((void *) info->description); + allocator.Free((void *) info->author); + allocator.Free((void *) info->url); + allocator.Free((void *) arc); + + memmove(&archiveInfo[idx], &archiveInfo[idx+1], len); + memmove(&archivers[idx], &archivers[idx+1], len); + + assert(numArchivers > 0); + numArchivers--; + + return 1; +} /* doDeregisterArchiver */ + + +/* Does NOT hold the state lock; we're shutting down. */ +static void freeArchivers(void) +{ + while (numArchivers > 0) + { + if (!doDeregisterArchiver(numArchivers - 1)) + assert(!"nothing should be mounted during shutdown."); + } /* while */ + + allocator.Free(archivers); + allocator.Free(archiveInfo); + archivers = NULL; + archiveInfo = NULL; +} /* freeArchivers */ + + +static int doDeinit(void) +{ + closeFileHandleList(&openWriteList); + BAIL_IF(!PHYSFS_setWriteDir(NULL), PHYSFS_ERR_FILES_STILL_OPEN, 0); + + freeSearchPath(); + freeArchivers(); + freeErrorStates(); + + if (baseDir != NULL) + { + allocator.Free(baseDir); + baseDir = NULL; + } /* if */ + + if (userDir != NULL) + { + allocator.Free(userDir); + userDir = NULL; + } /* if */ + + if (prefDir != NULL) + { + allocator.Free(prefDir); + prefDir = NULL; + } /* if */ + + if (archiveInfo != NULL) + { + allocator.Free(archiveInfo); + archiveInfo = NULL; + } /* if */ + + if (archivers != NULL) + { + allocator.Free(archivers); + archivers = NULL; + } /* if */ + + allowSymLinks = 0; + initialized = 0; + + if (errorLock) __PHYSFS_platformDestroyMutex(errorLock); + if (stateLock) __PHYSFS_platformDestroyMutex(stateLock); + + if (allocator.Deinit != NULL) + allocator.Deinit(); + + errorLock = stateLock = NULL; + + __PHYSFS_platformDeinit(); + + return 1; +} /* doDeinit */ + + +int PHYSFS_deinit(void) +{ + BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); + return doDeinit(); +} /* PHYSFS_deinit */ + + +int PHYSFS_isInit(void) +{ + return initialized; +} /* PHYSFS_isInit */ + + +char *__PHYSFS_strdup(const char *str) +{ + char *retval = (char *) allocator.Malloc(strlen(str) + 1); + if (retval) + strcpy(retval, str); + return retval; +} /* __PHYSFS_strdup */ + + +PHYSFS_uint32 __PHYSFS_hashString(const char *str, size_t len) +{ + PHYSFS_uint32 hash = 5381; + while (len--) + hash = ((hash << 5) + hash) ^ *(str++); + return hash; +} /* __PHYSFS_hashString */ + + +/* MAKE SURE you hold stateLock before calling this! */ +static int doRegisterArchiver(const PHYSFS_Archiver *_archiver) +{ + const PHYSFS_uint32 maxver = CURRENT_PHYSFS_ARCHIVER_API_VERSION; + const size_t len = (numArchivers + 2) * sizeof (void *); + PHYSFS_Archiver *archiver = NULL; + PHYSFS_ArchiveInfo *info = NULL; + const char *ext = NULL; + void *ptr = NULL; + size_t i; + + BAIL_IF(!_archiver, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(_archiver->version > maxver, PHYSFS_ERR_UNSUPPORTED, 0); + BAIL_IF(!_archiver->info.extension, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->info.description, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->info.author, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->info.url, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->openArchive, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->enumerate, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->openRead, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->openWrite, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->openAppend, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->remove, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->mkdir, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->closeArchive, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!_archiver->stat, PHYSFS_ERR_INVALID_ARGUMENT, 0); + + ext = _archiver->info.extension; + for (i = 0; i < numArchivers; i++) + { + if (PHYSFS_utf8stricmp(archiveInfo[i]->extension, ext) == 0) + BAIL(PHYSFS_ERR_DUPLICATE, 0); + } /* for */ + + /* make a copy of the data. */ + archiver = (PHYSFS_Archiver *) allocator.Malloc(sizeof (*archiver)); + GOTO_IF(!archiver, PHYSFS_ERR_OUT_OF_MEMORY, regfailed); + + /* Must copy sizeof (OLD_VERSION_OF_STRUCT) when version changes! */ + memcpy(archiver, _archiver, sizeof (*archiver)); + + info = (PHYSFS_ArchiveInfo *) &archiver->info; + memset(info, '\0', sizeof (*info)); /* NULL in case an alloc fails. */ + #define CPYSTR(item) \ + info->item = __PHYSFS_strdup(_archiver->info.item); \ + GOTO_IF(!info->item, PHYSFS_ERR_OUT_OF_MEMORY, regfailed); + CPYSTR(extension); + CPYSTR(description); + CPYSTR(author); + CPYSTR(url); + info->supportsSymlinks = _archiver->info.supportsSymlinks; + #undef CPYSTR + + ptr = allocator.Realloc(archiveInfo, len); + GOTO_IF(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, regfailed); + archiveInfo = (PHYSFS_ArchiveInfo **) ptr; + + ptr = allocator.Realloc(archivers, len); + GOTO_IF(!ptr, PHYSFS_ERR_OUT_OF_MEMORY, regfailed); + archivers = (PHYSFS_Archiver **) ptr; + + archiveInfo[numArchivers] = info; + archiveInfo[numArchivers + 1] = NULL; + + archivers[numArchivers] = archiver; + archivers[numArchivers + 1] = NULL; + + numArchivers++; + + return 1; + +regfailed: + if (info != NULL) + { + allocator.Free((void *) info->extension); + allocator.Free((void *) info->description); + allocator.Free((void *) info->author); + allocator.Free((void *) info->url); + } /* if */ + allocator.Free(archiver); + + return 0; +} /* doRegisterArchiver */ + + +int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver) +{ + int retval; + BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); + __PHYSFS_platformGrabMutex(stateLock); + retval = doRegisterArchiver(archiver); + __PHYSFS_platformReleaseMutex(stateLock); + return retval; +} /* PHYSFS_registerArchiver */ + + +int PHYSFS_deregisterArchiver(const char *ext) +{ + size_t i; + + BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); + BAIL_IF(!ext, PHYSFS_ERR_INVALID_ARGUMENT, 0); + + __PHYSFS_platformGrabMutex(stateLock); + for (i = 0; i < numArchivers; i++) + { + if (PHYSFS_utf8stricmp(archiveInfo[i]->extension, ext) == 0) + { + const int retval = doDeregisterArchiver(i); + __PHYSFS_platformReleaseMutex(stateLock); + return retval; + } /* if */ + } /* for */ + __PHYSFS_platformReleaseMutex(stateLock); + + BAIL(PHYSFS_ERR_NOT_FOUND, 0); +} /* PHYSFS_deregisterArchiver */ + + +const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void) +{ + BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, NULL); + return (const PHYSFS_ArchiveInfo **) archiveInfo; +} /* PHYSFS_supportedArchiveTypes */ + + +void PHYSFS_freeList(void *list) +{ + void **i; + if (list != NULL) + { + for (i = (void **) list; *i != NULL; i++) + allocator.Free(*i); + + allocator.Free(list); + } /* if */ +} /* PHYSFS_freeList */ + + +const char *PHYSFS_getDirSeparator(void) +{ + static char retval[2] = { __PHYSFS_platformDirSeparator, '\0' }; + return retval; +} /* PHYSFS_getDirSeparator */ + + +char **PHYSFS_getCdRomDirs(void) +{ + return doEnumStringList(__PHYSFS_platformDetectAvailableCDs); +} /* PHYSFS_getCdRomDirs */ + + +void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback callback, void *data) +{ + __PHYSFS_platformDetectAvailableCDs(callback, data); +} /* PHYSFS_getCdRomDirsCallback */ + + +const char *PHYSFS_getPrefDir(const char *org, const char *app) +{ + const char dirsep = __PHYSFS_platformDirSeparator; + PHYSFS_Stat statbuf; + char *ptr = NULL; + char *endstr = NULL; + + BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); + BAIL_IF(!org, PHYSFS_ERR_INVALID_ARGUMENT, NULL); + BAIL_IF(*org == '\0', PHYSFS_ERR_INVALID_ARGUMENT, NULL); + BAIL_IF(!app, PHYSFS_ERR_INVALID_ARGUMENT, NULL); + BAIL_IF(*app == '\0', PHYSFS_ERR_INVALID_ARGUMENT, NULL); + + allocator.Free(prefDir); + prefDir = __PHYSFS_platformCalcPrefDir(org, app); + BAIL_IF_ERRPASS(!prefDir, NULL); + + assert(strlen(prefDir) > 0); + endstr = prefDir + (strlen(prefDir) - 1); + assert(*endstr == dirsep); + *endstr = '\0'; /* mask out the final dirsep for now. */ + + if (!__PHYSFS_platformStat(prefDir, &statbuf, 1)) + { + for (ptr = strchr(prefDir, dirsep); ptr; ptr = strchr(ptr+1, dirsep)) + { + *ptr = '\0'; + __PHYSFS_platformMkDir(prefDir); + *ptr = dirsep; + } /* for */ + + if (!__PHYSFS_platformMkDir(prefDir)) + { + allocator.Free(prefDir); + prefDir = NULL; + } /* if */ + } /* if */ + + *endstr = dirsep; /* readd the final dirsep. */ + + return prefDir; +} /* PHYSFS_getPrefDir */ + + +const char *PHYSFS_getBaseDir(void) +{ + return baseDir; /* this is calculated in PHYSFS_init()... */ +} /* PHYSFS_getBaseDir */ + + +const char *__PHYSFS_getUserDir(void) /* not deprecated internal version. */ +{ + return userDir; /* this is calculated in PHYSFS_init()... */ +} /* __PHYSFS_getUserDir */ + + +const char *PHYSFS_getUserDir(void) +{ + return __PHYSFS_getUserDir(); +} /* PHYSFS_getUserDir */ + + +const char *PHYSFS_getWriteDir(void) +{ + const char *retval = NULL; + + __PHYSFS_platformGrabMutex(stateLock); + if (writeDir != NULL) + retval = writeDir->dirName; + __PHYSFS_platformReleaseMutex(stateLock); + + return retval; +} /* PHYSFS_getWriteDir */ + + +int PHYSFS_setWriteDir(const char *newDir) +{ + int retval = 1; + + __PHYSFS_platformGrabMutex(stateLock); + + if (writeDir != NULL) + { + BAIL_IF_MUTEX_ERRPASS(!freeDirHandle(writeDir, openWriteList), + stateLock, 0); + writeDir = NULL; + } /* if */ + + if (newDir != NULL) + { + writeDir = createDirHandle(NULL, newDir, NULL, 1); + retval = (writeDir != NULL); + } /* if */ + + __PHYSFS_platformReleaseMutex(stateLock); + + return retval; +} /* PHYSFS_setWriteDir */ + + +static int doMount(PHYSFS_Io *io, const char *fname, + const char *mountPoint, int appendToPath) +{ + DirHandle *dh; + DirHandle *prev = NULL; + DirHandle *i; + + BAIL_IF(!fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + + if (mountPoint == NULL) + mountPoint = "/"; + + __PHYSFS_platformGrabMutex(stateLock); + + for (i = searchPath; i != NULL; i = i->next) + { + /* already in search path? */ + if ((i->dirName != NULL) && (strcmp(fname, i->dirName) == 0)) + BAIL_MUTEX_ERRPASS(stateLock, 1); + prev = i; + } /* for */ + + dh = createDirHandle(io, fname, mountPoint, 0); + BAIL_IF_MUTEX_ERRPASS(!dh, stateLock, 0); + + if (appendToPath) + { + if (prev == NULL) + searchPath = dh; + else + prev->next = dh; + } /* if */ + else + { + dh->next = searchPath; + searchPath = dh; + } /* else */ + + __PHYSFS_platformReleaseMutex(stateLock); + return 1; +} /* doMount */ + + +int PHYSFS_mountIo(PHYSFS_Io *io, const char *fname, + const char *mountPoint, int appendToPath) +{ + BAIL_IF(!io, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(io->version != 0, PHYSFS_ERR_UNSUPPORTED, 0); + return doMount(io, fname, mountPoint, appendToPath); +} /* PHYSFS_mountIo */ + + +int PHYSFS_mountMemory(const void *buf, PHYSFS_uint64 len, void (*del)(void *), + const char *fname, const char *mountPoint, + int appendToPath) +{ + int retval = 0; + PHYSFS_Io *io = NULL; + + BAIL_IF(!buf, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + + io = __PHYSFS_createMemoryIo(buf, len, del); + BAIL_IF_ERRPASS(!io, 0); + retval = doMount(io, fname, mountPoint, appendToPath); + if (!retval) + { + /* docs say not to call (del) in case of failure, so cheat. */ + MemoryIoInfo *info = (MemoryIoInfo *) io->opaque; + info->destruct = NULL; + io->destroy(io); + } /* if */ + + return retval; +} /* PHYSFS_mountMemory */ + + +int PHYSFS_mountHandle(PHYSFS_File *file, const char *fname, + const char *mountPoint, int appendToPath) +{ + int retval = 0; + PHYSFS_Io *io = NULL; + + BAIL_IF(!file, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + + io = __PHYSFS_createHandleIo(file); + BAIL_IF_ERRPASS(!io, 0); + retval = doMount(io, fname, mountPoint, appendToPath); + if (!retval) + { + /* docs say not to destruct in case of failure, so cheat. */ + io->opaque = NULL; + io->destroy(io); + } /* if */ + + return retval; +} /* PHYSFS_mountHandle */ + + +int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath) +{ + BAIL_IF(!newDir, PHYSFS_ERR_INVALID_ARGUMENT, 0); + return doMount(NULL, newDir, mountPoint, appendToPath); +} /* PHYSFS_mount */ + + +int PHYSFS_addToSearchPath(const char *newDir, int appendToPath) +{ + return PHYSFS_mount(newDir, NULL, appendToPath); +} /* PHYSFS_addToSearchPath */ + + +int PHYSFS_removeFromSearchPath(const char *oldDir) +{ + return PHYSFS_unmount(oldDir); +} /* PHYSFS_removeFromSearchPath */ + + +int PHYSFS_unmount(const char *oldDir) +{ + DirHandle *i; + DirHandle *prev = NULL; + DirHandle *next = NULL; + + BAIL_IF(oldDir == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0); + + __PHYSFS_platformGrabMutex(stateLock); + for (i = searchPath; i != NULL; i = i->next) + { + if (strcmp(i->dirName, oldDir) == 0) + { + next = i->next; + BAIL_IF_MUTEX_ERRPASS(!freeDirHandle(i, openReadList), + stateLock, 0); + + if (prev == NULL) + searchPath = next; + else + prev->next = next; + + BAIL_MUTEX_ERRPASS(stateLock, 1); + } /* if */ + prev = i; + } /* for */ + + BAIL_MUTEX(PHYSFS_ERR_NOT_MOUNTED, stateLock, 0); +} /* PHYSFS_unmount */ + + +char **PHYSFS_getSearchPath(void) +{ + return doEnumStringList(PHYSFS_getSearchPathCallback); +} /* PHYSFS_getSearchPath */ + + +const char *PHYSFS_getMountPoint(const char *dir) +{ + DirHandle *i; + __PHYSFS_platformGrabMutex(stateLock); + for (i = searchPath; i != NULL; i = i->next) + { + if (strcmp(i->dirName, dir) == 0) + { + const char *retval = ((i->mountPoint) ? i->mountPoint : "/"); + __PHYSFS_platformReleaseMutex(stateLock); + return retval; + } /* if */ + } /* for */ + __PHYSFS_platformReleaseMutex(stateLock); + + BAIL(PHYSFS_ERR_NOT_MOUNTED, NULL); +} /* PHYSFS_getMountPoint */ + + +void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback callback, void *data) +{ + DirHandle *i; + + __PHYSFS_platformGrabMutex(stateLock); + + for (i = searchPath; i != NULL; i = i->next) + callback(data, i->dirName); + + __PHYSFS_platformReleaseMutex(stateLock); +} /* PHYSFS_getSearchPathCallback */ + + +typedef struct setSaneCfgEnumData +{ + const char *archiveExt; + size_t archiveExtLen; + int archivesFirst; + PHYSFS_ErrorCode errcode; +} setSaneCfgEnumData; + +static PHYSFS_EnumerateCallbackResult setSaneCfgEnumCallback(void *_data, + const char *dir, const char *f) +{ + setSaneCfgEnumData *data = (setSaneCfgEnumData *) _data; + const size_t extlen = data->archiveExtLen; + const size_t l = strlen(f); + const char *ext; + + if ((l > extlen) && (f[l - extlen - 1] == '.')) + { + ext = f + (l - extlen); + if (PHYSFS_utf8stricmp(ext, data->archiveExt) == 0) + { + const char dirsep = __PHYSFS_platformDirSeparator; + const char *d = PHYSFS_getRealDir(f); + const size_t allocsize = strlen(d) + l + 2; + char *str = (char *) __PHYSFS_smallAlloc(allocsize); + if (str == NULL) + data->errcode = PHYSFS_ERR_OUT_OF_MEMORY; + else + { + snprintf(str, allocsize, "%s%c%s", d, dirsep, f); + if (!PHYSFS_mount(str, NULL, data->archivesFirst == 0)) + data->errcode = currentErrorCode(); + __PHYSFS_smallFree(str); + } /* else */ + } /* if */ + } /* if */ + + /* !!! FIXME: if we want to abort on errors... */ + /*return (data->errcode != PHYSFS_ERR_OK) ? PHYSFS_ENUM_ERROR : PHYSFS_ENUM_OK;*/ + + return PHYSFS_ENUM_OK; /* keep going */ +} /* setSaneCfgEnumCallback */ + + +int PHYSFS_setSaneConfig(const char *organization, const char *appName, + const char *archiveExt, int includeCdRoms, + int archivesFirst) +{ + const char *basedir; + const char *prefdir; + + BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, 0); + + prefdir = PHYSFS_getPrefDir(organization, appName); + BAIL_IF_ERRPASS(!prefdir, 0); + + basedir = PHYSFS_getBaseDir(); + BAIL_IF_ERRPASS(!basedir, 0); + + BAIL_IF(!PHYSFS_setWriteDir(prefdir), PHYSFS_ERR_NO_WRITE_DIR, 0); + + /* !!! FIXME: these can fail and we should report that... */ + + /* Put write dir first in search path... */ + PHYSFS_mount(prefdir, NULL, 0); + + /* Put base path on search path... */ + PHYSFS_mount(basedir, NULL, 1); + + /* handle CD-ROMs... */ + if (includeCdRoms) + { + char **cds = PHYSFS_getCdRomDirs(); + char **i; + for (i = cds; *i != NULL; i++) + PHYSFS_mount(*i, NULL, 1); + PHYSFS_freeList(cds); + } /* if */ + + /* Root out archives, and add them to search path... */ + if (archiveExt != NULL) + { + setSaneCfgEnumData data; + memset(&data, '\0', sizeof (data)); + data.archiveExt = archiveExt; + data.archiveExtLen = strlen(archiveExt); + data.archivesFirst = archivesFirst; + data.errcode = PHYSFS_ERR_OK; + if (!PHYSFS_enumerate("/", setSaneCfgEnumCallback, &data)) + { + /* !!! FIXME: use this if we're reporting errors. + PHYSFS_ErrorCode errcode = currentErrorCode(); + if (errcode == PHYSFS_ERR_APP_CALLBACK) + errcode = data->errcode; */ + } /* if */ + } /* if */ + + return 1; +} /* PHYSFS_setSaneConfig */ + + +void PHYSFS_permitSymbolicLinks(int allow) +{ + allowSymLinks = allow; +} /* PHYSFS_permitSymbolicLinks */ + + +int PHYSFS_symbolicLinksPermitted(void) +{ + return allowSymLinks; +} /* PHYSFS_symbolicLinksPermitted */ + + +/* + * Verify that (fname) (in platform-independent notation), in relation + * to (h) is secure. That means that each element of fname is checked + * for symlinks (if they aren't permitted). This also allows for quick + * rejection of files that exist outside an archive's mountpoint. + * + * With some exceptions (like PHYSFS_mkdir(), which builds multiple subdirs + * at a time), you should always pass zero for "allowMissing" for efficiency. + * + * (fname) must point to an output from sanitizePlatformIndependentPath(), + * since it will make sure that path names are in the right format for + * passing certain checks. It will also do checks for "insecure" pathnames + * like ".." which should be done once instead of once per archive. This also + * gives us license to treat (fname) as scratch space in this function. + * + * Returns non-zero if string is safe, zero if there's a security issue. + * PHYSFS_getLastError() will specify what was wrong. (*fname) will be + * updated to point past any mount point elements so it is prepared to + * be used with the archiver directly. + */ +static int verifyPath(DirHandle *h, char **_fname, int allowMissing) +{ + char *fname = *_fname; + int retval = 1; + char *start; + char *end; + + if (*fname == '\0') /* quick rejection. */ + return 1; + + /* !!! FIXME: This codeblock sucks. */ + if (h->mountPoint != NULL) /* NULL mountpoint means "/". */ + { + size_t mntpntlen = strlen(h->mountPoint); + size_t len = strlen(fname); + assert(mntpntlen > 1); /* root mount points should be NULL. */ + /* not under the mountpoint, so skip this archive. */ + BAIL_IF(len < mntpntlen-1, PHYSFS_ERR_NOT_FOUND, 0); + /* !!! FIXME: Case insensitive? */ + retval = strncmp(h->mountPoint, fname, mntpntlen-1); + BAIL_IF(retval != 0, PHYSFS_ERR_NOT_FOUND, 0); + if (len > mntpntlen-1) /* corner case... */ + BAIL_IF(fname[mntpntlen-1]!='/', PHYSFS_ERR_NOT_FOUND, 0); + fname += mntpntlen-1; /* move to start of actual archive path. */ + if (*fname == '/') + fname++; + *_fname = fname; /* skip mountpoint for later use. */ + retval = 1; /* may be reset, below. */ + } /* if */ + + start = fname; + if (!allowSymLinks) + { + while (1) + { + PHYSFS_Stat statbuf; + int rc = 0; + end = strchr(start, '/'); + + if (end != NULL) *end = '\0'; + rc = h->funcs->stat(h->opaque, fname, &statbuf); + if (rc) + rc = (statbuf.filetype == PHYSFS_FILETYPE_SYMLINK); + else if (currentErrorCode() == PHYSFS_ERR_NOT_FOUND) + retval = 0; + + if (end != NULL) *end = '/'; + + /* insecure path (has a disallowed symlink in it)? */ + BAIL_IF(rc, PHYSFS_ERR_SYMLINK_FORBIDDEN, 0); + + /* break out early if path element is missing. */ + if (!retval) + { + /* + * We need to clear it if it's the last element of the path, + * since this might be a non-existant file we're opening + * for writing... + */ + if ((end == NULL) || (allowMissing)) + retval = 1; + break; + } /* if */ + + if (end == NULL) + break; + + start = end + 1; + } /* while */ + } /* if */ + + return retval; +} /* verifyPath */ + + +static int doMkdir(const char *_dname, char *dname) +{ + DirHandle *h; + char *start; + char *end; + int retval = 0; + int exists = 1; /* force existance check on first path element. */ + + BAIL_IF_ERRPASS(!sanitizePlatformIndependentPath(_dname, dname), 0); + + __PHYSFS_platformGrabMutex(stateLock); + BAIL_IF_MUTEX(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0); + h = writeDir; + BAIL_IF_MUTEX_ERRPASS(!verifyPath(h, &dname, 1), stateLock, 0); + + start = dname; + while (1) + { + end = strchr(start, '/'); + if (end != NULL) + *end = '\0'; + + /* only check for existance if all parent dirs existed, too... */ + if (exists) + { + PHYSFS_Stat statbuf; + const int rc = h->funcs->stat(h->opaque, dname, &statbuf); + if ((!rc) && (currentErrorCode() == PHYSFS_ERR_NOT_FOUND)) + exists = 0; + retval = ((rc) && (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY)); + } /* if */ + + if (!exists) + retval = h->funcs->mkdir(h->opaque, dname); + + if (!retval) + break; + + if (end == NULL) + break; + + *end = '/'; + start = end + 1; + } /* while */ + + __PHYSFS_platformReleaseMutex(stateLock); + return retval; +} /* doMkdir */ + + +int PHYSFS_mkdir(const char *_dname) +{ + int retval = 0; + char *dname; + size_t len; + + BAIL_IF(!_dname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + len = strlen(_dname) + 1; + dname = (char *) __PHYSFS_smallAlloc(len); + BAIL_IF(!dname, PHYSFS_ERR_OUT_OF_MEMORY, 0); + retval = doMkdir(_dname, dname); + __PHYSFS_smallFree(dname); + return retval; +} /* PHYSFS_mkdir */ + + +static int doDelete(const char *_fname, char *fname) +{ + int retval; + DirHandle *h; + BAIL_IF_ERRPASS(!sanitizePlatformIndependentPath(_fname, fname), 0); + + __PHYSFS_platformGrabMutex(stateLock); + + BAIL_IF_MUTEX(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, stateLock, 0); + h = writeDir; + BAIL_IF_MUTEX_ERRPASS(!verifyPath(h, &fname, 0), stateLock, 0); + retval = h->funcs->remove(h->opaque, fname); + + __PHYSFS_platformReleaseMutex(stateLock); + return retval; +} /* doDelete */ + + +int PHYSFS_delete(const char *_fname) +{ + int retval; + char *fname; + size_t len; + + BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + len = strlen(_fname) + 1; + fname = (char *) __PHYSFS_smallAlloc(len); + BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0); + retval = doDelete(_fname, fname); + __PHYSFS_smallFree(fname); + return retval; +} /* PHYSFS_delete */ + + +static DirHandle *getRealDirHandle(const char *_fname) +{ + DirHandle *retval = NULL; + char *fname = NULL; + size_t len; + + BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, NULL); + len = strlen(_fname) + 1; + fname = __PHYSFS_smallAlloc(len); + BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + if (sanitizePlatformIndependentPath(_fname, fname)) + { + DirHandle *i; + __PHYSFS_platformGrabMutex(stateLock); + for (i = searchPath; i != NULL; i = i->next) + { + char *arcfname = fname; + if (partOfMountPoint(i, arcfname)) + { + retval = i; + break; + } /* if */ + else if (verifyPath(i, &arcfname, 0)) + { + PHYSFS_Stat statbuf; + if (i->funcs->stat(i->opaque, arcfname, &statbuf)) + { + retval = i; + break; + } /* if */ + } /* if */ + } /* for */ + __PHYSFS_platformReleaseMutex(stateLock); + } /* if */ + + __PHYSFS_smallFree(fname); + return retval; +} /* getRealDirHandle */ + +const char *PHYSFS_getRealDir(const char *fname) +{ + DirHandle *dh = getRealDirHandle(fname); + return dh ? dh->dirName : NULL; +} /* PHYSFS_getRealDir */ + + +static int locateInStringList(const char *str, + char **list, + PHYSFS_uint32 *pos) +{ + PHYSFS_uint32 len = *pos; + PHYSFS_uint32 half_len; + PHYSFS_uint32 lo = 0; + PHYSFS_uint32 middle; + int cmp; + + while (len > 0) + { + half_len = len >> 1; + middle = lo + half_len; + cmp = strcmp(list[middle], str); + + if (cmp == 0) /* it's in the list already. */ + return 1; + else if (cmp > 0) + len = half_len; + else + { + lo = middle + 1; + len -= half_len + 1; + } /* else */ + } /* while */ + + *pos = lo; + return 0; +} /* locateInStringList */ + + +static PHYSFS_EnumerateCallbackResult enumFilesCallback(void *data, + const char *origdir, const char *str) +{ + PHYSFS_uint32 pos; + void *ptr; + char *newstr; + EnumStringListCallbackData *pecd = (EnumStringListCallbackData *) data; + + /* + * See if file is in the list already, and if not, insert it in there + * alphabetically... + */ + pos = pecd->size; + if (locateInStringList(str, pecd->list, &pos)) + return PHYSFS_ENUM_OK; /* already in the list, but keep going. */ + + ptr = allocator.Realloc(pecd->list, (pecd->size + 2) * sizeof (char *)); + newstr = (char *) allocator.Malloc(strlen(str) + 1); + if (ptr != NULL) + pecd->list = (char **) ptr; + + if ((ptr == NULL) || (newstr == NULL)) + { + if (newstr) + allocator.Free(newstr); + + pecd->errcode = PHYSFS_ERR_OUT_OF_MEMORY; + return PHYSFS_ENUM_ERROR; /* better luck next time. */ + } /* if */ + + strcpy(newstr, str); + + if (pos != pecd->size) + { + memmove(&pecd->list[pos+1], &pecd->list[pos], + sizeof (char *) * ((pecd->size) - pos)); + } /* if */ + + pecd->list[pos] = newstr; + pecd->size++; + + return PHYSFS_ENUM_OK; +} /* enumFilesCallback */ + + +char **PHYSFS_enumerateFiles(const char *path) +{ + EnumStringListCallbackData ecd; + memset(&ecd, '\0', sizeof (ecd)); + ecd.list = (char **) allocator.Malloc(sizeof (char *)); + BAIL_IF(!ecd.list, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + if (!PHYSFS_enumerate(path, enumFilesCallback, &ecd)) + { + const PHYSFS_ErrorCode errcode = currentErrorCode(); + PHYSFS_uint32 i; + for (i = 0; i < ecd.size; i++) + allocator.Free(ecd.list[i]); + allocator.Free(ecd.list); + BAIL_IF(errcode == PHYSFS_ERR_APP_CALLBACK, ecd.errcode, NULL); + return NULL; + } /* if */ + + ecd.list[ecd.size] = NULL; + return ecd.list; +} /* PHYSFS_enumerateFiles */ + + +/* + * Broke out to seperate function so we can use stack allocation gratuitously. + */ +static PHYSFS_EnumerateCallbackResult enumerateFromMountPoint(DirHandle *i, + const char *arcfname, + PHYSFS_EnumerateCallback callback, + const char *_fname, void *data) +{ + PHYSFS_EnumerateCallbackResult retval; + const size_t len = strlen(arcfname); + char *ptr = NULL; + char *end = NULL; + const size_t slen = strlen(i->mountPoint) + 1; + char *mountPoint = (char *) __PHYSFS_smallAlloc(slen); + + BAIL_IF(!mountPoint, PHYSFS_ERR_OUT_OF_MEMORY, PHYSFS_ENUM_ERROR); + + strcpy(mountPoint, i->mountPoint); + ptr = mountPoint + ((len) ? len + 1 : 0); + end = strchr(ptr, '/'); + assert(end); /* should always find a terminating '/'. */ + *end = '\0'; + retval = callback(data, _fname, ptr); + __PHYSFS_smallFree(mountPoint); + + BAIL_IF(retval == PHYSFS_ENUM_ERROR, PHYSFS_ERR_APP_CALLBACK, retval); + return retval; +} /* enumerateFromMountPoint */ + + +typedef struct SymlinkFilterData +{ + PHYSFS_EnumerateCallback callback; + void *callbackData; + DirHandle *dirhandle; + const char *arcfname; + PHYSFS_ErrorCode errcode; +} SymlinkFilterData; + +static PHYSFS_EnumerateCallbackResult enumCallbackFilterSymLinks(void *_data, + const char *origdir, const char *fname) +{ + SymlinkFilterData *data = (SymlinkFilterData *) _data; + const DirHandle *dh = data->dirhandle; + const char *arcfname = data->arcfname; + PHYSFS_Stat statbuf; + const char *trimmedDir = (*arcfname == '/') ? (arcfname + 1) : arcfname; + const size_t slen = strlen(trimmedDir) + strlen(fname) + 2; + char *path = (char *) __PHYSFS_smallAlloc(slen); + PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; + + if (path == NULL) + { + data->errcode = PHYSFS_ERR_OUT_OF_MEMORY; + return PHYSFS_ENUM_ERROR; + } /* if */ + + snprintf(path, slen, "%s%s%s", trimmedDir, *trimmedDir ? "/" : "", fname); + + if (!dh->funcs->stat(dh->opaque, path, &statbuf)) + { + data->errcode = currentErrorCode(); + retval = PHYSFS_ENUM_ERROR; + } /* if */ + else + { + /* Pass it on to the application if it's not a symlink. */ + if (statbuf.filetype != PHYSFS_FILETYPE_SYMLINK) + { + retval = data->callback(data->callbackData, origdir, fname); + if (retval == PHYSFS_ENUM_ERROR) + data->errcode = PHYSFS_ERR_APP_CALLBACK; + } /* if */ + } /* else */ + + __PHYSFS_smallFree(path); + + return retval; +} /* enumCallbackFilterSymLinks */ + + +int PHYSFS_enumerate(const char *_fn, PHYSFS_EnumerateCallback cb, void *data) +{ + PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; + size_t len; + char *fname; + + BAIL_IF(!_fn, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!cb, PHYSFS_ERR_INVALID_ARGUMENT, 0); + + len = strlen(_fn) + 1; + fname = (char *) __PHYSFS_smallAlloc(len); + BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0); + + if (!sanitizePlatformIndependentPath(_fn, fname)) + retval = PHYSFS_ENUM_STOP; + else + { + DirHandle *i; + SymlinkFilterData filterdata; + + __PHYSFS_platformGrabMutex(stateLock); + + if (!allowSymLinks) + { + memset(&filterdata, '\0', sizeof (filterdata)); + filterdata.callback = cb; + filterdata.callbackData = data; + } /* if */ + + for (i = searchPath; (retval == PHYSFS_ENUM_OK) && i; i = i->next) + { + char *arcfname = fname; + + if (partOfMountPoint(i, arcfname)) + retval = enumerateFromMountPoint(i, arcfname, cb, _fn, data); + + else if (verifyPath(i, &arcfname, 0)) + { + PHYSFS_Stat statbuf; + if (!i->funcs->stat(i->opaque, arcfname, &statbuf)) + { + if (currentErrorCode() == PHYSFS_ERR_NOT_FOUND) + continue; /* no such dir in this archive, skip it. */ + } /* if */ + + if (statbuf.filetype != PHYSFS_FILETYPE_DIRECTORY) + continue; /* not a directory in this archive, skip it. */ + + else if ((!allowSymLinks) && (i->funcs->info.supportsSymlinks)) + { + filterdata.dirhandle = i; + filterdata.arcfname = arcfname; + filterdata.errcode = PHYSFS_ERR_OK; + retval = i->funcs->enumerate(i->opaque, arcfname, + enumCallbackFilterSymLinks, + _fn, &filterdata); + if (retval == PHYSFS_ENUM_ERROR) + { + if (currentErrorCode() == PHYSFS_ERR_APP_CALLBACK) + PHYSFS_setErrorCode(filterdata.errcode); + } /* if */ + } /* else if */ + else + { + retval = i->funcs->enumerate(i->opaque, arcfname, + cb, _fn, data); + } /* else */ + } /* else if */ + } /* for */ + + __PHYSFS_platformReleaseMutex(stateLock); + } /* if */ + + __PHYSFS_smallFree(fname); + + return (retval == PHYSFS_ENUM_ERROR) ? 0 : 1; +} /* PHYSFS_enumerate */ + + +typedef struct +{ + PHYSFS_EnumFilesCallback callback; + void *data; +} LegacyEnumFilesCallbackData; + +static PHYSFS_EnumerateCallbackResult enumFilesCallbackAlwaysSucceed(void *d, + const char *origdir, const char *fname) +{ + LegacyEnumFilesCallbackData *cbdata = (LegacyEnumFilesCallbackData *) d; + cbdata->callback(cbdata->data, origdir, fname); + return PHYSFS_ENUM_OK; +} /* enumFilesCallbackAlwaysSucceed */ + +void PHYSFS_enumerateFilesCallback(const char *fname, + PHYSFS_EnumFilesCallback callback, + void *data) +{ + LegacyEnumFilesCallbackData cbdata; + cbdata.callback = callback; + cbdata.data = data; + (void) PHYSFS_enumerate(fname, enumFilesCallbackAlwaysSucceed, &cbdata); +} /* PHYSFS_enumerateFilesCallback */ + + +int PHYSFS_exists(const char *fname) +{ + return (getRealDirHandle(fname) != NULL); +} /* PHYSFS_exists */ + + +PHYSFS_sint64 PHYSFS_getLastModTime(const char *fname) +{ + PHYSFS_Stat statbuf; + BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), -1); + return statbuf.modtime; +} /* PHYSFS_getLastModTime */ + + +int PHYSFS_isDirectory(const char *fname) +{ + PHYSFS_Stat statbuf; + BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), 0); + return (statbuf.filetype == PHYSFS_FILETYPE_DIRECTORY); +} /* PHYSFS_isDirectory */ + + +int PHYSFS_isSymbolicLink(const char *fname) +{ + PHYSFS_Stat statbuf; + BAIL_IF_ERRPASS(!PHYSFS_stat(fname, &statbuf), 0); + return (statbuf.filetype == PHYSFS_FILETYPE_SYMLINK); +} /* PHYSFS_isSymbolicLink */ + + +static PHYSFS_File *doOpenWrite(const char *_fname, int appending) +{ + FileHandle *fh = NULL; + size_t len; + char *fname; + + BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + len = strlen(_fname) + 1; + fname = (char *) __PHYSFS_smallAlloc(len); + BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0); + + if (sanitizePlatformIndependentPath(_fname, fname)) + { + PHYSFS_Io *io = NULL; + DirHandle *h = NULL; + const PHYSFS_Archiver *f; + + __PHYSFS_platformGrabMutex(stateLock); + + GOTO_IF(!writeDir, PHYSFS_ERR_NO_WRITE_DIR, doOpenWriteEnd); + + h = writeDir; + GOTO_IF_ERRPASS(!verifyPath(h, &fname, 0), doOpenWriteEnd); + + f = h->funcs; + if (appending) + io = f->openAppend(h->opaque, fname); + else + io = f->openWrite(h->opaque, fname); + + GOTO_IF_ERRPASS(!io, doOpenWriteEnd); + + fh = (FileHandle *) allocator.Malloc(sizeof (FileHandle)); + if (fh == NULL) + { + io->destroy(io); + GOTO(PHYSFS_ERR_OUT_OF_MEMORY, doOpenWriteEnd); + } /* if */ + else + { + memset(fh, '\0', sizeof (FileHandle)); + fh->io = io; + fh->dirHandle = h; + fh->next = openWriteList; + openWriteList = fh; + } /* else */ + + doOpenWriteEnd: + __PHYSFS_platformReleaseMutex(stateLock); + } /* if */ + + __PHYSFS_smallFree(fname); + return ((PHYSFS_File *) fh); +} /* doOpenWrite */ + + +PHYSFS_File *PHYSFS_openWrite(const char *filename) +{ + return doOpenWrite(filename, 0); +} /* PHYSFS_openWrite */ + + +PHYSFS_File *PHYSFS_openAppend(const char *filename) +{ + return doOpenWrite(filename, 1); +} /* PHYSFS_openAppend */ + + +PHYSFS_File *PHYSFS_openRead(const char *_fname) +{ + FileHandle *fh = NULL; + char *fname; + size_t len; + + BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + len = strlen(_fname) + 1; + fname = (char *) __PHYSFS_smallAlloc(len); + BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0); + + if (sanitizePlatformIndependentPath(_fname, fname)) + { + DirHandle *i = NULL; + PHYSFS_Io *io = NULL; + + __PHYSFS_platformGrabMutex(stateLock); + + GOTO_IF(!searchPath, PHYSFS_ERR_NOT_FOUND, openReadEnd); + + for (i = searchPath; i != NULL; i = i->next) + { + char *arcfname = fname; + if (verifyPath(i, &arcfname, 0)) + { + io = i->funcs->openRead(i->opaque, arcfname); + if (io) + break; + } /* if */ + } /* for */ + + GOTO_IF_ERRPASS(!io, openReadEnd); + + fh = (FileHandle *) allocator.Malloc(sizeof (FileHandle)); + if (fh == NULL) + { + io->destroy(io); + GOTO(PHYSFS_ERR_OUT_OF_MEMORY, openReadEnd); + } /* if */ + + memset(fh, '\0', sizeof (FileHandle)); + fh->io = io; + fh->forReading = 1; + fh->dirHandle = i; + fh->next = openReadList; + openReadList = fh; + + openReadEnd: + __PHYSFS_platformReleaseMutex(stateLock); + } /* if */ + + __PHYSFS_smallFree(fname); + return ((PHYSFS_File *) fh); +} /* PHYSFS_openRead */ + + +static int closeHandleInOpenList(FileHandle **list, FileHandle *handle) +{ + FileHandle *prev = NULL; + FileHandle *i; + + for (i = *list; i != NULL; i = i->next) + { + if (i == handle) /* handle is in this list? */ + { + PHYSFS_Io *io = handle->io; + PHYSFS_uint8 *tmp = handle->buffer; + + /* send our buffer to io... */ + if (!handle->forReading) + { + if (!PHYSFS_flush((PHYSFS_File *) handle)) + return -1; + + /* ...then have io send it to the disk... */ + else if (io->flush && !io->flush(io)) + return -1; + } /* if */ + + /* ...then close the underlying file. */ + io->destroy(io); + + if (tmp != NULL) /* free any associated buffer. */ + allocator.Free(tmp); + + if (prev == NULL) + *list = handle->next; + else + prev->next = handle->next; + + allocator.Free(handle); + return 1; + } /* if */ + prev = i; + } /* for */ + + return 0; +} /* closeHandleInOpenList */ + + +int PHYSFS_close(PHYSFS_File *_handle) +{ + FileHandle *handle = (FileHandle *) _handle; + int rc; + + __PHYSFS_platformGrabMutex(stateLock); + + /* -1 == close failure. 0 == not found. 1 == success. */ + rc = closeHandleInOpenList(&openReadList, handle); + BAIL_IF_MUTEX_ERRPASS(rc == -1, stateLock, 0); + if (!rc) + { + rc = closeHandleInOpenList(&openWriteList, handle); + BAIL_IF_MUTEX_ERRPASS(rc == -1, stateLock, 0); + } /* if */ + + __PHYSFS_platformReleaseMutex(stateLock); + BAIL_IF(!rc, PHYSFS_ERR_INVALID_ARGUMENT, 0); + return 1; +} /* PHYSFS_close */ + + +static PHYSFS_sint64 doBufferedRead(FileHandle *fh, void *_buffer, size_t len) +{ + PHYSFS_uint8 *buffer = (PHYSFS_uint8 *) _buffer; + PHYSFS_sint64 retval = 0; + + while (len > 0) + { + const size_t avail = fh->buffill - fh->bufpos; + if (avail > 0) /* data available in the buffer. */ + { + const size_t cpy = (len < avail) ? len : avail; + memcpy(buffer, fh->buffer + fh->bufpos, cpy); + assert(len >= cpy); + buffer += cpy; + len -= cpy; + fh->bufpos += cpy; + retval += cpy; + } /* if */ + + else /* buffer is empty, refill it. */ + { + PHYSFS_Io *io = fh->io; + const PHYSFS_sint64 rc = io->read(io, fh->buffer, fh->bufsize); + fh->bufpos = 0; + if (rc > 0) + fh->buffill = (size_t) rc; + else + { + fh->buffill = 0; + if (retval == 0) /* report already-read data, or failure. */ + retval = rc; + break; + } /* else */ + } /* else */ + } /* while */ + + return retval; +} /* doBufferedRead */ + + +PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, + PHYSFS_uint32 size, PHYSFS_uint32 count) +{ + const PHYSFS_uint64 len = ((PHYSFS_uint64) size) * ((PHYSFS_uint64) count); + const PHYSFS_sint64 retval = PHYSFS_readBytes(handle, buffer, len); + return ( (retval <= 0) ? retval : (retval / ((PHYSFS_sint64) size)) ); +} /* PHYSFS_read */ + + +PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, + PHYSFS_uint64 _len) +{ + const size_t len = (size_t) _len; + FileHandle *fh = (FileHandle *) handle; + +#ifdef PHYSFS_NO_64BIT_SUPPORT + const PHYSFS_uint64 maxlen = __PHYSFS_UI64(0x7FFFFFFF); +#else + const PHYSFS_uint64 maxlen = __PHYSFS_UI64(0x7FFFFFFFFFFFFFFF); +#endif + + if (!__PHYSFS_ui64FitsAddressSpace(_len)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); + + BAIL_IF(_len > maxlen, PHYSFS_ERR_INVALID_ARGUMENT, -1); + BAIL_IF(!fh->forReading, PHYSFS_ERR_OPEN_FOR_WRITING, -1); + BAIL_IF_ERRPASS(len == 0, 0); + if (fh->buffer) + return doBufferedRead(fh, buffer, len); + + return fh->io->read(fh->io, buffer, len); +} /* PHYSFS_readBytes */ + + +static PHYSFS_sint64 doBufferedWrite(PHYSFS_File *handle, const void *buffer, + const size_t len) +{ + FileHandle *fh = (FileHandle *) handle; + + /* whole thing fits in the buffer? */ + if ((fh->buffill + len) < fh->bufsize) + { + memcpy(fh->buffer + fh->buffill, buffer, len); + fh->buffill += len; + return (PHYSFS_sint64) len; + } /* if */ + + /* would overflow buffer. Flush and then write the new objects, too. */ + BAIL_IF_ERRPASS(!PHYSFS_flush(handle), -1); + return fh->io->write(fh->io, buffer, len); +} /* doBufferedWrite */ + + +PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, + PHYSFS_uint32 size, PHYSFS_uint32 count) +{ + const PHYSFS_uint64 len = ((PHYSFS_uint64) size) * ((PHYSFS_uint64) count); + const PHYSFS_sint64 retval = PHYSFS_writeBytes(handle, buffer, len); + return ( (retval <= 0) ? retval : (retval / ((PHYSFS_sint64) size)) ); +} /* PHYSFS_write */ + + +PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle, const void *buffer, + PHYSFS_uint64 _len) +{ + const size_t len = (size_t) _len; + FileHandle *fh = (FileHandle *) handle; + +#ifdef PHYSFS_NO_64BIT_SUPPORT + const PHYSFS_uint64 maxlen = __PHYSFS_UI64(0x7FFFFFFF); +#else + const PHYSFS_uint64 maxlen = __PHYSFS_UI64(0x7FFFFFFFFFFFFFFF); +#endif + + if (!__PHYSFS_ui64FitsAddressSpace(_len)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); + + BAIL_IF(_len > maxlen, PHYSFS_ERR_INVALID_ARGUMENT, -1); + BAIL_IF(fh->forReading, PHYSFS_ERR_OPEN_FOR_READING, -1); + BAIL_IF_ERRPASS(len == 0, 0); + if (fh->buffer) + return doBufferedWrite(handle, buffer, len); + + return fh->io->write(fh->io, buffer, len); +} /* PHYSFS_write */ + + +int PHYSFS_eof(PHYSFS_File *handle) +{ + FileHandle *fh = (FileHandle *) handle; + + if (!fh->forReading) /* never EOF on files opened for write/append. */ + return 0; + + /* can't be eof if buffer isn't empty */ + if (fh->bufpos == fh->buffill) + { + /* check the Io. */ + PHYSFS_Io *io = fh->io; + const PHYSFS_sint64 pos = io->tell(io); + const PHYSFS_sint64 len = io->length(io); + if ((pos < 0) || (len < 0)) + return 0; /* beats me. */ + return (pos >= len); + } /* if */ + + return 0; +} /* PHYSFS_eof */ + + +PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle) +{ + FileHandle *fh = (FileHandle *) handle; + const PHYSFS_sint64 pos = fh->io->tell(fh->io); + const PHYSFS_sint64 retval = fh->forReading ? + (pos - fh->buffill) + fh->bufpos : + (pos + fh->buffill); + return retval; +} /* PHYSFS_tell */ + + +int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos) +{ + FileHandle *fh = (FileHandle *) handle; + BAIL_IF_ERRPASS(!PHYSFS_flush(handle), 0); + + if (fh->buffer && fh->forReading) + { + /* avoid throwing away our precious buffer if seeking within it. */ + PHYSFS_sint64 offset = pos - PHYSFS_tell(handle); + if ( /* seeking within the already-buffered range? */ + /* forward? */ + ((offset >= 0) && (((size_t)offset) <= fh->buffill-fh->bufpos)) || + /* backward? */ + ((offset < 0) && (((size_t) -offset) <= fh->bufpos)) ) + { + fh->bufpos = (size_t) (((PHYSFS_sint64) fh->bufpos) + offset); + return 1; /* successful seek */ + } /* if */ + } /* if */ + + /* we have to fall back to a 'raw' seek. */ + fh->buffill = fh->bufpos = 0; + return fh->io->seek(fh->io, pos); +} /* PHYSFS_seek */ + + +PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle) +{ + PHYSFS_Io *io = ((FileHandle *) handle)->io; + return io->length(io); +} /* PHYSFS_filelength */ + + +int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 _bufsize) +{ + FileHandle *fh = (FileHandle *) handle; + const size_t bufsize = (size_t) _bufsize; + + if (!__PHYSFS_ui64FitsAddressSpace(_bufsize)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, 0); + + BAIL_IF_ERRPASS(!PHYSFS_flush(handle), 0); + + /* + * For reads, we need to move the file pointer to where it would be + * if we weren't buffering, so that the next read will get the + * right chunk of stuff from the file. PHYSFS_flush() handles writes. + */ + if ((fh->forReading) && (fh->buffill != fh->bufpos)) + { + PHYSFS_uint64 pos; + const PHYSFS_sint64 curpos = fh->io->tell(fh->io); + BAIL_IF_ERRPASS(curpos == -1, 0); + pos = ((curpos - fh->buffill) + fh->bufpos); + BAIL_IF_ERRPASS(!fh->io->seek(fh->io, pos), 0); + } /* if */ + + if (bufsize == 0) /* delete existing buffer. */ + { + if (fh->buffer) + { + allocator.Free(fh->buffer); + fh->buffer = NULL; + } /* if */ + } /* if */ + + else + { + PHYSFS_uint8 *newbuf; + newbuf = (PHYSFS_uint8 *) allocator.Realloc(fh->buffer, bufsize); + BAIL_IF(!newbuf, PHYSFS_ERR_OUT_OF_MEMORY, 0); + fh->buffer = newbuf; + } /* else */ + + fh->bufsize = bufsize; + fh->buffill = fh->bufpos = 0; + return 1; +} /* PHYSFS_setBuffer */ + + +int PHYSFS_flush(PHYSFS_File *handle) +{ + FileHandle *fh = (FileHandle *) handle; + PHYSFS_Io *io; + PHYSFS_sint64 rc; + + if ((fh->forReading) || (fh->bufpos == fh->buffill)) + return 1; /* open for read or buffer empty are successful no-ops. */ + + /* dump buffer to disk. */ + io = fh->io; + rc = io->write(io, fh->buffer + fh->bufpos, fh->buffill - fh->bufpos); + BAIL_IF_ERRPASS(rc <= 0, 0); + fh->bufpos = fh->buffill = 0; + return 1; +} /* PHYSFS_flush */ + + +int PHYSFS_stat(const char *_fname, PHYSFS_Stat *stat) +{ + int retval = 0; + char *fname; + size_t len; + + BAIL_IF(!_fname, PHYSFS_ERR_INVALID_ARGUMENT, 0); + BAIL_IF(!stat, PHYSFS_ERR_INVALID_ARGUMENT, 0); + len = strlen(_fname) + 1; + fname = (char *) __PHYSFS_smallAlloc(len); + BAIL_IF(!fname, PHYSFS_ERR_OUT_OF_MEMORY, 0); + + /* set some sane defaults... */ + stat->filesize = -1; + stat->modtime = -1; + stat->createtime = -1; + stat->accesstime = -1; + stat->filetype = PHYSFS_FILETYPE_OTHER; + stat->readonly = 1; + + if (sanitizePlatformIndependentPath(_fname, fname)) + { + if (*fname == '\0') + { + stat->filetype = PHYSFS_FILETYPE_DIRECTORY; + stat->readonly = !writeDir; /* Writeable if we have a writeDir */ + retval = 1; + } /* if */ + else + { + DirHandle *i; + int exists = 0; + __PHYSFS_platformGrabMutex(stateLock); + for (i = searchPath; ((i != NULL) && (!exists)); i = i->next) + { + char *arcfname = fname; + exists = partOfMountPoint(i, arcfname); + if (exists) + { + stat->filetype = PHYSFS_FILETYPE_DIRECTORY; + stat->readonly = 1; + retval = 1; + } /* if */ + else if (verifyPath(i, &arcfname, 0)) + { + retval = i->funcs->stat(i->opaque, arcfname, stat); + if ((retval) || (currentErrorCode() != PHYSFS_ERR_NOT_FOUND)) + exists = 1; + } /* else if */ + } /* for */ + __PHYSFS_platformReleaseMutex(stateLock); + } /* else */ + } /* if */ + + __PHYSFS_smallFree(fname); + return retval; +} /* PHYSFS_stat */ + + +int __PHYSFS_readAll(PHYSFS_Io *io, void *buf, const size_t _len) +{ + const PHYSFS_uint64 len = (PHYSFS_uint64) _len; + return (io->read(io, buf, len) == len); +} /* __PHYSFS_readAll */ + + +void *__PHYSFS_initSmallAlloc(void *ptr, const size_t len) +{ + void *useHeap = ((ptr == NULL) ? ((void *) 1) : ((void *) 0)); + if (useHeap) /* too large for stack allocation or alloca() failed. */ + ptr = allocator.Malloc(len+sizeof (void *)); + + if (ptr != NULL) + { + void **retval = (void **) ptr; + /*printf("%s alloc'd (%lld) bytes at (%p).\n", + useHeap ? "heap" : "stack", (long long) len, ptr);*/ + *retval = useHeap; + return retval + 1; + } /* if */ + + return NULL; /* allocation failed. */ +} /* __PHYSFS_initSmallAlloc */ + + +void __PHYSFS_smallFree(void *ptr) +{ + if (ptr != NULL) + { + void **block = ((void **) ptr) - 1; + const int useHeap = (*block != NULL); + if (useHeap) + allocator.Free(block); + /*printf("%s free'd (%p).\n", useHeap ? "heap" : "stack", block);*/ + } /* if */ +} /* __PHYSFS_smallFree */ + + +int PHYSFS_setAllocator(const PHYSFS_Allocator *a) +{ + BAIL_IF(initialized, PHYSFS_ERR_IS_INITIALIZED, 0); + externalAllocator = (a != NULL); + if (externalAllocator) + memcpy(&allocator, a, sizeof (PHYSFS_Allocator)); + + return 1; +} /* PHYSFS_setAllocator */ + + +const PHYSFS_Allocator *PHYSFS_getAllocator(void) +{ + BAIL_IF(!initialized, PHYSFS_ERR_NOT_INITIALIZED, NULL); + return &allocator; +} /* PHYSFS_getAllocator */ + + +static void *mallocAllocatorMalloc(PHYSFS_uint64 s) +{ + if (!__PHYSFS_ui64FitsAddressSpace(s)) + BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); + #undef malloc + return malloc((size_t) s); +} /* mallocAllocatorMalloc */ + + +static void *mallocAllocatorRealloc(void *ptr, PHYSFS_uint64 s) +{ + if (!__PHYSFS_ui64FitsAddressSpace(s)) + BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); + #undef realloc + return realloc(ptr, (size_t) s); +} /* mallocAllocatorRealloc */ + + +static void mallocAllocatorFree(void *ptr) +{ + #undef free + free(ptr); +} /* mallocAllocatorFree */ + + +static void setDefaultAllocator(void) +{ + assert(!externalAllocator); + allocator.Init = NULL; + allocator.Deinit = NULL; + allocator.Malloc = mallocAllocatorMalloc; + allocator.Realloc = mallocAllocatorRealloc; + allocator.Free = mallocAllocatorFree; +} /* setDefaultAllocator */ + + +int __PHYSFS_DirTreeInit(__PHYSFS_DirTree *dt, const size_t entrylen) +{ + static char rootpath[2] = { '/', '\0' }; + size_t alloclen; + + assert(entrylen >= sizeof (__PHYSFS_DirTreeEntry)); + + memset(dt, '\0', sizeof (*dt)); + + dt->root = (__PHYSFS_DirTreeEntry *) allocator.Malloc(entrylen); + BAIL_IF(!dt->root, PHYSFS_ERR_OUT_OF_MEMORY, 0); + memset(dt->root, '\0', entrylen); + dt->root->name = rootpath; + dt->root->isdir = 1; + dt->hashBuckets = 64; + if (!dt->hashBuckets) + dt->hashBuckets = 1; + dt->entrylen = entrylen; + + alloclen = dt->hashBuckets * sizeof (__PHYSFS_DirTreeEntry *); + dt->hash = (__PHYSFS_DirTreeEntry **) allocator.Malloc(alloclen); + BAIL_IF(!dt->hash, PHYSFS_ERR_OUT_OF_MEMORY, 0); + memset(dt->hash, '\0', alloclen); + + return 1; +} /* __PHYSFS_DirTreeInit */ + + +static inline PHYSFS_uint32 hashPathName(__PHYSFS_DirTree *dt, const char *name) +{ + return __PHYSFS_hashString(name, strlen(name)) % dt->hashBuckets; +} /* hashPathName */ + + +/* Fill in missing parent directories. */ +static __PHYSFS_DirTreeEntry *addAncestors(__PHYSFS_DirTree *dt, char *name) +{ + __PHYSFS_DirTreeEntry *retval = dt->root; + char *sep = strrchr(name, '/'); + + if (sep) + { + *sep = '\0'; /* chop off last piece. */ + retval = (__PHYSFS_DirTreeEntry *) __PHYSFS_DirTreeFind(dt, name); + + if (retval != NULL) + { + *sep = '/'; + BAIL_IF(!retval->isdir, PHYSFS_ERR_CORRUPT, NULL); + return retval; /* already hashed. */ + } /* if */ + + /* okay, this is a new dir. Build and hash us. */ + retval = (__PHYSFS_DirTreeEntry*)__PHYSFS_DirTreeAdd(dt, name, 1); + *sep = '/'; + } /* if */ + + return retval; +} /* addAncestors */ + + +void *__PHYSFS_DirTreeAdd(__PHYSFS_DirTree *dt, char *name, const int isdir) +{ + __PHYSFS_DirTreeEntry *retval = __PHYSFS_DirTreeFind(dt, name); + if (!retval) + { + const size_t alloclen = strlen(name) + 1 + dt->entrylen; + PHYSFS_uint32 hashval; + __PHYSFS_DirTreeEntry *parent = addAncestors(dt, name); + BAIL_IF_ERRPASS(!parent, NULL); + assert(dt->entrylen >= sizeof (__PHYSFS_DirTreeEntry)); + retval = (__PHYSFS_DirTreeEntry *) allocator.Malloc(alloclen); + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + memset(retval, '\0', dt->entrylen); + retval->name = ((char *) retval) + dt->entrylen; + strcpy(retval->name, name); + hashval = hashPathName(dt, name); + retval->hashnext = dt->hash[hashval]; + dt->hash[hashval] = retval; + retval->sibling = parent->children; + retval->isdir = isdir; + parent->children = retval; + } /* if */ + + return retval; +} /* __PHYSFS_DirTreeAdd */ + + +/* Find the __PHYSFS_DirTreeEntry for a path in platform-independent notation. */ +void *__PHYSFS_DirTreeFind(__PHYSFS_DirTree *dt, const char *path) +{ + PHYSFS_uint32 hashval; + __PHYSFS_DirTreeEntry *prev = NULL; + __PHYSFS_DirTreeEntry *retval; + + if (*path == '\0') + return dt->root; + + hashval = hashPathName(dt, path); + for (retval = dt->hash[hashval]; retval; retval = retval->hashnext) + { + if (strcmp(retval->name, path) == 0) + { + if (prev != NULL) /* move this to the front of the list */ + { + prev->hashnext = retval->hashnext; + retval->hashnext = dt->hash[hashval]; + dt->hash[hashval] = retval; + } /* if */ + + return retval; + } /* if */ + + prev = retval; + } /* for */ + + BAIL(PHYSFS_ERR_NOT_FOUND, NULL); +} /* __PHYSFS_DirTreeFind */ + +PHYSFS_EnumerateCallbackResult __PHYSFS_DirTreeEnumerate(void *opaque, + const char *dname, PHYSFS_EnumerateCallback cb, + const char *origdir, void *callbackdata) +{ + PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; + __PHYSFS_DirTree *tree = (__PHYSFS_DirTree *) opaque; + const __PHYSFS_DirTreeEntry *entry = __PHYSFS_DirTreeFind(tree, dname); + BAIL_IF(!entry, PHYSFS_ERR_NOT_FOUND, PHYSFS_ENUM_ERROR); + + entry = entry->children; + + while (entry && (retval == PHYSFS_ENUM_OK)) + { + const char *name = entry->name; + const char *ptr = strrchr(name, '/'); + retval = cb(callbackdata, origdir, ptr ? ptr + 1 : name); + BAIL_IF(retval == PHYSFS_ENUM_ERROR, PHYSFS_ERR_APP_CALLBACK, retval); + entry = entry->sibling; + } /* while */ + + return retval; +} /* __PHYSFS_DirTreeEnumerate */ + + +void __PHYSFS_DirTreeDeinit(__PHYSFS_DirTree *dt) +{ + if (!dt) + return; + + if (dt->root) + { + assert(dt->root->sibling == NULL); + assert(dt->hash || (dt->root->children == NULL)); + allocator.Free(dt->root); + } /* if */ + + if (dt->hash) + { + size_t i; + for (i = 0; i < dt->hashBuckets; i++) + { + __PHYSFS_DirTreeEntry *entry; + __PHYSFS_DirTreeEntry *next; + for (entry = dt->hash[i]; entry; entry = next) + { + next = entry->hashnext; + allocator.Free(entry); + } /* for */ + } /* for */ + allocator.Free(dt->hash); + } /* if */ +} /* __PHYSFS_DirTreeDeinit */ + +/* end of physfs.c ... */ + diff --git a/desktop_version/physfs/physfs.h b/desktop_version/physfs/physfs.h new file mode 100644 index 00000000..10855505 --- /dev/null +++ b/desktop_version/physfs/physfs.h @@ -0,0 +1,3854 @@ +/** + * \file physfs.h + * + * Main header file for PhysicsFS. + */ + +/** + * \mainpage PhysicsFS + * + * The latest version of PhysicsFS can be found at: + * https://icculus.org/physfs/ + * + * PhysicsFS; a portable, flexible file i/o abstraction. + * + * This API gives you access to a system file system in ways superior to the + * stdio or system i/o calls. The brief benefits: + * + * - It's portable. + * - It's safe. No file access is permitted outside the specified dirs. + * - It's flexible. Archives (.ZIP files) can be used transparently as + * directory structures. + * + * With PhysicsFS, you have a single writing directory and multiple + * directories (the "search path") for reading. You can think of this as a + * filesystem within a filesystem. If (on Windows) you were to set the + * writing directory to "C:\MyGame\MyWritingDirectory", then no PHYSFS calls + * could touch anything above this directory, including the "C:\MyGame" and + * "C:\" directories. This prevents an application's internal scripting + * language from piddling over c:\\config.sys, for example. If you'd rather + * give PHYSFS full access to the system's REAL file system, set the writing + * dir to "C:\", but that's generally A Bad Thing for several reasons. + * + * Drive letters are hidden in PhysicsFS once you set up your initial paths. + * The search path creates a single, hierarchical directory structure. + * Not only does this lend itself well to general abstraction with archives, + * it also gives better support to operating systems like MacOS and Unix. + * Generally speaking, you shouldn't ever hardcode a drive letter; not only + * does this hurt portability to non-Microsoft OSes, but it limits your win32 + * users to a single drive, too. Use the PhysicsFS abstraction functions and + * allow user-defined configuration options, too. When opening a file, you + * specify it like it was on a Unix filesystem: if you want to write to + * "C:\MyGame\MyConfigFiles\game.cfg", then you might set the write dir to + * "C:\MyGame" and then open "MyConfigFiles/game.cfg". This gives an + * abstraction across all platforms. Specifying a file in this way is termed + * "platform-independent notation" in this documentation. Specifying a + * a filename in a form such as "C:\mydir\myfile" or + * "MacOS hard drive:My Directory:My File" is termed "platform-dependent + * notation". The only time you use platform-dependent notation is when + * setting up your write directory and search path; after that, all file + * access into those directories are done with platform-independent notation. + * + * All files opened for writing are opened in relation to the write directory, + * which is the root of the writable filesystem. When opening a file for + * reading, PhysicsFS goes through the search path. This is NOT the + * same thing as the PATH environment variable. An application using + * PhysicsFS specifies directories to be searched which may be actual + * directories, or archive files that contain files and subdirectories of + * their own. See the end of these docs for currently supported archive + * formats. + * + * Once the search path is defined, you may open files for reading. If you've + * got the following search path defined (to use a win32 example again): + * + * - C:\\mygame + * - C:\\mygame\\myuserfiles + * - D:\\mygamescdromdatafiles + * - C:\\mygame\\installeddatafiles.zip + * + * Then a call to PHYSFS_openRead("textfiles/myfile.txt") (note the directory + * separator, lack of drive letter, and lack of dir separator at the start of + * the string; this is platform-independent notation) will check for + * C:\\mygame\\textfiles\\myfile.txt, then + * C:\\mygame\\myuserfiles\\textfiles\\myfile.txt, then + * D:\\mygamescdromdatafiles\\textfiles\\myfile.txt, then, finally, for + * textfiles\\myfile.txt inside of C:\\mygame\\installeddatafiles.zip. + * Remember that most archive types and platform filesystems store their + * filenames in a case-sensitive manner, so you should be careful to specify + * it correctly. + * + * Files opened through PhysicsFS may NOT contain "." or ".." or ":" as dir + * elements. Not only are these meaningless on MacOS Classic and/or Unix, + * they are a security hole. Also, symbolic links (which can be found in + * some archive types and directly in the filesystem on Unix platforms) are + * NOT followed until you call PHYSFS_permitSymbolicLinks(). That's left to + * your own discretion, as following a symlink can allow for access outside + * the write dir and search paths. For portability, there is no mechanism for + * creating new symlinks in PhysicsFS. + * + * The write dir is not included in the search path unless you specifically + * add it. While you CAN change the write dir as many times as you like, + * you should probably set it once and stick to it. Remember that your + * program will not have permission to write in every directory on Unix and + * NT systems. + * + * All files are opened in binary mode; there is no endline conversion for + * textfiles. Other than that, PhysicsFS has some convenience functions for + * platform-independence. There is a function to tell you the current + * platform's dir separator ("\\" on windows, "/" on Unix, ":" on MacOS), + * which is needed only to set up your search/write paths. There is a + * function to tell you what CD-ROM drives contain accessible discs, and a + * function to recommend a good search path, etc. + * + * A recommended order for the search path is the write dir, then the base dir, + * then the cdrom dir, then any archives discovered. Quake 3 does something + * like this, but moves the archives to the start of the search path. Build + * Engine games, like Duke Nukem 3D and Blood, place the archives last, and + * use the base dir for both searching and writing. There is a helper + * function (PHYSFS_setSaneConfig()) that puts together a basic configuration + * for you, based on a few parameters. Also see the comments on + * PHYSFS_getBaseDir(), and PHYSFS_getPrefDir() for info on what those + * are and how they can help you determine an optimal search path. + * + * PhysicsFS 2.0 adds the concept of "mounting" archives to arbitrary points + * in the search path. If a zipfile contains "maps/level.map" and you mount + * that archive at "mods/mymod", then you would have to open + * "mods/mymod/maps/level.map" to access the file, even though "mods/mymod" + * isn't actually specified in the .zip file. Unlike the Unix mentality of + * mounting a filesystem, "mods/mymod" doesn't actually have to exist when + * mounting the zipfile. It's a "virtual" directory. The mounting mechanism + * allows the developer to seperate archives in the tree and avoid trampling + * over files when added new archives, such as including mod support in a + * game...keeping external content on a tight leash in this manner can be of + * utmost importance to some applications. + * + * PhysicsFS is mostly thread safe. The errors returned by + * PHYSFS_getLastErrorCode() are unique by thread, and library-state-setting + * functions are mutex'd. For efficiency, individual file accesses are + * not locked, so you can not safely read/write/seek/close/etc the same + * file from two threads at the same time. Other race conditions are bugs + * that should be reported/patched. + * + * While you CAN use stdio/syscall file access in a program that has PHYSFS_* + * calls, doing so is not recommended, and you can not directly use system + * filehandles with PhysicsFS and vice versa (but as of PhysicsFS 2.1, you + * can wrap them in a PHYSFS_Io interface yourself if you wanted to). + * + * Note that archives need not be named as such: if you have a ZIP file and + * rename it with a .PKG extension, the file will still be recognized as a + * ZIP archive by PhysicsFS; the file's contents are used to determine its + * type where possible. + * + * Currently supported archive types: + * - .ZIP (pkZip/WinZip/Info-ZIP compatible) + * - .7Z (7zip archives) + * - .ISO (ISO9660 files, CD-ROM images) + * - .GRP (Build Engine groupfile archives) + * - .PAK (Quake I/II archive format) + * - .HOG (Descent I/II HOG file archives) + * - .MVL (Descent II movielib archives) + * - .WAD (DOOM engine archives) + * - .VDF (Gothic I/II engine archives) + * - .SLB (Independence War archives) + * + * String policy for PhysicsFS 2.0 and later: + * + * PhysicsFS 1.0 could only deal with null-terminated ASCII strings. All high + * ASCII chars resulted in undefined behaviour, and there was no Unicode + * support at all. PhysicsFS 2.0 supports Unicode without breaking binary + * compatibility with the 1.0 API by using UTF-8 encoding of all strings + * passed in and out of the library. + * + * All strings passed through PhysicsFS are in null-terminated UTF-8 format. + * This means that if all you care about is English (ASCII characters <= 127) + * then you just use regular C strings. If you care about Unicode (and you + * should!) then you need to figure out what your platform wants, needs, and + * offers. If you are on Windows before Win2000 and build with Unicode + * support, your TCHAR strings are two bytes per character (this is called + * "UCS-2 encoding"). Any modern Windows uses UTF-16, which is two bytes + * per character for most characters, but some characters are four. You + * should convert them to UTF-8 before handing them to PhysicsFS with + * PHYSFS_utf8FromUtf16(), which handles both UTF-16 and UCS-2. If you're + * using Unix or Mac OS X, your wchar_t strings are four bytes per character + * ("UCS-4 encoding", sometimes called "UTF-32"). Use PHYSFS_utf8FromUcs4(). + * Mac OS X can give you UTF-8 directly from a CFString or NSString, and many + * Unixes generally give you C strings in UTF-8 format everywhere. If you + * have a single-byte high ASCII charset, like so-many European "codepages" + * you may be out of luck. We'll convert from "Latin1" to UTF-8 only, and + * never back to Latin1. If you're above ASCII 127, all bets are off: move + * to Unicode or use your platform's facilities. Passing a C string with + * high-ASCII data that isn't UTF-8 encoded will NOT do what you expect! + * + * Naturally, there's also PHYSFS_utf8ToUcs2(), PHYSFS_utf8ToUtf16(), and + * PHYSFS_utf8ToUcs4() to get data back into a format you like. Behind the + * scenes, PhysicsFS will use Unicode where possible: the UTF-8 strings on + * Windows will be converted and used with the multibyte Windows APIs, for + * example. + * + * PhysicsFS offers basic encoding conversion support, but not a whole string + * library. Get your stuff into whatever format you can work with. + * + * Most platforms supported by PhysicsFS 2.1 and later fully support Unicode. + * Some older platforms have been dropped (Windows 95, Mac OS 9). Some, like + * OS/2, might be able to convert to a local codepage or will just fail to + * open/create the file. Modern OSes (macOS, Linux, Windows, etc) should all + * be fine. + * + * Many game-specific archivers are seriously unprepared for Unicode (the + * Descent HOG/MVL and Build Engine GRP archivers, for example, only offer a + * DOS 8.3 filename, for example). Nothing can be done for these, but they + * tend to be legacy formats for existing content that was all ASCII (and + * thus, valid UTF-8) anyhow. Other formats, like .ZIP, don't explicitly + * offer Unicode support, but unofficially expect filenames to be UTF-8 + * encoded, and thus Just Work. Most everything does the right thing without + * bothering you, but it's good to be aware of these nuances in case they + * don't. + * + * + * Other stuff: + * + * Please see the file LICENSE.txt in the source's root directory for + * licensing and redistribution rights. + * + * Please see the file CREDITS.txt in the source's "docs" directory for + * a more or less complete list of who's responsible for this. + * + * \author Ryan C. Gordon. + */ + +#ifndef _INCLUDE_PHYSFS_H_ +#define _INCLUDE_PHYSFS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(PHYSFS_DECL) +/* do nothing. */ +#elif defined(_MSC_VER) +#define PHYSFS_DECL __declspec(dllexport) +#elif defined(__SUNPRO_C) +#define PHYSFS_DECL __global +#elif ((__GNUC__ >= 3) && (!defined(__EMX__)) && (!defined(sun))) +#define PHYSFS_DECL __attribute__((visibility("default"))) +#else +#define PHYSFS_DECL +#endif + +#if defined(PHYSFS_DEPRECATED) +/* do nothing. */ +#elif (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */ +#define PHYSFS_DEPRECATED __attribute__((deprecated)) +#else +#define PHYSFS_DEPRECATED +#endif + +#if 0 /* !!! FIXME: look into this later. */ +#if defined(PHYSFS_CALL) +/* do nothing. */ +#elif defined(__WIN32__) && !defined(__GNUC__) +#define PHYSFS_CALL __cdecl +#elif defined(__OS2__) || defined(OS2) /* should work across all compilers. */ +#define PHYSFS_CALL _System +#else +#define PHYSFS_CALL +#endif +#endif + +/** + * \typedef PHYSFS_uint8 + * \brief An unsigned, 8-bit integer type. + */ +typedef unsigned char PHYSFS_uint8; + +/** + * \typedef PHYSFS_sint8 + * \brief A signed, 8-bit integer type. + */ +typedef signed char PHYSFS_sint8; + +/** + * \typedef PHYSFS_uint16 + * \brief An unsigned, 16-bit integer type. + */ +typedef unsigned short PHYSFS_uint16; + +/** + * \typedef PHYSFS_sint16 + * \brief A signed, 16-bit integer type. + */ +typedef signed short PHYSFS_sint16; + +/** + * \typedef PHYSFS_uint32 + * \brief An unsigned, 32-bit integer type. + */ +typedef unsigned int PHYSFS_uint32; + +/** + * \typedef PHYSFS_sint32 + * \brief A signed, 32-bit integer type. + */ +typedef signed int PHYSFS_sint32; + +/** + * \typedef PHYSFS_uint64 + * \brief An unsigned, 64-bit integer type. + * \warning on platforms without any sort of 64-bit datatype, this is + * equivalent to PHYSFS_uint32! + */ + +/** + * \typedef PHYSFS_sint64 + * \brief A signed, 64-bit integer type. + * \warning on platforms without any sort of 64-bit datatype, this is + * equivalent to PHYSFS_sint32! + */ + + +#if (defined PHYSFS_NO_64BIT_SUPPORT) /* oh well. */ +typedef PHYSFS_uint32 PHYSFS_uint64; +typedef PHYSFS_sint32 PHYSFS_sint64; +#elif (defined _MSC_VER) +typedef signed __int64 PHYSFS_sint64; +typedef unsigned __int64 PHYSFS_uint64; +#else +typedef unsigned long long PHYSFS_uint64; +typedef signed long long PHYSFS_sint64; +#endif + + +#ifndef DOXYGEN_SHOULD_IGNORE_THIS +/* Make sure the types really have the right sizes */ +#define PHYSFS_COMPILE_TIME_ASSERT(name, x) \ + typedef int PHYSFS_compile_time_assert_##name[(x) * 2 - 1] + +PHYSFS_COMPILE_TIME_ASSERT(uint8IsOneByte, sizeof(PHYSFS_uint8) == 1); +PHYSFS_COMPILE_TIME_ASSERT(sint8IsOneByte, sizeof(PHYSFS_sint8) == 1); +PHYSFS_COMPILE_TIME_ASSERT(uint16IsTwoBytes, sizeof(PHYSFS_uint16) == 2); +PHYSFS_COMPILE_TIME_ASSERT(sint16IsTwoBytes, sizeof(PHYSFS_sint16) == 2); +PHYSFS_COMPILE_TIME_ASSERT(uint32IsFourBytes, sizeof(PHYSFS_uint32) == 4); +PHYSFS_COMPILE_TIME_ASSERT(sint32IsFourBytes, sizeof(PHYSFS_sint32) == 4); + +#ifndef PHYSFS_NO_64BIT_SUPPORT +PHYSFS_COMPILE_TIME_ASSERT(uint64IsEightBytes, sizeof(PHYSFS_uint64) == 8); +PHYSFS_COMPILE_TIME_ASSERT(sint64IsEightBytes, sizeof(PHYSFS_sint64) == 8); +#endif + +#undef PHYSFS_COMPILE_TIME_ASSERT + +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ + + +/** + * \struct PHYSFS_File + * \brief A PhysicsFS file handle. + * + * You get a pointer to one of these when you open a file for reading, + * writing, or appending via PhysicsFS. + * + * As you can see from the lack of meaningful fields, you should treat this + * as opaque data. Don't try to manipulate the file handle, just pass the + * pointer you got, unmolested, to various PhysicsFS APIs. + * + * \sa PHYSFS_openRead + * \sa PHYSFS_openWrite + * \sa PHYSFS_openAppend + * \sa PHYSFS_close + * \sa PHYSFS_read + * \sa PHYSFS_write + * \sa PHYSFS_seek + * \sa PHYSFS_tell + * \sa PHYSFS_eof + * \sa PHYSFS_setBuffer + * \sa PHYSFS_flush + */ +typedef struct PHYSFS_File +{ + void *opaque; /**< That's all you get. Don't touch. */ +} PHYSFS_File; + + +/** + * \def PHYSFS_file + * \brief 1.0 API compatibility define. + * + * PHYSFS_file is identical to PHYSFS_File. This #define is here for backwards + * compatibility with the 1.0 API, which had an inconsistent capitalization + * convention in this case. New code should use PHYSFS_File, as this #define + * may go away someday. + * + * \sa PHYSFS_File + */ +#define PHYSFS_file PHYSFS_File + + +/** + * \struct PHYSFS_ArchiveInfo + * \brief Information on various PhysicsFS-supported archives. + * + * This structure gives you details on what sort of archives are supported + * by this implementation of PhysicsFS. Archives tend to be things like + * ZIP files and such. + * + * \warning Not all binaries are created equal! PhysicsFS can be built with + * or without support for various archives. You can check with + * PHYSFS_supportedArchiveTypes() to see if your archive type is + * supported. + * + * \sa PHYSFS_supportedArchiveTypes + * \sa PHYSFS_registerArchiver + * \sa PHYSFS_deregisterArchiver + */ +typedef struct PHYSFS_ArchiveInfo +{ + const char *extension; /**< Archive file extension: "ZIP", for example. */ + const char *description; /**< Human-readable archive description. */ + const char *author; /**< Person who did support for this archive. */ + const char *url; /**< URL related to this archive */ + int supportsSymlinks; /**< non-zero if archive offers symbolic links. */ +} PHYSFS_ArchiveInfo; + + +/** + * \struct PHYSFS_Version + * \brief Information the version of PhysicsFS in use. + * + * Represents the library's version as three levels: major revision + * (increments with massive changes, additions, and enhancements), + * minor revision (increments with backwards-compatible changes to the + * major revision), and patchlevel (increments with fixes to the minor + * revision). + * + * \sa PHYSFS_VERSION + * \sa PHYSFS_getLinkedVersion + */ +typedef struct PHYSFS_Version +{ + PHYSFS_uint8 major; /**< major revision */ + PHYSFS_uint8 minor; /**< minor revision */ + PHYSFS_uint8 patch; /**< patchlevel */ +} PHYSFS_Version; + + +#ifndef DOXYGEN_SHOULD_IGNORE_THIS +#define PHYSFS_VER_MAJOR 3 +#define PHYSFS_VER_MINOR 0 +#define PHYSFS_VER_PATCH 2 +#endif /* DOXYGEN_SHOULD_IGNORE_THIS */ + + +/* PhysicsFS state stuff ... */ + +/** + * \def PHYSFS_VERSION(x) + * \brief Macro to determine PhysicsFS version program was compiled against. + * + * This macro fills in a PHYSFS_Version structure with the version of the + * library you compiled against. This is determined by what header the + * compiler uses. Note that if you dynamically linked the library, you might + * have a slightly newer or older version at runtime. That version can be + * determined with PHYSFS_getLinkedVersion(), which, unlike PHYSFS_VERSION, + * is not a macro. + * + * \param x A pointer to a PHYSFS_Version struct to initialize. + * + * \sa PHYSFS_Version + * \sa PHYSFS_getLinkedVersion + */ +#define PHYSFS_VERSION(x) \ +{ \ + (x)->major = PHYSFS_VER_MAJOR; \ + (x)->minor = PHYSFS_VER_MINOR; \ + (x)->patch = PHYSFS_VER_PATCH; \ +} + + +/** + * \fn void PHYSFS_getLinkedVersion(PHYSFS_Version *ver) + * \brief Get the version of PhysicsFS that is linked against your program. + * + * If you are using a shared library (DLL) version of PhysFS, then it is + * possible that it will be different than the version you compiled against. + * + * This is a real function; the macro PHYSFS_VERSION tells you what version + * of PhysFS you compiled against: + * + * \code + * PHYSFS_Version compiled; + * PHYSFS_Version linked; + * + * PHYSFS_VERSION(&compiled); + * PHYSFS_getLinkedVersion(&linked); + * printf("We compiled against PhysFS version %d.%d.%d ...\n", + * compiled.major, compiled.minor, compiled.patch); + * printf("But we linked against PhysFS version %d.%d.%d.\n", + * linked.major, linked.minor, linked.patch); + * \endcode + * + * This function may be called safely at any time, even before PHYSFS_init(). + * + * \sa PHYSFS_VERSION + */ +PHYSFS_DECL void PHYSFS_getLinkedVersion(PHYSFS_Version *ver); + + +/** + * \fn int PHYSFS_init(const char *argv0) + * \brief Initialize the PhysicsFS library. + * + * This must be called before any other PhysicsFS function. + * + * This should be called prior to any attempts to change your process's + * current working directory. + * + * \param argv0 the argv[0] string passed to your program's mainline. + * This may be NULL on most platforms (such as ones without a + * standard main() function), but you should always try to pass + * something in here. Unix-like systems such as Linux _need_ to + * pass argv[0] from main() in here. + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). + * + * \sa PHYSFS_deinit + * \sa PHYSFS_isInit + */ +PHYSFS_DECL int PHYSFS_init(const char *argv0); + + +/** + * \fn int PHYSFS_deinit(void) + * \brief Deinitialize the PhysicsFS library. + * + * This closes any files opened via PhysicsFS, blanks the search/write paths, + * frees memory, and invalidates all of your file handles. + * + * Note that this call can FAIL if there's a file open for writing that + * refuses to close (for example, the underlying operating system was + * buffering writes to network filesystem, and the fileserver has crashed, + * or a hard drive has failed, etc). It is usually best to close all write + * handles yourself before calling this function, so that you can gracefully + * handle a specific failure. + * + * Once successfully deinitialized, PHYSFS_init() can be called again to + * restart the subsystem. All default API states are restored at this + * point, with the exception of any custom allocator you might have + * specified, which survives between initializations. + * + * \return nonzero on success, zero on error. Specifics of the error can be + * gleaned from PHYSFS_getLastError(). If failure, state of PhysFS is + * undefined, and probably badly screwed up. + * + * \sa PHYSFS_init + * \sa PHYSFS_isInit + */ +PHYSFS_DECL int PHYSFS_deinit(void); + + +/** + * \fn const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void) + * \brief Get a list of supported archive types. + * + * Get a list of archive types supported by this implementation of PhysicFS. + * These are the file formats usable for search path entries. This is for + * informational purposes only. Note that the extension listed is merely + * convention: if we list "ZIP", you can open a PkZip-compatible archive + * with an extension of "XYZ", if you like. + * + * The returned value is an array of pointers to PHYSFS_ArchiveInfo structures, + * with a NULL entry to signify the end of the list: + * + * \code + * PHYSFS_ArchiveInfo **i; + * + * for (i = PHYSFS_supportedArchiveTypes(); *i != NULL; i++) + * { + * printf("Supported archive: [%s], which is [%s].\n", + * (*i)->extension, (*i)->description); + * } + * \endcode + * + * The return values are pointers to internal memory, and should + * be considered READ ONLY, and never freed. The returned values are + * valid until the next call to PHYSFS_deinit(), PHYSFS_registerArchiver(), + * or PHYSFS_deregisterArchiver(). + * + * \return READ ONLY Null-terminated array of READ ONLY structures. + * + * \sa PHYSFS_registerArchiver + * \sa PHYSFS_deregisterArchiver + */ +PHYSFS_DECL const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void); + + +/** + * \fn void PHYSFS_freeList(void *listVar) + * \brief Deallocate resources of lists returned by PhysicsFS. + * + * Certain PhysicsFS functions return lists of information that are + * dynamically allocated. Use this function to free those resources. + * + * It is safe to pass a NULL here, but doing so will cause a crash in versions + * before PhysicsFS 2.1.0. + * + * \param listVar List of information specified as freeable by this function. + * Passing NULL is safe; it is a valid no-op. + * + * \sa PHYSFS_getCdRomDirs + * \sa PHYSFS_enumerateFiles + * \sa PHYSFS_getSearchPath + */ +PHYSFS_DECL void PHYSFS_freeList(void *listVar); + + +/** + * \fn const char *PHYSFS_getLastError(void) + * \brief Get human-readable error information. + * + * \deprecated Use PHYSFS_getLastErrorCode() and PHYSFS_getErrorByCode() instead. + * + * \warning As of PhysicsFS 2.1, this function has been nerfed. + * Before PhysicsFS 2.1, this function was the only way to get + * error details beyond a given function's basic return value. + * This was meant to be a human-readable string in one of several + * languages, and was not useful for application parsing. This was + * a problem, because the developer and not the user chose the + * language at compile time, and the PhysicsFS maintainers had + * to (poorly) maintain a significant amount of localization work. + * The app couldn't parse the strings, even if they counted on a + * specific language, since some were dynamically generated. + * In 2.1 and later, this always returns a static string in + * English; you may use it as a key string for your own + * localizations if you like, as we'll promise not to change + * existing error strings. Also, if your application wants to + * look at specific errors, we now offer a better option: + * use PHYSFS_getLastErrorCode() instead. + * + * Get the last PhysicsFS error message as a human-readable, null-terminated + * string. This will return NULL if there's been no error since the last call + * to this function. The pointer returned by this call points to an internal + * buffer. Each thread has a unique error state associated with it, but each + * time a new error message is set, it will overwrite the previous one + * associated with that thread. It is safe to call this function at anytime, + * even before PHYSFS_init(). + * + * PHYSFS_getLastError() and PHYSFS_getLastErrorCode() both reset the same + * thread-specific error state. Calling one will wipe out the other's + * data. If you need both, call PHYSFS_getLastErrorCode(), then pass that + * value to PHYSFS_getErrorByCode(). + * + * As of PhysicsFS 2.1, this function only presents text in the English + * language, but the strings are static, so you can use them as keys into + * your own localization dictionary. These strings are meant to be passed on + * directly to the user. + * + * Generally, applications should only concern themselves with whether a + * given function failed; however, if your code require more specifics, you + * should use PHYSFS_getLastErrorCode() instead of this function. + * + * \return READ ONLY string of last error message. + * + * \sa PHYSFS_getLastErrorCode + * \sa PHYSFS_getErrorByCode + */ +PHYSFS_DECL const char *PHYSFS_getLastError(void) PHYSFS_DEPRECATED; + + +/** + * \fn const char *PHYSFS_getDirSeparator(void) + * \brief Get platform-dependent dir separator string. + * + * This returns "\\" on win32, "/" on Unix, and ":" on MacOS. It may be more + * than one character, depending on the platform, and your code should take + * that into account. Note that this is only useful for setting up the + * search/write paths, since access into those dirs always use '/' + * (platform-independent notation) to separate directories. This is also + * handy for getting platform-independent access when using stdio calls. + * + * \return READ ONLY null-terminated string of platform's dir separator. + */ +PHYSFS_DECL const char *PHYSFS_getDirSeparator(void); + + +/** + * \fn void PHYSFS_permitSymbolicLinks(int allow) + * \brief Enable or disable following of symbolic links. + * + * Some physical filesystems and archives contain files that are just pointers + * to other files. On the physical filesystem, opening such a link will + * (transparently) open the file that is pointed to. + * + * By default, PhysicsFS will check if a file is really a symlink during open + * calls and fail if it is. Otherwise, the link could take you outside the + * write and search paths, and compromise security. + * + * If you want to take that risk, call this function with a non-zero parameter. + * Note that this is more for sandboxing a program's scripting language, in + * case untrusted scripts try to compromise the system. Generally speaking, + * a user could very well have a legitimate reason to set up a symlink, so + * unless you feel there's a specific danger in allowing them, you should + * permit them. + * + * Symlinks are only explicitly checked when dealing with filenames + * in platform-independent notation. That is, when setting up your + * search and write paths, etc, symlinks are never checked for. + * + * Please note that PHYSFS_stat() will always check the path specified; if + * that path is a symlink, it will not be followed in any case. If symlinks + * aren't permitted through this function, PHYSFS_stat() ignores them, and + * would treat the query as if the path didn't exist at all. + * + * Symbolic link permission can be enabled or disabled at any time after + * you've called PHYSFS_init(), and is disabled by default. + * + * \param allow nonzero to permit symlinks, zero to deny linking. + * + * \sa PHYSFS_symbolicLinksPermitted + */ +PHYSFS_DECL void PHYSFS_permitSymbolicLinks(int allow); + + +/** + * \fn char **PHYSFS_getCdRomDirs(void) + * \brief Get an array of paths to available CD-ROM drives. + * + * The dirs returned are platform-dependent ("D:\" on Win32, "/cdrom" or + * whatnot on Unix). Dirs are only returned if there is a disc ready and + * accessible in the drive. So if you've got two drives (D: and E:), and only + * E: has a disc in it, then that's all you get. If the user inserts a disc + * in D: and you call this function again, you get both drives. If, on a + * Unix box, the user unmounts a disc and remounts it elsewhere, the next + * call to this function will reflect that change. + * + * This function refers to "CD-ROM" media, but it really means "inserted disc + * media," such as DVD-ROM, HD-DVD, CDRW, and Blu-Ray discs. It looks for + * filesystems, and as such won't report an audio CD, unless there's a + * mounted filesystem track on it. + * + * The returned value is an array of strings, with a NULL entry to signify the + * end of the list: + * + * \code + * char **cds = PHYSFS_getCdRomDirs(); + * char **i; + * + * for (i = cds; *i != NULL; i++) + * printf("cdrom dir [%s] is available.\n", *i); + * + * PHYSFS_freeList(cds); + * \endcode + * + * This call may block while drives spin up. Be forewarned. + * + * When you are done with the returned information, you may dispose of the + * resources by calling PHYSFS_freeList() with the returned pointer. + * + * \return Null-terminated array of null-terminated strings. + * + * \sa PHYSFS_getCdRomDirsCallback + */ +PHYSFS_DECL char **PHYSFS_getCdRomDirs(void); + + +/** + * \fn const char *PHYSFS_getBaseDir(void) + * \brief Get the path where the application resides. + * + * Helper function. + * + * Get the "base dir". This is the directory where the application was run + * from, which is probably the installation directory, and may or may not + * be the process's current working directory. + * + * You should probably use the base dir in your search path. + * + * \return READ ONLY string of base dir in platform-dependent notation. + * + * \sa PHYSFS_getPrefDir + */ +PHYSFS_DECL const char *PHYSFS_getBaseDir(void); + + +/** + * \fn const char *PHYSFS_getUserDir(void) + * \brief Get the path where user's home directory resides. + * + * \deprecated As of PhysicsFS 2.1, you probably want PHYSFS_getPrefDir(). + * + * Helper function. + * + * Get the "user dir". This is meant to be a suggestion of where a specific + * user of the system can store files. On Unix, this is her home directory. + * On systems with no concept of multiple home directories (MacOS, win95), + * this will default to something like "C:\mybasedir\users\username" + * where "username" will either be the login name, or "default" if the + * platform doesn't support multiple users, either. + * + * \return READ ONLY string of user dir in platform-dependent notation. + * + * \sa PHYSFS_getBaseDir + * \sa PHYSFS_getPrefDir + */ +PHYSFS_DECL const char *PHYSFS_getUserDir(void) PHYSFS_DEPRECATED; + + +/** + * \fn const char *PHYSFS_getWriteDir(void) + * \brief Get path where PhysicsFS will allow file writing. + * + * Get the current write dir. The default write dir is NULL. + * + * \return READ ONLY string of write dir in platform-dependent notation, + * OR NULL IF NO WRITE PATH IS CURRENTLY SET. + * + * \sa PHYSFS_setWriteDir + */ +PHYSFS_DECL const char *PHYSFS_getWriteDir(void); + + +/** + * \fn int PHYSFS_setWriteDir(const char *newDir) + * \brief Tell PhysicsFS where it may write files. + * + * Set a new write dir. This will override the previous setting. + * + * This call will fail (and fail to change the write dir) if the current + * write dir still has files open in it. + * + * \param newDir The new directory to be the root of the write dir, + * specified in platform-dependent notation. Setting to NULL + * disables the write dir, so no files can be opened for + * writing via PhysicsFS. + * \return non-zero on success, zero on failure. All attempts to open a file + * for writing via PhysicsFS will fail until this call succeeds. + * Use PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_getWriteDir + */ +PHYSFS_DECL int PHYSFS_setWriteDir(const char *newDir); + + +/** + * \fn int PHYSFS_addToSearchPath(const char *newDir, int appendToPath) + * \brief Add an archive or directory to the search path. + * + * \deprecated As of PhysicsFS 2.0, use PHYSFS_mount() instead. This + * function just wraps it anyhow. + * + * This function is equivalent to: + * + * \code + * PHYSFS_mount(newDir, NULL, appendToPath); + * \endcode + * + * You must use this and not PHYSFS_mount if binary compatibility with + * PhysicsFS 1.0 is important (which it may not be for many people). + * + * \sa PHYSFS_mount + * \sa PHYSFS_removeFromSearchPath + * \sa PHYSFS_getSearchPath + */ +PHYSFS_DECL int PHYSFS_addToSearchPath(const char *newDir, int appendToPath) + PHYSFS_DEPRECATED; + +/** + * \fn int PHYSFS_removeFromSearchPath(const char *oldDir) + * \brief Remove a directory or archive from the search path. + * + * \deprecated As of PhysicsFS 2.1, use PHYSFS_unmount() instead. This + * function just wraps it anyhow. There's no functional difference + * except the vocabulary changed from "adding to the search path" + * to "mounting" when that functionality was extended, and thus + * the preferred way to accomplish this function's work is now + * called "unmounting." + * + * This function is equivalent to: + * + * \code + * PHYSFS_unmount(oldDir); + * \endcode + * + * You must use this and not PHYSFS_unmount if binary compatibility with + * PhysicsFS 1.0 is important (which it may not be for many people). + * + * \sa PHYSFS_addToSearchPath + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_unmount + */ +PHYSFS_DECL int PHYSFS_removeFromSearchPath(const char *oldDir) + PHYSFS_DEPRECATED; + + +/** + * \fn char **PHYSFS_getSearchPath(void) + * \brief Get the current search path. + * + * The default search path is an empty list. + * + * The returned value is an array of strings, with a NULL entry to signify the + * end of the list: + * + * \code + * char **i; + * + * for (i = PHYSFS_getSearchPath(); *i != NULL; i++) + * printf("[%s] is in the search path.\n", *i); + * \endcode + * + * When you are done with the returned information, you may dispose of the + * resources by calling PHYSFS_freeList() with the returned pointer. + * + * \return Null-terminated array of null-terminated strings. NULL if there + * was a problem (read: OUT OF MEMORY). + * + * \sa PHYSFS_getSearchPathCallback + * \sa PHYSFS_addToSearchPath + * \sa PHYSFS_removeFromSearchPath + */ +PHYSFS_DECL char **PHYSFS_getSearchPath(void); + + +/** + * \fn int PHYSFS_setSaneConfig(const char *organization, const char *appName, const char *archiveExt, int includeCdRoms, int archivesFirst) + * \brief Set up sane, default paths. + * + * Helper function. + * + * The write dir will be set to the pref dir returned by + * \code PHYSFS_getPrefDir(organization, appName) \endcode, which is + * created if it doesn't exist. + * + * The above is sufficient to make sure your program's configuration directory + * is separated from other clutter, and platform-independent. + * + * The search path will be: + * + * - The Write Dir (created if it doesn't exist) + * - The Base Dir (PHYSFS_getBaseDir()) + * - All found CD-ROM dirs (optionally) + * + * These directories are then searched for files ending with the extension + * (archiveExt), which, if they are valid and supported archives, will also + * be added to the search path. If you specified "PKG" for (archiveExt), and + * there's a file named data.PKG in the base dir, it'll be checked. Archives + * can either be appended or prepended to the search path in alphabetical + * order, regardless of which directories they were found in. All archives + * are mounted in the root of the virtual file system ("/"). + * + * All of this can be accomplished from the application, but this just does it + * all for you. Feel free to add more to the search path manually, too. + * + * \param organization Name of your company/group/etc to be used as a + * dirname, so keep it small, and no-frills. + * + * \param appName Program-specific name of your program, to separate it + * from other programs using PhysicsFS. + * + * \param archiveExt File extension used by your program to specify an + * archive. For example, Quake 3 uses "pk3", even though + * they are just zipfiles. Specify NULL to not dig out + * archives automatically. Do not specify the '.' char; + * If you want to look for ZIP files, specify "ZIP" and + * not ".ZIP" ... the archive search is case-insensitive. + * + * \param includeCdRoms Non-zero to include CD-ROMs in the search path, and + * (if (archiveExt) != NULL) search them for archives. + * This may cause a significant amount of blocking + * while discs are accessed, and if there are no discs + * in the drive (or even not mounted on Unix systems), + * then they may not be made available anyhow. You may + * want to specify zero and handle the disc setup + * yourself. + * + * \param archivesFirst Non-zero to prepend the archives to the search path. + * Zero to append them. Ignored if !(archiveExt). + * + * \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() + * to obtain the specific error. + */ +PHYSFS_DECL int PHYSFS_setSaneConfig(const char *organization, + const char *appName, + const char *archiveExt, + int includeCdRoms, + int archivesFirst); + + +/* Directory management stuff ... */ + +/** + * \fn int PHYSFS_mkdir(const char *dirName) + * \brief Create a directory. + * + * This is specified in platform-independent notation in relation to the + * write dir. All missing parent directories are also created if they + * don't exist. + * + * So if you've got the write dir set to "C:\mygame\writedir" and call + * PHYSFS_mkdir("downloads/maps") then the directories + * "C:\mygame\writedir\downloads" and "C:\mygame\writedir\downloads\maps" + * will be created if possible. If the creation of "maps" fails after we + * have successfully created "downloads", then the function leaves the + * created directory behind and reports failure. + * + * \param dirName New dir to create. + * \return nonzero on success, zero on error. Use + * PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_delete + */ +PHYSFS_DECL int PHYSFS_mkdir(const char *dirName); + + +/** + * \fn int PHYSFS_delete(const char *filename) + * \brief Delete a file or directory. + * + * (filename) is specified in platform-independent notation in relation to the + * write dir. + * + * A directory must be empty before this call can delete it. + * + * Deleting a symlink will remove the link, not what it points to, regardless + * of whether you "permitSymLinks" or not. + * + * So if you've got the write dir set to "C:\mygame\writedir" and call + * PHYSFS_delete("downloads/maps/level1.map") then the file + * "C:\mygame\writedir\downloads\maps\level1.map" is removed from the + * physical filesystem, if it exists and the operating system permits the + * deletion. + * + * Note that on Unix systems, deleting a file may be successful, but the + * actual file won't be removed until all processes that have an open + * filehandle to it (including your program) close their handles. + * + * Chances are, the bits that make up the file still exist, they are just + * made available to be written over at a later point. Don't consider this + * a security method or anything. :) + * + * \param filename Filename to delete. + * \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() + * to obtain the specific error. + */ +PHYSFS_DECL int PHYSFS_delete(const char *filename); + + +/** + * \fn const char *PHYSFS_getRealDir(const char *filename) + * \brief Figure out where in the search path a file resides. + * + * The file is specified in platform-independent notation. The returned + * filename will be the element of the search path where the file was found, + * which may be a directory, or an archive. Even if there are multiple + * matches in different parts of the search path, only the first one found + * is used, just like when opening a file. + * + * So, if you look for "maps/level1.map", and C:\\mygame is in your search + * path and C:\\mygame\\maps\\level1.map exists, then "C:\mygame" is returned. + * + * If a any part of a match is a symbolic link, and you've not explicitly + * permitted symlinks, then it will be ignored, and the search for a match + * will continue. + * + * If you specify a fake directory that only exists as a mount point, it'll + * be associated with the first archive mounted there, even though that + * directory isn't necessarily contained in a real archive. + * + * \warning This will return NULL if there is no real directory associated + * with (filename). Specifically, PHYSFS_mountIo(), + * PHYSFS_mountMemory(), and PHYSFS_mountHandle() will return NULL + * even if the filename is found in the search path. Plan accordingly. + * + * \param filename file to look for. + * \return READ ONLY string of element of search path containing the + * the file in question. NULL if not found. + */ +PHYSFS_DECL const char *PHYSFS_getRealDir(const char *filename); + + +/** + * \fn char **PHYSFS_enumerateFiles(const char *dir) + * \brief Get a file listing of a search path's directory. + * + * \warning In PhysicsFS versions prior to 2.1, this function would return + * as many items as it could in the face of a failure condition + * (out of memory, disk i/o error, etc). Since this meant apps + * couldn't distinguish between complete success and partial failure, + * and since the function could always return NULL to report + * catastrophic failures anyway, in PhysicsFS 2.1 this function's + * policy changed: it will either return a list of complete results + * or it will return NULL for any failure of any kind, so we can + * guarantee that the enumeration ran to completion and has no gaps + * in its results. + * + * Matching directories are interpolated. That is, if "C:\mydir" is in the + * search path and contains a directory "savegames" that contains "x.sav", + * "y.sav", and "z.sav", and there is also a "C:\userdir" in the search path + * that has a "savegames" subdirectory with "w.sav", then the following code: + * + * \code + * char **rc = PHYSFS_enumerateFiles("savegames"); + * char **i; + * + * for (i = rc; *i != NULL; i++) + * printf(" * We've got [%s].\n", *i); + * + * PHYSFS_freeList(rc); + * \endcode + * + * \...will print: + * + * \verbatim + * We've got [x.sav]. + * We've got [y.sav]. + * We've got [z.sav]. + * We've got [w.sav].\endverbatim + * + * Feel free to sort the list however you like. However, the returned data + * will always contain no duplicates, and will be always sorted in alphabetic + * (rather: case-sensitive Unicode) order for you. + * + * Don't forget to call PHYSFS_freeList() with the return value from this + * function when you are done with it. + * + * \param dir directory in platform-independent notation to enumerate. + * \return Null-terminated array of null-terminated strings, or NULL for + * failure cases. + * + * \sa PHYSFS_enumerate + */ +PHYSFS_DECL char **PHYSFS_enumerateFiles(const char *dir); + + +/** + * \fn int PHYSFS_exists(const char *fname) + * \brief Determine if a file exists in the search path. + * + * Reports true if there is an entry anywhere in the search path by the + * name of (fname). + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, so you + * might end up further down in the search path than expected. + * + * \param fname filename in platform-independent notation. + * \return non-zero if filename exists. zero otherwise. + */ +PHYSFS_DECL int PHYSFS_exists(const char *fname); + + +/** + * \fn int PHYSFS_isDirectory(const char *fname) + * \brief Determine if a file in the search path is really a directory. + * + * \deprecated As of PhysicsFS 2.1, use PHYSFS_stat() instead. This + * function just wraps it anyhow. + * + * Determine if the first occurence of (fname) in the search path is + * really a directory entry. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, so you + * might end up further down in the search path than expected. + * + * \param fname filename in platform-independent notation. + * \return non-zero if filename exists and is a directory. zero otherwise. + * + * \sa PHYSFS_stat + * \sa PHYSFS_exists + */ +PHYSFS_DECL int PHYSFS_isDirectory(const char *fname) PHYSFS_DEPRECATED; + + +/** + * \fn int PHYSFS_isSymbolicLink(const char *fname) + * \brief Determine if a file in the search path is really a symbolic link. + * + * \deprecated As of PhysicsFS 2.1, use PHYSFS_stat() instead. This + * function just wraps it anyhow. + * + * Determine if the first occurence of (fname) in the search path is + * really a symbolic link. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, and as such, + * this function will always return 0 in that case. + * + * \param fname filename in platform-independent notation. + * \return non-zero if filename exists and is a symlink. zero otherwise. + * + * \sa PHYSFS_stat + * \sa PHYSFS_exists + */ +PHYSFS_DECL int PHYSFS_isSymbolicLink(const char *fname) PHYSFS_DEPRECATED; + + +/** + * \fn PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename) + * \brief Get the last modification time of a file. + * + * \deprecated As of PhysicsFS 2.1, use PHYSFS_stat() instead. This + * function just wraps it anyhow. + * + * The modtime is returned as a number of seconds since the Unix epoch + * (midnight, Jan 1, 1970). The exact derivation and accuracy of this time + * depends on the particular archiver. If there is no reasonable way to + * obtain this information for a particular archiver, or there was some sort + * of error, this function returns (-1). + * + * You must use this and not PHYSFS_stat() if binary compatibility with + * PhysicsFS 2.0 is important (which it may not be for many people). + * + * \param filename filename to check, in platform-independent notation. + * \return last modified time of the file. -1 if it can't be determined. + * + * \sa PHYSFS_stat + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename) + PHYSFS_DEPRECATED; + + +/* i/o stuff... */ + +/** + * \fn PHYSFS_File *PHYSFS_openWrite(const char *filename) + * \brief Open a file for writing. + * + * Open a file for writing, in platform-independent notation and in relation + * to the write dir as the root of the writable filesystem. The specified + * file is created if it doesn't exist. If it does exist, it is truncated to + * zero bytes, and the writing offset is set to the start. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a + * symlink with this function will fail in such a case. + * + * \param filename File to open. + * \return A valid PhysicsFS filehandle on success, NULL on error. Use + * PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_openRead + * \sa PHYSFS_openAppend + * \sa PHYSFS_write + * \sa PHYSFS_close + */ +PHYSFS_DECL PHYSFS_File *PHYSFS_openWrite(const char *filename); + + +/** + * \fn PHYSFS_File *PHYSFS_openAppend(const char *filename) + * \brief Open a file for appending. + * + * Open a file for writing, in platform-independent notation and in relation + * to the write dir as the root of the writable filesystem. The specified + * file is created if it doesn't exist. If it does exist, the writing offset + * is set to the end of the file, so the first write will be the byte after + * the end. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a + * symlink with this function will fail in such a case. + * + * \param filename File to open. + * \return A valid PhysicsFS filehandle on success, NULL on error. Use + * PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_openRead + * \sa PHYSFS_openWrite + * \sa PHYSFS_write + * \sa PHYSFS_close + */ +PHYSFS_DECL PHYSFS_File *PHYSFS_openAppend(const char *filename); + + +/** + * \fn PHYSFS_File *PHYSFS_openRead(const char *filename) + * \brief Open a file for reading. + * + * Open a file for reading, in platform-independent notation. The search path + * is checked one at a time until a matching file is found, in which case an + * abstract filehandle is associated with it, and reading may be done. + * The reading offset is set to the first byte of the file. + * + * Note that entries that are symlinks are ignored if + * PHYSFS_permitSymbolicLinks(1) hasn't been called, and opening a + * symlink with this function will fail in such a case. + * + * \param filename File to open. + * \return A valid PhysicsFS filehandle on success, NULL on error. + * Use PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_openWrite + * \sa PHYSFS_openAppend + * \sa PHYSFS_read + * \sa PHYSFS_close + */ +PHYSFS_DECL PHYSFS_File *PHYSFS_openRead(const char *filename); + + +/** + * \fn int PHYSFS_close(PHYSFS_File *handle) + * \brief Close a PhysicsFS filehandle. + * + * This call is capable of failing if the operating system was buffering + * writes to the physical media, and, now forced to write those changes to + * physical media, can not store the data for some reason. In such a case, + * the filehandle stays open. A well-written program should ALWAYS check the + * return value from the close call in addition to every writing call! + * + * \param handle handle returned from PHYSFS_open*(). + * \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() + * to obtain the specific error. + * + * \sa PHYSFS_openRead + * \sa PHYSFS_openWrite + * \sa PHYSFS_openAppend + */ +PHYSFS_DECL int PHYSFS_close(PHYSFS_File *handle); + + +/** + * \fn PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) + * \brief Read data from a PhysicsFS filehandle + * + * The file must be opened for reading. + * + * \deprecated As of PhysicsFS 2.1, use PHYSFS_readBytes() instead. This + * function just wraps it anyhow. This function never clarified + * what would happen if you managed to read a partial object, so + * working at the byte level makes this cleaner for everyone, + * especially now that PHYSFS_Io interfaces can be supplied by the + * application. + * + * \param handle handle returned from PHYSFS_openRead(). + * \param buffer buffer to store read data into. + * \param objSize size in bytes of objects being read from (handle). + * \param objCount number of (objSize) objects to read from (handle). + * \return number of objects read. PHYSFS_getLastErrorCode() can shed light + * on the reason this might be < (objCount), as can PHYSFS_eof(). + * -1 if complete failure. + * + * \sa PHYSFS_readBytes + * \sa PHYSFS_eof + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, + void *buffer, + PHYSFS_uint32 objSize, + PHYSFS_uint32 objCount) + PHYSFS_DEPRECATED; + +/** + * \fn PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) + * \brief Write data to a PhysicsFS filehandle + * + * The file must be opened for writing. + * + * \deprecated As of PhysicsFS 2.1, use PHYSFS_writeBytes() instead. This + * function just wraps it anyhow. This function never clarified + * what would happen if you managed to write a partial object, so + * working at the byte level makes this cleaner for everyone, + * especially now that PHYSFS_Io interfaces can be supplied by the + * application. + * + * \param handle retval from PHYSFS_openWrite() or PHYSFS_openAppend(). + * \param buffer buffer of bytes to write to (handle). + * \param objSize size in bytes of objects being written to (handle). + * \param objCount number of (objSize) objects to write to (handle). + * \return number of objects written. PHYSFS_getLastErrorCode() can shed + * light on the reason this might be < (objCount). -1 if complete + * failure. + * + * \sa PHYSFS_writeBytes + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, + const void *buffer, + PHYSFS_uint32 objSize, + PHYSFS_uint32 objCount) + PHYSFS_DEPRECATED; + + +/* File position stuff... */ + +/** + * \fn int PHYSFS_eof(PHYSFS_File *handle) + * \brief Check for end-of-file state on a PhysicsFS filehandle. + * + * Determine if the end of file has been reached in a PhysicsFS filehandle. + * + * \param handle handle returned from PHYSFS_openRead(). + * \return nonzero if EOF, zero if not. + * + * \sa PHYSFS_read + * \sa PHYSFS_tell + */ +PHYSFS_DECL int PHYSFS_eof(PHYSFS_File *handle); + + +/** + * \fn PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle) + * \brief Determine current position within a PhysicsFS filehandle. + * + * \param handle handle returned from PHYSFS_open*(). + * \return offset in bytes from start of file. -1 if error occurred. + * Use PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_seek + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle); + + +/** + * \fn int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos) + * \brief Seek to a new position within a PhysicsFS filehandle. + * + * The next read or write will occur at that place. Seeking past the + * beginning or end of the file is not allowed, and causes an error. + * + * \param handle handle returned from PHYSFS_open*(). + * \param pos number of bytes from start of file to seek to. + * \return nonzero on success, zero on error. Use PHYSFS_getLastErrorCode() + * to obtain the specific error. + * + * \sa PHYSFS_tell + */ +PHYSFS_DECL int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos); + + +/** + * \fn PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle) + * \brief Get total length of a file in bytes. + * + * Note that if another process/thread is writing to this file at the same + * time, then the information this function supplies could be incorrect + * before you get it. Use with caution, or better yet, don't use at all. + * + * \param handle handle returned from PHYSFS_open*(). + * \return size in bytes of the file. -1 if can't be determined. + * + * \sa PHYSFS_tell + * \sa PHYSFS_seek + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle); + + +/* Buffering stuff... */ + +/** + * \fn int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize) + * \brief Set up buffering for a PhysicsFS file handle. + * + * Define an i/o buffer for a file handle. A memory block of (bufsize) bytes + * will be allocated and associated with (handle). + * + * For files opened for reading, up to (bufsize) bytes are read from (handle) + * and stored in the internal buffer. Calls to PHYSFS_read() will pull + * from this buffer until it is empty, and then refill it for more reading. + * Note that compressed files, like ZIP archives, will decompress while + * buffering, so this can be handy for offsetting CPU-intensive operations. + * The buffer isn't filled until you do your next read. + * + * For files opened for writing, data will be buffered to memory until the + * buffer is full or the buffer is flushed. Closing a handle implicitly + * causes a flush...check your return values! + * + * Seeking, etc transparently accounts for buffering. + * + * You can resize an existing buffer by calling this function more than once + * on the same file. Setting the buffer size to zero will free an existing + * buffer. + * + * PhysicsFS file handles are unbuffered by default. + * + * Please check the return value of this function! Failures can include + * not being able to seek backwards in a read-only file when removing the + * buffer, not being able to allocate the buffer, and not being able to + * flush the buffer to disk, among other unexpected problems. + * + * \param handle handle returned from PHYSFS_open*(). + * \param bufsize size, in bytes, of buffer to allocate. + * \return nonzero if successful, zero on error. + * + * \sa PHYSFS_flush + * \sa PHYSFS_read + * \sa PHYSFS_write + * \sa PHYSFS_close + */ +PHYSFS_DECL int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize); + + +/** + * \fn int PHYSFS_flush(PHYSFS_File *handle) + * \brief Flush a buffered PhysicsFS file handle. + * + * For buffered files opened for writing, this will put the current contents + * of the buffer to disk and flag the buffer as empty if possible. + * + * For buffered files opened for reading or unbuffered files, this is a safe + * no-op, and will report success. + * + * \param handle handle returned from PHYSFS_open*(). + * \return nonzero if successful, zero on error. + * + * \sa PHYSFS_setBuffer + * \sa PHYSFS_close + */ +PHYSFS_DECL int PHYSFS_flush(PHYSFS_File *handle); + + +/* Byteorder stuff... */ + +/** + * \fn PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val) + * \brief Swap littleendian signed 16 to platform's native byte order. + * + * Take a 16-bit signed value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +PHYSFS_DECL PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val); + + +/** + * \fn PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val) + * \brief Swap littleendian unsigned 16 to platform's native byte order. + * + * Take a 16-bit unsigned value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +PHYSFS_DECL PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val); + +/** + * \fn PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val) + * \brief Swap littleendian signed 32 to platform's native byte order. + * + * Take a 32-bit signed value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +PHYSFS_DECL PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val); + + +/** + * \fn PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val) + * \brief Swap littleendian unsigned 32 to platform's native byte order. + * + * Take a 32-bit unsigned value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +PHYSFS_DECL PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val); + +/** + * \fn PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val) + * \brief Swap littleendian signed 64 to platform's native byte order. + * + * Take a 64-bit signed value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + * + * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val); + + +/** + * \fn PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val) + * \brief Swap littleendian unsigned 64 to platform's native byte order. + * + * Take a 64-bit unsigned value in littleendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val); + + +/** + * \fn PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val) + * \brief Swap bigendian signed 16 to platform's native byte order. + * + * Take a 16-bit signed value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +PHYSFS_DECL PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val); + + +/** + * \fn PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val) + * \brief Swap bigendian unsigned 16 to platform's native byte order. + * + * Take a 16-bit unsigned value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +PHYSFS_DECL PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val); + +/** + * \fn PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val) + * \brief Swap bigendian signed 32 to platform's native byte order. + * + * Take a 32-bit signed value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +PHYSFS_DECL PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val); + + +/** + * \fn PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val) + * \brief Swap bigendian unsigned 32 to platform's native byte order. + * + * Take a 32-bit unsigned value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + */ +PHYSFS_DECL PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val); + + +/** + * \fn PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val) + * \brief Swap bigendian signed 64 to platform's native byte order. + * + * Take a 64-bit signed value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + * + * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val); + + +/** + * \fn PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val) + * \brief Swap bigendian unsigned 64 to platform's native byte order. + * + * Take a 64-bit unsigned value in bigendian format and convert it to + * the platform's native byte order. + * + * \param val value to convert + * \return converted value. + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val); + + +/** + * \fn int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val) + * \brief Read and convert a signed 16-bit littleendian value. + * + * Convenience function. Read a signed 16-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val); + + +/** + * \fn int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val) + * \brief Read and convert an unsigned 16-bit littleendian value. + * + * Convenience function. Read an unsigned 16-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + * + */ +PHYSFS_DECL int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val); + + +/** + * \fn int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val) + * \brief Read and convert a signed 16-bit bigendian value. + * + * Convenience function. Read a signed 16-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val); + + +/** + * \fn int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val) + * \brief Read and convert an unsigned 16-bit bigendian value. + * + * Convenience function. Read an unsigned 16-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + * + */ +PHYSFS_DECL int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val); + + +/** + * \fn int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val) + * \brief Read and convert a signed 32-bit littleendian value. + * + * Convenience function. Read a signed 32-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val); + + +/** + * \fn int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val) + * \brief Read and convert an unsigned 32-bit littleendian value. + * + * Convenience function. Read an unsigned 32-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + * + */ +PHYSFS_DECL int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val); + + +/** + * \fn int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val) + * \brief Read and convert a signed 32-bit bigendian value. + * + * Convenience function. Read a signed 32-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val); + + +/** + * \fn int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val) + * \brief Read and convert an unsigned 32-bit bigendian value. + * + * Convenience function. Read an unsigned 32-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + * + */ +PHYSFS_DECL int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val); + + +/** + * \fn int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val) + * \brief Read and convert a signed 64-bit littleendian value. + * + * Convenience function. Read a signed 64-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + * + * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val); + + +/** + * \fn int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val) + * \brief Read and convert an unsigned 64-bit littleendian value. + * + * Convenience function. Read an unsigned 64-bit littleendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val); + + +/** + * \fn int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val) + * \brief Read and convert a signed 64-bit bigendian value. + * + * Convenience function. Read a signed 64-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + * + * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val); + + +/** + * \fn int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val) + * \brief Read and convert an unsigned 64-bit bigendian value. + * + * Convenience function. Read an unsigned 64-bit bigendian value from a + * file and convert it to the platform's native byte order. + * + * \param file PhysicsFS file handle from which to read. + * \param val pointer to where value should be stored. + * \return zero on failure, non-zero on success. If successful, (*val) will + * store the result. On failure, you can find out what went wrong + * from PHYSFS_getLastErrorCode(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val); + + +/** + * \fn int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val) + * \brief Convert and write a signed 16-bit littleendian value. + * + * Convenience function. Convert a signed 16-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val); + + +/** + * \fn int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val) + * \brief Convert and write an unsigned 16-bit littleendian value. + * + * Convenience function. Convert an unsigned 16-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val); + + +/** + * \fn int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val) + * \brief Convert and write a signed 16-bit bigendian value. + * + * Convenience function. Convert a signed 16-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val); + + +/** + * \fn int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val) + * \brief Convert and write an unsigned 16-bit bigendian value. + * + * Convenience function. Convert an unsigned 16-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val); + + +/** + * \fn int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val) + * \brief Convert and write a signed 32-bit littleendian value. + * + * Convenience function. Convert a signed 32-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val); + + +/** + * \fn int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val) + * \brief Convert and write an unsigned 32-bit littleendian value. + * + * Convenience function. Convert an unsigned 32-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val); + + +/** + * \fn int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val) + * \brief Convert and write a signed 32-bit bigendian value. + * + * Convenience function. Convert a signed 32-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val); + + +/** + * \fn int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val) + * \brief Convert and write an unsigned 32-bit bigendian value. + * + * Convenience function. Convert an unsigned 32-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + */ +PHYSFS_DECL int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val); + + +/** + * \fn int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val) + * \brief Convert and write a signed 64-bit littleendian value. + * + * Convenience function. Convert a signed 64-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + * + * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val); + + +/** + * \fn int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val) + * \brief Convert and write an unsigned 64-bit littleendian value. + * + * Convenience function. Convert an unsigned 64-bit value from the platform's + * native byte order to littleendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val); + + +/** + * \fn int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val) + * \brief Convert and write a signed 64-bit bigending value. + * + * Convenience function. Convert a signed 64-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + * + * \warning Remember, PHYSFS_sint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val); + + +/** + * \fn int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val) + * \brief Convert and write an unsigned 64-bit bigendian value. + * + * Convenience function. Convert an unsigned 64-bit value from the platform's + * native byte order to bigendian and write it to a file. + * + * \param file PhysicsFS file handle to which to write. + * \param val Value to convert and write. + * \return zero on failure, non-zero on success. On failure, you can + * find out what went wrong from PHYSFS_getLastErrorCode(). + * + * \warning Remember, PHYSFS_uint64 is only 32 bits on platforms without + * any sort of 64-bit support. + */ +PHYSFS_DECL int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val); + + +/* Everything above this line is part of the PhysicsFS 1.0 API. */ + +/** + * \fn int PHYSFS_isInit(void) + * \brief Determine if the PhysicsFS library is initialized. + * + * Once PHYSFS_init() returns successfully, this will return non-zero. + * Before a successful PHYSFS_init() and after PHYSFS_deinit() returns + * successfully, this will return zero. This function is safe to call at + * any time. + * + * \return non-zero if library is initialized, zero if library is not. + * + * \sa PHYSFS_init + * \sa PHYSFS_deinit + */ +PHYSFS_DECL int PHYSFS_isInit(void); + + +/** + * \fn int PHYSFS_symbolicLinksPermitted(void) + * \brief Determine if the symbolic links are permitted. + * + * This reports the setting from the last call to PHYSFS_permitSymbolicLinks(). + * If PHYSFS_permitSymbolicLinks() hasn't been called since the library was + * last initialized, symbolic links are implicitly disabled. + * + * \return non-zero if symlinks are permitted, zero if not. + * + * \sa PHYSFS_permitSymbolicLinks + */ +PHYSFS_DECL int PHYSFS_symbolicLinksPermitted(void); + + +/** + * \struct PHYSFS_Allocator + * \brief PhysicsFS allocation function pointers. + * + * (This is for limited, hardcore use. If you don't immediately see a need + * for it, you can probably ignore this forever.) + * + * You create one of these structures for use with PHYSFS_setAllocator. + * Allocators are assumed to be reentrant by the caller; please mutex + * accordingly. + * + * Allocations are always discussed in 64-bits, for future expansion...we're + * on the cusp of a 64-bit transition, and we'll probably be allocating 6 + * gigabytes like it's nothing sooner or later, and I don't want to change + * this again at that point. If you're on a 32-bit platform and have to + * downcast, it's okay to return NULL if the allocation is greater than + * 4 gigabytes, since you'd have to do so anyhow. + * + * \sa PHYSFS_setAllocator + */ +typedef struct PHYSFS_Allocator +{ + int (*Init)(void); /**< Initialize. Can be NULL. Zero on failure. */ + void (*Deinit)(void); /**< Deinitialize your allocator. Can be NULL. */ + void *(*Malloc)(PHYSFS_uint64); /**< Allocate like malloc(). */ + void *(*Realloc)(void *, PHYSFS_uint64); /**< Reallocate like realloc(). */ + void (*Free)(void *); /**< Free memory from Malloc or Realloc. */ +} PHYSFS_Allocator; + + +/** + * \fn int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator) + * \brief Hook your own allocation routines into PhysicsFS. + * + * (This is for limited, hardcore use. If you don't immediately see a need + * for it, you can probably ignore this forever.) + * + * By default, PhysicsFS will use whatever is reasonable for a platform + * to manage dynamic memory (usually ANSI C malloc/realloc/free, but + * some platforms might use something else), but in some uncommon cases, the + * app might want more control over the library's memory management. This + * lets you redirect PhysicsFS to use your own allocation routines instead. + * You can only call this function before PHYSFS_init(); if the library is + * initialized, it'll reject your efforts to change the allocator mid-stream. + * You may call this function after PHYSFS_deinit() if you are willing to + * shut down the library and restart it with a new allocator; this is a safe + * and supported operation. The allocator remains intact between deinit/init + * calls. If you want to return to the platform's default allocator, pass a + * NULL in here. + * + * If you aren't immediately sure what to do with this function, you can + * safely ignore it altogether. + * + * \param allocator Structure containing your allocator's entry points. + * \return zero on failure, non-zero on success. This call only fails + * when used between PHYSFS_init() and PHYSFS_deinit() calls. + */ +PHYSFS_DECL int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator); + + +/** + * \fn int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath) + * \brief Add an archive or directory to the search path. + * + * If this is a duplicate, the entry is not added again, even though the + * function succeeds. You may not add the same archive to two different + * mountpoints: duplicate checking is done against the archive and not the + * mountpoint. + * + * When you mount an archive, it is added to a virtual file system...all files + * in all of the archives are interpolated into a single hierachical file + * tree. Two archives mounted at the same place (or an archive with files + * overlapping another mountpoint) may have overlapping files: in such a case, + * the file earliest in the search path is selected, and the other files are + * inaccessible to the application. This allows archives to be used to + * override previous revisions; you can use the mounting mechanism to place + * archives at a specific point in the file tree and prevent overlap; this + * is useful for downloadable mods that might trample over application data + * or each other, for example. + * + * The mountpoint does not need to exist prior to mounting, which is different + * than those familiar with the Unix concept of "mounting" may expect. + * As well, more than one archive can be mounted to the same mountpoint, or + * mountpoints and archive contents can overlap...the interpolation mechanism + * still functions as usual. + * + * Specifying a symbolic link to an archive or directory is allowed here, + * regardless of the state of PHYSFS_permitSymbolicLinks(). That function + * only deals with symlinks inside the mounted directory or archive. + * + * \param newDir directory or archive to add to the path, in + * platform-dependent notation. + * \param mountPoint Location in the interpolated tree that this archive + * will be "mounted", in platform-independent notation. + * NULL or "" is equivalent to "/". + * \param appendToPath nonzero to append to search path, zero to prepend. + * \return nonzero if added to path, zero on failure (bogus archive, dir + * missing, etc). Use PHYSFS_getLastErrorCode() to obtain + * the specific error. + * + * \sa PHYSFS_removeFromSearchPath + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_getMountPoint + * \sa PHYSFS_mountIo + */ +PHYSFS_DECL int PHYSFS_mount(const char *newDir, + const char *mountPoint, + int appendToPath); + +/** + * \fn int PHYSFS_getMountPoint(const char *dir) + * \brief Determine a mounted archive's mountpoint. + * + * You give this function the name of an archive or dir you successfully + * added to the search path, and it reports the location in the interpolated + * tree where it is mounted. Files mounted with a NULL mountpoint or through + * PHYSFS_addToSearchPath() will report "/". The return value is READ ONLY + * and valid until the archive is removed from the search path. + * + * \param dir directory or archive previously added to the path, in + * platform-dependent notation. This must match the string + * used when adding, even if your string would also reference + * the same file with a different string of characters. + * \return READ-ONLY string of mount point if added to path, NULL on failure + * (bogus archive, etc). Use PHYSFS_getLastErrorCode() to obtain the + * specific error. + * + * \sa PHYSFS_removeFromSearchPath + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_getMountPoint + */ +PHYSFS_DECL const char *PHYSFS_getMountPoint(const char *dir); + + +/** + * \typedef PHYSFS_StringCallback + * \brief Function signature for callbacks that report strings. + * + * These are used to report a list of strings to an original caller, one + * string per callback. All strings are UTF-8 encoded. Functions should not + * try to modify or free the string's memory. + * + * These callbacks are used, starting in PhysicsFS 1.1, as an alternative to + * functions that would return lists that need to be cleaned up with + * PHYSFS_freeList(). The callback means that the library doesn't need to + * allocate an entire list and all the strings up front. + * + * Be aware that promises data ordering in the list versions are not + * necessarily so in the callback versions. Check the documentation on + * specific APIs, but strings may not be sorted as you expect. + * + * \param data User-defined data pointer, passed through from the API + * that eventually called the callback. + * \param str The string data about which the callback is meant to inform. + * + * \sa PHYSFS_getCdRomDirsCallback + * \sa PHYSFS_getSearchPathCallback + */ +typedef void (*PHYSFS_StringCallback)(void *data, const char *str); + + +/** + * \typedef PHYSFS_EnumFilesCallback + * \brief Function signature for callbacks that enumerate files. + * + * \warning As of PhysicsFS 2.1, Use PHYSFS_EnumerateCallback with + * PHYSFS_enumerate() instead; it gives you more control over the process. + * + * These are used to report a list of directory entries to an original caller, + * one file/dir/symlink per callback. All strings are UTF-8 encoded. + * Functions should not try to modify or free any string's memory. + * + * These callbacks are used, starting in PhysicsFS 1.1, as an alternative to + * functions that would return lists that need to be cleaned up with + * PHYSFS_freeList(). The callback means that the library doesn't need to + * allocate an entire list and all the strings up front. + * + * Be aware that promised data ordering in the list versions are not + * necessarily so in the callback versions. Check the documentation on + * specific APIs, but strings may not be sorted as you expect and you might + * get duplicate strings. + * + * \param data User-defined data pointer, passed through from the API + * that eventually called the callback. + * \param origdir A string containing the full path, in platform-independent + * notation, of the directory containing this file. In most + * cases, this is the directory on which you requested + * enumeration, passed in the callback for your convenience. + * \param fname The filename that is being enumerated. It may not be in + * alphabetical order compared to other callbacks that have + * fired, and it will not contain the full path. You can + * recreate the fullpath with $origdir/$fname ... The file + * can be a subdirectory, a file, a symlink, etc. + * + * \sa PHYSFS_enumerateFilesCallback + */ +typedef void (*PHYSFS_EnumFilesCallback)(void *data, const char *origdir, + const char *fname); + + +/** + * \fn void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d) + * \brief Enumerate CD-ROM directories, using an application-defined callback. + * + * Internally, PHYSFS_getCdRomDirs() just calls this function and then builds + * a list before returning to the application, so functionality is identical + * except for how the information is represented to the application. + * + * Unlike PHYSFS_getCdRomDirs(), this function does not return an array. + * Rather, it calls a function specified by the application once per + * detected disc: + * + * \code + * + * static void foundDisc(void *data, const char *cddir) + * { + * printf("cdrom dir [%s] is available.\n", cddir); + * } + * + * // ... + * PHYSFS_getCdRomDirsCallback(foundDisc, NULL); + * \endcode + * + * This call may block while drives spin up. Be forewarned. + * + * \param c Callback function to notify about detected drives. + * \param d Application-defined data passed to callback. Can be NULL. + * + * \sa PHYSFS_StringCallback + * \sa PHYSFS_getCdRomDirs + */ +PHYSFS_DECL void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d); + + +/** + * \fn void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d) + * \brief Enumerate the search path, using an application-defined callback. + * + * Internally, PHYSFS_getSearchPath() just calls this function and then builds + * a list before returning to the application, so functionality is identical + * except for how the information is represented to the application. + * + * Unlike PHYSFS_getSearchPath(), this function does not return an array. + * Rather, it calls a function specified by the application once per + * element of the search path: + * + * \code + * + * static void printSearchPath(void *data, const char *pathItem) + * { + * printf("[%s] is in the search path.\n", pathItem); + * } + * + * // ... + * PHYSFS_getSearchPathCallback(printSearchPath, NULL); + * \endcode + * + * Elements of the search path are reported in order search priority, so the + * first archive/dir that would be examined when looking for a file is the + * first element passed through the callback. + * + * \param c Callback function to notify about search path elements. + * \param d Application-defined data passed to callback. Can be NULL. + * + * \sa PHYSFS_StringCallback + * \sa PHYSFS_getSearchPath + */ +PHYSFS_DECL void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d); + + +/** + * \fn void PHYSFS_enumerateFilesCallback(const char *dir, PHYSFS_EnumFilesCallback c, void *d) + * \brief Get a file listing of a search path's directory, using an application-defined callback. + * + * \deprecated As of PhysicsFS 2.1, use PHYSFS_enumerate() instead. This + * function has no way to report errors (or to have the callback signal an + * error or request a stop), so if data will be lost, your callback has no + * way to direct the process, and your calling app has no way to know. + * + * As of PhysicsFS 2.1, this function just wraps PHYSFS_enumerate() and + * ignores errors. Consider using PHYSFS_enumerate() or + * PHYSFS_enumerateFiles() instead. + * + * \sa PHYSFS_enumerate + * \sa PHYSFS_enumerateFiles + * \sa PHYSFS_EnumFilesCallback + */ +PHYSFS_DECL void PHYSFS_enumerateFilesCallback(const char *dir, + PHYSFS_EnumFilesCallback c, + void *d) PHYSFS_DEPRECATED; + +/** + * \fn void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, PHYSFS_uint64 len) + * \brief Convert a UCS-4 string to a UTF-8 string. + * + * \warning This function will not report an error if there are invalid UCS-4 + * values in the source string. It will replace them with a '?' + * character and continue on. + * + * UCS-4 (aka UTF-32) strings are 32-bits per character: \c wchar_t on Unix. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is the same size as the source buffer. UTF-8 + * never uses more than 32-bits per character, so while it may shrink a UCS-4 + * string, it will never expand it. + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UTF-8 + * sequence at the end. If the buffer length is 0, this function does nothing. + * + * \param src Null-terminated source string in UCS-4 format. + * \param dst Buffer to store converted UTF-8 string. + * \param len Size, in bytes, of destination buffer. + */ +PHYSFS_DECL void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, + PHYSFS_uint64 len); + +/** + * \fn void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, PHYSFS_uint64 len) + * \brief Convert a UTF-8 string to a UCS-4 string. + * + * \warning This function will not report an error if there are invalid UTF-8 + * sequences in the source string. It will replace them with a '?' + * character and continue on. + * + * UCS-4 (aka UTF-32) strings are 32-bits per character: \c wchar_t on Unix. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is four times the size of the source buffer. + * UTF-8 uses from one to four bytes per character, but UCS-4 always uses + * four, so an entirely low-ASCII string will quadruple in size! + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UCS-4 + * sequence at the end. If the buffer length is 0, this function does nothing. + * + * \param src Null-terminated source string in UTF-8 format. + * \param dst Buffer to store converted UCS-4 string. + * \param len Size, in bytes, of destination buffer. + */ +PHYSFS_DECL void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, + PHYSFS_uint64 len); + +/** + * \fn void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) + * \brief Convert a UCS-2 string to a UTF-8 string. + * + * \warning you almost certainly should use PHYSFS_utf8FromUtf16(), which + * became available in PhysicsFS 2.1, unless you know what you're doing. + * + * \warning This function will not report an error if there are invalid UCS-2 + * values in the source string. It will replace them with a '?' + * character and continue on. + * + * UCS-2 strings are 16-bits per character: \c TCHAR on Windows, when building + * with Unicode support. Please note that modern versions of Windows use + * UTF-16, which is an extended form of UCS-2, and not UCS-2 itself. You + * almost certainly want PHYSFS_utf8FromUtf16() instead. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is double the size of the source buffer. + * UTF-8 never uses more than 32-bits per character, so while it may shrink + * a UCS-2 string, it may also expand it. + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UTF-8 + * sequence at the end. If the buffer length is 0, this function does nothing. + * + * \param src Null-terminated source string in UCS-2 format. + * \param dst Buffer to store converted UTF-8 string. + * \param len Size, in bytes, of destination buffer. + * + * \sa PHYSFS_utf8FromUtf16 + */ +PHYSFS_DECL void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, + PHYSFS_uint64 len); + +/** + * \fn PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) + * \brief Convert a UTF-8 string to a UCS-2 string. + * + * \warning you almost certainly should use PHYSFS_utf8ToUtf16(), which + * became available in PhysicsFS 2.1, unless you know what you're doing. + * + * \warning This function will not report an error if there are invalid UTF-8 + * sequences in the source string. It will replace them with a '?' + * character and continue on. + * + * UCS-2 strings are 16-bits per character: \c TCHAR on Windows, when building + * with Unicode support. Please note that modern versions of Windows use + * UTF-16, which is an extended form of UCS-2, and not UCS-2 itself. You + * almost certainly want PHYSFS_utf8ToUtf16() instead, but you need to + * understand how that changes things, too. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is double the size of the source buffer. + * UTF-8 uses from one to four bytes per character, but UCS-2 always uses + * two, so an entirely low-ASCII string will double in size! + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UCS-2 + * sequence at the end. If the buffer length is 0, this function does nothing. + * + * \param src Null-terminated source string in UTF-8 format. + * \param dst Buffer to store converted UCS-2 string. + * \param len Size, in bytes, of destination buffer. + * + * \sa PHYSFS_utf8ToUtf16 + */ +PHYSFS_DECL void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, + PHYSFS_uint64 len); + +/** + * \fn void PHYSFS_utf8FromLatin1(const char *src, char *dst, PHYSFS_uint64 len) + * \brief Convert a UTF-8 string to a Latin1 string. + * + * Latin1 strings are 8-bits per character: a popular "high ASCII" encoding. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is double the size of the source buffer. + * UTF-8 expands latin1 codepoints over 127 from 1 to 2 bytes, so the string + * may grow in some cases. + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UTF-8 + * sequence at the end. If the buffer length is 0, this function does nothing. + * + * Please note that we do not supply a UTF-8 to Latin1 converter, since Latin1 + * can't express most Unicode codepoints. It's a legacy encoding; you should + * be converting away from it at all times. + * + * \param src Null-terminated source string in Latin1 format. + * \param dst Buffer to store converted UTF-8 string. + * \param len Size, in bytes, of destination buffer. + */ +PHYSFS_DECL void PHYSFS_utf8FromLatin1(const char *src, char *dst, + PHYSFS_uint64 len); + +/* Everything above this line is part of the PhysicsFS 2.0 API. */ + +/** + * \fn int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to) + * \brief "Fold" a Unicode codepoint to a lowercase equivalent. + * + * (This is for limited, hardcore use. If you don't immediately see a need + * for it, you can probably ignore this forever.) + * + * This will convert a Unicode codepoint into its lowercase equivalent. + * Bogus codepoints and codepoints without a lowercase equivalent will + * be returned unconverted. + * + * Note that you might get multiple codepoints in return! The German Eszett, + * for example, will fold down to two lowercase latin 's' codepoints. The + * theory is that if you fold two strings, one with an Eszett and one with + * "SS" down, they will match. + * + * \warning Anyone that is a student of Unicode knows about the "Turkish I" + * problem. This API does not handle it. Assume this one letter + * in all of Unicode will definitely fold sort of incorrectly. If + * you don't know what this is about, you can probably ignore this + * problem for most of the planet, but perfection is impossible. + * + * \param from The codepoint to fold. + * \param to Buffer to store the folded codepoint values into. This should + * point to space for at least 3 PHYSFS_uint32 slots. + * \return The number of codepoints the folding produced. Between 1 and 3. + */ +PHYSFS_DECL int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to); + + +/** + * \fn int PHYSFS_utf8stricmp(const char *str1, const char *str2) + * \brief Case-insensitive compare of two UTF-8 strings. + * + * This is a strcasecmp/stricmp replacement that expects both strings + * to be in UTF-8 encoding. It will do "case folding" to decide if the + * Unicode codepoints in the strings match. + * + * If both strings are exclusively low-ASCII characters, this will do the + * right thing, as that is also valid UTF-8. If there are any high-ASCII + * chars, this will not do what you expect! + * + * It will report which string is "greater than" the other, but be aware that + * this doesn't necessarily mean anything: 'a' may be "less than" 'b', but + * a Japanese kuten has no meaningful alphabetically relationship to + * a Greek lambda, but being able to assign a reliable "value" makes sorting + * algorithms possible, if not entirely sane. Most cases should treat the + * return value as "equal" or "not equal". + * + * Like stricmp, this expects both strings to be NULL-terminated. + * + * \param str1 First string to compare. + * \param str2 Second string to compare. + * \return -1 if str1 is "less than" str2, 1 if "greater than", 0 if equal. + */ +PHYSFS_DECL int PHYSFS_utf8stricmp(const char *str1, const char *str2); + +/** + * \fn int PHYSFS_utf16stricmp(const PHYSFS_uint16 *str1, const PHYSFS_uint16 *str2) + * \brief Case-insensitive compare of two UTF-16 strings. + * + * This is a strcasecmp/stricmp replacement that expects both strings + * to be in UTF-16 encoding. It will do "case folding" to decide if the + * Unicode codepoints in the strings match. + * + * It will report which string is "greater than" the other, but be aware that + * this doesn't necessarily mean anything: 'a' may be "less than" 'b', but + * a Japanese kuten has no meaningful alphabetically relationship to + * a Greek lambda, but being able to assign a reliable "value" makes sorting + * algorithms possible, if not entirely sane. Most cases should treat the + * return value as "equal" or "not equal". + * + * Like stricmp, this expects both strings to be NULL-terminated. + * + * \param str1 First string to compare. + * \param str2 Second string to compare. + * \return -1 if str1 is "less than" str2, 1 if "greater than", 0 if equal. + */ +PHYSFS_DECL int PHYSFS_utf16stricmp(const PHYSFS_uint16 *str1, + const PHYSFS_uint16 *str2); + +/** + * \fn int PHYSFS_ucs4stricmp(const PHYSFS_uint32 *str1, const PHYSFS_uint32 *str2) + * \brief Case-insensitive compare of two UCS-4 strings. + * + * This is a strcasecmp/stricmp replacement that expects both strings + * to be in UCS-4 (aka UTF-32) encoding. It will do "case folding" to decide + * if the Unicode codepoints in the strings match. + * + * It will report which string is "greater than" the other, but be aware that + * this doesn't necessarily mean anything: 'a' may be "less than" 'b', but + * a Japanese kuten has no meaningful alphabetically relationship to + * a Greek lambda, but being able to assign a reliable "value" makes sorting + * algorithms possible, if not entirely sane. Most cases should treat the + * return value as "equal" or "not equal". + * + * Like stricmp, this expects both strings to be NULL-terminated. + * + * \param str1 First string to compare. + * \param str2 Second string to compare. + * \return -1 if str1 is "less than" str2, 1 if "greater than", 0 if equal. + */ +PHYSFS_DECL int PHYSFS_ucs4stricmp(const PHYSFS_uint32 *str1, + const PHYSFS_uint32 *str2); + + +/** + * \typedef PHYSFS_EnumerateCallback + * \brief Possible return values from PHYSFS_EnumerateCallback. + * + * These values dictate if an enumeration callback should continue to fire, + * or stop (and why it is stopping). + * + * \sa PHYSFS_EnumerateCallback + * \sa PHYSFS_enumerate + */ +typedef enum PHYSFS_EnumerateCallbackResult +{ + PHYSFS_ENUM_ERROR = -1, /**< Stop enumerating, report error to app. */ + PHYSFS_ENUM_STOP = 0, /**< Stop enumerating, report success to app. */ + PHYSFS_ENUM_OK = 1 /**< Keep enumerating, no problems */ +} PHYSFS_EnumerateCallbackResult; + +/** + * \typedef PHYSFS_EnumerateCallback + * \brief Function signature for callbacks that enumerate and return results. + * + * This is the same thing as PHYSFS_EnumFilesCallback from PhysicsFS 2.0, + * except it can return a result from the callback: namely: if you're looking + * for something specific, once you find it, you can tell PhysicsFS to stop + * enumerating further. This is used with PHYSFS_enumerate(), which we + * hopefully got right this time. :) + * + * \param data User-defined data pointer, passed through from the API + * that eventually called the callback. + * \param origdir A string containing the full path, in platform-independent + * notation, of the directory containing this file. In most + * cases, this is the directory on which you requested + * enumeration, passed in the callback for your convenience. + * \param fname The filename that is being enumerated. It may not be in + * alphabetical order compared to other callbacks that have + * fired, and it will not contain the full path. You can + * recreate the fullpath with $origdir/$fname ... The file + * can be a subdirectory, a file, a symlink, etc. + * \return A value from PHYSFS_EnumerateCallbackResult. + * All other values are (currently) undefined; don't use them. + * + * \sa PHYSFS_enumerate + * \sa PHYSFS_EnumerateCallbackResult + */ +typedef PHYSFS_EnumerateCallbackResult (*PHYSFS_EnumerateCallback)(void *data, + const char *origdir, const char *fname); + +/** + * \fn int PHYSFS_enumerate(const char *dir, PHYSFS_EnumerateCallback c, void *d) + * \brief Get a file listing of a search path's directory, using an application-defined callback, with errors reported. + * + * Internally, PHYSFS_enumerateFiles() just calls this function and then builds + * a list before returning to the application, so functionality is identical + * except for how the information is represented to the application. + * + * Unlike PHYSFS_enumerateFiles(), this function does not return an array. + * Rather, it calls a function specified by the application once per + * element of the search path: + * + * \code + * + * static int printDir(void *data, const char *origdir, const char *fname) + * { + * printf(" * We've got [%s] in [%s].\n", fname, origdir); + * return 1; // give me more data, please. + * } + * + * // ... + * PHYSFS_enumerate("/some/path", printDir, NULL); + * \endcode + * + * Items sent to the callback are not guaranteed to be in any order whatsoever. + * There is no sorting done at this level, and if you need that, you should + * probably use PHYSFS_enumerateFiles() instead, which guarantees + * alphabetical sorting. This form reports whatever is discovered in each + * archive before moving on to the next. Even within one archive, we can't + * guarantee what order it will discover data. Any sorting you find in + * these callbacks is just pure luck. Do not rely on it. As this walks + * the entire list of archives, you may receive duplicate filenames. + * + * This API and the callbacks themselves are capable of reporting errors. + * Prior to this API, callbacks had to accept every enumerated item, even if + * they were only looking for a specific thing and wanted to stop after that, + * or had a serious error and couldn't alert anyone. Furthermore, if + * PhysicsFS itself had a problem (disk error or whatnot), it couldn't report + * it to the calling app, it would just have to skip items or stop + * enumerating outright, and the caller wouldn't know it had lost some data + * along the way. + * + * Now the caller can be sure it got a complete data set, and its callback has + * control if it wants enumeration to stop early. See the documentation for + * PHYSFS_EnumerateCallback for details on how your callback should behave. + * + * \param dir Directory, in platform-independent notation, to enumerate. + * \param c Callback function to notify about search path elements. + * \param d Application-defined data passed to callback. Can be NULL. + * \return non-zero on success, zero on failure. Use + * PHYSFS_getLastErrorCode() to obtain the specific error. If the + * callback returns PHYSFS_ENUM_STOP to stop early, this will be + * considered success. Callbacks returning PHYSFS_ENUM_ERROR will + * make this function return zero and set the error code to + * PHYSFS_ERR_APP_CALLBACK. + * + * \sa PHYSFS_EnumerateCallback + * \sa PHYSFS_enumerateFiles + */ +PHYSFS_DECL int PHYSFS_enumerate(const char *dir, PHYSFS_EnumerateCallback c, + void *d); + + +/** + * \fn int PHYSFS_unmount(const char *oldDir) + * \brief Remove a directory or archive from the search path. + * + * This is functionally equivalent to PHYSFS_removeFromSearchPath(), but that + * function is deprecated to keep the vocabulary paired with PHYSFS_mount(). + * + * This must be a (case-sensitive) match to a dir or archive already in the + * search path, specified in platform-dependent notation. + * + * This call will fail (and fail to remove from the path) if the element still + * has files open in it. + * + * \warning This function wants the path to the archive or directory that was + * mounted (the same string used for the "newDir" argument of + * PHYSFS_addToSearchPath or any of the mount functions), not the + * path where it is mounted in the tree (the "mountPoint" argument + * to any of the mount functions). + * + * \param oldDir dir/archive to remove. + * \return nonzero on success, zero on failure. Use + * PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_mount + */ +PHYSFS_DECL int PHYSFS_unmount(const char *oldDir); + + +/** + * \fn const PHYSFS_Allocator *PHYSFS_getAllocator(void) + * \brief Discover the current allocator. + * + * (This is for limited, hardcore use. If you don't immediately see a need + * for it, you can probably ignore this forever.) + * + * This function exposes the function pointers that make up the currently used + * allocator. This can be useful for apps that want to access PhysicsFS's + * internal, default allocation routines, as well as for external code that + * wants to share the same allocator, even if the application specified their + * own. + * + * This call is only valid between PHYSFS_init() and PHYSFS_deinit() calls; + * it will return NULL if the library isn't initialized. As we can't + * guarantee the state of the internal allocators unless the library is + * initialized, you shouldn't use any allocator returned here after a call + * to PHYSFS_deinit(). + * + * Do not call the returned allocator's Init() or Deinit() methods under any + * circumstances. + * + * If you aren't immediately sure what to do with this function, you can + * safely ignore it altogether. + * + * \return Current allocator, as set by PHYSFS_setAllocator(), or PhysicsFS's + * internal, default allocator if no application defined allocator + * is currently set. Will return NULL if the library is not + * initialized. + * + * \sa PHYSFS_Allocator + * \sa PHYSFS_setAllocator + */ +PHYSFS_DECL const PHYSFS_Allocator *PHYSFS_getAllocator(void); + + +/** + * \enum PHYSFS_FileType + * \brief Type of a File + * + * Possible types of a file. + * + * \sa PHYSFS_stat + */ +typedef enum PHYSFS_FileType +{ + PHYSFS_FILETYPE_REGULAR, /**< a normal file */ + PHYSFS_FILETYPE_DIRECTORY, /**< a directory */ + PHYSFS_FILETYPE_SYMLINK, /**< a symlink */ + PHYSFS_FILETYPE_OTHER /**< something completely different like a device */ +} PHYSFS_FileType; + +/** + * \struct PHYSFS_Stat + * \brief Meta data for a file or directory + * + * Container for various meta data about a file in the virtual file system. + * PHYSFS_stat() uses this structure for returning the information. The time + * data will be either the number of seconds since the Unix epoch (midnight, + * Jan 1, 1970), or -1 if the information isn't available or applicable. + * The (filesize) field is measured in bytes. + * The (readonly) field tells you whether the archive thinks a file is + * not writable, but tends to be only an estimate (for example, your write + * dir might overlap with a .zip file, meaning you _can_ successfully open + * that path for writing, as it gets created elsewhere. + * + * \sa PHYSFS_stat + * \sa PHYSFS_FileType + */ +typedef struct PHYSFS_Stat +{ + PHYSFS_sint64 filesize; /**< size in bytes, -1 for non-files and unknown */ + PHYSFS_sint64 modtime; /**< last modification time */ + PHYSFS_sint64 createtime; /**< like modtime, but for file creation time */ + PHYSFS_sint64 accesstime; /**< like modtime, but for file access time */ + PHYSFS_FileType filetype; /**< File? Directory? Symlink? */ + int readonly; /**< non-zero if read only, zero if writable. */ +} PHYSFS_Stat; + +/** + * \fn int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat) + * \brief Get various information about a directory or a file. + * + * Obtain various information about a file or directory from the meta data. + * + * This function will never follow symbolic links. If you haven't enabled + * symlinks with PHYSFS_permitSymbolicLinks(), stat'ing a symlink will be + * treated like stat'ing a non-existant file. If symlinks are enabled, + * stat'ing a symlink will give you information on the link itself and not + * what it points to. + * + * \param fname filename to check, in platform-indepedent notation. + * \param stat pointer to structure to fill in with data about (fname). + * \return non-zero on success, zero on failure. On failure, (stat)'s + * contents are undefined. + * + * \sa PHYSFS_Stat + */ +PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat); + + +/** + * \fn void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) + * \brief Convert a UTF-16 string to a UTF-8 string. + * + * \warning This function will not report an error if there are invalid UTF-16 + * sequences in the source string. It will replace them with a '?' + * character and continue on. + * + * UTF-16 strings are 16-bits per character (except some chars, which are + * 32-bits): \c TCHAR on Windows, when building with Unicode support. Modern + * Windows releases use UTF-16. Windows releases before 2000 used TCHAR, but + * only handled UCS-2. UTF-16 _is_ UCS-2, except for the characters that + * are 4 bytes, which aren't representable in UCS-2 at all anyhow. If you + * aren't sure, you should be using UTF-16 at this point on Windows. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is double the size of the source buffer. + * UTF-8 never uses more than 32-bits per character, so while it may shrink + * a UTF-16 string, it may also expand it. + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UTF-8 + * sequence at the end. If the buffer length is 0, this function does nothing. + * + * \param src Null-terminated source string in UTF-16 format. + * \param dst Buffer to store converted UTF-8 string. + * \param len Size, in bytes, of destination buffer. + */ +PHYSFS_DECL void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst, + PHYSFS_uint64 len); + +/** + * \fn PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) + * \brief Convert a UTF-8 string to a UTF-16 string. + * + * \warning This function will not report an error if there are invalid UTF-8 + * sequences in the source string. It will replace them with a '?' + * character and continue on. + * + * UTF-16 strings are 16-bits per character (except some chars, which are + * 32-bits): \c TCHAR on Windows, when building with Unicode support. Modern + * Windows releases use UTF-16. Windows releases before 2000 used TCHAR, but + * only handled UCS-2. UTF-16 _is_ UCS-2, except for the characters that + * are 4 bytes, which aren't representable in UCS-2 at all anyhow. If you + * aren't sure, you should be using UTF-16 at this point on Windows. + * + * To ensure that the destination buffer is large enough for the conversion, + * please allocate a buffer that is double the size of the source buffer. + * UTF-8 uses from one to four bytes per character, but UTF-16 always uses + * two to four, so an entirely low-ASCII string will double in size! The + * UTF-16 characters that would take four bytes also take four bytes in UTF-8, + * so you don't need to allocate 4x the space just in case: double will do. + * + * Strings that don't fit in the destination buffer will be truncated, but + * will always be null-terminated and never have an incomplete UTF-16 + * surrogate pair at the end. If the buffer length is 0, this function does + * nothing. + * + * \param src Null-terminated source string in UTF-8 format. + * \param dst Buffer to store converted UTF-16 string. + * \param len Size, in bytes, of destination buffer. + * + * \sa PHYSFS_utf8ToUtf16 + */ +PHYSFS_DECL void PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst, + PHYSFS_uint64 len); + + +/** + * \fn PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, PHYSFS_uint64 len) + * \brief Read bytes from a PhysicsFS filehandle + * + * The file must be opened for reading. + * + * \param handle handle returned from PHYSFS_openRead(). + * \param buffer buffer of at least (len) bytes to store read data into. + * \param len number of bytes being read from (handle). + * \return number of bytes read. This may be less than (len); this does not + * signify an error, necessarily (a short read may mean EOF). + * PHYSFS_getLastErrorCode() can shed light on the reason this might + * be < (len), as can PHYSFS_eof(). -1 if complete failure. + * + * \sa PHYSFS_eof + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, + PHYSFS_uint64 len); + +/** + * \fn PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle, const void *buffer, PHYSFS_uint64 len) + * \brief Write data to a PhysicsFS filehandle + * + * The file must be opened for writing. + * + * Please note that while (len) is an unsigned 64-bit integer, you are limited + * to 63 bits (9223372036854775807 bytes), so we can return a negative value + * on error. If length is greater than 0x7FFFFFFFFFFFFFFF, this function will + * immediately fail. For systems without a 64-bit datatype, you are limited + * to 31 bits (0x7FFFFFFF, or 2147483647 bytes). We trust most things won't + * need to do multiple gigabytes of i/o in one call anyhow, but why limit + * things? + * + * \param handle retval from PHYSFS_openWrite() or PHYSFS_openAppend(). + * \param buffer buffer of (len) bytes to write to (handle). + * \param len number of bytes being written to (handle). + * \return number of bytes written. This may be less than (len); in the case + * of an error, the system may try to write as many bytes as possible, + * so an incomplete write might occur. PHYSFS_getLastErrorCode() can + * shed light on the reason this might be < (len). -1 if complete + * failure. + */ +PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle, + const void *buffer, + PHYSFS_uint64 len); + + +/** + * \struct PHYSFS_Io + * \brief An abstract i/o interface. + * + * \warning This is advanced, hardcore stuff. You don't need this unless you + * really know what you're doing. Most apps will not need this. + * + * Historically, PhysicsFS provided access to the physical filesystem and + * archives within that filesystem. However, sometimes you need more power + * than this. Perhaps you need to provide an archive that is entirely + * contained in RAM, or you need to bridge some other file i/o API to + * PhysicsFS, or you need to translate the bits (perhaps you have a + * a standard .zip file that's encrypted, and you need to decrypt on the fly + * for the unsuspecting zip archiver). + * + * A PHYSFS_Io is the interface that Archivers use to get archive data. + * Historically, this has mapped to file i/o to the physical filesystem, but + * as of PhysicsFS 2.1, applications can provide their own i/o implementations + * at runtime. + * + * This interface isn't necessarily a good universal fit for i/o. There are a + * few requirements of note: + * + * - They only do blocking i/o (at least, for now). + * - They need to be able to duplicate. If you have a file handle from + * fopen(), you need to be able to create a unique clone of it (so we + * have two handles to the same file that can both seek/read/etc without + * stepping on each other). + * - They need to know the size of their entire data set. + * - They need to be able to seek and rewind on demand. + * + * ...in short, you're probably not going to write an HTTP implementation. + * + * Thread safety: PHYSFS_Io implementations are not guaranteed to be thread + * safe in themselves. Under the hood where PhysicsFS uses them, the library + * provides its own locks. If you plan to use them directly from separate + * threads, you should either use mutexes to protect them, or don't use the + * same PHYSFS_Io from two threads at the same time. + * + * \sa PHYSFS_mountIo + */ +typedef struct PHYSFS_Io +{ + /** + * \brief Binary compatibility information. + * + * This must be set to zero at this time. Future versions of this + * struct will increment this field, so we know what a given + * implementation supports. We'll presumably keep supporting older + * versions as we offer new features, though. + */ + PHYSFS_uint32 version; + + /** + * \brief Instance data for this struct. + * + * Each instance has a pointer associated with it that can be used to + * store anything it likes. This pointer is per-instance of the stream, + * so presumably it will change when calling duplicate(). This can be + * deallocated during the destroy() method. + */ + void *opaque; + + /** + * \brief Read more data. + * + * Read (len) bytes from the interface, at the current i/o position, and + * store them in (buffer). The current i/o position should move ahead + * by the number of bytes successfully read. + * + * You don't have to implement this; set it to NULL if not implemented. + * This will only be used if the file is opened for reading. If set to + * NULL, a default implementation that immediately reports failure will + * be used. + * + * \param io The i/o instance to read from. + * \param buf The buffer to store data into. It must be at least + * (len) bytes long and can't be NULL. + * \param len The number of bytes to read from the interface. + * \return number of bytes read from file, 0 on EOF, -1 if complete + * failure. + */ + PHYSFS_sint64 (*read)(struct PHYSFS_Io *io, void *buf, PHYSFS_uint64 len); + + /** + * \brief Write more data. + * + * Write (len) bytes from (buffer) to the interface at the current i/o + * position. The current i/o position should move ahead by the number of + * bytes successfully written. + * + * You don't have to implement this; set it to NULL if not implemented. + * This will only be used if the file is opened for writing. If set to + * NULL, a default implementation that immediately reports failure will + * be used. + * + * You are allowed to buffer; a write can succeed here and then later + * fail when flushing. Note that PHYSFS_setBuffer() may be operating a + * level above your i/o, so you should usually not implement your + * own buffering routines. + * + * \param io The i/o instance to write to. + * \param buffer The buffer to read data from. It must be at least + * (len) bytes long and can't be NULL. + * \param len The number of bytes to read from (buffer). + * \return number of bytes written to file, -1 if complete failure. + */ + PHYSFS_sint64 (*write)(struct PHYSFS_Io *io, const void *buffer, + PHYSFS_uint64 len); + + /** + * \brief Move i/o position to a given byte offset from start. + * + * This method moves the i/o position, so the next read/write will + * be of the byte at (offset) offset. Seeks past the end of file should + * be treated as an error condition. + * + * \param io The i/o instance to seek. + * \param offset The new byte offset for the i/o position. + * \return non-zero on success, zero on error. + */ + int (*seek)(struct PHYSFS_Io *io, PHYSFS_uint64 offset); + + /** + * \brief Report current i/o position. + * + * Return bytes offset, or -1 if you aren't able to determine. A failure + * will almost certainly be fatal to further use of this stream, so you + * may not leave this unimplemented. + * + * \param io The i/o instance to query. + * \return The current byte offset for the i/o position, -1 if unknown. + */ + PHYSFS_sint64 (*tell)(struct PHYSFS_Io *io); + + /** + * \brief Determine size of the i/o instance's dataset. + * + * Return number of bytes available in the file, or -1 if you + * aren't able to determine. A failure will almost certainly be fatal + * to further use of this stream, so you may not leave this unimplemented. + * + * \param io The i/o instance to query. + * \return Total size, in bytes, of the dataset. + */ + PHYSFS_sint64 (*length)(struct PHYSFS_Io *io); + + /** + * \brief Duplicate this i/o instance. + * + * This needs to result in a full copy of this PHYSFS_Io, that can live + * completely independently. The copy needs to be able to perform all + * its operations without altering the original, including either object + * being destroyed separately (so, for example: they can't share a file + * handle; they each need their own). + * + * If you can't duplicate a handle, it's legal to return NULL, but you + * almost certainly need this functionality if you want to use this to + * PHYSFS_Io to back an archive. + * + * \param io The i/o instance to duplicate. + * \return A new value for a stream's (opaque) field, or NULL on error. + */ + struct PHYSFS_Io *(*duplicate)(struct PHYSFS_Io *io); + + /** + * \brief Flush resources to media, or wherever. + * + * This is the chance to report failure for writes that had claimed + * success earlier, but still had a chance to actually fail. This method + * can be NULL if flushing isn't necessary. + * + * This function may be called before destroy(), as it can report failure + * and destroy() can not. It may be called at other times, too. + * + * \param io The i/o instance to flush. + * \return Zero on error, non-zero on success. + */ + int (*flush)(struct PHYSFS_Io *io); + + /** + * \brief Cleanup and deallocate i/o instance. + * + * Free associated resources, including (opaque) if applicable. + * + * This function must always succeed: as such, it returns void. The + * system may call your flush() method before this. You may report + * failure there if necessary. This method may still be called if + * flush() fails, in which case you'll have to abandon unflushed data + * and other failing conditions and clean up. + * + * Once this method is called for a given instance, the system will assume + * it is unsafe to touch that instance again and will discard any + * references to it. + * + * \param s The i/o instance to destroy. + */ + void (*destroy)(struct PHYSFS_Io *io); +} PHYSFS_Io; + + +/** + * \fn int PHYSFS_mountIo(PHYSFS_Io *io, const char *newDir, const char *mountPoint, int appendToPath) + * \brief Add an archive, built on a PHYSFS_Io, to the search path. + * + * \warning Unless you have some special, low-level need, you should be using + * PHYSFS_mount() instead of this. + * + * This function operates just like PHYSFS_mount(), but takes a PHYSFS_Io + * instead of a pathname. Behind the scenes, PHYSFS_mount() calls this + * function with a physical-filesystem-based PHYSFS_Io. + * + * (newDir) must be a unique string to identify this archive. It is used + * to optimize archiver selection (if you name it XXXXX.zip, we might try + * the ZIP archiver first, for example, or directly choose an archiver that + * can only trust the data is valid by filename extension). It doesn't + * need to refer to a real file at all. If the filename extension isn't + * helpful, the system will try every archiver until one works or none + * of them do. This filename must be unique, as the system won't allow you + * to have two archives with the same name. + * + * (io) must remain until the archive is unmounted. When the archive is + * unmounted, the system will call (io)->destroy(io), which will give you + * a chance to free your resources. + * + * If this function fails, (io)->destroy(io) is not called. + * + * \param io i/o instance for archive to add to the path. + * \param newDir Filename that can represent this stream. + * \param mountPoint Location in the interpolated tree that this archive + * will be "mounted", in platform-independent notation. + * NULL or "" is equivalent to "/". + * \param appendToPath nonzero to append to search path, zero to prepend. + * \return nonzero if added to path, zero on failure (bogus archive, stream + * i/o issue, etc). Use PHYSFS_getLastErrorCode() to obtain + * the specific error. + * + * \sa PHYSFS_unmount + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_getMountPoint + */ +PHYSFS_DECL int PHYSFS_mountIo(PHYSFS_Io *io, const char *newDir, + const char *mountPoint, int appendToPath); + + +/** + * \fn int PHYSFS_mountMemory(const void *buf, PHYSFS_uint64 len, void (*del)(void *), const char *newDir, const char *mountPoint, int appendToPath) + * \brief Add an archive, contained in a memory buffer, to the search path. + * + * \warning Unless you have some special, low-level need, you should be using + * PHYSFS_mount() instead of this. + * + * This function operates just like PHYSFS_mount(), but takes a memory buffer + * instead of a pathname. This buffer contains all the data of the archive, + * and is used instead of a real file in the physical filesystem. + * + * (newDir) must be a unique string to identify this archive. It is used + * to optimize archiver selection (if you name it XXXXX.zip, we might try + * the ZIP archiver first, for example, or directly choose an archiver that + * can only trust the data is valid by filename extension). It doesn't + * need to refer to a real file at all. If the filename extension isn't + * helpful, the system will try every archiver until one works or none + * of them do. This filename must be unique, as the system won't allow you + * to have two archives with the same name. + * + * (ptr) must remain until the archive is unmounted. When the archive is + * unmounted, the system will call (del)(ptr), which will notify you that + * the system is done with the buffer, and give you a chance to free your + * resources. (del) can be NULL, in which case the system will make no + * attempt to free the buffer. + * + * If this function fails, (del) is not called. + * + * \param buf Address of the memory buffer containing the archive data. + * \param len Size of memory buffer, in bytes. + * \param del A callback that triggers upon unmount. Can be NULL. + * \param newDir Filename that can represent this stream. + * \param mountPoint Location in the interpolated tree that this archive + * will be "mounted", in platform-independent notation. + * NULL or "" is equivalent to "/". + * \param appendToPath nonzero to append to search path, zero to prepend. + * \return nonzero if added to path, zero on failure (bogus archive, etc). + * Use PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_unmount + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_getMountPoint + */ +PHYSFS_DECL int PHYSFS_mountMemory(const void *buf, PHYSFS_uint64 len, + void (*del)(void *), const char *newDir, + const char *mountPoint, int appendToPath); + + +/** + * \fn int PHYSFS_mountHandle(PHYSFS_File *file, const char *newDir, const char *mountPoint, int appendToPath) + * \brief Add an archive, contained in a PHYSFS_File handle, to the search path. + * + * \warning Unless you have some special, low-level need, you should be using + * PHYSFS_mount() instead of this. + * + * \warning Archives-in-archives may be very slow! While a PHYSFS_File can + * seek even when the data is compressed, it may do so by rewinding + * to the start and decompressing everything before the seek point. + * Normal archive usage may do a lot of seeking behind the scenes. + * As such, you might find normal archive usage extremely painful + * if mounted this way. Plan accordingly: if you, say, have a + * self-extracting .zip file, and want to mount something in it, + * compress the contents of the inner archive and make sure the outer + * .zip file doesn't compress the inner archive too. + * + * This function operates just like PHYSFS_mount(), but takes a PHYSFS_File + * handle instead of a pathname. This handle contains all the data of the + * archive, and is used instead of a real file in the physical filesystem. + * The PHYSFS_File may be backed by a real file in the physical filesystem, + * but isn't necessarily. The most popular use for this is likely to mount + * archives stored inside other archives. + * + * (newDir) must be a unique string to identify this archive. It is used + * to optimize archiver selection (if you name it XXXXX.zip, we might try + * the ZIP archiver first, for example, or directly choose an archiver that + * can only trust the data is valid by filename extension). It doesn't + * need to refer to a real file at all. If the filename extension isn't + * helpful, the system will try every archiver until one works or none + * of them do. This filename must be unique, as the system won't allow you + * to have two archives with the same name. + * + * (file) must remain until the archive is unmounted. When the archive is + * unmounted, the system will call PHYSFS_close(file). If you need this + * handle to survive, you will have to wrap this in a PHYSFS_Io and use + * PHYSFS_mountIo() instead. + * + * If this function fails, PHYSFS_close(file) is not called. + * + * \param file The PHYSFS_File handle containing archive data. + * \param newDir Filename that can represent this stream. + * \param mountPoint Location in the interpolated tree that this archive + * will be "mounted", in platform-independent notation. + * NULL or "" is equivalent to "/". + * \param appendToPath nonzero to append to search path, zero to prepend. + * \return nonzero if added to path, zero on failure (bogus archive, etc). + * Use PHYSFS_getLastErrorCode() to obtain the specific error. + * + * \sa PHYSFS_unmount + * \sa PHYSFS_getSearchPath + * \sa PHYSFS_getMountPoint + */ +PHYSFS_DECL int PHYSFS_mountHandle(PHYSFS_File *file, const char *newDir, + const char *mountPoint, int appendToPath); + + +/** + * \enum PHYSFS_ErrorCode + * \brief Values that represent specific causes of failure. + * + * Most of the time, you should only concern yourself with whether a given + * operation failed or not, but there may be occasions where you plan to + * handle a specific failure case gracefully, so we provide specific error + * codes. + * + * Most of these errors are a little vague, and most aren't things you can + * fix...if there's a permission error, for example, all you can really do + * is pass that information on to the user and let them figure out how to + * handle it. In most these cases, your program should only care that it + * failed to accomplish its goals, and not care specifically why. + * + * \sa PHYSFS_getLastErrorCode + * \sa PHYSFS_getErrorByCode + */ +typedef enum PHYSFS_ErrorCode +{ + PHYSFS_ERR_OK, /**< Success; no error. */ + PHYSFS_ERR_OTHER_ERROR, /**< Error not otherwise covered here. */ + PHYSFS_ERR_OUT_OF_MEMORY, /**< Memory allocation failed. */ + PHYSFS_ERR_NOT_INITIALIZED, /**< PhysicsFS is not initialized. */ + PHYSFS_ERR_IS_INITIALIZED, /**< PhysicsFS is already initialized. */ + PHYSFS_ERR_ARGV0_IS_NULL, /**< Needed argv[0], but it is NULL. */ + PHYSFS_ERR_UNSUPPORTED, /**< Operation or feature unsupported. */ + PHYSFS_ERR_PAST_EOF, /**< Attempted to access past end of file. */ + PHYSFS_ERR_FILES_STILL_OPEN, /**< Files still open. */ + PHYSFS_ERR_INVALID_ARGUMENT, /**< Bad parameter passed to an function. */ + PHYSFS_ERR_NOT_MOUNTED, /**< Requested archive/dir not mounted. */ + PHYSFS_ERR_NOT_FOUND, /**< File (or whatever) not found. */ + PHYSFS_ERR_SYMLINK_FORBIDDEN,/**< Symlink seen when not permitted. */ + PHYSFS_ERR_NO_WRITE_DIR, /**< No write dir has been specified. */ + PHYSFS_ERR_OPEN_FOR_READING, /**< Wrote to a file opened for reading. */ + PHYSFS_ERR_OPEN_FOR_WRITING, /**< Read from a file opened for writing. */ + PHYSFS_ERR_NOT_A_FILE, /**< Needed a file, got a directory (etc). */ + PHYSFS_ERR_READ_ONLY, /**< Wrote to a read-only filesystem. */ + PHYSFS_ERR_CORRUPT, /**< Corrupted data encountered. */ + PHYSFS_ERR_SYMLINK_LOOP, /**< Infinite symbolic link loop. */ + PHYSFS_ERR_IO, /**< i/o error (hardware failure, etc). */ + PHYSFS_ERR_PERMISSION, /**< Permission denied. */ + PHYSFS_ERR_NO_SPACE, /**< No space (disk full, over quota, etc) */ + PHYSFS_ERR_BAD_FILENAME, /**< Filename is bogus/insecure. */ + PHYSFS_ERR_BUSY, /**< Tried to modify a file the OS needs. */ + PHYSFS_ERR_DIR_NOT_EMPTY, /**< Tried to delete dir with files in it. */ + PHYSFS_ERR_OS_ERROR, /**< Unspecified OS-level error. */ + PHYSFS_ERR_DUPLICATE, /**< Duplicate entry. */ + PHYSFS_ERR_BAD_PASSWORD, /**< Bad password. */ + PHYSFS_ERR_APP_CALLBACK /**< Application callback reported error. */ +} PHYSFS_ErrorCode; + + +/** + * \fn PHYSFS_ErrorCode PHYSFS_getLastErrorCode(void) + * \brief Get machine-readable error information. + * + * Get the last PhysicsFS error message as an integer value. This will return + * PHYSFS_ERR_OK if there's been no error since the last call to this + * function. Each thread has a unique error state associated with it, but + * each time a new error message is set, it will overwrite the previous one + * associated with that thread. It is safe to call this function at anytime, + * even before PHYSFS_init(). + * + * PHYSFS_getLastError() and PHYSFS_getLastErrorCode() both reset the same + * thread-specific error state. Calling one will wipe out the other's + * data. If you need both, call PHYSFS_getLastErrorCode(), then pass that + * value to PHYSFS_getErrorByCode(). + * + * Generally, applications should only concern themselves with whether a + * given function failed; however, if you require more specifics, you can + * try this function to glean information, if there's some specific problem + * you're expecting and plan to handle. But with most things that involve + * file systems, the best course of action is usually to give up, report the + * problem to the user, and let them figure out what should be done about it. + * For that, you might prefer PHYSFS_getErrorByCode() instead. + * + * \return Enumeration value that represents last reported error. + * + * \sa PHYSFS_getErrorByCode + */ +PHYSFS_DECL PHYSFS_ErrorCode PHYSFS_getLastErrorCode(void); + + +/** + * \fn const char *PHYSFS_getErrorByCode(PHYSFS_ErrorCode code) + * \brief Get human-readable description string for a given error code. + * + * Get a static string, in UTF-8 format, that represents an English + * description of a given error code. + * + * This string is guaranteed to never change (although we may add new strings + * for new error codes in later versions of PhysicsFS), so you can use it + * for keying a localization dictionary. + * + * It is safe to call this function at anytime, even before PHYSFS_init(). + * + * These strings are meant to be passed on directly to the user. + * Generally, applications should only concern themselves with whether a + * given function failed, but not care about the specifics much. + * + * Do not attempt to free the returned strings; they are read-only and you + * don't own their memory pages. + * + * \param code Error code to convert to a string. + * \return READ ONLY string of requested error message, NULL if this + * is not a valid PhysicsFS error code. Always check for NULL if + * you might be looking up an error code that didn't exist in an + * earlier version of PhysicsFS. + * + * \sa PHYSFS_getLastErrorCode + */ +PHYSFS_DECL const char *PHYSFS_getErrorByCode(PHYSFS_ErrorCode code); + +/** + * \fn void PHYSFS_setErrorCode(PHYSFS_ErrorCode code) + * \brief Set the current thread's error code. + * + * This lets you set the value that will be returned by the next call to + * PHYSFS_getLastErrorCode(). This will replace any existing error code, + * whether set by your application or internally by PhysicsFS. + * + * Error codes are stored per-thread; what you set here will not be + * accessible to another thread. + * + * Any call into PhysicsFS may change the current error code, so any code you + * set here is somewhat fragile, and thus you shouldn't build any serious + * error reporting framework on this function. The primary goal of this + * function is to allow PHYSFS_Io implementations to set the error state, + * which generally will be passed back to your application when PhysicsFS + * makes a PHYSFS_Io call that fails internally. + * + * This function doesn't care if the error code is a value known to PhysicsFS + * or not (but PHYSFS_getErrorByCode() will return NULL for unknown values). + * The value will be reported unmolested by PHYSFS_getLastErrorCode(). + * + * \param code Error code to become the current thread's new error state. + * + * \sa PHYSFS_getLastErrorCode + * \sa PHYSFS_getErrorByCode + */ +PHYSFS_DECL void PHYSFS_setErrorCode(PHYSFS_ErrorCode code); + + +/** + * \fn const char *PHYSFS_getPrefDir(const char *org, const char *app) + * \brief Get the user-and-app-specific path where files can be written. + * + * Helper function. + * + * Get the "pref dir". This is meant to be where users can write personal + * files (preferences and save games, etc) that are specific to your + * application. This directory is unique per user, per application. + * + * This function will decide the appropriate location in the native filesystem, + * create the directory if necessary, and return a string in + * platform-dependent notation, suitable for passing to PHYSFS_setWriteDir(). + * + * On Windows, this might look like: + * "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name" + * + * On Linux, this might look like: + * "/home/bob/.local/share/My Program Name" + * + * On Mac OS X, this might look like: + * "/Users/bob/Library/Application Support/My Program Name" + * + * (etc.) + * + * You should probably use the pref dir for your write dir, and also put it + * near the beginning of your search path. Older versions of PhysicsFS + * offered only PHYSFS_getUserDir() and left you to figure out where the + * files should go under that tree. This finds the correct location + * for whatever platform, which not only changes between operating systems, + * but also versions of the same operating system. + * + * You specify the name of your organization (if it's not a real organization, + * your name or an Internet domain you own might do) and the name of your + * application. These should be proper names. + * + * Both the (org) and (app) strings may become part of a directory name, so + * please follow these rules: + * + * - Try to use the same org string (including case-sensitivity) for + * all your applications that use this function. + * - Always use a unique app string for each one, and make sure it never + * changes for an app once you've decided on it. + * - Unicode characters are legal, as long as it's UTF-8 encoded, but... + * - ...only use letters, numbers, and spaces. Avoid punctuation like + * "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient. + * + * The pointer returned by this function remains valid until you call this + * function again, or call PHYSFS_deinit(). This is not necessarily a fast + * call, though, so you should call this once at startup and copy the string + * if you need it. + * + * You should assume the path returned by this function is the only safe + * place to write files (and that PHYSFS_getUserDir() and PHYSFS_getBaseDir(), + * while they might be writable, or even parents of the returned path, aren't + * where you should be writing things). + * + * \param org The name of your organization. + * \param app The name of your application. + * \return READ ONLY string of user dir in platform-dependent notation. NULL + * if there's a problem (creating directory failed, etc). + * + * \sa PHYSFS_getBaseDir + * \sa PHYSFS_getUserDir + */ +PHYSFS_DECL const char *PHYSFS_getPrefDir(const char *org, const char *app); + + +/** + * \struct PHYSFS_Archiver + * \brief Abstract interface to provide support for user-defined archives. + * + * \warning This is advanced, hardcore stuff. You don't need this unless you + * really know what you're doing. Most apps will not need this. + * + * Historically, PhysicsFS provided a means to mount various archive file + * formats, and physical directories in the native filesystem. However, + * applications have been limited to the file formats provided by the + * library. This interface allows an application to provide their own + * archive file types. + * + * Conceptually, a PHYSFS_Archiver provides directory entries, while + * PHYSFS_Io provides data streams for those directory entries. The most + * obvious use of PHYSFS_Archiver is to provide support for an archive + * file type that isn't provided by PhysicsFS directly: perhaps some + * proprietary format that only your application needs to understand. + * + * Internally, all the built-in archive support uses this interface, so the + * best examples for building a PHYSFS_Archiver is the source code to + * PhysicsFS itself. + * + * An archiver is added to the system with PHYSFS_registerArchiver(), and then + * it will be available for use automatically with PHYSFS_mount(); if a + * given archive can be handled with your archiver, it will be given control + * as appropriate. + * + * These methods deal with dir handles. You have one instance of your + * archiver, and it generates a unique, opaque handle for each opened + * archive in its openArchive() method. Since the lifetime of an Archiver + * (not an archive) is generally the entire lifetime of the process, and it's + * assumed to be a singleton, we do not provide any instance data for the + * archiver itself; the app can just use some static variables if necessary. + * + * Symlinks should always be followed (except in stat()); PhysicsFS will + * use the stat() method to check for symlinks and make a judgement on + * whether to continue to call other methods based on that. + * + * Archivers, when necessary, should set the PhysicsFS error state with + * PHYSFS_setErrorCode() before returning. PhysicsFS will pass these errors + * back to the application unmolested in most cases. + * + * Thread safety: PHYSFS_Archiver implementations are not guaranteed to be + * thread safe in themselves. PhysicsFS provides thread safety when it calls + * into a given archiver inside the library, but it does not promise that + * using the same PHYSFS_File from two threads at once is thread-safe; as + * such, your PHYSFS_Archiver can assume that locking is handled for you + * so long as the PHYSFS_Io you return from PHYSFS_open* doesn't change any + * of your Archiver state, as the PHYSFS_Io won't be as aggressively + * protected. + * + * \sa PHYSFS_registerArchiver + * \sa PHYSFS_deregisterArchiver + * \sa PHYSFS_supportedArchiveTypes + */ +typedef struct PHYSFS_Archiver +{ + /** + * \brief Binary compatibility information. + * + * This must be set to zero at this time. Future versions of this + * struct will increment this field, so we know what a given + * implementation supports. We'll presumably keep supporting older + * versions as we offer new features, though. + */ + PHYSFS_uint32 version; + + /** + * \brief Basic info about this archiver. + * + * This is used to identify your archive, and is returned in + * PHYSFS_supportedArchiveTypes(). + */ + PHYSFS_ArchiveInfo info; + + /** + * \brief Open an archive provided by (io). + * + * This is where resources are allocated and data is parsed when mounting + * an archive. + * (name) is a filename associated with (io), but doesn't necessarily + * map to anything, let alone a real filename. This possibly- + * meaningless name is in platform-dependent notation. + * (forWrite) is non-zero if this is to be used for + * the write directory, and zero if this is to be used for an + * element of the search path. + * (claimed) should be set to 1 if this is definitely an archive your + * archiver implementation can handle, even if it fails. We use to + * decide if we should stop trying other archivers if you fail to open + * it. For example: the .zip archiver will set this to 1 for something + * that's got a .zip file signature, even if it failed because the file + * was also truncated. No sense in trying other archivers here, we + * already tried to handle it with the appropriate implementation!. + * Return NULL on failure and set (claimed) appropriately. If no archiver + * opened the archive or set (claimed), PHYSFS_mount() will report + * PHYSFS_ERR_UNSUPPORTED. Otherwise, it will report the error from the + * archiver that claimed the data through (claimed). + * Return non-NULL on success. The pointer returned will be + * passed as the "opaque" parameter for later calls. + */ + void *(*openArchive)(PHYSFS_Io *io, const char *name, + int forWrite, int *claimed); + + /** + * \brief List all files in (dirname). + * + * Each file is passed to (cb), where a copy is made if appropriate, so + * you can dispose of it upon return from the callback. (dirname) is in + * platform-independent notation. + * If you have a failure, call PHYSFS_SetErrorCode() with whatever code + * seem appropriate and return PHYSFS_ENUM_ERROR. + * If the callback returns PHYSFS_ENUM_ERROR, please call + * PHYSFS_SetErrorCode(PHYSFS_ERR_APP_CALLBACK) and then return + * PHYSFS_ENUM_ERROR as well. Don't call the callback again in any + * circumstances. + * If the callback returns PHYSFS_ENUM_STOP, stop enumerating and return + * PHYSFS_ENUM_STOP as well. Don't call the callback again in any + * circumstances. Don't set an error code in this case. + * Callbacks are only supposed to return a value from + * PHYSFS_EnumerateCallbackResult. Any other result has undefined + * behavior. + * As long as the callback returned PHYSFS_ENUM_OK and you haven't + * experienced any errors of your own, keep enumerating until you're done + * and then return PHYSFS_ENUM_OK without setting an error code. + * + * \warning PHYSFS_enumerate returns zero or non-zero (success or failure), + * so be aware this function pointer returns different values! + */ + PHYSFS_EnumerateCallbackResult (*enumerate)(void *opaque, + const char *dirname, PHYSFS_EnumerateCallback cb, + const char *origdir, void *callbackdata); + + /** + * \brief Open a file in this archive for reading. + * + * This filename, (fnm), is in platform-independent notation. + * Fail if the file does not exist. + * Returns NULL on failure, and calls PHYSFS_setErrorCode(). + * Returns non-NULL on success. The pointer returned will be + * passed as the "opaque" parameter for later file calls. + */ + PHYSFS_Io *(*openRead)(void *opaque, const char *fnm); + + /** + * \brief Open a file in this archive for writing. + * + * If the file does not exist, it should be created. If it exists, + * it should be truncated to zero bytes. The writing offset should + * be the start of the file. + * If the archive is read-only, this operation should fail. + * This filename is in platform-independent notation. + * Returns NULL on failure, and calls PHYSFS_setErrorCode(). + * Returns non-NULL on success. The pointer returned will be + * passed as the "opaque" parameter for later file calls. + */ + PHYSFS_Io *(*openWrite)(void *opaque, const char *filename); + + /** + * \brief Open a file in this archive for appending. + * + * If the file does not exist, it should be created. The writing + * offset should be the end of the file. + * If the archive is read-only, this operation should fail. + * This filename is in platform-independent notation. + * Returns NULL on failure, and calls PHYSFS_setErrorCode(). + * Returns non-NULL on success. The pointer returned will be + * passed as the "opaque" parameter for later file calls. + */ + PHYSFS_Io *(*openAppend)(void *opaque, const char *filename); + + /** + * \brief Delete a file or directory in the archive. + * + * This same call is used for both files and directories; there is not a + * separate rmdir() call. Directories are only meant to be removed if + * they are empty. + * If the archive is read-only, this operation should fail. + * + * Return non-zero on success, zero on failure. + * This filename is in platform-independent notation. + * On failure, call PHYSFS_setErrorCode(). + */ + int (*remove)(void *opaque, const char *filename); + + /** + * \brief Create a directory in the archive. + * + * If the application is trying to make multiple dirs, PhysicsFS + * will split them up into multiple calls before passing them to + * your driver. + * If the archive is read-only, this operation should fail. + * Return non-zero on success, zero on failure. + * This filename is in platform-independent notation. + * On failure, call PHYSFS_setErrorCode(). + */ + int (*mkdir)(void *opaque, const char *filename); + + /** + * \brief Obtain basic file metadata. + * + * On success, fill in all the fields in (stat), using + * reasonable defaults for fields that apply to your archive. + * + * Returns non-zero on success, zero on failure. + * This filename is in platform-independent notation. + * On failure, call PHYSFS_setErrorCode(). + */ + int (*stat)(void *opaque, const char *fn, PHYSFS_Stat *stat); + + /** + * \brief Destruct a previously-opened archive. + * + * Close this archive, and free any associated memory, + * including the original PHYSFS_Io and (opaque) itself, if + * applicable. Implementation can assume that it won't be called if + * there are still files open from this archive. + */ + void (*closeArchive)(void *opaque); +} PHYSFS_Archiver; + +/** + * \fn int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver) + * \brief Add a new archiver to the system. + * + * \warning This is advanced, hardcore stuff. You don't need this unless you + * really know what you're doing. Most apps will not need this. + * + * If you want to provide your own archiver (for example, a custom archive + * file format, or some virtual thing you want to make look like a filesystem + * that you can access through the usual PhysicsFS APIs), this is where you + * start. Once an archiver is successfully registered, then you can use + * PHYSFS_mount() to add archives that your archiver supports to the + * search path, or perhaps use it as the write dir. Internally, PhysicsFS + * uses this function to register its own built-in archivers, like .zip + * support, etc. + * + * You may not have two archivers that handle the same extension. If you are + * going to have a clash, you can deregister the other archiver (including + * built-in ones) with PHYSFS_deregisterArchiver(). + * + * The data in (archiver) is copied; you may free this pointer when this + * function returns. + * + * Once this function returns successfully, PhysicsFS will be able to support + * archives of this type until you deregister the archiver again. + * + * \param archiver The archiver to register. + * \return Zero on error, non-zero on success. + * + * \sa PHYSFS_Archiver + * \sa PHYSFS_deregisterArchiver + */ +PHYSFS_DECL int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver); + +/** + * \fn int PHYSFS_deregisterArchiver(const char *ext) + * \brief Remove an archiver from the system. + * + * If for some reason, you only need your previously-registered archiver to + * live for a portion of your app's lifetime, you can remove it from the + * system once you're done with it through this function. + * + * This fails if there are any archives still open that use this archiver. + * + * This function can also remove internally-supplied archivers, like .zip + * support or whatnot. This could be useful in some situations, like + * disabling support for them outright or overriding them with your own + * implementation. Once an internal archiver is disabled like this, + * PhysicsFS provides no mechanism to recover them, short of calling + * PHYSFS_deinit() and PHYSFS_init() again. + * + * PHYSFS_deinit() will automatically deregister all archivers, so you don't + * need to explicitly deregister yours if you otherwise shut down cleanly. + * + * \param ext Filename extension that the archiver handles. + * \return Zero on error, non-zero on success. + * + * \sa PHYSFS_Archiver + * \sa PHYSFS_registerArchiver + */ +PHYSFS_DECL int PHYSFS_deregisterArchiver(const char *ext); + + +/* Everything above this line is part of the PhysicsFS 2.1 API. */ + +#ifdef __cplusplus +} +#endif + +#endif /* !defined _INCLUDE_PHYSFS_H_ */ + +/* end of physfs.h ... */ + diff --git a/desktop_version/physfs/physfs_archiver_dir.c b/desktop_version/physfs/physfs_archiver_dir.c new file mode 100644 index 00000000..61c0da3f --- /dev/null +++ b/desktop_version/physfs/physfs_archiver_dir.c @@ -0,0 +1,196 @@ +/* + * Standard directory I/O support routines for PhysicsFS. + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon. + */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_internal.h" + +/* There's no PHYSFS_Io interface here. Use __PHYSFS_createNativeIo(). */ + + + +static char *cvtToDependent(const char *prepend, const char *path, + char *buf, const size_t buflen) +{ + BAIL_IF(buf == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + snprintf(buf, buflen, "%s%s", prepend ? prepend : "", path); + + #if !__PHYSFS_STANDARD_DIRSEP + assert(__PHYSFS_platformDirSeparator != '/'); + { + char *p; + for (p = strchr(buf, '/'); p != NULL; p = strchr(p + 1, '/')) + *p = __PHYSFS_platformDirSeparator; + } /* if */ + #endif + + return buf; +} /* cvtToDependent */ + + +#define CVT_TO_DEPENDENT(buf, pre, dir) { \ + const size_t len = ((pre) ? strlen((char *) pre) : 0) + strlen(dir) + 1; \ + buf = cvtToDependent((char*)pre,dir,(char*)__PHYSFS_smallAlloc(len),len); \ +} + + + +static void *DIR_openArchive(PHYSFS_Io *io, const char *name, + int forWriting, int *claimed) +{ + PHYSFS_Stat st; + const char dirsep = __PHYSFS_platformDirSeparator; + char *retval = NULL; + const size_t namelen = strlen(name); + const size_t seplen = 1; + + assert(io == NULL); /* shouldn't create an Io for these. */ + BAIL_IF_ERRPASS(!__PHYSFS_platformStat(name, &st, 1), NULL); + + if (st.filetype != PHYSFS_FILETYPE_DIRECTORY) + BAIL(PHYSFS_ERR_UNSUPPORTED, NULL); + + *claimed = 1; + retval = allocator.Malloc(namelen + seplen + 1); + BAIL_IF(retval == NULL, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + + strcpy(retval, name); + + /* make sure there's a dir separator at the end of the string */ + if (retval[namelen - 1] != dirsep) + { + retval[namelen] = dirsep; + retval[namelen + 1] = '\0'; + } /* if */ + + return retval; +} /* DIR_openArchive */ + + +static PHYSFS_EnumerateCallbackResult DIR_enumerate(void *opaque, + const char *dname, PHYSFS_EnumerateCallback cb, + const char *origdir, void *callbackdata) +{ + char *d; + PHYSFS_EnumerateCallbackResult retval; + CVT_TO_DEPENDENT(d, opaque, dname); + BAIL_IF_ERRPASS(!d, PHYSFS_ENUM_ERROR); + retval = __PHYSFS_platformEnumerate(d, cb, origdir, callbackdata); + __PHYSFS_smallFree(d); + return retval; +} /* DIR_enumerate */ + + +static PHYSFS_Io *doOpen(void *opaque, const char *name, const int mode) +{ + PHYSFS_Io *io = NULL; + char *f = NULL; + + CVT_TO_DEPENDENT(f, opaque, name); + BAIL_IF_ERRPASS(!f, NULL); + + io = __PHYSFS_createNativeIo(f, mode); + if (io == NULL) + { + const PHYSFS_ErrorCode err = PHYSFS_getLastErrorCode(); + PHYSFS_Stat statbuf; + __PHYSFS_platformStat(f, &statbuf, 0); /* !!! FIXME: why are we stating here? */ + PHYSFS_setErrorCode(err); + } /* if */ + + __PHYSFS_smallFree(f); + + return io; +} /* doOpen */ + + +static PHYSFS_Io *DIR_openRead(void *opaque, const char *filename) +{ + return doOpen(opaque, filename, 'r'); +} /* DIR_openRead */ + + +static PHYSFS_Io *DIR_openWrite(void *opaque, const char *filename) +{ + return doOpen(opaque, filename, 'w'); +} /* DIR_openWrite */ + + +static PHYSFS_Io *DIR_openAppend(void *opaque, const char *filename) +{ + return doOpen(opaque, filename, 'a'); +} /* DIR_openAppend */ + + +static int DIR_remove(void *opaque, const char *name) +{ + int retval; + char *f; + + CVT_TO_DEPENDENT(f, opaque, name); + BAIL_IF_ERRPASS(!f, 0); + retval = __PHYSFS_platformDelete(f); + __PHYSFS_smallFree(f); + return retval; +} /* DIR_remove */ + + +static int DIR_mkdir(void *opaque, const char *name) +{ + int retval; + char *f; + + CVT_TO_DEPENDENT(f, opaque, name); + BAIL_IF_ERRPASS(!f, 0); + retval = __PHYSFS_platformMkDir(f); + __PHYSFS_smallFree(f); + return retval; +} /* DIR_mkdir */ + + +static void DIR_closeArchive(void *opaque) +{ + allocator.Free(opaque); +} /* DIR_closeArchive */ + + +static int DIR_stat(void *opaque, const char *name, PHYSFS_Stat *stat) +{ + int retval = 0; + char *d; + + CVT_TO_DEPENDENT(d, opaque, name); + BAIL_IF_ERRPASS(!d, 0); + retval = __PHYSFS_platformStat(d, stat, 0); + __PHYSFS_smallFree(d); + return retval; +} /* DIR_stat */ + + +const PHYSFS_Archiver __PHYSFS_Archiver_DIR = +{ + CURRENT_PHYSFS_ARCHIVER_API_VERSION, + { + "", + "Non-archive, direct filesystem I/O", + "Ryan C. Gordon ", + "https://icculus.org/physfs/", + 1, /* supportsSymlinks */ + }, + DIR_openArchive, + DIR_enumerate, + DIR_openRead, + DIR_openWrite, + DIR_openAppend, + DIR_remove, + DIR_mkdir, + DIR_stat, + DIR_closeArchive +}; + +/* end of physfs_archiver_dir.c ... */ + diff --git a/desktop_version/physfs/physfs_archiver_unpacked.c b/desktop_version/physfs/physfs_archiver_unpacked.c new file mode 100644 index 00000000..575efef3 --- /dev/null +++ b/desktop_version/physfs/physfs_archiver_unpacked.c @@ -0,0 +1,305 @@ +/* + * High-level PhysicsFS archiver for simple unpacked file formats. + * + * This is a framework that basic archivers build on top of. It's for simple + * formats that can just hand back a list of files and the offsets of their + * uncompressed data. There are an alarming number of formats like this. + * + * RULES: Archive entries must be uncompressed. Dirs and files allowed, but no + * symlinks, etc. We can relax some of these rules as necessary. + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon. + */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_internal.h" + +typedef struct +{ + __PHYSFS_DirTree tree; + PHYSFS_Io *io; +} UNPKinfo; + +typedef struct +{ + __PHYSFS_DirTreeEntry tree; + PHYSFS_uint64 startPos; + PHYSFS_uint64 size; + PHYSFS_sint64 ctime; + PHYSFS_sint64 mtime; +} UNPKentry; + +typedef struct +{ + PHYSFS_Io *io; + UNPKentry *entry; + PHYSFS_uint32 curPos; +} UNPKfileinfo; + + +void UNPK_closeArchive(void *opaque) +{ + UNPKinfo *info = ((UNPKinfo *) opaque); + if (info) + { + __PHYSFS_DirTreeDeinit(&info->tree); + + if (info->io) + info->io->destroy(info->io); + + allocator.Free(info); + } /* if */ +} /* UNPK_closeArchive */ + +void UNPK_abandonArchive(void *opaque) +{ + UNPKinfo *info = ((UNPKinfo *) opaque); + if (info) + { + info->io = NULL; + UNPK_closeArchive(info); + } /* if */ +} /* UNPK_abandonArchive */ + +static PHYSFS_sint64 UNPK_read(PHYSFS_Io *io, void *buffer, PHYSFS_uint64 len) +{ + UNPKfileinfo *finfo = (UNPKfileinfo *) io->opaque; + const UNPKentry *entry = finfo->entry; + const PHYSFS_uint64 bytesLeft = (PHYSFS_uint64)(entry->size-finfo->curPos); + PHYSFS_sint64 rc; + + if (bytesLeft < len) + len = bytesLeft; + + rc = finfo->io->read(finfo->io, buffer, len); + if (rc > 0) + finfo->curPos += (PHYSFS_uint32) rc; + + return rc; +} /* UNPK_read */ + + +static PHYSFS_sint64 UNPK_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 len) +{ + BAIL(PHYSFS_ERR_READ_ONLY, -1); +} /* UNPK_write */ + + +static PHYSFS_sint64 UNPK_tell(PHYSFS_Io *io) +{ + return ((UNPKfileinfo *) io->opaque)->curPos; +} /* UNPK_tell */ + + +static int UNPK_seek(PHYSFS_Io *io, PHYSFS_uint64 offset) +{ + UNPKfileinfo *finfo = (UNPKfileinfo *) io->opaque; + const UNPKentry *entry = finfo->entry; + int rc; + + BAIL_IF(offset >= entry->size, PHYSFS_ERR_PAST_EOF, 0); + rc = finfo->io->seek(finfo->io, entry->startPos + offset); + if (rc) + finfo->curPos = (PHYSFS_uint32) offset; + + return rc; +} /* UNPK_seek */ + + +static PHYSFS_sint64 UNPK_length(PHYSFS_Io *io) +{ + const UNPKfileinfo *finfo = (UNPKfileinfo *) io->opaque; + return ((PHYSFS_sint64) finfo->entry->size); +} /* UNPK_length */ + + +static PHYSFS_Io *UNPK_duplicate(PHYSFS_Io *_io) +{ + UNPKfileinfo *origfinfo = (UNPKfileinfo *) _io->opaque; + PHYSFS_Io *io = NULL; + PHYSFS_Io *retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + UNPKfileinfo *finfo = (UNPKfileinfo *) allocator.Malloc(sizeof (UNPKfileinfo)); + GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_duplicate_failed); + GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_duplicate_failed); + + io = origfinfo->io->duplicate(origfinfo->io); + if (!io) goto UNPK_duplicate_failed; + finfo->io = io; + finfo->entry = origfinfo->entry; + finfo->curPos = 0; + memcpy(retval, _io, sizeof (PHYSFS_Io)); + retval->opaque = finfo; + return retval; + +UNPK_duplicate_failed: + if (finfo != NULL) allocator.Free(finfo); + if (retval != NULL) allocator.Free(retval); + if (io != NULL) io->destroy(io); + return NULL; +} /* UNPK_duplicate */ + +static int UNPK_flush(PHYSFS_Io *io) { return 1; /* no write support. */ } + +static void UNPK_destroy(PHYSFS_Io *io) +{ + UNPKfileinfo *finfo = (UNPKfileinfo *) io->opaque; + finfo->io->destroy(finfo->io); + allocator.Free(finfo); + allocator.Free(io); +} /* UNPK_destroy */ + + +static const PHYSFS_Io UNPK_Io = +{ + CURRENT_PHYSFS_IO_API_VERSION, NULL, + UNPK_read, + UNPK_write, + UNPK_seek, + UNPK_tell, + UNPK_length, + UNPK_duplicate, + UNPK_flush, + UNPK_destroy +}; + + +static inline UNPKentry *findEntry(UNPKinfo *info, const char *path) +{ + return (UNPKentry *) __PHYSFS_DirTreeFind(&info->tree, path); +} /* findEntry */ + + +PHYSFS_Io *UNPK_openRead(void *opaque, const char *name) +{ + PHYSFS_Io *retval = NULL; + UNPKinfo *info = (UNPKinfo *) opaque; + UNPKfileinfo *finfo = NULL; + UNPKentry *entry = findEntry(info, name); + + BAIL_IF_ERRPASS(!entry, NULL); + BAIL_IF(entry->tree.isdir, PHYSFS_ERR_NOT_A_FILE, NULL); + + retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_openRead_failed); + + finfo = (UNPKfileinfo *) allocator.Malloc(sizeof (UNPKfileinfo)); + GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, UNPK_openRead_failed); + + finfo->io = info->io->duplicate(info->io); + GOTO_IF_ERRPASS(!finfo->io, UNPK_openRead_failed); + + if (!finfo->io->seek(finfo->io, entry->startPos)) + goto UNPK_openRead_failed; + + finfo->curPos = 0; + finfo->entry = entry; + + memcpy(retval, &UNPK_Io, sizeof (*retval)); + retval->opaque = finfo; + return retval; + +UNPK_openRead_failed: + if (finfo != NULL) + { + if (finfo->io != NULL) + finfo->io->destroy(finfo->io); + allocator.Free(finfo); + } /* if */ + + if (retval != NULL) + allocator.Free(retval); + + return NULL; +} /* UNPK_openRead */ + + +PHYSFS_Io *UNPK_openWrite(void *opaque, const char *name) +{ + BAIL(PHYSFS_ERR_READ_ONLY, NULL); +} /* UNPK_openWrite */ + + +PHYSFS_Io *UNPK_openAppend(void *opaque, const char *name) +{ + BAIL(PHYSFS_ERR_READ_ONLY, NULL); +} /* UNPK_openAppend */ + + +int UNPK_remove(void *opaque, const char *name) +{ + BAIL(PHYSFS_ERR_READ_ONLY, 0); +} /* UNPK_remove */ + + +int UNPK_mkdir(void *opaque, const char *name) +{ + BAIL(PHYSFS_ERR_READ_ONLY, 0); +} /* UNPK_mkdir */ + + +int UNPK_stat(void *opaque, const char *path, PHYSFS_Stat *stat) +{ + UNPKinfo *info = (UNPKinfo *) opaque; + const UNPKentry *entry = findEntry(info, path); + + BAIL_IF_ERRPASS(!entry, 0); + + if (entry->tree.isdir) + { + stat->filetype = PHYSFS_FILETYPE_DIRECTORY; + stat->filesize = 0; + } /* if */ + else + { + stat->filetype = PHYSFS_FILETYPE_REGULAR; + stat->filesize = entry->size; + } /* else */ + + stat->modtime = entry->mtime; + stat->createtime = entry->ctime; + stat->accesstime = -1; + stat->readonly = 1; + + return 1; +} /* UNPK_stat */ + + +void *UNPK_addEntry(void *opaque, char *name, const int isdir, + const PHYSFS_sint64 ctime, const PHYSFS_sint64 mtime, + const PHYSFS_uint64 pos, const PHYSFS_uint64 len) +{ + UNPKinfo *info = (UNPKinfo *) opaque; + UNPKentry *entry; + + entry = (UNPKentry *) __PHYSFS_DirTreeAdd(&info->tree, name, isdir); + BAIL_IF_ERRPASS(!entry, NULL); + + entry->startPos = isdir ? 0 : pos; + entry->size = isdir ? 0 : len; + entry->ctime = ctime; + entry->mtime = mtime; + + return entry; +} /* UNPK_addEntry */ + + +void *UNPK_openArchive(PHYSFS_Io *io) +{ + UNPKinfo *info = (UNPKinfo *) allocator.Malloc(sizeof (UNPKinfo)); + BAIL_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + + if (!__PHYSFS_DirTreeInit(&info->tree, sizeof (UNPKentry))) + { + allocator.Free(info); + return NULL; + } /* if */ + + info->io = io; + + return info; +} /* UNPK_openArchive */ + +/* end of physfs_archiver_unpacked.c ... */ + diff --git a/desktop_version/physfs/physfs_archiver_zip.c b/desktop_version/physfs/physfs_archiver_zip.c new file mode 100644 index 00000000..9972628f --- /dev/null +++ b/desktop_version/physfs/physfs_archiver_zip.c @@ -0,0 +1,1710 @@ +/* + * ZIP support routines for PhysicsFS. + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon, with some peeking at "unzip.c" + * by Gilles Vollant. + */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_internal.h" + +#if PHYSFS_SUPPORTS_ZIP + +#include +#include + +#include "physfs_miniz.h" + +/* + * A buffer of ZIP_READBUFSIZE is allocated for each compressed file opened, + * and is freed when you close the file; compressed data is read into + * this buffer, and then is decompressed into the buffer passed to + * PHYSFS_read(). + * + * Uncompressed entries in a zipfile do not allocate this buffer; they just + * read data directly into the buffer passed to PHYSFS_read(). + * + * Depending on your speed and memory requirements, you should tweak this + * value. + */ +#define ZIP_READBUFSIZE (16 * 1024) + + +/* + * Entries are "unresolved" until they are first opened. At that time, + * local file headers parsed/validated, data offsets will be updated to look + * at the actual file data instead of the header, and symlinks will be + * followed and optimized. This means that we don't seek and read around the + * archive until forced to do so, and after the first time, we had to do + * less reading and parsing, which is very CD-ROM friendly. + */ +typedef enum +{ + ZIP_UNRESOLVED_FILE, + ZIP_UNRESOLVED_SYMLINK, + ZIP_RESOLVING, + ZIP_RESOLVED, + ZIP_DIRECTORY, + ZIP_BROKEN_FILE, + ZIP_BROKEN_SYMLINK +} ZipResolveType; + + +/* + * One ZIPentry is kept for each file in an open ZIP archive. + */ +typedef struct _ZIPentry +{ + __PHYSFS_DirTreeEntry tree; /* manages directory tree */ + struct _ZIPentry *symlink; /* NULL or file we symlink to */ + ZipResolveType resolved; /* Have we resolved file/symlink? */ + PHYSFS_uint64 offset; /* offset of data in archive */ + PHYSFS_uint16 version; /* version made by */ + PHYSFS_uint16 version_needed; /* version needed to extract */ + PHYSFS_uint16 general_bits; /* general purpose bits */ + PHYSFS_uint16 compression_method; /* compression method */ + PHYSFS_uint32 crc; /* crc-32 */ + PHYSFS_uint64 compressed_size; /* compressed size */ + PHYSFS_uint64 uncompressed_size; /* uncompressed size */ + PHYSFS_sint64 last_mod_time; /* last file mod time */ + PHYSFS_uint32 dos_mod_time; /* original MS-DOS style mod time */ +} ZIPentry; + +/* + * One ZIPinfo is kept for each open ZIP archive. + */ +typedef struct +{ + __PHYSFS_DirTree tree; /* manages directory tree. */ + PHYSFS_Io *io; /* the i/o interface for this archive. */ + int zip64; /* non-zero if this is a Zip64 archive. */ + int has_crypto; /* non-zero if any entry uses encryption. */ +} ZIPinfo; + +/* + * One ZIPfileinfo is kept for each open file in a ZIP archive. + */ +typedef struct +{ + ZIPentry *entry; /* Info on file. */ + PHYSFS_Io *io; /* physical file handle. */ + PHYSFS_uint32 compressed_position; /* offset in compressed data. */ + PHYSFS_uint32 uncompressed_position; /* tell() position. */ + PHYSFS_uint8 *buffer; /* decompression buffer. */ + PHYSFS_uint32 crypto_keys[3]; /* for "traditional" crypto. */ + PHYSFS_uint32 initial_crypto_keys[3]; /* for "traditional" crypto. */ + z_stream stream; /* zlib stream state. */ +} ZIPfileinfo; + + +/* Magic numbers... */ +#define ZIP_LOCAL_FILE_SIG 0x04034b50 +#define ZIP_CENTRAL_DIR_SIG 0x02014b50 +#define ZIP_END_OF_CENTRAL_DIR_SIG 0x06054b50 +#define ZIP64_END_OF_CENTRAL_DIR_SIG 0x06064b50 +#define ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIG 0x07064b50 +#define ZIP64_EXTENDED_INFO_EXTRA_FIELD_SIG 0x0001 + +/* compression methods... */ +#define COMPMETH_NONE 0 +/* ...and others... */ + + +#define UNIX_FILETYPE_MASK 0170000 +#define UNIX_FILETYPE_SYMLINK 0120000 + +#define ZIP_GENERAL_BITS_TRADITIONAL_CRYPTO (1 << 0) +#define ZIP_GENERAL_BITS_IGNORE_LOCAL_HEADER (1 << 3) + +/* support for "traditional" PKWARE encryption. */ +static int zip_entry_is_tradional_crypto(const ZIPentry *entry) +{ + return (entry->general_bits & ZIP_GENERAL_BITS_TRADITIONAL_CRYPTO) != 0; +} /* zip_entry_is_traditional_crypto */ + +static int zip_entry_ignore_local_header(const ZIPentry *entry) +{ + return (entry->general_bits & ZIP_GENERAL_BITS_IGNORE_LOCAL_HEADER) != 0; +} /* zip_entry_is_traditional_crypto */ + +static PHYSFS_uint32 zip_crypto_crc32(const PHYSFS_uint32 crc, const PHYSFS_uint8 val) +{ + int i; + PHYSFS_uint32 xorval = (crc ^ ((PHYSFS_uint32) val)) & 0xFF; + for (i = 0; i < 8; i++) + xorval = ((xorval & 1) ? (0xEDB88320 ^ (xorval >> 1)) : (xorval >> 1)); + return xorval ^ (crc >> 8); +} /* zip_crc32 */ + +static void zip_update_crypto_keys(PHYSFS_uint32 *keys, const PHYSFS_uint8 val) +{ + keys[0] = zip_crypto_crc32(keys[0], val); + keys[1] = keys[1] + (keys[0] & 0x000000FF); + keys[1] = (keys[1] * 134775813) + 1; + keys[2] = zip_crypto_crc32(keys[2], (PHYSFS_uint8) ((keys[1] >> 24) & 0xFF)); +} /* zip_update_crypto_keys */ + +static PHYSFS_uint8 zip_decrypt_byte(const PHYSFS_uint32 *keys) +{ + const PHYSFS_uint16 tmp = keys[2] | 2; + return (PHYSFS_uint8) ((tmp * (tmp ^ 1)) >> 8); +} /* zip_decrypt_byte */ + +static PHYSFS_sint64 zip_read_decrypt(ZIPfileinfo *finfo, void *buf, PHYSFS_uint64 len) +{ + PHYSFS_Io *io = finfo->io; + const PHYSFS_sint64 br = io->read(io, buf, len); + + /* Decompression the new data if necessary. */ + if (zip_entry_is_tradional_crypto(finfo->entry) && (br > 0)) + { + PHYSFS_uint32 *keys = finfo->crypto_keys; + PHYSFS_uint8 *ptr = (PHYSFS_uint8 *) buf; + PHYSFS_sint64 i; + for (i = 0; i < br; i++, ptr++) + { + const PHYSFS_uint8 ch = *ptr ^ zip_decrypt_byte(keys); + zip_update_crypto_keys(keys, ch); + *ptr = ch; + } /* for */ + } /* if */ + + return br; +} /* zip_read_decrypt */ + +static int zip_prep_crypto_keys(ZIPfileinfo *finfo, const PHYSFS_uint8 *crypto_header, const PHYSFS_uint8 *password) +{ + /* It doesn't appear to be documented in PKWare's APPNOTE.TXT, but you + need to use a different byte in the header to verify the password + if general purpose bit 3 is set. Discovered this from Info-Zip. + That's what the (verifier) value is doing, below. */ + + PHYSFS_uint32 *keys = finfo->crypto_keys; + const ZIPentry *entry = finfo->entry; + const int usedate = zip_entry_ignore_local_header(entry); + const PHYSFS_uint8 verifier = (PHYSFS_uint8) ((usedate ? (entry->dos_mod_time >> 8) : (entry->crc >> 24)) & 0xFF); + PHYSFS_uint8 finalbyte = 0; + int i = 0; + + /* initialize vector with defaults, then password, then header. */ + keys[0] = 305419896; + keys[1] = 591751049; + keys[2] = 878082192; + + while (*password) + zip_update_crypto_keys(keys, *(password++)); + + for (i = 0; i < 12; i++) + { + const PHYSFS_uint8 c = crypto_header[i] ^ zip_decrypt_byte(keys); + zip_update_crypto_keys(keys, c); + finalbyte = c; + } /* for */ + + /* you have a 1/256 chance of passing this test incorrectly. :/ */ + if (finalbyte != verifier) + BAIL(PHYSFS_ERR_BAD_PASSWORD, 0); + + /* save the initial vector for seeking purposes. Not secure!! */ + memcpy(finfo->initial_crypto_keys, finfo->crypto_keys, 12); + return 1; +} /* zip_prep_crypto_keys */ + + +/* + * Bridge physfs allocation functions to zlib's format... + */ +static voidpf zlibPhysfsAlloc(voidpf opaque, uInt items, uInt size) +{ + return ((PHYSFS_Allocator *) opaque)->Malloc(items * size); +} /* zlibPhysfsAlloc */ + +/* + * Bridge physfs allocation functions to zlib's format... + */ +static void zlibPhysfsFree(voidpf opaque, voidpf address) +{ + ((PHYSFS_Allocator *) opaque)->Free(address); +} /* zlibPhysfsFree */ + + +/* + * Construct a new z_stream to a sane state. + */ +static void initializeZStream(z_stream *pstr) +{ + memset(pstr, '\0', sizeof (z_stream)); + pstr->zalloc = zlibPhysfsAlloc; + pstr->zfree = zlibPhysfsFree; + pstr->opaque = &allocator; +} /* initializeZStream */ + + +static PHYSFS_ErrorCode zlib_error_code(int rc) +{ + switch (rc) + { + case Z_OK: return PHYSFS_ERR_OK; /* not an error. */ + case Z_STREAM_END: return PHYSFS_ERR_OK; /* not an error. */ + case Z_ERRNO: return PHYSFS_ERR_IO; + case Z_MEM_ERROR: return PHYSFS_ERR_OUT_OF_MEMORY; + default: return PHYSFS_ERR_CORRUPT; + } /* switch */ +} /* zlib_error_string */ + + +/* + * Wrap all zlib calls in this, so the physfs error state is set appropriately. + */ +static int zlib_err(const int rc) +{ + PHYSFS_setErrorCode(zlib_error_code(rc)); + return rc; +} /* zlib_err */ + +/* + * Read an unsigned 64-bit int and swap to native byte order. + */ +static int readui64(PHYSFS_Io *io, PHYSFS_uint64 *val) +{ + PHYSFS_uint64 v; + BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0); + *val = PHYSFS_swapULE64(v); + return 1; +} /* readui64 */ + +/* + * Read an unsigned 32-bit int and swap to native byte order. + */ +static int readui32(PHYSFS_Io *io, PHYSFS_uint32 *val) +{ + PHYSFS_uint32 v; + BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0); + *val = PHYSFS_swapULE32(v); + return 1; +} /* readui32 */ + + +/* + * Read an unsigned 16-bit int and swap to native byte order. + */ +static int readui16(PHYSFS_Io *io, PHYSFS_uint16 *val) +{ + PHYSFS_uint16 v; + BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &v, sizeof (v)), 0); + *val = PHYSFS_swapULE16(v); + return 1; +} /* readui16 */ + + +static PHYSFS_sint64 ZIP_read(PHYSFS_Io *_io, void *buf, PHYSFS_uint64 len) +{ + ZIPfileinfo *finfo = (ZIPfileinfo *) _io->opaque; + ZIPentry *entry = finfo->entry; + PHYSFS_sint64 retval = 0; + PHYSFS_sint64 maxread = (PHYSFS_sint64) len; + PHYSFS_sint64 avail = entry->uncompressed_size - + finfo->uncompressed_position; + + if (avail < maxread) + maxread = avail; + + BAIL_IF_ERRPASS(maxread == 0, 0); /* quick rejection. */ + + if (entry->compression_method == COMPMETH_NONE) + retval = zip_read_decrypt(finfo, buf, maxread); + else + { + finfo->stream.next_out = buf; + finfo->stream.avail_out = (uInt) maxread; + + while (retval < maxread) + { + const PHYSFS_uint32 before = (PHYSFS_uint32) finfo->stream.total_out; + int rc; + + if (finfo->stream.avail_in == 0) + { + PHYSFS_sint64 br; + + br = entry->compressed_size - finfo->compressed_position; + if (br > 0) + { + if (br > ZIP_READBUFSIZE) + br = ZIP_READBUFSIZE; + + br = zip_read_decrypt(finfo, finfo->buffer, (PHYSFS_uint64) br); + if (br <= 0) + break; + + finfo->compressed_position += (PHYSFS_uint32) br; + finfo->stream.next_in = finfo->buffer; + finfo->stream.avail_in = (unsigned int) br; + } /* if */ + } /* if */ + + rc = zlib_err(inflate(&finfo->stream, Z_SYNC_FLUSH)); + retval += (finfo->stream.total_out - before); + + if (rc != Z_OK) + break; + } /* while */ + } /* else */ + + if (retval > 0) + finfo->uncompressed_position += (PHYSFS_uint32) retval; + + return retval; +} /* ZIP_read */ + + +static PHYSFS_sint64 ZIP_write(PHYSFS_Io *io, const void *b, PHYSFS_uint64 len) +{ + BAIL(PHYSFS_ERR_READ_ONLY, -1); +} /* ZIP_write */ + + +static PHYSFS_sint64 ZIP_tell(PHYSFS_Io *io) +{ + return ((ZIPfileinfo *) io->opaque)->uncompressed_position; +} /* ZIP_tell */ + + +static int ZIP_seek(PHYSFS_Io *_io, PHYSFS_uint64 offset) +{ + ZIPfileinfo *finfo = (ZIPfileinfo *) _io->opaque; + ZIPentry *entry = finfo->entry; + PHYSFS_Io *io = finfo->io; + const int encrypted = zip_entry_is_tradional_crypto(entry); + + BAIL_IF(offset > entry->uncompressed_size, PHYSFS_ERR_PAST_EOF, 0); + + if (!encrypted && (entry->compression_method == COMPMETH_NONE)) + { + PHYSFS_sint64 newpos = offset + entry->offset; + BAIL_IF_ERRPASS(!io->seek(io, newpos), 0); + finfo->uncompressed_position = (PHYSFS_uint32) offset; + } /* if */ + + else + { + /* + * If seeking backwards, we need to redecode the file + * from the start and throw away the compressed bits until we hit + * the offset we need. If seeking forward, we still need to + * decode, but we don't rewind first. + */ + if (offset < finfo->uncompressed_position) + { + /* we do a copy so state is sane if inflateInit2() fails. */ + z_stream str; + initializeZStream(&str); + if (zlib_err(inflateInit2(&str, -MAX_WBITS)) != Z_OK) + return 0; + + if (!io->seek(io, entry->offset + (encrypted ? 12 : 0))) + return 0; + + inflateEnd(&finfo->stream); + memcpy(&finfo->stream, &str, sizeof (z_stream)); + finfo->uncompressed_position = finfo->compressed_position = 0; + + if (encrypted) + memcpy(finfo->crypto_keys, finfo->initial_crypto_keys, 12); + } /* if */ + + while (finfo->uncompressed_position != offset) + { + PHYSFS_uint8 buf[512]; + PHYSFS_uint32 maxread; + + maxread = (PHYSFS_uint32) (offset - finfo->uncompressed_position); + if (maxread > sizeof (buf)) + maxread = sizeof (buf); + + if (ZIP_read(_io, buf, maxread) != maxread) + return 0; + } /* while */ + } /* else */ + + return 1; +} /* ZIP_seek */ + + +static PHYSFS_sint64 ZIP_length(PHYSFS_Io *io) +{ + const ZIPfileinfo *finfo = (ZIPfileinfo *) io->opaque; + return (PHYSFS_sint64) finfo->entry->uncompressed_size; +} /* ZIP_length */ + + +static PHYSFS_Io *zip_get_io(PHYSFS_Io *io, ZIPinfo *inf, ZIPentry *entry); + +static PHYSFS_Io *ZIP_duplicate(PHYSFS_Io *io) +{ + ZIPfileinfo *origfinfo = (ZIPfileinfo *) io->opaque; + PHYSFS_Io *retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + ZIPfileinfo *finfo = (ZIPfileinfo *) allocator.Malloc(sizeof (ZIPfileinfo)); + GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, failed); + GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, failed); + memset(finfo, '\0', sizeof (*finfo)); + + finfo->entry = origfinfo->entry; + finfo->io = zip_get_io(origfinfo->io, NULL, finfo->entry); + GOTO_IF_ERRPASS(!finfo->io, failed); + + initializeZStream(&finfo->stream); + if (finfo->entry->compression_method != COMPMETH_NONE) + { + finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE); + GOTO_IF(!finfo->buffer, PHYSFS_ERR_OUT_OF_MEMORY, failed); + if (zlib_err(inflateInit2(&finfo->stream, -MAX_WBITS)) != Z_OK) + goto failed; + } /* if */ + + memcpy(retval, io, sizeof (PHYSFS_Io)); + retval->opaque = finfo; + return retval; + +failed: + if (finfo != NULL) + { + if (finfo->io != NULL) + finfo->io->destroy(finfo->io); + + if (finfo->buffer != NULL) + { + allocator.Free(finfo->buffer); + inflateEnd(&finfo->stream); + } /* if */ + + allocator.Free(finfo); + } /* if */ + + if (retval != NULL) + allocator.Free(retval); + + return NULL; +} /* ZIP_duplicate */ + +static int ZIP_flush(PHYSFS_Io *io) { return 1; /* no write support. */ } + +static void ZIP_destroy(PHYSFS_Io *io) +{ + ZIPfileinfo *finfo = (ZIPfileinfo *) io->opaque; + finfo->io->destroy(finfo->io); + + if (finfo->entry->compression_method != COMPMETH_NONE) + inflateEnd(&finfo->stream); + + if (finfo->buffer != NULL) + allocator.Free(finfo->buffer); + + allocator.Free(finfo); + allocator.Free(io); +} /* ZIP_destroy */ + + +static const PHYSFS_Io ZIP_Io = +{ + CURRENT_PHYSFS_IO_API_VERSION, NULL, + ZIP_read, + ZIP_write, + ZIP_seek, + ZIP_tell, + ZIP_length, + ZIP_duplicate, + ZIP_flush, + ZIP_destroy +}; + + + +static PHYSFS_sint64 zip_find_end_of_central_dir(PHYSFS_Io *io, PHYSFS_sint64 *len) +{ + PHYSFS_uint8 buf[256]; + PHYSFS_uint8 extra[4] = { 0, 0, 0, 0 }; + PHYSFS_sint32 i = 0; + PHYSFS_sint64 filelen; + PHYSFS_sint64 filepos; + PHYSFS_sint32 maxread; + PHYSFS_sint32 totalread = 0; + int found = 0; + + filelen = io->length(io); + BAIL_IF_ERRPASS(filelen == -1, -1); + + /* + * Jump to the end of the file and start reading backwards. + * The last thing in the file is the zipfile comment, which is variable + * length, and the field that specifies its size is before it in the + * file (argh!)...this means that we need to scan backwards until we + * hit the end-of-central-dir signature. We can then sanity check that + * the comment was as big as it should be to make sure we're in the + * right place. The comment length field is 16 bits, so we can stop + * searching for that signature after a little more than 64k at most, + * and call it a corrupted zipfile. + */ + + if (sizeof (buf) < filelen) + { + filepos = filelen - sizeof (buf); + maxread = sizeof (buf); + } /* if */ + else + { + filepos = 0; + maxread = (PHYSFS_uint32) filelen; + } /* else */ + + while ((totalread < filelen) && (totalread < 65557)) + { + BAIL_IF_ERRPASS(!io->seek(io, filepos), -1); + + /* make sure we catch a signature between buffers. */ + if (totalread != 0) + { + if (!__PHYSFS_readAll(io, buf, maxread - 4)) + return -1; + memcpy(&buf[maxread - 4], &extra, sizeof (extra)); + totalread += maxread - 4; + } /* if */ + else + { + if (!__PHYSFS_readAll(io, buf, maxread)) + return -1; + totalread += maxread; + } /* else */ + + memcpy(&extra, buf, sizeof (extra)); + + for (i = maxread - 4; i > 0; i--) + { + if ((buf[i + 0] == 0x50) && + (buf[i + 1] == 0x4B) && + (buf[i + 2] == 0x05) && + (buf[i + 3] == 0x06) ) + { + found = 1; /* that's the signature! */ + break; + } /* if */ + } /* for */ + + if (found) + break; + + filepos -= (maxread - 4); + if (filepos < 0) + filepos = 0; + } /* while */ + + BAIL_IF(!found, PHYSFS_ERR_UNSUPPORTED, -1); + + if (len != NULL) + *len = filelen; + + return (filepos + i); +} /* zip_find_end_of_central_dir */ + + +static int isZip(PHYSFS_Io *io) +{ + PHYSFS_uint32 sig = 0; + int retval = 0; + + /* + * The first thing in a zip file might be the signature of the + * first local file record, so it makes for a quick determination. + */ + if (readui32(io, &sig)) + { + retval = (sig == ZIP_LOCAL_FILE_SIG); + if (!retval) + { + /* + * No sig...might be a ZIP with data at the start + * (a self-extracting executable, etc), so we'll have to do + * it the hard way... + */ + retval = (zip_find_end_of_central_dir(io, NULL) != -1); + } /* if */ + } /* if */ + + return retval; +} /* isZip */ + + +/* Convert paths from old, buggy DOS zippers... */ +static void zip_convert_dos_path(const PHYSFS_uint16 entryversion, char *path) +{ + const PHYSFS_uint8 hosttype = (PHYSFS_uint8) ((entryversion >> 8) & 0xFF); + if (hosttype == 0) /* FS_FAT_ */ + { + while (*path) + { + if (*path == '\\') + *path = '/'; + path++; + } /* while */ + } /* if */ +} /* zip_convert_dos_path */ + + +static void zip_expand_symlink_path(char *path) +{ + char *ptr = path; + char *prevptr = path; + + while (1) + { + ptr = strchr(ptr, '/'); + if (ptr == NULL) + break; + + if (*(ptr + 1) == '.') + { + if (*(ptr + 2) == '/') + { + /* current dir in middle of string: ditch it. */ + memmove(ptr, ptr + 2, strlen(ptr + 2) + 1); + } /* else if */ + + else if (*(ptr + 2) == '\0') + { + /* current dir at end of string: ditch it. */ + *ptr = '\0'; + } /* else if */ + + else if (*(ptr + 2) == '.') + { + if (*(ptr + 3) == '/') + { + /* parent dir in middle: move back one, if possible. */ + memmove(prevptr, ptr + 4, strlen(ptr + 4) + 1); + ptr = prevptr; + while (prevptr != path) + { + prevptr--; + if (*prevptr == '/') + { + prevptr++; + break; + } /* if */ + } /* while */ + } /* if */ + + if (*(ptr + 3) == '\0') + { + /* parent dir at end: move back one, if possible. */ + *prevptr = '\0'; + } /* if */ + } /* if */ + } /* if */ + else + { + prevptr = ptr; + ptr++; + } /* else */ + } /* while */ +} /* zip_expand_symlink_path */ + + +static inline ZIPentry *zip_find_entry(ZIPinfo *info, const char *path) +{ + return (ZIPentry *) __PHYSFS_DirTreeFind(&info->tree, path); +} /* zip_find_entry */ + +/* (forward reference: zip_follow_symlink and zip_resolve call each other.) */ +static int zip_resolve(PHYSFS_Io *io, ZIPinfo *info, ZIPentry *entry); + +/* + * Look for the entry named by (path). If it exists, resolve it, and return + * a pointer to that entry. If it's another symlink, keep resolving until you + * hit a real file and then return a pointer to the final non-symlink entry. + * If there's a problem, return NULL. + */ +static ZIPentry *zip_follow_symlink(PHYSFS_Io *io, ZIPinfo *info, char *path) +{ + ZIPentry *entry; + + zip_expand_symlink_path(path); + entry = zip_find_entry(info, path); + if (entry != NULL) + { + if (!zip_resolve(io, info, entry)) /* recursive! */ + entry = NULL; + else + { + if (entry->symlink != NULL) + entry = entry->symlink; + } /* else */ + } /* if */ + + return entry; +} /* zip_follow_symlink */ + + +static int zip_resolve_symlink(PHYSFS_Io *io, ZIPinfo *info, ZIPentry *entry) +{ + const size_t size = (size_t) entry->uncompressed_size; + char *path = NULL; + int rc = 0; + + /* + * We've already parsed the local file header of the symlink at this + * point. Now we need to read the actual link from the file data and + * follow it. + */ + + BAIL_IF_ERRPASS(!io->seek(io, entry->offset), 0); + + path = (char *) __PHYSFS_smallAlloc(size + 1); + BAIL_IF(!path, PHYSFS_ERR_OUT_OF_MEMORY, 0); + + if (entry->compression_method == COMPMETH_NONE) + rc = __PHYSFS_readAll(io, path, size); + + else /* symlink target path is compressed... */ + { + z_stream stream; + const size_t complen = (size_t) entry->compressed_size; + PHYSFS_uint8 *compressed = (PHYSFS_uint8*) __PHYSFS_smallAlloc(complen); + if (compressed != NULL) + { + if (__PHYSFS_readAll(io, compressed, complen)) + { + initializeZStream(&stream); + stream.next_in = compressed; + stream.avail_in = (unsigned int) complen; + stream.next_out = (unsigned char *) path; + stream.avail_out = (unsigned int) size; + if (zlib_err(inflateInit2(&stream, -MAX_WBITS)) == Z_OK) + { + rc = zlib_err(inflate(&stream, Z_FINISH)); + inflateEnd(&stream); + + /* both are acceptable outcomes... */ + rc = ((rc == Z_OK) || (rc == Z_STREAM_END)); + } /* if */ + } /* if */ + __PHYSFS_smallFree(compressed); + } /* if */ + } /* else */ + + if (rc) + { + path[entry->uncompressed_size] = '\0'; /* null-terminate it. */ + zip_convert_dos_path(entry->version, path); + entry->symlink = zip_follow_symlink(io, info, path); + } /* else */ + + __PHYSFS_smallFree(path); + + return (entry->symlink != NULL); +} /* zip_resolve_symlink */ + + +/* + * Parse the local file header of an entry, and update entry->offset. + */ +static int zip_parse_local(PHYSFS_Io *io, ZIPentry *entry) +{ + PHYSFS_uint32 ui32; + PHYSFS_uint16 ui16; + PHYSFS_uint16 fnamelen; + PHYSFS_uint16 extralen; + + /* + * crc and (un)compressed_size are always zero if this is a "JAR" + * archive created with Sun's Java tools, apparently. We only + * consider this archive corrupted if those entries don't match and + * aren't zero. That seems to work well. + * We also ignore a mismatch if the value is 0xFFFFFFFF here, since it's + * possible that's a Zip64 thing. + */ + + /* !!! FIXME: apparently these are zero if general purpose bit 3 is set, + !!! FIXME: which is probably true for Jar files, fwiw, but we don't + !!! FIXME: care about these values anyhow. */ + + BAIL_IF_ERRPASS(!io->seek(io, entry->offset), 0); + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 != ZIP_LOCAL_FILE_SIG, PHYSFS_ERR_CORRUPT, 0); + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); + BAIL_IF(ui16 != entry->version_needed, PHYSFS_ERR_CORRUPT, 0); + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); /* general bits. */ + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); + BAIL_IF(ui16 != entry->compression_method, PHYSFS_ERR_CORRUPT, 0); + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); /* date/time */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 && (ui32 != entry->crc), PHYSFS_ERR_CORRUPT, 0); + + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 && (ui32 != 0xFFFFFFFF) && + (ui32 != entry->compressed_size), PHYSFS_ERR_CORRUPT, 0); + + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 && (ui32 != 0xFFFFFFFF) && + (ui32 != entry->uncompressed_size), PHYSFS_ERR_CORRUPT, 0); + + BAIL_IF_ERRPASS(!readui16(io, &fnamelen), 0); + BAIL_IF_ERRPASS(!readui16(io, &extralen), 0); + + entry->offset += fnamelen + extralen + 30; + return 1; +} /* zip_parse_local */ + + +static int zip_resolve(PHYSFS_Io *io, ZIPinfo *info, ZIPentry *entry) +{ + int retval = 1; + const ZipResolveType resolve_type = entry->resolved; + + if (resolve_type == ZIP_DIRECTORY) + return 1; /* we're good. */ + + /* Don't bother if we've failed to resolve this entry before. */ + BAIL_IF(resolve_type == ZIP_BROKEN_FILE, PHYSFS_ERR_CORRUPT, 0); + BAIL_IF(resolve_type == ZIP_BROKEN_SYMLINK, PHYSFS_ERR_CORRUPT, 0); + + /* uhoh...infinite symlink loop! */ + BAIL_IF(resolve_type == ZIP_RESOLVING, PHYSFS_ERR_SYMLINK_LOOP, 0); + + /* + * We fix up the offset to point to the actual data on the + * first open, since we don't want to seek across the whole file on + * archive open (can be SLOW on large, CD-stored files), but we + * need to check the local file header...not just for corruption, + * but since it stores offset info the central directory does not. + */ + if (resolve_type != ZIP_RESOLVED) + { + if (entry->tree.isdir) /* an ancestor dir that DirTree filled in? */ + { + entry->resolved = ZIP_DIRECTORY; + return 1; + } /* if */ + + retval = zip_parse_local(io, entry); + if (retval) + { + /* + * If it's a symlink, find the original file. This will cause + * resolution of other entries (other symlinks and, eventually, + * the real file) if all goes well. + */ + if (resolve_type == ZIP_UNRESOLVED_SYMLINK) + retval = zip_resolve_symlink(io, info, entry); + } /* if */ + + if (resolve_type == ZIP_UNRESOLVED_SYMLINK) + entry->resolved = ((retval) ? ZIP_RESOLVED : ZIP_BROKEN_SYMLINK); + else if (resolve_type == ZIP_UNRESOLVED_FILE) + entry->resolved = ((retval) ? ZIP_RESOLVED : ZIP_BROKEN_FILE); + } /* if */ + + return retval; +} /* zip_resolve */ + + +static int zip_entry_is_symlink(const ZIPentry *entry) +{ + return ((entry->resolved == ZIP_UNRESOLVED_SYMLINK) || + (entry->resolved == ZIP_BROKEN_SYMLINK) || + (entry->symlink)); +} /* zip_entry_is_symlink */ + + +static int zip_version_does_symlinks(PHYSFS_uint32 version) +{ + int retval = 0; + PHYSFS_uint8 hosttype = (PHYSFS_uint8) ((version >> 8) & 0xFF); + + switch (hosttype) + { + /* + * These are the platforms that can NOT build an archive with + * symlinks, according to the Info-ZIP project. + */ + case 0: /* FS_FAT_ */ + case 1: /* AMIGA_ */ + case 2: /* VMS_ */ + case 4: /* VM_CSM_ */ + case 6: /* FS_HPFS_ */ + case 11: /* FS_NTFS_ */ + case 14: /* FS_VFAT_ */ + case 13: /* ACORN_ */ + case 15: /* MVS_ */ + case 18: /* THEOS_ */ + break; /* do nothing. */ + + default: /* assume the rest to be unix-like. */ + retval = 1; + break; + } /* switch */ + + return retval; +} /* zip_version_does_symlinks */ + + +static inline int zip_has_symlink_attr(const ZIPentry *entry, + const PHYSFS_uint32 extern_attr) +{ + PHYSFS_uint16 xattr = ((extern_attr >> 16) & 0xFFFF); + return ( (zip_version_does_symlinks(entry->version)) && + (entry->uncompressed_size > 0) && + ((xattr & UNIX_FILETYPE_MASK) == UNIX_FILETYPE_SYMLINK) ); +} /* zip_has_symlink_attr */ + + +static PHYSFS_sint64 zip_dos_time_to_physfs_time(PHYSFS_uint32 dostime) +{ + PHYSFS_uint32 dosdate; + struct tm unixtime; + memset(&unixtime, '\0', sizeof (unixtime)); + + dosdate = (PHYSFS_uint32) ((dostime >> 16) & 0xFFFF); + dostime &= 0xFFFF; + + /* dissect date */ + unixtime.tm_year = ((dosdate >> 9) & 0x7F) + 80; + unixtime.tm_mon = ((dosdate >> 5) & 0x0F) - 1; + unixtime.tm_mday = ((dosdate ) & 0x1F); + + /* dissect time */ + unixtime.tm_hour = ((dostime >> 11) & 0x1F); + unixtime.tm_min = ((dostime >> 5) & 0x3F); + unixtime.tm_sec = ((dostime << 1) & 0x3E); + + /* let mktime calculate daylight savings time. */ + unixtime.tm_isdst = -1; + + return ((PHYSFS_sint64) mktime(&unixtime)); +} /* zip_dos_time_to_physfs_time */ + + +static ZIPentry *zip_load_entry(ZIPinfo *info, const int zip64, + const PHYSFS_uint64 ofs_fixup) +{ + PHYSFS_Io *io = info->io; + ZIPentry entry; + ZIPentry *retval = NULL; + PHYSFS_uint16 fnamelen, extralen, commentlen; + PHYSFS_uint32 external_attr; + PHYSFS_uint32 starting_disk; + PHYSFS_uint64 offset; + PHYSFS_uint16 ui16; + PHYSFS_uint32 ui32; + PHYSFS_sint64 si64; + char *name = NULL; + int isdir = 0; + + /* sanity check with central directory signature... */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), NULL); + BAIL_IF(ui32 != ZIP_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, NULL); + + memset(&entry, '\0', sizeof (entry)); + + /* Get the pertinent parts of the record... */ + BAIL_IF_ERRPASS(!readui16(io, &entry.version), NULL); + BAIL_IF_ERRPASS(!readui16(io, &entry.version_needed), NULL); + BAIL_IF_ERRPASS(!readui16(io, &entry.general_bits), NULL); /* general bits */ + BAIL_IF_ERRPASS(!readui16(io, &entry.compression_method), NULL); + BAIL_IF_ERRPASS(!readui32(io, &entry.dos_mod_time), NULL); + entry.last_mod_time = zip_dos_time_to_physfs_time(entry.dos_mod_time); + BAIL_IF_ERRPASS(!readui32(io, &entry.crc), NULL); + BAIL_IF_ERRPASS(!readui32(io, &ui32), NULL); + entry.compressed_size = (PHYSFS_uint64) ui32; + BAIL_IF_ERRPASS(!readui32(io, &ui32), NULL); + entry.uncompressed_size = (PHYSFS_uint64) ui32; + BAIL_IF_ERRPASS(!readui16(io, &fnamelen), NULL); + BAIL_IF_ERRPASS(!readui16(io, &extralen), NULL); + BAIL_IF_ERRPASS(!readui16(io, &commentlen), NULL); + BAIL_IF_ERRPASS(!readui16(io, &ui16), NULL); + starting_disk = (PHYSFS_uint32) ui16; + BAIL_IF_ERRPASS(!readui16(io, &ui16), NULL); /* internal file attribs */ + BAIL_IF_ERRPASS(!readui32(io, &external_attr), NULL); + BAIL_IF_ERRPASS(!readui32(io, &ui32), NULL); + offset = (PHYSFS_uint64) ui32; + + name = (char *) __PHYSFS_smallAlloc(fnamelen + 1); + BAIL_IF(!name, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + if (!__PHYSFS_readAll(io, name, fnamelen)) + { + __PHYSFS_smallFree(name); + return NULL; + } /* if */ + + if (name[fnamelen - 1] == '/') + { + name[fnamelen - 1] = '\0'; + isdir = 1; + } /* if */ + name[fnamelen] = '\0'; /* null-terminate the filename. */ + + zip_convert_dos_path(entry.version, name); + + retval = (ZIPentry *) __PHYSFS_DirTreeAdd(&info->tree, name, isdir); + __PHYSFS_smallFree(name); + + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + + /* It's okay to BAIL without freeing retval, because it's stored in the + __PHYSFS_DirTree and will be freed later anyhow. */ + BAIL_IF(retval->last_mod_time != 0, PHYSFS_ERR_CORRUPT, NULL); /* dupe? */ + + /* Move the data we already read into place in the official object. */ + memcpy(((PHYSFS_uint8 *) retval) + sizeof (__PHYSFS_DirTreeEntry), + ((PHYSFS_uint8 *) &entry) + sizeof (__PHYSFS_DirTreeEntry), + sizeof (*retval) - sizeof (__PHYSFS_DirTreeEntry)); + + retval->symlink = NULL; /* will be resolved later, if necessary. */ + + if (isdir) + retval->resolved = ZIP_DIRECTORY; + else + { + retval->resolved = (zip_has_symlink_attr(retval, external_attr)) ? + ZIP_UNRESOLVED_SYMLINK : ZIP_UNRESOLVED_FILE; + } /* else */ + + si64 = io->tell(io); + BAIL_IF_ERRPASS(si64 == -1, NULL); + + /* If the actual sizes didn't fit in 32-bits, look for the Zip64 + extended information extra field... */ + if ( (zip64) && + ((offset == 0xFFFFFFFF) || + (starting_disk == 0xFFFFFFFF) || + (retval->compressed_size == 0xFFFFFFFF) || + (retval->uncompressed_size == 0xFFFFFFFF)) ) + { + int found = 0; + PHYSFS_uint16 sig = 0; + PHYSFS_uint16 len = 0; + while (extralen > 4) + { + BAIL_IF_ERRPASS(!readui16(io, &sig), NULL); + BAIL_IF_ERRPASS(!readui16(io, &len), NULL); + + si64 += 4 + len; + extralen -= 4 + len; + if (sig != ZIP64_EXTENDED_INFO_EXTRA_FIELD_SIG) + { + BAIL_IF_ERRPASS(!io->seek(io, si64), NULL); + continue; + } /* if */ + + found = 1; + break; + } /* while */ + + BAIL_IF(!found, PHYSFS_ERR_CORRUPT, NULL); + + if (retval->uncompressed_size == 0xFFFFFFFF) + { + BAIL_IF(len < 8, PHYSFS_ERR_CORRUPT, NULL); + BAIL_IF_ERRPASS(!readui64(io, &retval->uncompressed_size), NULL); + len -= 8; + } /* if */ + + if (retval->compressed_size == 0xFFFFFFFF) + { + BAIL_IF(len < 8, PHYSFS_ERR_CORRUPT, NULL); + BAIL_IF_ERRPASS(!readui64(io, &retval->compressed_size), NULL); + len -= 8; + } /* if */ + + if (offset == 0xFFFFFFFF) + { + BAIL_IF(len < 8, PHYSFS_ERR_CORRUPT, NULL); + BAIL_IF_ERRPASS(!readui64(io, &offset), NULL); + len -= 8; + } /* if */ + + if (starting_disk == 0xFFFFFFFF) + { + BAIL_IF(len < 8, PHYSFS_ERR_CORRUPT, NULL); + BAIL_IF_ERRPASS(!readui32(io, &starting_disk), NULL); + len -= 4; + } /* if */ + + BAIL_IF(len != 0, PHYSFS_ERR_CORRUPT, NULL); + } /* if */ + + BAIL_IF(starting_disk != 0, PHYSFS_ERR_CORRUPT, NULL); + + retval->offset = offset + ofs_fixup; + + /* seek to the start of the next entry in the central directory... */ + BAIL_IF_ERRPASS(!io->seek(io, si64 + extralen + commentlen), NULL); + + return retval; /* success. */ +} /* zip_load_entry */ + + +/* This leaves things allocated on error; the caller will clean up the mess. */ +static int zip_load_entries(ZIPinfo *info, + const PHYSFS_uint64 data_ofs, + const PHYSFS_uint64 central_ofs, + const PHYSFS_uint64 entry_count) +{ + PHYSFS_Io *io = info->io; + const int zip64 = info->zip64; + PHYSFS_uint64 i; + + BAIL_IF_ERRPASS(!io->seek(io, central_ofs), 0); + + for (i = 0; i < entry_count; i++) + { + ZIPentry *entry = zip_load_entry(info, zip64, data_ofs); + BAIL_IF_ERRPASS(!entry, 0); + if (zip_entry_is_tradional_crypto(entry)) + info->has_crypto = 1; + } /* for */ + + return 1; +} /* zip_load_entries */ + + +static PHYSFS_sint64 zip64_find_end_of_central_dir(PHYSFS_Io *io, + PHYSFS_sint64 _pos, + PHYSFS_uint64 offset) +{ + /* + * Naturally, the offset is useless to us; it is the offset from the + * start of file, which is meaningless if we've appended this .zip to + * a self-extracting .exe. We need to find this on our own. It should + * be directly before the locator record, but the record in question, + * like the original end-of-central-directory record, ends with a + * variable-length field. Unlike the original, which has to store the + * size of that variable-length field in a 16-bit int and thus has to be + * within 64k, the new one gets 64-bits. + * + * Fortunately, the only currently-specified record for that variable + * length block is some weird proprietary thing that deals with EBCDIC + * and tape backups or something. So we don't seek far. + */ + + PHYSFS_uint32 ui32; + const PHYSFS_uint64 pos = (PHYSFS_uint64) _pos; + + assert(_pos > 0); + + /* Try offset specified in the Zip64 end of central directory locator. */ + /* This works if the entire PHYSFS_Io is the zip file. */ + BAIL_IF_ERRPASS(!io->seek(io, offset), -1); + BAIL_IF_ERRPASS(!readui32(io, &ui32), -1); + if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG) + return offset; + + /* Try 56 bytes before the Zip64 end of central directory locator. */ + /* This works if the record isn't variable length and is version 1. */ + if (pos > 56) + { + BAIL_IF_ERRPASS(!io->seek(io, pos-56), -1); + BAIL_IF_ERRPASS(!readui32(io, &ui32), -1); + if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG) + return pos-56; + } /* if */ + + /* Try 84 bytes before the Zip64 end of central directory locator. */ + /* This works if the record isn't variable length and is version 2. */ + if (pos > 84) + { + BAIL_IF_ERRPASS(!io->seek(io, pos-84), -1); + BAIL_IF_ERRPASS(!readui32(io, &ui32), -1); + if (ui32 == ZIP64_END_OF_CENTRAL_DIR_SIG) + return pos-84; + } /* if */ + + /* Ok, brute force: we know it's between (offset) and (pos) somewhere. */ + /* Just try moving back at most 256k. Oh well. */ + if ((offset < pos) && (pos > 4)) + { + const size_t maxbuflen = 256 * 1024; + size_t len = (size_t) (pos - offset); + PHYSFS_uint8 *buf = NULL; + PHYSFS_sint32 i; + + if (len > maxbuflen) + len = maxbuflen; + + buf = (PHYSFS_uint8 *) __PHYSFS_smallAlloc(len); + BAIL_IF(!buf, PHYSFS_ERR_OUT_OF_MEMORY, -1); + + if (!io->seek(io, pos - len) || !__PHYSFS_readAll(io, buf, len)) + { + __PHYSFS_smallFree(buf); + return -1; /* error was set elsewhere. */ + } /* if */ + + for (i = (PHYSFS_sint32) (len - 4); i >= 0; i--) + { + if ( (buf[i] == 0x50) && (buf[i+1] == 0x4b) && + (buf[i+2] == 0x06) && (buf[i+3] == 0x06) ) + { + __PHYSFS_smallFree(buf); + return pos - ((PHYSFS_sint64) (len - i)); + } /* if */ + } /* for */ + + __PHYSFS_smallFree(buf); + } /* if */ + + BAIL(PHYSFS_ERR_CORRUPT, -1); /* didn't find it. */ +} /* zip64_find_end_of_central_dir */ + + +static int zip64_parse_end_of_central_dir(ZIPinfo *info, + PHYSFS_uint64 *data_start, + PHYSFS_uint64 *dir_ofs, + PHYSFS_uint64 *entry_count, + PHYSFS_sint64 pos) +{ + PHYSFS_Io *io = info->io; + PHYSFS_uint64 ui64; + PHYSFS_uint32 ui32; + PHYSFS_uint16 ui16; + + /* We should be positioned right past the locator signature. */ + + if ((pos < 0) || (!io->seek(io, pos))) + return 0; + + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + if (ui32 != ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR_SIG) + return -1; /* it's not a Zip64 archive. Not an error, though! */ + + info->zip64 = 1; + + /* number of the disk with the start of the central directory. */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0); + + /* offset of Zip64 end of central directory record. */ + BAIL_IF_ERRPASS(!readui64(io, &ui64), 0); + + /* total number of disks */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 != 1, PHYSFS_ERR_CORRUPT, 0); + + pos = zip64_find_end_of_central_dir(io, pos, ui64); + if (pos < 0) + return 0; /* oh well. */ + + /* + * For self-extracting archives, etc, there's crapola in the file + * before the zipfile records; we calculate how much data there is + * prepended by determining how far the zip64-end-of-central-directory + * offset is from where it is supposed to be...the difference in bytes + * is how much arbitrary data is at the start of the physical file. + */ + assert(((PHYSFS_uint64) pos) >= ui64); + *data_start = ((PHYSFS_uint64) pos) - ui64; + + BAIL_IF_ERRPASS(!io->seek(io, pos), 0); + + /* check signature again, just in case. */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 != ZIP64_END_OF_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, 0); + + /* size of Zip64 end of central directory record. */ + BAIL_IF_ERRPASS(!readui64(io, &ui64), 0); + + /* version made by. */ + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); + + /* version needed to extract. */ + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); + + /* number of this disk. */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0); + + /* number of disk with start of central directory record. */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 != 0, PHYSFS_ERR_CORRUPT, 0); + + /* total number of entries in the central dir on this disk */ + BAIL_IF_ERRPASS(!readui64(io, &ui64), 0); + + /* total number of entries in the central dir */ + BAIL_IF_ERRPASS(!readui64(io, entry_count), 0); + BAIL_IF(ui64 != *entry_count, PHYSFS_ERR_CORRUPT, 0); + + /* size of the central directory */ + BAIL_IF_ERRPASS(!readui64(io, &ui64), 0); + + /* offset of central directory */ + BAIL_IF_ERRPASS(!readui64(io, dir_ofs), 0); + + /* Since we know the difference, fix up the central dir offset... */ + *dir_ofs += *data_start; + + /* + * There are more fields here, for encryption and feature-specific things, + * but we don't care about any of them at the moment. + */ + + return 1; /* made it. */ +} /* zip64_parse_end_of_central_dir */ + + +static int zip_parse_end_of_central_dir(ZIPinfo *info, + PHYSFS_uint64 *data_start, + PHYSFS_uint64 *dir_ofs, + PHYSFS_uint64 *entry_count) +{ + PHYSFS_Io *io = info->io; + PHYSFS_uint16 entryCount16; + PHYSFS_uint32 offset32; + PHYSFS_uint32 ui32; + PHYSFS_uint16 ui16; + PHYSFS_sint64 len; + PHYSFS_sint64 pos; + int rc; + + /* find the end-of-central-dir record, and seek to it. */ + pos = zip_find_end_of_central_dir(io, &len); + BAIL_IF_ERRPASS(pos == -1, 0); + BAIL_IF_ERRPASS(!io->seek(io, pos), 0); + + /* check signature again, just in case. */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + BAIL_IF(ui32 != ZIP_END_OF_CENTRAL_DIR_SIG, PHYSFS_ERR_CORRUPT, 0); + + /* Seek back to see if "Zip64 end of central directory locator" exists. */ + /* this record is 20 bytes before end-of-central-dir */ + rc = zip64_parse_end_of_central_dir(info, data_start, dir_ofs, + entry_count, pos - 20); + + /* Error or success? Bounce out of here. Keep going if not zip64. */ + if ((rc == 0) || (rc == 1)) + return rc; + + assert(rc == -1); /* no error, just not a Zip64 archive. */ + + /* Not Zip64? Seek back to where we were and keep processing. */ + BAIL_IF_ERRPASS(!io->seek(io, pos + 4), 0); + + /* number of this disk */ + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); + BAIL_IF(ui16 != 0, PHYSFS_ERR_CORRUPT, 0); + + /* number of the disk with the start of the central directory */ + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); + BAIL_IF(ui16 != 0, PHYSFS_ERR_CORRUPT, 0); + + /* total number of entries in the central dir on this disk */ + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); + + /* total number of entries in the central dir */ + BAIL_IF_ERRPASS(!readui16(io, &entryCount16), 0); + BAIL_IF(ui16 != entryCount16, PHYSFS_ERR_CORRUPT, 0); + + *entry_count = entryCount16; + + /* size of the central directory */ + BAIL_IF_ERRPASS(!readui32(io, &ui32), 0); + + /* offset of central directory */ + BAIL_IF_ERRPASS(!readui32(io, &offset32), 0); + *dir_ofs = (PHYSFS_uint64) offset32; + BAIL_IF(((PHYSFS_uint64) pos) < (*dir_ofs + ui32), PHYSFS_ERR_CORRUPT, 0); + + /* + * For self-extracting archives, etc, there's crapola in the file + * before the zipfile records; we calculate how much data there is + * prepended by determining how far the central directory offset is + * from where it is supposed to be (start of end-of-central-dir minus + * sizeof central dir)...the difference in bytes is how much arbitrary + * data is at the start of the physical file. + */ + *data_start = (PHYSFS_uint64) (pos - (*dir_ofs + ui32)); + + /* Now that we know the difference, fix up the central dir offset... */ + *dir_ofs += *data_start; + + /* zipfile comment length */ + BAIL_IF_ERRPASS(!readui16(io, &ui16), 0); + + /* + * Make sure that the comment length matches to the end of file... + * If it doesn't, we're either in the wrong part of the file, or the + * file is corrupted, but we give up either way. + */ + BAIL_IF((pos + 22 + ui16) != len, PHYSFS_ERR_CORRUPT, 0); + + return 1; /* made it. */ +} /* zip_parse_end_of_central_dir */ + + +static void ZIP_closeArchive(void *opaque) +{ + ZIPinfo *info = (ZIPinfo *) (opaque); + + if (!info) + return; + + if (info->io) + info->io->destroy(info->io); + + __PHYSFS_DirTreeDeinit(&info->tree); + + allocator.Free(info); +} /* ZIP_closeArchive */ + + +static void *ZIP_openArchive(PHYSFS_Io *io, const char *name, + int forWriting, int *claimed) +{ + ZIPinfo *info = NULL; + ZIPentry *root = NULL; + PHYSFS_uint64 dstart = 0; /* data start */ + PHYSFS_uint64 cdir_ofs; /* central dir offset */ + PHYSFS_uint64 count; + + assert(io != NULL); /* shouldn't ever happen. */ + + BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL); + BAIL_IF_ERRPASS(!isZip(io), NULL); + + *claimed = 1; + + info = (ZIPinfo *) allocator.Malloc(sizeof (ZIPinfo)); + BAIL_IF(!info, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + memset(info, '\0', sizeof (ZIPinfo)); + + info->io = io; + + if (!zip_parse_end_of_central_dir(info, &dstart, &cdir_ofs, &count)) + goto ZIP_openarchive_failed; + else if (!__PHYSFS_DirTreeInit(&info->tree, sizeof (ZIPentry))) + goto ZIP_openarchive_failed; + + root = (ZIPentry *) info->tree.root; + root->resolved = ZIP_DIRECTORY; + + if (!zip_load_entries(info, dstart, cdir_ofs, count)) + goto ZIP_openarchive_failed; + + assert(info->tree.root->sibling == NULL); + return info; + +ZIP_openarchive_failed: + info->io = NULL; /* don't let ZIP_closeArchive destroy (io). */ + ZIP_closeArchive(info); + return NULL; +} /* ZIP_openArchive */ + + +static PHYSFS_Io *zip_get_io(PHYSFS_Io *io, ZIPinfo *inf, ZIPentry *entry) +{ + int success; + PHYSFS_Io *retval = io->duplicate(io); + BAIL_IF_ERRPASS(!retval, NULL); + + assert(!entry->tree.isdir); /* should have been checked before calling. */ + + /* (inf) can be NULL if we already resolved. */ + success = (inf == NULL) || zip_resolve(retval, inf, entry); + if (success) + { + PHYSFS_sint64 offset; + offset = ((entry->symlink) ? entry->symlink->offset : entry->offset); + success = retval->seek(retval, offset); + } /* if */ + + if (!success) + { + retval->destroy(retval); + retval = NULL; + } /* if */ + + return retval; +} /* zip_get_io */ + + +static PHYSFS_Io *ZIP_openRead(void *opaque, const char *filename) +{ + PHYSFS_Io *retval = NULL; + ZIPinfo *info = (ZIPinfo *) opaque; + ZIPentry *entry = zip_find_entry(info, filename); + ZIPfileinfo *finfo = NULL; + PHYSFS_Io *io = NULL; + PHYSFS_uint8 *password = NULL; + + /* if not found, see if maybe "$PASSWORD" is appended. */ + if ((!entry) && (info->has_crypto)) + { + const char *ptr = strrchr(filename, '$'); + if (ptr != NULL) + { + const size_t len = (size_t) (ptr - filename); + char *str = (char *) __PHYSFS_smallAlloc(len + 1); + BAIL_IF(!str, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + memcpy(str, filename, len); + str[len] = '\0'; + entry = zip_find_entry(info, str); + __PHYSFS_smallFree(str); + password = (PHYSFS_uint8 *) (ptr + 1); + } /* if */ + } /* if */ + + BAIL_IF_ERRPASS(!entry, NULL); + + BAIL_IF_ERRPASS(!zip_resolve(info->io, info, entry), NULL); + + BAIL_IF(entry->tree.isdir, PHYSFS_ERR_NOT_A_FILE, NULL); + + retval = (PHYSFS_Io *) allocator.Malloc(sizeof (PHYSFS_Io)); + GOTO_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed); + + finfo = (ZIPfileinfo *) allocator.Malloc(sizeof (ZIPfileinfo)); + GOTO_IF(!finfo, PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed); + memset(finfo, '\0', sizeof (ZIPfileinfo)); + + io = zip_get_io(info->io, info, entry); + GOTO_IF_ERRPASS(!io, ZIP_openRead_failed); + finfo->io = io; + finfo->entry = ((entry->symlink != NULL) ? entry->symlink : entry); + initializeZStream(&finfo->stream); + + if (finfo->entry->compression_method != COMPMETH_NONE) + { + finfo->buffer = (PHYSFS_uint8 *) allocator.Malloc(ZIP_READBUFSIZE); + if (!finfo->buffer) + GOTO(PHYSFS_ERR_OUT_OF_MEMORY, ZIP_openRead_failed); + else if (zlib_err(inflateInit2(&finfo->stream, -MAX_WBITS)) != Z_OK) + goto ZIP_openRead_failed; + } /* if */ + + if (!zip_entry_is_tradional_crypto(entry)) + GOTO_IF(password != NULL, PHYSFS_ERR_BAD_PASSWORD, ZIP_openRead_failed); + else + { + PHYSFS_uint8 crypto_header[12]; + GOTO_IF(password == NULL, PHYSFS_ERR_BAD_PASSWORD, ZIP_openRead_failed); + if (io->read(io, crypto_header, 12) != 12) + goto ZIP_openRead_failed; + else if (!zip_prep_crypto_keys(finfo, crypto_header, password)) + goto ZIP_openRead_failed; + } /* if */ + + memcpy(retval, &ZIP_Io, sizeof (PHYSFS_Io)); + retval->opaque = finfo; + + return retval; + +ZIP_openRead_failed: + if (finfo != NULL) + { + if (finfo->io != NULL) + finfo->io->destroy(finfo->io); + + if (finfo->buffer != NULL) + { + allocator.Free(finfo->buffer); + inflateEnd(&finfo->stream); + } /* if */ + + allocator.Free(finfo); + } /* if */ + + if (retval != NULL) + allocator.Free(retval); + + return NULL; +} /* ZIP_openRead */ + + +static PHYSFS_Io *ZIP_openWrite(void *opaque, const char *filename) +{ + BAIL(PHYSFS_ERR_READ_ONLY, NULL); +} /* ZIP_openWrite */ + + +static PHYSFS_Io *ZIP_openAppend(void *opaque, const char *filename) +{ + BAIL(PHYSFS_ERR_READ_ONLY, NULL); +} /* ZIP_openAppend */ + + +static int ZIP_remove(void *opaque, const char *name) +{ + BAIL(PHYSFS_ERR_READ_ONLY, 0); +} /* ZIP_remove */ + + +static int ZIP_mkdir(void *opaque, const char *name) +{ + BAIL(PHYSFS_ERR_READ_ONLY, 0); +} /* ZIP_mkdir */ + + +static int ZIP_stat(void *opaque, const char *filename, PHYSFS_Stat *stat) +{ + ZIPinfo *info = (ZIPinfo *) opaque; + ZIPentry *entry = zip_find_entry(info, filename); + + if (entry == NULL) + return 0; + + else if (!zip_resolve(info->io, info, entry)) + return 0; + + else if (entry->resolved == ZIP_DIRECTORY) + { + stat->filesize = 0; + stat->filetype = PHYSFS_FILETYPE_DIRECTORY; + } /* if */ + + else if (zip_entry_is_symlink(entry)) + { + stat->filesize = 0; + stat->filetype = PHYSFS_FILETYPE_SYMLINK; + } /* else if */ + + else + { + stat->filesize = (PHYSFS_sint64) entry->uncompressed_size; + stat->filetype = PHYSFS_FILETYPE_REGULAR; + } /* else */ + + stat->modtime = ((entry) ? entry->last_mod_time : 0); + stat->createtime = stat->modtime; + stat->accesstime = -1; + stat->readonly = 1; /* .zip files are always read only */ + + return 1; +} /* ZIP_stat */ + + +const PHYSFS_Archiver __PHYSFS_Archiver_ZIP = +{ + CURRENT_PHYSFS_ARCHIVER_API_VERSION, + { + "ZIP", + "PkZip/WinZip/Info-Zip compatible", + "Ryan C. Gordon ", + "https://icculus.org/physfs/", + 1, /* supportsSymlinks */ + }, + ZIP_openArchive, + __PHYSFS_DirTreeEnumerate, + ZIP_openRead, + ZIP_openWrite, + ZIP_openAppend, + ZIP_remove, + ZIP_mkdir, + ZIP_stat, + ZIP_closeArchive +}; + +#endif /* defined PHYSFS_SUPPORTS_ZIP */ + +/* end of physfs_archiver_zip.c ... */ + diff --git a/desktop_version/physfs/physfs_byteorder.c b/desktop_version/physfs/physfs_byteorder.c new file mode 100644 index 00000000..b2d3a2cf --- /dev/null +++ b/desktop_version/physfs/physfs_byteorder.c @@ -0,0 +1,137 @@ +/** + * PhysicsFS; a portable, flexible file i/o abstraction. + * + * Documentation is in physfs.h. It's verbose, honest. :) + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon. + */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_internal.h" + +#ifndef PHYSFS_Swap16 +static inline PHYSFS_uint16 PHYSFS_Swap16(PHYSFS_uint16 D) +{ + return ((D<<8)|(D>>8)); +} +#endif +#ifndef PHYSFS_Swap32 +static inline PHYSFS_uint32 PHYSFS_Swap32(PHYSFS_uint32 D) +{ + return ((D<<24)|((D<<8)&0x00FF0000)|((D>>8)&0x0000FF00)|(D>>24)); +} +#endif +#ifndef PHYSFS_NO_64BIT_SUPPORT +#ifndef PHYSFS_Swap64 +static inline PHYSFS_uint64 PHYSFS_Swap64(PHYSFS_uint64 val) { + PHYSFS_uint32 hi, lo; + + /* Separate into high and low 32-bit values and swap them */ + lo = (PHYSFS_uint32)(val&0xFFFFFFFF); + val >>= 32; + hi = (PHYSFS_uint32)(val&0xFFFFFFFF); + val = PHYSFS_Swap32(lo); + val <<= 32; + val |= PHYSFS_Swap32(hi); + return val; +} +#endif +#else +#ifndef PHYSFS_Swap64 +/* This is mainly to keep compilers from complaining in PHYSFS code. + If there is no real 64-bit datatype, then compilers will complain about + the fake 64-bit datatype that PHYSFS provides when it compiles user code. +*/ +#define PHYSFS_Swap64(X) (X) +#endif +#endif /* PHYSFS_NO_64BIT_SUPPORT */ + + +/* Byteswap item from the specified endianness to the native endianness */ +#if PHYSFS_BYTEORDER == PHYSFS_LIL_ENDIAN +PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 x) { return x; } +PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 x) { return x; } +PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 x) { return x; } +PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 x) { return x; } +PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 x) { return x; } +PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 x) { return x; } + +PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 x) { return PHYSFS_Swap16(x); } +PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 x) { return PHYSFS_Swap16(x); } +PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 x) { return PHYSFS_Swap32(x); } +PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 x) { return PHYSFS_Swap32(x); } +PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 x) { return PHYSFS_Swap64(x); } +PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 x) { return PHYSFS_Swap64(x); } +#else +PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 x) { return PHYSFS_Swap16(x); } +PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 x) { return PHYSFS_Swap16(x); } +PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 x) { return PHYSFS_Swap32(x); } +PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 x) { return PHYSFS_Swap32(x); } +PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 x) { return PHYSFS_Swap64(x); } +PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 x) { return PHYSFS_Swap64(x); } + +PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 x) { return x; } +PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 x) { return x; } +PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 x) { return x; } +PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 x) { return x; } +PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 x) { return x; } +PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 x) { return x; } +#endif + +static inline int readAll(PHYSFS_File *file, void *val, const size_t len) +{ + return (PHYSFS_readBytes(file, val, len) == len); +} /* readAll */ + +#define PHYSFS_BYTEORDER_READ(datatype, swaptype) \ + int PHYSFS_read##swaptype(PHYSFS_File *file, PHYSFS_##datatype *val) { \ + PHYSFS_##datatype in; \ + BAIL_IF(val == NULL, PHYSFS_ERR_INVALID_ARGUMENT, 0); \ + BAIL_IF_ERRPASS(!readAll(file, &in, sizeof (in)), 0); \ + *val = PHYSFS_swap##swaptype(in); \ + return 1; \ + } + +PHYSFS_BYTEORDER_READ(sint16, SLE16) +PHYSFS_BYTEORDER_READ(uint16, ULE16) +PHYSFS_BYTEORDER_READ(sint16, SBE16) +PHYSFS_BYTEORDER_READ(uint16, UBE16) +PHYSFS_BYTEORDER_READ(sint32, SLE32) +PHYSFS_BYTEORDER_READ(uint32, ULE32) +PHYSFS_BYTEORDER_READ(sint32, SBE32) +PHYSFS_BYTEORDER_READ(uint32, UBE32) +PHYSFS_BYTEORDER_READ(sint64, SLE64) +PHYSFS_BYTEORDER_READ(uint64, ULE64) +PHYSFS_BYTEORDER_READ(sint64, SBE64) +PHYSFS_BYTEORDER_READ(uint64, UBE64) + + +static inline int writeAll(PHYSFS_File *f, const void *val, const size_t len) +{ + return (PHYSFS_writeBytes(f, val, len) == len); +} /* writeAll */ + +#define PHYSFS_BYTEORDER_WRITE(datatype, swaptype) \ + int PHYSFS_write##swaptype(PHYSFS_File *file, PHYSFS_##datatype val) { \ + const PHYSFS_##datatype out = PHYSFS_swap##swaptype(val); \ + BAIL_IF_ERRPASS(!writeAll(file, &out, sizeof (out)), 0); \ + return 1; \ + } + +PHYSFS_BYTEORDER_WRITE(sint16, SLE16) +PHYSFS_BYTEORDER_WRITE(uint16, ULE16) +PHYSFS_BYTEORDER_WRITE(sint16, SBE16) +PHYSFS_BYTEORDER_WRITE(uint16, UBE16) +PHYSFS_BYTEORDER_WRITE(sint32, SLE32) +PHYSFS_BYTEORDER_WRITE(uint32, ULE32) +PHYSFS_BYTEORDER_WRITE(sint32, SBE32) +PHYSFS_BYTEORDER_WRITE(uint32, UBE32) +PHYSFS_BYTEORDER_WRITE(sint64, SLE64) +PHYSFS_BYTEORDER_WRITE(uint64, ULE64) +PHYSFS_BYTEORDER_WRITE(sint64, SBE64) +PHYSFS_BYTEORDER_WRITE(uint64, UBE64) + +/* end of physfs_byteorder.c ... */ + diff --git a/desktop_version/physfs/physfs_casefolding.h b/desktop_version/physfs/physfs_casefolding.h new file mode 100644 index 00000000..bb6ac189 --- /dev/null +++ b/desktop_version/physfs/physfs_casefolding.h @@ -0,0 +1,2572 @@ +/* + * This file is part of PhysicsFS (https://icculus.org/physfs/) + * + * This data generated by physfs/extras/makecasefoldhashtable.pl ... + * Do not manually edit this file! + * + * Please see the file LICENSE.txt in the source's root directory. + */ + +#ifndef _INCLUDE_PHYSFS_CASEFOLDING_H_ +#define _INCLUDE_PHYSFS_CASEFOLDING_H_ + +#ifndef __PHYSICSFS_INTERNAL__ +#error Do not include this header from your applications. +#endif + +/* We build three simple hashmaps here: one that maps Unicode codepoints to +a one, two, or three lowercase codepoints. To retrieve this info: look at +case_fold_hashX, where X is 1, 2, or 3. Most foldable codepoints fold to one, +a few dozen fold to two, and a handful fold to three. If the codepoint isn't +in any of these hashes, it doesn't fold (no separate upper and lowercase). + +Almost all these codepoints fit into 16 bits, so we hash them as such to save +memory. If a codepoint is > 0xFFFF, we have separate hashes for them, +since there are (currently) only about 120 of them and (currently) all of them +map to a single lowercase codepoint. */ + +typedef struct CaseFoldMapping1_32 +{ + PHYSFS_uint32 from; + PHYSFS_uint32 to0; +} CaseFoldMapping1_32; + +typedef struct CaseFoldMapping1_16 +{ + PHYSFS_uint16 from; + PHYSFS_uint16 to0; +} CaseFoldMapping1_16; + +typedef struct CaseFoldMapping2_16 +{ + PHYSFS_uint16 from; + PHYSFS_uint16 to0; + PHYSFS_uint16 to1; +} CaseFoldMapping2_16; + +typedef struct CaseFoldMapping3_16 +{ + PHYSFS_uint16 from; + PHYSFS_uint16 to0; + PHYSFS_uint16 to1; + PHYSFS_uint16 to2; +} CaseFoldMapping3_16; + +typedef struct CaseFoldHashBucket1_16 +{ + const CaseFoldMapping1_16 *list; + const PHYSFS_uint8 count; +} CaseFoldHashBucket1_16; + +typedef struct CaseFoldHashBucket1_32 +{ + const CaseFoldMapping1_32 *list; + const PHYSFS_uint8 count; +} CaseFoldHashBucket1_32; + +typedef struct CaseFoldHashBucket2_16 +{ + const CaseFoldMapping2_16 *list; + const PHYSFS_uint8 count; +} CaseFoldHashBucket2_16; + +typedef struct CaseFoldHashBucket3_16 +{ + const CaseFoldMapping3_16 *list; + const PHYSFS_uint8 count; +} CaseFoldHashBucket3_16; + +static const CaseFoldMapping1_16 case_fold1_16_000[] = { + { 0x0202, 0x0203 }, + { 0x0404, 0x0454 }, + { 0x1E1E, 0x1E1F }, + { 0x2C2C, 0x2C5C }, + { 0xABAB, 0x13DB } +}; + +static const CaseFoldMapping1_16 case_fold1_16_001[] = { + { 0x0100, 0x0101 }, + { 0x0405, 0x0455 }, + { 0x0504, 0x0505 }, + { 0x2C2D, 0x2C5D }, + { 0xA7A6, 0xA7A7 }, + { 0xABAA, 0x13DA } +}; + +static const CaseFoldMapping1_16 case_fold1_16_002[] = { + { 0x0200, 0x0201 }, + { 0x0406, 0x0456 }, + { 0x1E1C, 0x1E1D }, + { 0x1F1D, 0x1F15 }, + { 0x2C2E, 0x2C5E }, + { 0xABA9, 0x13D9 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_003[] = { + { 0x0102, 0x0103 }, + { 0x0407, 0x0457 }, + { 0x0506, 0x0507 }, + { 0x1F1C, 0x1F14 }, + { 0xA7A4, 0xA7A5 }, + { 0xABA8, 0x13D8 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_004[] = { + { 0x0206, 0x0207 }, + { 0x0400, 0x0450 }, + { 0x1E1A, 0x1E1B }, + { 0x1F1B, 0x1F13 }, + { 0x2C28, 0x2C58 }, + { 0xABAF, 0x13DF } +}; + +static const CaseFoldMapping1_16 case_fold1_16_005[] = { + { 0x0104, 0x0105 }, + { 0x0401, 0x0451 }, + { 0x0500, 0x0501 }, + { 0x1F1A, 0x1F12 }, + { 0x2C29, 0x2C59 }, + { 0xA7A2, 0xA7A3 }, + { 0xABAE, 0x13DE } +}; + +static const CaseFoldMapping1_16 case_fold1_16_006[] = { + { 0x0204, 0x0205 }, + { 0x0402, 0x0452 }, + { 0x1E18, 0x1E19 }, + { 0x1F19, 0x1F11 }, + { 0x2C2A, 0x2C5A }, + { 0xABAD, 0x13DD } +}; + +static const CaseFoldMapping1_16 case_fold1_16_007[] = { + { 0x0106, 0x0107 }, + { 0x0403, 0x0453 }, + { 0x0502, 0x0503 }, + { 0x1F18, 0x1F10 }, + { 0x2126, 0x03C9 }, + { 0x2C2B, 0x2C5B }, + { 0xA7A0, 0xA7A1 }, + { 0xABAC, 0x13DC } +}; + +static const CaseFoldMapping1_16 case_fold1_16_008[] = { + { 0x020A, 0x020B }, + { 0x040C, 0x045C }, + { 0x1E16, 0x1E17 }, + { 0x2C24, 0x2C54 }, + { 0xABA3, 0x13D3 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_009[] = { + { 0x0108, 0x0109 }, + { 0x040D, 0x045D }, + { 0x050C, 0x050D }, + { 0x2C25, 0x2C55 }, + { 0xABA2, 0x13D2 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_010[] = { + { 0x0208, 0x0209 }, + { 0x040E, 0x045E }, + { 0x1E14, 0x1E15 }, + { 0x212B, 0x00E5 }, + { 0x2C26, 0x2C56 }, + { 0xA7AD, 0x026C }, + { 0xABA1, 0x13D1 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_011[] = { + { 0x010A, 0x010B }, + { 0x040F, 0x045F }, + { 0x050E, 0x050F }, + { 0x212A, 0x006B }, + { 0x2C27, 0x2C57 }, + { 0xA7AC, 0x0261 }, + { 0xABA0, 0x13D0 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_012[] = { + { 0x020E, 0x020F }, + { 0x0408, 0x0458 }, + { 0x1E12, 0x1E13 }, + { 0x2C20, 0x2C50 }, + { 0xA7AB, 0x025C }, + { 0xABA7, 0x13D7 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_013[] = { + { 0x010C, 0x010D }, + { 0x0409, 0x0459 }, + { 0x0508, 0x0509 }, + { 0x2C21, 0x2C51 }, + { 0xA7AA, 0x0266 }, + { 0xABA6, 0x13D6 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_014[] = { + { 0x020C, 0x020D }, + { 0x040A, 0x045A }, + { 0x1E10, 0x1E11 }, + { 0x2C22, 0x2C52 }, + { 0xABA5, 0x13D5 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_015[] = { + { 0x010E, 0x010F }, + { 0x040B, 0x045B }, + { 0x050A, 0x050B }, + { 0x2C23, 0x2C53 }, + { 0xA7A8, 0xA7A9 }, + { 0xABA4, 0x13D4 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_016[] = { + { 0x0212, 0x0213 }, + { 0x0414, 0x0434 }, + { 0x1E0E, 0x1E0F }, + { 0x1F0F, 0x1F07 }, + { 0xABBB, 0x13EB } +}; + +static const CaseFoldMapping1_16 case_fold1_16_017[] = { + { 0x0110, 0x0111 }, + { 0x0415, 0x0435 }, + { 0x0514, 0x0515 }, + { 0x1F0E, 0x1F06 }, + { 0xA7B6, 0xA7B7 }, + { 0xABBA, 0x13EA } +}; + +static const CaseFoldMapping1_16 case_fold1_16_018[] = { + { 0x0210, 0x0211 }, + { 0x0416, 0x0436 }, + { 0x1E0C, 0x1E0D }, + { 0x1F0D, 0x1F05 }, + { 0xABB9, 0x13E9 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_019[] = { + { 0x0112, 0x0113 }, + { 0x0417, 0x0437 }, + { 0x0516, 0x0517 }, + { 0x1F0C, 0x1F04 }, + { 0x2132, 0x214E }, + { 0xA7B4, 0xA7B5 }, + { 0xABB8, 0x13E8 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_020[] = { + { 0x0216, 0x0217 }, + { 0x0410, 0x0430 }, + { 0x1E0A, 0x1E0B }, + { 0x1F0B, 0x1F03 }, + { 0xA7B3, 0xAB53 }, + { 0xABBF, 0x13EF } +}; + +static const CaseFoldMapping1_16 case_fold1_16_021[] = { + { 0x0114, 0x0115 }, + { 0x0411, 0x0431 }, + { 0x0510, 0x0511 }, + { 0x1F0A, 0x1F02 }, + { 0xA7B2, 0x029D }, + { 0xABBE, 0x13EE } +}; + +static const CaseFoldMapping1_16 case_fold1_16_022[] = { + { 0x0214, 0x0215 }, + { 0x0412, 0x0432 }, + { 0x1E08, 0x1E09 }, + { 0x1F09, 0x1F01 }, + { 0xA7B1, 0x0287 }, + { 0xABBD, 0x13ED } +}; + +static const CaseFoldMapping1_16 case_fold1_16_023[] = { + { 0x0116, 0x0117 }, + { 0x0413, 0x0433 }, + { 0x0512, 0x0513 }, + { 0x1F08, 0x1F00 }, + { 0xA7B0, 0x029E }, + { 0xABBC, 0x13EC } +}; + +static const CaseFoldMapping1_16 case_fold1_16_024[] = { + { 0x021A, 0x021B }, + { 0x041C, 0x043C }, + { 0x1E06, 0x1E07 }, + { 0xABB3, 0x13E3 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_025[] = { + { 0x0118, 0x0119 }, + { 0x041D, 0x043D }, + { 0x051C, 0x051D }, + { 0xABB2, 0x13E2 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_026[] = { + { 0x0218, 0x0219 }, + { 0x041E, 0x043E }, + { 0x1E04, 0x1E05 }, + { 0xABB1, 0x13E1 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_027[] = { + { 0x011A, 0x011B }, + { 0x041F, 0x043F }, + { 0x051E, 0x051F }, + { 0xABB0, 0x13E0 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_028[] = { + { 0x021E, 0x021F }, + { 0x0418, 0x0438 }, + { 0x1E02, 0x1E03 }, + { 0xABB7, 0x13E7 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_029[] = { + { 0x011C, 0x011D }, + { 0x0419, 0x0439 }, + { 0x0518, 0x0519 }, + { 0xABB6, 0x13E6 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_030[] = { + { 0x021C, 0x021D }, + { 0x041A, 0x043A }, + { 0x1E00, 0x1E01 }, + { 0xABB5, 0x13E5 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_031[] = { + { 0x011E, 0x011F }, + { 0x041B, 0x043B }, + { 0x051A, 0x051B }, + { 0xABB4, 0x13E4 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_032[] = { + { 0x0222, 0x0223 }, + { 0x0424, 0x0444 }, + { 0x1E3E, 0x1E3F }, + { 0x1F3F, 0x1F37 }, + { 0x2C0C, 0x2C3C }, + { 0xA686, 0xA687 }, + { 0xAB8B, 0x13BB } +}; + +static const CaseFoldMapping1_16 case_fold1_16_033[] = { + { 0x0120, 0x0121 }, + { 0x0425, 0x0445 }, + { 0x0524, 0x0525 }, + { 0x1F3E, 0x1F36 }, + { 0x2C0D, 0x2C3D }, + { 0xA786, 0xA787 }, + { 0xAB8A, 0x13BA } +}; + +static const CaseFoldMapping1_16 case_fold1_16_034[] = { + { 0x0220, 0x019E }, + { 0x0426, 0x0446 }, + { 0x1E3C, 0x1E3D }, + { 0x1F3D, 0x1F35 }, + { 0x2C0E, 0x2C3E }, + { 0xA684, 0xA685 }, + { 0xAB89, 0x13B9 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_035[] = { + { 0x0122, 0x0123 }, + { 0x0427, 0x0447 }, + { 0x0526, 0x0527 }, + { 0x1F3C, 0x1F34 }, + { 0x2C0F, 0x2C3F }, + { 0xA784, 0xA785 }, + { 0xAB88, 0x13B8 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_036[] = { + { 0x0226, 0x0227 }, + { 0x0420, 0x0440 }, + { 0x1E3A, 0x1E3B }, + { 0x1F3B, 0x1F33 }, + { 0x2C08, 0x2C38 }, + { 0xA682, 0xA683 }, + { 0xAB8F, 0x13BF } +}; + +static const CaseFoldMapping1_16 case_fold1_16_037[] = { + { 0x0124, 0x0125 }, + { 0x0421, 0x0441 }, + { 0x0520, 0x0521 }, + { 0x1F3A, 0x1F32 }, + { 0x2C09, 0x2C39 }, + { 0xA782, 0xA783 }, + { 0xAB8E, 0x13BE } +}; + +static const CaseFoldMapping1_16 case_fold1_16_038[] = { + { 0x0224, 0x0225 }, + { 0x0422, 0x0442 }, + { 0x1E38, 0x1E39 }, + { 0x1F39, 0x1F31 }, + { 0x2C0A, 0x2C3A }, + { 0xA680, 0xA681 }, + { 0xAB8D, 0x13BD } +}; + +static const CaseFoldMapping1_16 case_fold1_16_039[] = { + { 0x0126, 0x0127 }, + { 0x0423, 0x0443 }, + { 0x0522, 0x0523 }, + { 0x1F38, 0x1F30 }, + { 0x2C0B, 0x2C3B }, + { 0xA780, 0xA781 }, + { 0xAB8C, 0x13BC } +}; + +static const CaseFoldMapping1_16 case_fold1_16_040[] = { + { 0x022A, 0x022B }, + { 0x042C, 0x044C }, + { 0x1E36, 0x1E37 }, + { 0x2C04, 0x2C34 }, + { 0xA68E, 0xA68F }, + { 0xAB83, 0x13B3 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_041[] = { + { 0x0128, 0x0129 }, + { 0x042D, 0x044D }, + { 0x052C, 0x052D }, + { 0x2C05, 0x2C35 }, + { 0xAB82, 0x13B2 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_042[] = { + { 0x0228, 0x0229 }, + { 0x042E, 0x044E }, + { 0x1E34, 0x1E35 }, + { 0x2C06, 0x2C36 }, + { 0xA68C, 0xA68D }, + { 0xA78D, 0x0265 }, + { 0xAB81, 0x13B1 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_043[] = { + { 0x012A, 0x012B }, + { 0x042F, 0x044F }, + { 0x052E, 0x052F }, + { 0x2C07, 0x2C37 }, + { 0xAB80, 0x13B0 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_044[] = { + { 0x022E, 0x022F }, + { 0x0428, 0x0448 }, + { 0x1E32, 0x1E33 }, + { 0x2C00, 0x2C30 }, + { 0xA68A, 0xA68B }, + { 0xA78B, 0xA78C }, + { 0xAB87, 0x13B7 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_045[] = { + { 0x012C, 0x012D }, + { 0x0429, 0x0449 }, + { 0x0528, 0x0529 }, + { 0x2C01, 0x2C31 }, + { 0xAB86, 0x13B6 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_046[] = { + { 0x022C, 0x022D }, + { 0x042A, 0x044A }, + { 0x1E30, 0x1E31 }, + { 0x2C02, 0x2C32 }, + { 0xA688, 0xA689 }, + { 0xAB85, 0x13B5 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_047[] = { + { 0x012E, 0x012F }, + { 0x042B, 0x044B }, + { 0x052A, 0x052B }, + { 0x2C03, 0x2C33 }, + { 0xAB84, 0x13B4 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_048[] = { + { 0x0232, 0x0233 }, + { 0x0535, 0x0565 }, + { 0x1E2E, 0x1E2F }, + { 0x1F2F, 0x1F27 }, + { 0x2C1C, 0x2C4C }, + { 0xA696, 0xA697 }, + { 0xAB9B, 0x13CB } +}; + +static const CaseFoldMapping1_16 case_fold1_16_049[] = { + { 0x0534, 0x0564 }, + { 0x1F2E, 0x1F26 }, + { 0x2C1D, 0x2C4D }, + { 0xA796, 0xA797 }, + { 0xAB9A, 0x13CA } +}; + +static const CaseFoldMapping1_16 case_fold1_16_050[] = { + { 0x0230, 0x0231 }, + { 0x0537, 0x0567 }, + { 0x1E2C, 0x1E2D }, + { 0x1F2D, 0x1F25 }, + { 0x2C1E, 0x2C4E }, + { 0xA694, 0xA695 }, + { 0xAB99, 0x13C9 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_051[] = { + { 0x0132, 0x0133 }, + { 0x0536, 0x0566 }, + { 0x1F2C, 0x1F24 }, + { 0x2C1F, 0x2C4F }, + { 0xAB98, 0x13C8 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_052[] = { + { 0x0531, 0x0561 }, + { 0x1E2A, 0x1E2B }, + { 0x1F2B, 0x1F23 }, + { 0x2C18, 0x2C48 }, + { 0xA692, 0xA693 }, + { 0xAB9F, 0x13CF } +}; + +static const CaseFoldMapping1_16 case_fold1_16_053[] = { + { 0x0134, 0x0135 }, + { 0x1F2A, 0x1F22 }, + { 0x2C19, 0x2C49 }, + { 0xA792, 0xA793 }, + { 0xAB9E, 0x13CE } +}; + +static const CaseFoldMapping1_16 case_fold1_16_054[] = { + { 0x0533, 0x0563 }, + { 0x1E28, 0x1E29 }, + { 0x1F29, 0x1F21 }, + { 0x2C1A, 0x2C4A }, + { 0xA690, 0xA691 }, + { 0xAB9D, 0x13CD } +}; + +static const CaseFoldMapping1_16 case_fold1_16_055[] = { + { 0x0136, 0x0137 }, + { 0x0532, 0x0562 }, + { 0x1F28, 0x1F20 }, + { 0x2C1B, 0x2C4B }, + { 0xA790, 0xA791 }, + { 0xAB9C, 0x13CC } +}; + +static const CaseFoldMapping1_16 case_fold1_16_056[] = { + { 0x0139, 0x013A }, + { 0x023A, 0x2C65 }, + { 0x053D, 0x056D }, + { 0x1E26, 0x1E27 }, + { 0x2C14, 0x2C44 }, + { 0xAB93, 0x13C3 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_057[] = { + { 0x023B, 0x023C }, + { 0x053C, 0x056C }, + { 0x2C15, 0x2C45 }, + { 0xA79E, 0xA79F }, + { 0xAB92, 0x13C2 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_058[] = { + { 0x013B, 0x013C }, + { 0x053F, 0x056F }, + { 0x1E24, 0x1E25 }, + { 0x2C16, 0x2C46 }, + { 0xAB91, 0x13C1 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_059[] = { + { 0x053E, 0x056E }, + { 0x2C17, 0x2C47 }, + { 0xA79C, 0xA79D }, + { 0xAB90, 0x13C0 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_060[] = { + { 0x013D, 0x013E }, + { 0x023E, 0x2C66 }, + { 0x0539, 0x0569 }, + { 0x1E22, 0x1E23 }, + { 0x2C10, 0x2C40 }, + { 0xA69A, 0xA69B }, + { 0xAB97, 0x13C7 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_061[] = { + { 0x0538, 0x0568 }, + { 0x2C11, 0x2C41 }, + { 0xA79A, 0xA79B }, + { 0xAB96, 0x13C6 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_062[] = { + { 0x013F, 0x0140 }, + { 0x053B, 0x056B }, + { 0x1E20, 0x1E21 }, + { 0x2C12, 0x2C42 }, + { 0xA698, 0xA699 }, + { 0xAB95, 0x13C5 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_063[] = { + { 0x023D, 0x019A }, + { 0x053A, 0x056A }, + { 0x2C13, 0x2C43 }, + { 0xA798, 0xA799 }, + { 0xAB94, 0x13C4 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_064[] = { + { 0x0141, 0x0142 }, + { 0x0545, 0x0575 }, + { 0x1E5E, 0x1E5F }, + { 0x1F5F, 0x1F57 }, + { 0x2161, 0x2171 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_065[] = { + { 0x0041, 0x0061 }, + { 0x0243, 0x0180 }, + { 0x0544, 0x0574 }, + { 0x2160, 0x2170 }, + { 0x2C6D, 0x0251 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_066[] = { + { 0x0042, 0x0062 }, + { 0x0143, 0x0144 }, + { 0x0547, 0x0577 }, + { 0x1E5C, 0x1E5D }, + { 0x1F5D, 0x1F55 }, + { 0x2163, 0x2173 }, + { 0x2C6E, 0x0271 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_067[] = { + { 0x0043, 0x0063 }, + { 0x0241, 0x0242 }, + { 0x0546, 0x0576 }, + { 0x2162, 0x2172 }, + { 0x2C6F, 0x0250 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_068[] = { + { 0x0044, 0x0064 }, + { 0x0145, 0x0146 }, + { 0x0246, 0x0247 }, + { 0x0541, 0x0571 }, + { 0x1E5A, 0x1E5B }, + { 0x1F5B, 0x1F53 }, + { 0x2165, 0x2175 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_069[] = { + { 0x0045, 0x0065 }, + { 0x0540, 0x0570 }, + { 0x2164, 0x2174 }, + { 0x2C69, 0x2C6A } +}; + +static const CaseFoldMapping1_16 case_fold1_16_070[] = { + { 0x0046, 0x0066 }, + { 0x0147, 0x0148 }, + { 0x0244, 0x0289 }, + { 0x0345, 0x03B9 }, + { 0x0543, 0x0573 }, + { 0x1E58, 0x1E59 }, + { 0x1F59, 0x1F51 }, + { 0x2167, 0x2177 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_071[] = { + { 0x0047, 0x0067 }, + { 0x0245, 0x028C }, + { 0x0542, 0x0572 }, + { 0x2166, 0x2176 }, + { 0x2C6B, 0x2C6C } +}; + +static const CaseFoldMapping1_16 case_fold1_16_072[] = { + { 0x0048, 0x0068 }, + { 0x024A, 0x024B }, + { 0x054D, 0x057D }, + { 0x1E56, 0x1E57 }, + { 0x2169, 0x2179 }, + { 0x2C64, 0x027D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_073[] = { + { 0x0049, 0x0069 }, + { 0x054C, 0x057C }, + { 0x2168, 0x2178 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_074[] = { + { 0x004A, 0x006A }, + { 0x0248, 0x0249 }, + { 0x054F, 0x057F }, + { 0x1E54, 0x1E55 }, + { 0x216B, 0x217B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_075[] = { + { 0x004B, 0x006B }, + { 0x014A, 0x014B }, + { 0x054E, 0x057E }, + { 0x216A, 0x217A }, + { 0x2C67, 0x2C68 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_076[] = { + { 0x004C, 0x006C }, + { 0x024E, 0x024F }, + { 0x0549, 0x0579 }, + { 0x1E52, 0x1E53 }, + { 0x216D, 0x217D }, + { 0x2C60, 0x2C61 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_077[] = { + { 0x004D, 0x006D }, + { 0x014C, 0x014D }, + { 0x0548, 0x0578 }, + { 0x216C, 0x217C } +}; + +static const CaseFoldMapping1_16 case_fold1_16_078[] = { + { 0x004E, 0x006E }, + { 0x024C, 0x024D }, + { 0x054B, 0x057B }, + { 0x1E50, 0x1E51 }, + { 0x216F, 0x217F }, + { 0x2C62, 0x026B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_079[] = { + { 0x004F, 0x006F }, + { 0x014E, 0x014F }, + { 0x054A, 0x057A }, + { 0x216E, 0x217E }, + { 0x2C63, 0x1D7D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_080[] = { + { 0x0050, 0x0070 }, + { 0x0555, 0x0585 }, + { 0x1E4E, 0x1E4F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_081[] = { + { 0x0051, 0x0071 }, + { 0x0150, 0x0151 }, + { 0x0554, 0x0584 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_082[] = { + { 0x0052, 0x0072 }, + { 0x1E4C, 0x1E4D }, + { 0x1F4D, 0x1F45 }, + { 0x2C7E, 0x023F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_083[] = { + { 0x0053, 0x0073 }, + { 0x0152, 0x0153 }, + { 0x0556, 0x0586 }, + { 0x1F4C, 0x1F44 }, + { 0x2C7F, 0x0240 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_084[] = { + { 0x0054, 0x0074 }, + { 0x0551, 0x0581 }, + { 0x1E4A, 0x1E4B }, + { 0x1F4B, 0x1F43 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_085[] = { + { 0x0055, 0x0075 }, + { 0x0154, 0x0155 }, + { 0x0550, 0x0580 }, + { 0x1F4A, 0x1F42 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_086[] = { + { 0x0056, 0x0076 }, + { 0x0553, 0x0583 }, + { 0x1E48, 0x1E49 }, + { 0x1F49, 0x1F41 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_087[] = { + { 0x0057, 0x0077 }, + { 0x0156, 0x0157 }, + { 0x0552, 0x0582 }, + { 0x1F48, 0x1F40 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_088[] = { + { 0x0058, 0x0078 }, + { 0x1E46, 0x1E47 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_089[] = { + { 0x0059, 0x0079 }, + { 0x0158, 0x0159 }, + { 0x2C75, 0x2C76 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_090[] = { + { 0x005A, 0x007A }, + { 0x1E44, 0x1E45 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_091[] = { + { 0x015A, 0x015B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_092[] = { + { 0x1E42, 0x1E43 }, + { 0x2C70, 0x0252 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_093[] = { + { 0x015C, 0x015D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_094[] = { + { 0x1E40, 0x1E41 }, + { 0x2C72, 0x2C73 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_095[] = { + { 0x015E, 0x015F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_096[] = { + { 0x0464, 0x0465 }, + { 0x1E7E, 0x1E7F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_097[] = { + { 0x0160, 0x0161 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_098[] = { + { 0x0466, 0x0467 }, + { 0x1E7C, 0x1E7D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_099[] = { + { 0x0162, 0x0163 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_100[] = { + { 0x0460, 0x0461 }, + { 0x1E7A, 0x1E7B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_101[] = { + { 0x0164, 0x0165 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_102[] = { + { 0x0462, 0x0463 }, + { 0x1E78, 0x1E79 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_103[] = { + { 0x0166, 0x0167 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_104[] = { + { 0x046C, 0x046D }, + { 0x1E76, 0x1E77 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_105[] = { + { 0x0168, 0x0169 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_106[] = { + { 0x046E, 0x046F }, + { 0x1E74, 0x1E75 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_107[] = { + { 0x016A, 0x016B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_108[] = { + { 0x0468, 0x0469 }, + { 0x1E72, 0x1E73 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_109[] = { + { 0x016C, 0x016D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_110[] = { + { 0x046A, 0x046B }, + { 0x1E70, 0x1E71 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_111[] = { + { 0x016E, 0x016F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_112[] = { + { 0x0474, 0x0475 }, + { 0x1E6E, 0x1E6F }, + { 0x1F6F, 0x1F67 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_113[] = { + { 0x0170, 0x0171 }, + { 0x0372, 0x0373 }, + { 0x1F6E, 0x1F66 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_114[] = { + { 0x0476, 0x0477 }, + { 0x1E6C, 0x1E6D }, + { 0x1F6D, 0x1F65 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_115[] = { + { 0x0172, 0x0173 }, + { 0x0370, 0x0371 }, + { 0x1F6C, 0x1F64 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_116[] = { + { 0x0470, 0x0471 }, + { 0x1E6A, 0x1E6B }, + { 0x1F6B, 0x1F63 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_117[] = { + { 0x0174, 0x0175 }, + { 0x0376, 0x0377 }, + { 0x1F6A, 0x1F62 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_118[] = { + { 0x0472, 0x0473 }, + { 0x1E68, 0x1E69 }, + { 0x1F69, 0x1F61 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_119[] = { + { 0x0176, 0x0177 }, + { 0x1F68, 0x1F60 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_120[] = { + { 0x0179, 0x017A }, + { 0x047C, 0x047D }, + { 0x1E66, 0x1E67 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_121[] = { + { 0x0178, 0x00FF } +}; + +static const CaseFoldMapping1_16 case_fold1_16_122[] = { + { 0x017B, 0x017C }, + { 0x047E, 0x047F }, + { 0x1E64, 0x1E65 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_124[] = { + { 0x017D, 0x017E }, + { 0x037F, 0x03F3 }, + { 0x0478, 0x0479 }, + { 0x1E62, 0x1E63 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_126[] = { + { 0x017F, 0x0073 }, + { 0x047A, 0x047B }, + { 0x1E60, 0x1E61 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_128[] = { + { 0x0181, 0x0253 }, + { 0x2CAC, 0x2CAD } +}; + +static const CaseFoldMapping1_16 case_fold1_16_129[] = { + { 0xA726, 0xA727 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_130[] = { + { 0x2CAE, 0x2CAF } +}; + +static const CaseFoldMapping1_16 case_fold1_16_131[] = { + { 0x0182, 0x0183 }, + { 0xA724, 0xA725 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_132[] = { + { 0x0480, 0x0481 }, + { 0x2CA8, 0x2CA9 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_133[] = { + { 0x0184, 0x0185 }, + { 0x0386, 0x03AC }, + { 0x1E9B, 0x1E61 }, + { 0xA722, 0xA723 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_134[] = { + { 0x0187, 0x0188 }, + { 0x2CAA, 0x2CAB } +}; + +static const CaseFoldMapping1_16 case_fold1_16_135[] = { + { 0x0186, 0x0254 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_136[] = { + { 0x0189, 0x0256 }, + { 0x048C, 0x048D }, + { 0x2CA4, 0x2CA5 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_137[] = { + { 0x038A, 0x03AF }, + { 0xA72E, 0xA72F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_138[] = { + { 0x018B, 0x018C }, + { 0x0389, 0x03AE }, + { 0x048E, 0x048F }, + { 0x1E94, 0x1E95 }, + { 0x2CA6, 0x2CA7 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_139[] = { + { 0x018A, 0x0257 }, + { 0x0388, 0x03AD }, + { 0xA72C, 0xA72D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_140[] = { + { 0x038F, 0x03CE }, + { 0x1E92, 0x1E93 }, + { 0x2CA0, 0x2CA1 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_141[] = { + { 0x038E, 0x03CD }, + { 0xA72A, 0xA72B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_142[] = { + { 0x018F, 0x0259 }, + { 0x048A, 0x048B }, + { 0x1E90, 0x1E91 }, + { 0x2CA2, 0x2CA3 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_143[] = { + { 0x018E, 0x01DD }, + { 0x038C, 0x03CC }, + { 0xA728, 0xA729 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_144[] = { + { 0x0191, 0x0192 }, + { 0x0393, 0x03B3 }, + { 0x0494, 0x0495 }, + { 0x1E8E, 0x1E8F }, + { 0x2CBC, 0x2CBD } +}; + +static const CaseFoldMapping1_16 case_fold1_16_145[] = { + { 0x0190, 0x025B }, + { 0x0392, 0x03B2 }, + { 0xA736, 0xA737 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_146[] = { + { 0x0193, 0x0260 }, + { 0x0391, 0x03B1 }, + { 0x0496, 0x0497 }, + { 0x1E8C, 0x1E8D }, + { 0x24B6, 0x24D0 }, + { 0x2CBE, 0x2CBF } +}; + +static const CaseFoldMapping1_16 case_fold1_16_147[] = { + { 0x24B7, 0x24D1 }, + { 0xA734, 0xA735 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_148[] = { + { 0x0397, 0x03B7 }, + { 0x0490, 0x0491 }, + { 0x1E8A, 0x1E8B }, + { 0x2CB8, 0x2CB9 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_149[] = { + { 0x0194, 0x0263 }, + { 0x0396, 0x03B6 }, + { 0xA732, 0xA733 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_150[] = { + { 0x0197, 0x0268 }, + { 0x0395, 0x03B5 }, + { 0x0492, 0x0493 }, + { 0x1E88, 0x1E89 }, + { 0x2CBA, 0x2CBB } +}; + +static const CaseFoldMapping1_16 case_fold1_16_151[] = { + { 0x0196, 0x0269 }, + { 0x0394, 0x03B4 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_152[] = { + { 0x039B, 0x03BB }, + { 0x049C, 0x049D }, + { 0x1E86, 0x1E87 }, + { 0x24BC, 0x24D6 }, + { 0x2CB4, 0x2CB5 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_153[] = { + { 0x0198, 0x0199 }, + { 0x039A, 0x03BA }, + { 0x24BD, 0x24D7 }, + { 0xA73E, 0xA73F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_154[] = { + { 0x0399, 0x03B9 }, + { 0x049E, 0x049F }, + { 0x1E84, 0x1E85 }, + { 0x24BE, 0x24D8 }, + { 0x2CB6, 0x2CB7 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_155[] = { + { 0x0398, 0x03B8 }, + { 0x24BF, 0x24D9 }, + { 0xA73C, 0xA73D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_156[] = { + { 0x019D, 0x0272 }, + { 0x039F, 0x03BF }, + { 0x0498, 0x0499 }, + { 0x1E82, 0x1E83 }, + { 0x24B8, 0x24D2 }, + { 0x2CB0, 0x2CB1 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_157[] = { + { 0x019C, 0x026F }, + { 0x039E, 0x03BE }, + { 0x24B9, 0x24D3 }, + { 0xA73A, 0xA73B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_158[] = { + { 0x019F, 0x0275 }, + { 0x039D, 0x03BD }, + { 0x049A, 0x049B }, + { 0x1E80, 0x1E81 }, + { 0x24BA, 0x24D4 }, + { 0x2CB2, 0x2CB3 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_159[] = { + { 0x039C, 0x03BC }, + { 0x24BB, 0x24D5 }, + { 0xA738, 0xA739 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_160[] = { + { 0x03A3, 0x03C3 }, + { 0x04A4, 0x04A5 }, + { 0x10B0, 0x2D10 }, + { 0x1EBE, 0x1EBF }, + { 0x2C8C, 0x2C8D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_161[] = { + { 0x01A0, 0x01A1 }, + { 0x10B1, 0x2D11 }, + { 0x1FBE, 0x03B9 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_162[] = { + { 0x03A1, 0x03C1 }, + { 0x04A6, 0x04A7 }, + { 0x10B2, 0x2D12 }, + { 0x1EBC, 0x1EBD }, + { 0x2183, 0x2184 }, + { 0x2C8E, 0x2C8F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_163[] = { + { 0x01A2, 0x01A3 }, + { 0x03A0, 0x03C0 }, + { 0x10B3, 0x2D13 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_164[] = { + { 0x03A7, 0x03C7 }, + { 0x04A0, 0x04A1 }, + { 0x10B4, 0x2D14 }, + { 0x1EBA, 0x1EBB }, + { 0x1FBB, 0x1F71 }, + { 0x2C88, 0x2C89 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_165[] = { + { 0x01A4, 0x01A5 }, + { 0x03A6, 0x03C6 }, + { 0x10B5, 0x2D15 }, + { 0x1FBA, 0x1F70 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_166[] = { + { 0x01A7, 0x01A8 }, + { 0x03A5, 0x03C5 }, + { 0x04A2, 0x04A3 }, + { 0x10B6, 0x2D16 }, + { 0x1EB8, 0x1EB9 }, + { 0x1FB9, 0x1FB1 }, + { 0x2C8A, 0x2C8B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_167[] = { + { 0x01A6, 0x0280 }, + { 0x03A4, 0x03C4 }, + { 0x10B7, 0x2D17 }, + { 0x1FB8, 0x1FB0 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_168[] = { + { 0x01A9, 0x0283 }, + { 0x03AB, 0x03CB }, + { 0x04AC, 0x04AD }, + { 0x10B8, 0x2D18 }, + { 0x1EB6, 0x1EB7 }, + { 0x2C84, 0x2C85 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_169[] = { + { 0x03AA, 0x03CA }, + { 0x10B9, 0x2D19 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_170[] = { + { 0x03A9, 0x03C9 }, + { 0x04AE, 0x04AF }, + { 0x10BA, 0x2D1A }, + { 0x1EB4, 0x1EB5 }, + { 0x2C86, 0x2C87 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_171[] = { + { 0x03A8, 0x03C8 }, + { 0x10BB, 0x2D1B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_172[] = { + { 0x04A8, 0x04A9 }, + { 0x10BC, 0x2D1C }, + { 0x1EB2, 0x1EB3 }, + { 0x2C80, 0x2C81 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_173[] = { + { 0x01AC, 0x01AD }, + { 0x10BD, 0x2D1D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_174[] = { + { 0x01AF, 0x01B0 }, + { 0x04AA, 0x04AB }, + { 0x10BE, 0x2D1E }, + { 0x1EB0, 0x1EB1 }, + { 0x2C82, 0x2C83 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_175[] = { + { 0x01AE, 0x0288 }, + { 0x10BF, 0x2D1F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_176[] = { + { 0x01B1, 0x028A }, + { 0x04B4, 0x04B5 }, + { 0x10A0, 0x2D00 }, + { 0x1EAE, 0x1EAF }, + { 0x2C9C, 0x2C9D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_177[] = { + { 0x10A1, 0x2D01 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_178[] = { + { 0x01B3, 0x01B4 }, + { 0x04B6, 0x04B7 }, + { 0x10A2, 0x2D02 }, + { 0x1EAC, 0x1EAD }, + { 0x2C9E, 0x2C9F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_179[] = { + { 0x01B2, 0x028B }, + { 0x10A3, 0x2D03 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_180[] = { + { 0x01B5, 0x01B6 }, + { 0x04B0, 0x04B1 }, + { 0x10A4, 0x2D04 }, + { 0x1EAA, 0x1EAB }, + { 0x2C98, 0x2C99 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_181[] = { + { 0x00B5, 0x03BC }, + { 0x10A5, 0x2D05 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_182[] = { + { 0x01B7, 0x0292 }, + { 0x04B2, 0x04B3 }, + { 0x10A6, 0x2D06 }, + { 0x1EA8, 0x1EA9 }, + { 0x2C9A, 0x2C9B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_183[] = { + { 0x10A7, 0x2D07 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_184[] = { + { 0x04BC, 0x04BD }, + { 0x10A8, 0x2D08 }, + { 0x1EA6, 0x1EA7 }, + { 0x2C94, 0x2C95 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_185[] = { + { 0x01B8, 0x01B9 }, + { 0x10A9, 0x2D09 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_186[] = { + { 0x04BE, 0x04BF }, + { 0x10AA, 0x2D0A }, + { 0x1EA4, 0x1EA5 }, + { 0x2C96, 0x2C97 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_187[] = { + { 0x10AB, 0x2D0B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_188[] = { + { 0x04B8, 0x04B9 }, + { 0x10AC, 0x2D0C }, + { 0x1EA2, 0x1EA3 }, + { 0x2C90, 0x2C91 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_189[] = { + { 0x01BC, 0x01BD }, + { 0x10AD, 0x2D0D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_190[] = { + { 0x04BA, 0x04BB }, + { 0x10AE, 0x2D0E }, + { 0x1EA0, 0x1EA1 }, + { 0x2C92, 0x2C93 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_191[] = { + { 0x10AF, 0x2D0F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_192[] = { + { 0x00C0, 0x00E0 }, + { 0x1EDE, 0x1EDF }, + { 0xA666, 0xA667 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_193[] = { + { 0x00C1, 0x00E1 }, + { 0x03C2, 0x03C3 }, + { 0x04C5, 0x04C6 }, + { 0x2CED, 0x2CEE }, + { 0xA766, 0xA767 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_194[] = { + { 0x00C2, 0x00E2 }, + { 0x1EDC, 0x1EDD }, + { 0xA664, 0xA665 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_195[] = { + { 0x00C3, 0x00E3 }, + { 0x04C7, 0x04C8 }, + { 0xA764, 0xA765 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_196[] = { + { 0x00C4, 0x00E4 }, + { 0x01C5, 0x01C6 }, + { 0x04C0, 0x04CF }, + { 0x1EDA, 0x1EDB }, + { 0x1FDB, 0x1F77 }, + { 0xA662, 0xA663 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_197[] = { + { 0x00C5, 0x00E5 }, + { 0x01C4, 0x01C6 }, + { 0x04C1, 0x04C2 }, + { 0x1FDA, 0x1F76 }, + { 0xA762, 0xA763 }, + { 0xFF3A, 0xFF5A } +}; + +static const CaseFoldMapping1_16 case_fold1_16_198[] = { + { 0x00C6, 0x00E6 }, + { 0x01C7, 0x01C9 }, + { 0x1ED8, 0x1ED9 }, + { 0x1FD9, 0x1FD1 }, + { 0xA660, 0xA661 }, + { 0xFF39, 0xFF59 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_199[] = { + { 0x00C7, 0x00E7 }, + { 0x04C3, 0x04C4 }, + { 0x1FD8, 0x1FD0 }, + { 0x2CEB, 0x2CEC }, + { 0xA760, 0xA761 }, + { 0xFF38, 0xFF58 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_200[] = { + { 0x00C8, 0x00E8 }, + { 0x1ED6, 0x1ED7 }, + { 0xFF37, 0xFF57 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_201[] = { + { 0x00C9, 0x00E9 }, + { 0x01C8, 0x01C9 }, + { 0x04CD, 0x04CE }, + { 0xA76E, 0xA76F }, + { 0xFF36, 0xFF56 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_202[] = { + { 0x00CA, 0x00EA }, + { 0x01CB, 0x01CC }, + { 0x1ED4, 0x1ED5 }, + { 0xA66C, 0xA66D }, + { 0xFF35, 0xFF55 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_203[] = { + { 0x00CB, 0x00EB }, + { 0x01CA, 0x01CC }, + { 0xA76C, 0xA76D }, + { 0xFF34, 0xFF54 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_204[] = { + { 0x00CC, 0x00EC }, + { 0x01CD, 0x01CE }, + { 0x03CF, 0x03D7 }, + { 0x1ED2, 0x1ED3 }, + { 0x2CE0, 0x2CE1 }, + { 0xA66A, 0xA66B }, + { 0xFF33, 0xFF53 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_205[] = { + { 0x00CD, 0x00ED }, + { 0x04C9, 0x04CA }, + { 0xA76A, 0xA76B }, + { 0xFF32, 0xFF52 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_206[] = { + { 0x00CE, 0x00EE }, + { 0x01CF, 0x01D0 }, + { 0x1ED0, 0x1ED1 }, + { 0x2CE2, 0x2CE3 }, + { 0xA668, 0xA669 }, + { 0xFF31, 0xFF51 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_207[] = { + { 0x00CF, 0x00EF }, + { 0x04CB, 0x04CC }, + { 0xA768, 0xA769 }, + { 0xFF30, 0xFF50 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_208[] = { + { 0x00D0, 0x00F0 }, + { 0x01D1, 0x01D2 }, + { 0x04D4, 0x04D5 }, + { 0x10C0, 0x2D20 }, + { 0x1ECE, 0x1ECF }, + { 0xAB7B, 0x13AB }, + { 0xFF2F, 0xFF4F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_209[] = { + { 0x00D1, 0x00F1 }, + { 0x10C1, 0x2D21 }, + { 0xAB7A, 0x13AA }, + { 0xFF2E, 0xFF4E } +}; + +static const CaseFoldMapping1_16 case_fold1_16_210[] = { + { 0x00D2, 0x00F2 }, + { 0x01D3, 0x01D4 }, + { 0x03D1, 0x03B8 }, + { 0x04D6, 0x04D7 }, + { 0x10C2, 0x2D22 }, + { 0x1ECC, 0x1ECD }, + { 0xAB79, 0x13A9 }, + { 0xFF2D, 0xFF4D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_211[] = { + { 0x00D3, 0x00F3 }, + { 0x03D0, 0x03B2 }, + { 0x10C3, 0x2D23 }, + { 0xAB78, 0x13A8 }, + { 0xFF2C, 0xFF4C } +}; + +static const CaseFoldMapping1_16 case_fold1_16_212[] = { + { 0x00D4, 0x00F4 }, + { 0x01D5, 0x01D6 }, + { 0x04D0, 0x04D1 }, + { 0x10C4, 0x2D24 }, + { 0x1ECA, 0x1ECB }, + { 0x1FCB, 0x1F75 }, + { 0xAB7F, 0x13AF }, + { 0xFF2B, 0xFF4B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_213[] = { + { 0x00D5, 0x00F5 }, + { 0x03D6, 0x03C0 }, + { 0x10C5, 0x2D25 }, + { 0x1FCA, 0x1F74 }, + { 0xAB7E, 0x13AE }, + { 0xFF2A, 0xFF4A } +}; + +static const CaseFoldMapping1_16 case_fold1_16_214[] = { + { 0x00D6, 0x00F6 }, + { 0x01D7, 0x01D8 }, + { 0x03D5, 0x03C6 }, + { 0x04D2, 0x04D3 }, + { 0x1EC8, 0x1EC9 }, + { 0x1FC9, 0x1F73 }, + { 0xAB7D, 0x13AD }, + { 0xFF29, 0xFF49 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_215[] = { + { 0x10C7, 0x2D27 }, + { 0x1FC8, 0x1F72 }, + { 0xAB7C, 0x13AC }, + { 0xFF28, 0xFF48 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_216[] = { + { 0x00D8, 0x00F8 }, + { 0x01D9, 0x01DA }, + { 0x04DC, 0x04DD }, + { 0x1EC6, 0x1EC7 }, + { 0xAB73, 0x13A3 }, + { 0xFF27, 0xFF47 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_217[] = { + { 0x00D9, 0x00F9 }, + { 0x03DA, 0x03DB }, + { 0xA77E, 0xA77F }, + { 0xAB72, 0x13A2 }, + { 0xFF26, 0xFF46 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_218[] = { + { 0x00DA, 0x00FA }, + { 0x01DB, 0x01DC }, + { 0x04DE, 0x04DF }, + { 0x1EC4, 0x1EC5 }, + { 0xA77D, 0x1D79 }, + { 0xAB71, 0x13A1 }, + { 0xFF25, 0xFF45 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_219[] = { + { 0x00DB, 0x00FB }, + { 0x03D8, 0x03D9 }, + { 0xAB70, 0x13A0 }, + { 0xFF24, 0xFF44 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_220[] = { + { 0x00DC, 0x00FC }, + { 0x04D8, 0x04D9 }, + { 0x1EC2, 0x1EC3 }, + { 0xA77B, 0xA77C }, + { 0xAB77, 0x13A7 }, + { 0xFF23, 0xFF43 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_221[] = { + { 0x00DD, 0x00FD }, + { 0x03DE, 0x03DF }, + { 0x10CD, 0x2D2D }, + { 0xAB76, 0x13A6 }, + { 0xFF22, 0xFF42 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_222[] = { + { 0x00DE, 0x00FE }, + { 0x04DA, 0x04DB }, + { 0x1EC0, 0x1EC1 }, + { 0x2CF2, 0x2CF3 }, + { 0xA779, 0xA77A }, + { 0xAB75, 0x13A5 }, + { 0xFF21, 0xFF41 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_223[] = { + { 0x01DE, 0x01DF }, + { 0x03DC, 0x03DD }, + { 0xAB74, 0x13A4 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_224[] = { + { 0x04E4, 0x04E5 }, + { 0x1EFE, 0x1EFF }, + { 0x24C4, 0x24DE }, + { 0x2CCC, 0x2CCD }, + { 0xA646, 0xA647 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_225[] = { + { 0x01E0, 0x01E1 }, + { 0x03E2, 0x03E3 }, + { 0x24C5, 0x24DF }, + { 0xA746, 0xA747 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_226[] = { + { 0x04E6, 0x04E7 }, + { 0x1EFC, 0x1EFD }, + { 0x24C6, 0x24E0 }, + { 0x2CCE, 0x2CCF }, + { 0xA644, 0xA645 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_227[] = { + { 0x01E2, 0x01E3 }, + { 0x03E0, 0x03E1 }, + { 0x24C7, 0x24E1 }, + { 0xA744, 0xA745 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_228[] = { + { 0x04E0, 0x04E1 }, + { 0x1EFA, 0x1EFB }, + { 0x1FFB, 0x1F7D }, + { 0x24C0, 0x24DA }, + { 0x2CC8, 0x2CC9 }, + { 0xA642, 0xA643 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_229[] = { + { 0x01E4, 0x01E5 }, + { 0x03E6, 0x03E7 }, + { 0x1FFA, 0x1F7C }, + { 0x24C1, 0x24DB }, + { 0xA742, 0xA743 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_230[] = { + { 0x04E2, 0x04E3 }, + { 0x1EF8, 0x1EF9 }, + { 0x1FF9, 0x1F79 }, + { 0x24C2, 0x24DC }, + { 0x2CCA, 0x2CCB }, + { 0xA640, 0xA641 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_231[] = { + { 0x01E6, 0x01E7 }, + { 0x03E4, 0x03E5 }, + { 0x1FF8, 0x1F78 }, + { 0x24C3, 0x24DD }, + { 0xA740, 0xA741 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_232[] = { + { 0x04EC, 0x04ED }, + { 0x13FB, 0x13F3 }, + { 0x1EF6, 0x1EF7 }, + { 0x24CC, 0x24E6 }, + { 0x2CC4, 0x2CC5 }, + { 0xA64E, 0xA64F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_233[] = { + { 0x01E8, 0x01E9 }, + { 0x03EA, 0x03EB }, + { 0x13FA, 0x13F2 }, + { 0x24CD, 0x24E7 }, + { 0xA74E, 0xA74F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_234[] = { + { 0x04EE, 0x04EF }, + { 0x13F9, 0x13F1 }, + { 0x1EF4, 0x1EF5 }, + { 0x24CE, 0x24E8 }, + { 0x2CC6, 0x2CC7 }, + { 0xA64C, 0xA64D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_235[] = { + { 0x01EA, 0x01EB }, + { 0x03E8, 0x03E9 }, + { 0x13F8, 0x13F0 }, + { 0x24CF, 0x24E9 }, + { 0xA74C, 0xA74D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_236[] = { + { 0x04E8, 0x04E9 }, + { 0x1EF2, 0x1EF3 }, + { 0x24C8, 0x24E2 }, + { 0x2CC0, 0x2CC1 }, + { 0xA64A, 0xA64B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_237[] = { + { 0x01EC, 0x01ED }, + { 0x03EE, 0x03EF }, + { 0x24C9, 0x24E3 }, + { 0xA74A, 0xA74B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_238[] = { + { 0x04EA, 0x04EB }, + { 0x13FD, 0x13F5 }, + { 0x1EF0, 0x1EF1 }, + { 0x24CA, 0x24E4 }, + { 0x2CC2, 0x2CC3 }, + { 0xA648, 0xA649 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_239[] = { + { 0x01EE, 0x01EF }, + { 0x03EC, 0x03ED }, + { 0x13FC, 0x13F4 }, + { 0x24CB, 0x24E5 }, + { 0xA748, 0xA749 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_240[] = { + { 0x01F1, 0x01F3 }, + { 0x04F4, 0x04F5 }, + { 0x1EEE, 0x1EEF }, + { 0x2CDC, 0x2CDD }, + { 0xA656, 0xA657 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_241[] = { + { 0xA756, 0xA757 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_242[] = { + { 0x03F1, 0x03C1 }, + { 0x04F6, 0x04F7 }, + { 0x1EEC, 0x1EED }, + { 0x2CDE, 0x2CDF }, + { 0xA654, 0xA655 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_243[] = { + { 0x01F2, 0x01F3 }, + { 0x03F0, 0x03BA }, + { 0x1FEC, 0x1FE5 }, + { 0xA754, 0xA755 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_244[] = { + { 0x03F7, 0x03F8 }, + { 0x04F0, 0x04F1 }, + { 0x1EEA, 0x1EEB }, + { 0x1FEB, 0x1F7B }, + { 0x2CD8, 0x2CD9 }, + { 0xA652, 0xA653 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_245[] = { + { 0x01F4, 0x01F5 }, + { 0x1FEA, 0x1F7A }, + { 0xA752, 0xA753 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_246[] = { + { 0x01F7, 0x01BF }, + { 0x03F5, 0x03B5 }, + { 0x04F2, 0x04F3 }, + { 0x1EE8, 0x1EE9 }, + { 0x1FE9, 0x1FE1 }, + { 0x2CDA, 0x2CDB }, + { 0xA650, 0xA651 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_247[] = { + { 0x01F6, 0x0195 }, + { 0x03F4, 0x03B8 }, + { 0x1FE8, 0x1FE0 }, + { 0xA750, 0xA751 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_248[] = { + { 0x04FC, 0x04FD }, + { 0x1EE6, 0x1EE7 }, + { 0x2CD4, 0x2CD5 }, + { 0xA65E, 0xA65F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_249[] = { + { 0x01F8, 0x01F9 }, + { 0x03FA, 0x03FB }, + { 0xA75E, 0xA75F } +}; + +static const CaseFoldMapping1_16 case_fold1_16_250[] = { + { 0x03F9, 0x03F2 }, + { 0x04FE, 0x04FF }, + { 0x1EE4, 0x1EE5 }, + { 0x2CD6, 0x2CD7 }, + { 0xA65C, 0xA65D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_251[] = { + { 0x01FA, 0x01FB }, + { 0xA75C, 0xA75D } +}; + +static const CaseFoldMapping1_16 case_fold1_16_252[] = { + { 0x03FF, 0x037D }, + { 0x04F8, 0x04F9 }, + { 0x1EE2, 0x1EE3 }, + { 0x2CD0, 0x2CD1 }, + { 0xA65A, 0xA65B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_253[] = { + { 0x01FC, 0x01FD }, + { 0x03FE, 0x037C }, + { 0xA75A, 0xA75B } +}; + +static const CaseFoldMapping1_16 case_fold1_16_254[] = { + { 0x03FD, 0x037B }, + { 0x04FA, 0x04FB }, + { 0x1EE0, 0x1EE1 }, + { 0x2CD2, 0x2CD3 }, + { 0xA658, 0xA659 } +}; + +static const CaseFoldMapping1_16 case_fold1_16_255[] = { + { 0x01FE, 0x01FF }, + { 0xA758, 0xA759 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_000[] = { + { 0x10404, 0x1042C }, + { 0x10414, 0x1043C }, + { 0x10424, 0x1044C }, + { 0x10C8C, 0x10CCC }, + { 0x10C9C, 0x10CDC }, + { 0x10CAC, 0x10CEC }, + { 0x118A8, 0x118C8 }, + { 0x118B8, 0x118D8 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_001[] = { + { 0x10405, 0x1042D }, + { 0x10415, 0x1043D }, + { 0x10425, 0x1044D }, + { 0x10C8D, 0x10CCD }, + { 0x10C9D, 0x10CDD }, + { 0x10CAD, 0x10CED }, + { 0x118A9, 0x118C9 }, + { 0x118B9, 0x118D9 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_002[] = { + { 0x10406, 0x1042E }, + { 0x10416, 0x1043E }, + { 0x10426, 0x1044E }, + { 0x10C8E, 0x10CCE }, + { 0x10C9E, 0x10CDE }, + { 0x10CAE, 0x10CEE }, + { 0x118AA, 0x118CA }, + { 0x118BA, 0x118DA } +}; + +static const CaseFoldMapping1_32 case_fold1_32_003[] = { + { 0x10407, 0x1042F }, + { 0x10417, 0x1043F }, + { 0x10427, 0x1044F }, + { 0x10C8F, 0x10CCF }, + { 0x10C9F, 0x10CDF }, + { 0x10CAF, 0x10CEF }, + { 0x118AB, 0x118CB }, + { 0x118BB, 0x118DB } +}; + +static const CaseFoldMapping1_32 case_fold1_32_004[] = { + { 0x10400, 0x10428 }, + { 0x10410, 0x10438 }, + { 0x10420, 0x10448 }, + { 0x10C88, 0x10CC8 }, + { 0x10C98, 0x10CD8 }, + { 0x10CA8, 0x10CE8 }, + { 0x118AC, 0x118CC }, + { 0x118BC, 0x118DC } +}; + +static const CaseFoldMapping1_32 case_fold1_32_005[] = { + { 0x10401, 0x10429 }, + { 0x10411, 0x10439 }, + { 0x10421, 0x10449 }, + { 0x10C89, 0x10CC9 }, + { 0x10C99, 0x10CD9 }, + { 0x10CA9, 0x10CE9 }, + { 0x118AD, 0x118CD }, + { 0x118BD, 0x118DD } +}; + +static const CaseFoldMapping1_32 case_fold1_32_006[] = { + { 0x10402, 0x1042A }, + { 0x10412, 0x1043A }, + { 0x10422, 0x1044A }, + { 0x10C8A, 0x10CCA }, + { 0x10C9A, 0x10CDA }, + { 0x10CAA, 0x10CEA }, + { 0x118AE, 0x118CE }, + { 0x118BE, 0x118DE } +}; + +static const CaseFoldMapping1_32 case_fold1_32_007[] = { + { 0x10403, 0x1042B }, + { 0x10413, 0x1043B }, + { 0x10423, 0x1044B }, + { 0x10C8B, 0x10CCB }, + { 0x10C9B, 0x10CDB }, + { 0x10CAB, 0x10CEB }, + { 0x118AF, 0x118CF }, + { 0x118BF, 0x118DF } +}; + +static const CaseFoldMapping1_32 case_fold1_32_008[] = { + { 0x1040C, 0x10434 }, + { 0x1041C, 0x10444 }, + { 0x10C84, 0x10CC4 }, + { 0x10C94, 0x10CD4 }, + { 0x10CA4, 0x10CE4 }, + { 0x118A0, 0x118C0 }, + { 0x118B0, 0x118D0 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_009[] = { + { 0x1040D, 0x10435 }, + { 0x1041D, 0x10445 }, + { 0x10C85, 0x10CC5 }, + { 0x10C95, 0x10CD5 }, + { 0x10CA5, 0x10CE5 }, + { 0x118A1, 0x118C1 }, + { 0x118B1, 0x118D1 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_010[] = { + { 0x1040E, 0x10436 }, + { 0x1041E, 0x10446 }, + { 0x10C86, 0x10CC6 }, + { 0x10C96, 0x10CD6 }, + { 0x10CA6, 0x10CE6 }, + { 0x118A2, 0x118C2 }, + { 0x118B2, 0x118D2 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_011[] = { + { 0x1040F, 0x10437 }, + { 0x1041F, 0x10447 }, + { 0x10C87, 0x10CC7 }, + { 0x10C97, 0x10CD7 }, + { 0x10CA7, 0x10CE7 }, + { 0x118A3, 0x118C3 }, + { 0x118B3, 0x118D3 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_012[] = { + { 0x10408, 0x10430 }, + { 0x10418, 0x10440 }, + { 0x10C80, 0x10CC0 }, + { 0x10C90, 0x10CD0 }, + { 0x10CA0, 0x10CE0 }, + { 0x10CB0, 0x10CF0 }, + { 0x118A4, 0x118C4 }, + { 0x118B4, 0x118D4 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_013[] = { + { 0x10409, 0x10431 }, + { 0x10419, 0x10441 }, + { 0x10C81, 0x10CC1 }, + { 0x10C91, 0x10CD1 }, + { 0x10CA1, 0x10CE1 }, + { 0x10CB1, 0x10CF1 }, + { 0x118A5, 0x118C5 }, + { 0x118B5, 0x118D5 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_014[] = { + { 0x1040A, 0x10432 }, + { 0x1041A, 0x10442 }, + { 0x10C82, 0x10CC2 }, + { 0x10C92, 0x10CD2 }, + { 0x10CA2, 0x10CE2 }, + { 0x10CB2, 0x10CF2 }, + { 0x118A6, 0x118C6 }, + { 0x118B6, 0x118D6 } +}; + +static const CaseFoldMapping1_32 case_fold1_32_015[] = { + { 0x1040B, 0x10433 }, + { 0x1041B, 0x10443 }, + { 0x10C83, 0x10CC3 }, + { 0x10C93, 0x10CD3 }, + { 0x10CA3, 0x10CE3 }, + { 0x118A7, 0x118C7 }, + { 0x118B7, 0x118D7 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_000[] = { + { 0x1E9E, 0x0073, 0x0073 }, + { 0x1F8F, 0x1F07, 0x03B9 }, + { 0x1F9F, 0x1F27, 0x03B9 }, + { 0x1FAF, 0x1F67, 0x03B9 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_001[] = { + { 0x0130, 0x0069, 0x0307 }, + { 0x01F0, 0x006A, 0x030C }, + { 0x1F8E, 0x1F06, 0x03B9 }, + { 0x1F9E, 0x1F26, 0x03B9 }, + { 0x1FAE, 0x1F66, 0x03B9 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_002[] = { + { 0x0587, 0x0565, 0x0582 }, + { 0x1F8D, 0x1F05, 0x03B9 }, + { 0x1F9D, 0x1F25, 0x03B9 }, + { 0x1FAD, 0x1F65, 0x03B9 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_003[] = { + { 0x1F8C, 0x1F04, 0x03B9 }, + { 0x1F9C, 0x1F24, 0x03B9 }, + { 0x1FAC, 0x1F64, 0x03B9 }, + { 0x1FBC, 0x03B1, 0x03B9 }, + { 0x1FCC, 0x03B7, 0x03B9 }, + { 0x1FFC, 0x03C9, 0x03B9 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_004[] = { + { 0x1E9A, 0x0061, 0x02BE }, + { 0x1F8B, 0x1F03, 0x03B9 }, + { 0x1F9B, 0x1F23, 0x03B9 }, + { 0x1FAB, 0x1F63, 0x03B9 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_005[] = { + { 0x1F8A, 0x1F02, 0x03B9 }, + { 0x1F9A, 0x1F22, 0x03B9 }, + { 0x1FAA, 0x1F62, 0x03B9 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_006[] = { + { 0x1E98, 0x0077, 0x030A }, + { 0x1F89, 0x1F01, 0x03B9 }, + { 0x1F99, 0x1F21, 0x03B9 }, + { 0x1FA9, 0x1F61, 0x03B9 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_007[] = { + { 0x1E99, 0x0079, 0x030A }, + { 0x1F88, 0x1F00, 0x03B9 }, + { 0x1F98, 0x1F20, 0x03B9 }, + { 0x1FA8, 0x1F60, 0x03B9 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_008[] = { + { 0x0149, 0x02BC, 0x006E }, + { 0x1E96, 0x0068, 0x0331 }, + { 0x1F87, 0x1F07, 0x03B9 }, + { 0x1F97, 0x1F27, 0x03B9 }, + { 0x1FA7, 0x1F67, 0x03B9 }, + { 0xFB13, 0x0574, 0x0576 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_009[] = { + { 0x1E97, 0x0074, 0x0308 }, + { 0x1F86, 0x1F06, 0x03B9 }, + { 0x1F96, 0x1F26, 0x03B9 }, + { 0x1FA6, 0x1F66, 0x03B9 }, + { 0x1FB6, 0x03B1, 0x0342 }, + { 0x1FC6, 0x03B7, 0x0342 }, + { 0x1FD6, 0x03B9, 0x0342 }, + { 0x1FE6, 0x03C5, 0x0342 }, + { 0x1FF6, 0x03C9, 0x0342 }, + { 0xFB02, 0x0066, 0x006C } +}; + +static const CaseFoldMapping2_16 case_fold2_16_010[] = { + { 0x1F85, 0x1F05, 0x03B9 }, + { 0x1F95, 0x1F25, 0x03B9 }, + { 0x1FA5, 0x1F65, 0x03B9 }, + { 0xFB01, 0x0066, 0x0069 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_011[] = { + { 0x1F84, 0x1F04, 0x03B9 }, + { 0x1F94, 0x1F24, 0x03B9 }, + { 0x1FA4, 0x1F64, 0x03B9 }, + { 0x1FB4, 0x03AC, 0x03B9 }, + { 0x1FC4, 0x03AE, 0x03B9 }, + { 0x1FE4, 0x03C1, 0x0313 }, + { 0x1FF4, 0x03CE, 0x03B9 }, + { 0xFB00, 0x0066, 0x0066 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_012[] = { + { 0x1F83, 0x1F03, 0x03B9 }, + { 0x1F93, 0x1F23, 0x03B9 }, + { 0x1FA3, 0x1F63, 0x03B9 }, + { 0x1FB3, 0x03B1, 0x03B9 }, + { 0x1FC3, 0x03B7, 0x03B9 }, + { 0x1FF3, 0x03C9, 0x03B9 }, + { 0xFB17, 0x0574, 0x056D } +}; + +static const CaseFoldMapping2_16 case_fold2_16_013[] = { + { 0x1F82, 0x1F02, 0x03B9 }, + { 0x1F92, 0x1F22, 0x03B9 }, + { 0x1FA2, 0x1F62, 0x03B9 }, + { 0x1FB2, 0x1F70, 0x03B9 }, + { 0x1FC2, 0x1F74, 0x03B9 }, + { 0x1FF2, 0x1F7C, 0x03B9 }, + { 0xFB06, 0x0073, 0x0074 }, + { 0xFB16, 0x057E, 0x0576 } +}; + +static const CaseFoldMapping2_16 case_fold2_16_014[] = { + { 0x1F81, 0x1F01, 0x03B9 }, + { 0x1F91, 0x1F21, 0x03B9 }, + { 0x1FA1, 0x1F61, 0x03B9 }, + { 0xFB05, 0x0073, 0x0074 }, + { 0xFB15, 0x0574, 0x056B } +}; + +static const CaseFoldMapping2_16 case_fold2_16_015[] = { + { 0x00DF, 0x0073, 0x0073 }, + { 0x1F50, 0x03C5, 0x0313 }, + { 0x1F80, 0x1F00, 0x03B9 }, + { 0x1F90, 0x1F20, 0x03B9 }, + { 0x1FA0, 0x1F60, 0x03B9 }, + { 0xFB14, 0x0574, 0x0565 } +}; + +static const CaseFoldMapping3_16 case_fold3_16_000[] = { + { 0x1FB7, 0x03B1, 0x0342, 0x03B9 }, + { 0x1FC7, 0x03B7, 0x0342, 0x03B9 }, + { 0x1FD3, 0x03B9, 0x0308, 0x0301 }, + { 0x1FD7, 0x03B9, 0x0308, 0x0342 }, + { 0x1FE3, 0x03C5, 0x0308, 0x0301 }, + { 0x1FE7, 0x03C5, 0x0308, 0x0342 }, + { 0x1FF7, 0x03C9, 0x0342, 0x03B9 }, + { 0xFB03, 0x0066, 0x0066, 0x0069 } +}; + +static const CaseFoldMapping3_16 case_fold3_16_001[] = { + { 0x1F52, 0x03C5, 0x0313, 0x0300 }, + { 0x1F56, 0x03C5, 0x0313, 0x0342 }, + { 0x1FD2, 0x03B9, 0x0308, 0x0300 }, + { 0x1FE2, 0x03C5, 0x0308, 0x0300 } +}; + +static const CaseFoldMapping3_16 case_fold3_16_003[] = { + { 0x0390, 0x03B9, 0x0308, 0x0301 }, + { 0x03B0, 0x03C5, 0x0308, 0x0301 }, + { 0x1F54, 0x03C5, 0x0313, 0x0301 }, + { 0xFB04, 0x0066, 0x0066, 0x006C } +}; + +static const CaseFoldHashBucket1_16 case_fold_hash1_16[] = { + { case_fold1_16_000, __PHYSFS_ARRAYLEN(case_fold1_16_000) }, + { case_fold1_16_001, __PHYSFS_ARRAYLEN(case_fold1_16_001) }, + { case_fold1_16_002, __PHYSFS_ARRAYLEN(case_fold1_16_002) }, + { case_fold1_16_003, __PHYSFS_ARRAYLEN(case_fold1_16_003) }, + { case_fold1_16_004, __PHYSFS_ARRAYLEN(case_fold1_16_004) }, + { case_fold1_16_005, __PHYSFS_ARRAYLEN(case_fold1_16_005) }, + { case_fold1_16_006, __PHYSFS_ARRAYLEN(case_fold1_16_006) }, + { case_fold1_16_007, __PHYSFS_ARRAYLEN(case_fold1_16_007) }, + { case_fold1_16_008, __PHYSFS_ARRAYLEN(case_fold1_16_008) }, + { case_fold1_16_009, __PHYSFS_ARRAYLEN(case_fold1_16_009) }, + { case_fold1_16_010, __PHYSFS_ARRAYLEN(case_fold1_16_010) }, + { case_fold1_16_011, __PHYSFS_ARRAYLEN(case_fold1_16_011) }, + { case_fold1_16_012, __PHYSFS_ARRAYLEN(case_fold1_16_012) }, + { case_fold1_16_013, __PHYSFS_ARRAYLEN(case_fold1_16_013) }, + { case_fold1_16_014, __PHYSFS_ARRAYLEN(case_fold1_16_014) }, + { case_fold1_16_015, __PHYSFS_ARRAYLEN(case_fold1_16_015) }, + { case_fold1_16_016, __PHYSFS_ARRAYLEN(case_fold1_16_016) }, + { case_fold1_16_017, __PHYSFS_ARRAYLEN(case_fold1_16_017) }, + { case_fold1_16_018, __PHYSFS_ARRAYLEN(case_fold1_16_018) }, + { case_fold1_16_019, __PHYSFS_ARRAYLEN(case_fold1_16_019) }, + { case_fold1_16_020, __PHYSFS_ARRAYLEN(case_fold1_16_020) }, + { case_fold1_16_021, __PHYSFS_ARRAYLEN(case_fold1_16_021) }, + { case_fold1_16_022, __PHYSFS_ARRAYLEN(case_fold1_16_022) }, + { case_fold1_16_023, __PHYSFS_ARRAYLEN(case_fold1_16_023) }, + { case_fold1_16_024, __PHYSFS_ARRAYLEN(case_fold1_16_024) }, + { case_fold1_16_025, __PHYSFS_ARRAYLEN(case_fold1_16_025) }, + { case_fold1_16_026, __PHYSFS_ARRAYLEN(case_fold1_16_026) }, + { case_fold1_16_027, __PHYSFS_ARRAYLEN(case_fold1_16_027) }, + { case_fold1_16_028, __PHYSFS_ARRAYLEN(case_fold1_16_028) }, + { case_fold1_16_029, __PHYSFS_ARRAYLEN(case_fold1_16_029) }, + { case_fold1_16_030, __PHYSFS_ARRAYLEN(case_fold1_16_030) }, + { case_fold1_16_031, __PHYSFS_ARRAYLEN(case_fold1_16_031) }, + { case_fold1_16_032, __PHYSFS_ARRAYLEN(case_fold1_16_032) }, + { case_fold1_16_033, __PHYSFS_ARRAYLEN(case_fold1_16_033) }, + { case_fold1_16_034, __PHYSFS_ARRAYLEN(case_fold1_16_034) }, + { case_fold1_16_035, __PHYSFS_ARRAYLEN(case_fold1_16_035) }, + { case_fold1_16_036, __PHYSFS_ARRAYLEN(case_fold1_16_036) }, + { case_fold1_16_037, __PHYSFS_ARRAYLEN(case_fold1_16_037) }, + { case_fold1_16_038, __PHYSFS_ARRAYLEN(case_fold1_16_038) }, + { case_fold1_16_039, __PHYSFS_ARRAYLEN(case_fold1_16_039) }, + { case_fold1_16_040, __PHYSFS_ARRAYLEN(case_fold1_16_040) }, + { case_fold1_16_041, __PHYSFS_ARRAYLEN(case_fold1_16_041) }, + { case_fold1_16_042, __PHYSFS_ARRAYLEN(case_fold1_16_042) }, + { case_fold1_16_043, __PHYSFS_ARRAYLEN(case_fold1_16_043) }, + { case_fold1_16_044, __PHYSFS_ARRAYLEN(case_fold1_16_044) }, + { case_fold1_16_045, __PHYSFS_ARRAYLEN(case_fold1_16_045) }, + { case_fold1_16_046, __PHYSFS_ARRAYLEN(case_fold1_16_046) }, + { case_fold1_16_047, __PHYSFS_ARRAYLEN(case_fold1_16_047) }, + { case_fold1_16_048, __PHYSFS_ARRAYLEN(case_fold1_16_048) }, + { case_fold1_16_049, __PHYSFS_ARRAYLEN(case_fold1_16_049) }, + { case_fold1_16_050, __PHYSFS_ARRAYLEN(case_fold1_16_050) }, + { case_fold1_16_051, __PHYSFS_ARRAYLEN(case_fold1_16_051) }, + { case_fold1_16_052, __PHYSFS_ARRAYLEN(case_fold1_16_052) }, + { case_fold1_16_053, __PHYSFS_ARRAYLEN(case_fold1_16_053) }, + { case_fold1_16_054, __PHYSFS_ARRAYLEN(case_fold1_16_054) }, + { case_fold1_16_055, __PHYSFS_ARRAYLEN(case_fold1_16_055) }, + { case_fold1_16_056, __PHYSFS_ARRAYLEN(case_fold1_16_056) }, + { case_fold1_16_057, __PHYSFS_ARRAYLEN(case_fold1_16_057) }, + { case_fold1_16_058, __PHYSFS_ARRAYLEN(case_fold1_16_058) }, + { case_fold1_16_059, __PHYSFS_ARRAYLEN(case_fold1_16_059) }, + { case_fold1_16_060, __PHYSFS_ARRAYLEN(case_fold1_16_060) }, + { case_fold1_16_061, __PHYSFS_ARRAYLEN(case_fold1_16_061) }, + { case_fold1_16_062, __PHYSFS_ARRAYLEN(case_fold1_16_062) }, + { case_fold1_16_063, __PHYSFS_ARRAYLEN(case_fold1_16_063) }, + { case_fold1_16_064, __PHYSFS_ARRAYLEN(case_fold1_16_064) }, + { case_fold1_16_065, __PHYSFS_ARRAYLEN(case_fold1_16_065) }, + { case_fold1_16_066, __PHYSFS_ARRAYLEN(case_fold1_16_066) }, + { case_fold1_16_067, __PHYSFS_ARRAYLEN(case_fold1_16_067) }, + { case_fold1_16_068, __PHYSFS_ARRAYLEN(case_fold1_16_068) }, + { case_fold1_16_069, __PHYSFS_ARRAYLEN(case_fold1_16_069) }, + { case_fold1_16_070, __PHYSFS_ARRAYLEN(case_fold1_16_070) }, + { case_fold1_16_071, __PHYSFS_ARRAYLEN(case_fold1_16_071) }, + { case_fold1_16_072, __PHYSFS_ARRAYLEN(case_fold1_16_072) }, + { case_fold1_16_073, __PHYSFS_ARRAYLEN(case_fold1_16_073) }, + { case_fold1_16_074, __PHYSFS_ARRAYLEN(case_fold1_16_074) }, + { case_fold1_16_075, __PHYSFS_ARRAYLEN(case_fold1_16_075) }, + { case_fold1_16_076, __PHYSFS_ARRAYLEN(case_fold1_16_076) }, + { case_fold1_16_077, __PHYSFS_ARRAYLEN(case_fold1_16_077) }, + { case_fold1_16_078, __PHYSFS_ARRAYLEN(case_fold1_16_078) }, + { case_fold1_16_079, __PHYSFS_ARRAYLEN(case_fold1_16_079) }, + { case_fold1_16_080, __PHYSFS_ARRAYLEN(case_fold1_16_080) }, + { case_fold1_16_081, __PHYSFS_ARRAYLEN(case_fold1_16_081) }, + { case_fold1_16_082, __PHYSFS_ARRAYLEN(case_fold1_16_082) }, + { case_fold1_16_083, __PHYSFS_ARRAYLEN(case_fold1_16_083) }, + { case_fold1_16_084, __PHYSFS_ARRAYLEN(case_fold1_16_084) }, + { case_fold1_16_085, __PHYSFS_ARRAYLEN(case_fold1_16_085) }, + { case_fold1_16_086, __PHYSFS_ARRAYLEN(case_fold1_16_086) }, + { case_fold1_16_087, __PHYSFS_ARRAYLEN(case_fold1_16_087) }, + { case_fold1_16_088, __PHYSFS_ARRAYLEN(case_fold1_16_088) }, + { case_fold1_16_089, __PHYSFS_ARRAYLEN(case_fold1_16_089) }, + { case_fold1_16_090, __PHYSFS_ARRAYLEN(case_fold1_16_090) }, + { case_fold1_16_091, __PHYSFS_ARRAYLEN(case_fold1_16_091) }, + { case_fold1_16_092, __PHYSFS_ARRAYLEN(case_fold1_16_092) }, + { case_fold1_16_093, __PHYSFS_ARRAYLEN(case_fold1_16_093) }, + { case_fold1_16_094, __PHYSFS_ARRAYLEN(case_fold1_16_094) }, + { case_fold1_16_095, __PHYSFS_ARRAYLEN(case_fold1_16_095) }, + { case_fold1_16_096, __PHYSFS_ARRAYLEN(case_fold1_16_096) }, + { case_fold1_16_097, __PHYSFS_ARRAYLEN(case_fold1_16_097) }, + { case_fold1_16_098, __PHYSFS_ARRAYLEN(case_fold1_16_098) }, + { case_fold1_16_099, __PHYSFS_ARRAYLEN(case_fold1_16_099) }, + { case_fold1_16_100, __PHYSFS_ARRAYLEN(case_fold1_16_100) }, + { case_fold1_16_101, __PHYSFS_ARRAYLEN(case_fold1_16_101) }, + { case_fold1_16_102, __PHYSFS_ARRAYLEN(case_fold1_16_102) }, + { case_fold1_16_103, __PHYSFS_ARRAYLEN(case_fold1_16_103) }, + { case_fold1_16_104, __PHYSFS_ARRAYLEN(case_fold1_16_104) }, + { case_fold1_16_105, __PHYSFS_ARRAYLEN(case_fold1_16_105) }, + { case_fold1_16_106, __PHYSFS_ARRAYLEN(case_fold1_16_106) }, + { case_fold1_16_107, __PHYSFS_ARRAYLEN(case_fold1_16_107) }, + { case_fold1_16_108, __PHYSFS_ARRAYLEN(case_fold1_16_108) }, + { case_fold1_16_109, __PHYSFS_ARRAYLEN(case_fold1_16_109) }, + { case_fold1_16_110, __PHYSFS_ARRAYLEN(case_fold1_16_110) }, + { case_fold1_16_111, __PHYSFS_ARRAYLEN(case_fold1_16_111) }, + { case_fold1_16_112, __PHYSFS_ARRAYLEN(case_fold1_16_112) }, + { case_fold1_16_113, __PHYSFS_ARRAYLEN(case_fold1_16_113) }, + { case_fold1_16_114, __PHYSFS_ARRAYLEN(case_fold1_16_114) }, + { case_fold1_16_115, __PHYSFS_ARRAYLEN(case_fold1_16_115) }, + { case_fold1_16_116, __PHYSFS_ARRAYLEN(case_fold1_16_116) }, + { case_fold1_16_117, __PHYSFS_ARRAYLEN(case_fold1_16_117) }, + { case_fold1_16_118, __PHYSFS_ARRAYLEN(case_fold1_16_118) }, + { case_fold1_16_119, __PHYSFS_ARRAYLEN(case_fold1_16_119) }, + { case_fold1_16_120, __PHYSFS_ARRAYLEN(case_fold1_16_120) }, + { case_fold1_16_121, __PHYSFS_ARRAYLEN(case_fold1_16_121) }, + { case_fold1_16_122, __PHYSFS_ARRAYLEN(case_fold1_16_122) }, + { NULL, 0 }, + { case_fold1_16_124, __PHYSFS_ARRAYLEN(case_fold1_16_124) }, + { NULL, 0 }, + { case_fold1_16_126, __PHYSFS_ARRAYLEN(case_fold1_16_126) }, + { NULL, 0 }, + { case_fold1_16_128, __PHYSFS_ARRAYLEN(case_fold1_16_128) }, + { case_fold1_16_129, __PHYSFS_ARRAYLEN(case_fold1_16_129) }, + { case_fold1_16_130, __PHYSFS_ARRAYLEN(case_fold1_16_130) }, + { case_fold1_16_131, __PHYSFS_ARRAYLEN(case_fold1_16_131) }, + { case_fold1_16_132, __PHYSFS_ARRAYLEN(case_fold1_16_132) }, + { case_fold1_16_133, __PHYSFS_ARRAYLEN(case_fold1_16_133) }, + { case_fold1_16_134, __PHYSFS_ARRAYLEN(case_fold1_16_134) }, + { case_fold1_16_135, __PHYSFS_ARRAYLEN(case_fold1_16_135) }, + { case_fold1_16_136, __PHYSFS_ARRAYLEN(case_fold1_16_136) }, + { case_fold1_16_137, __PHYSFS_ARRAYLEN(case_fold1_16_137) }, + { case_fold1_16_138, __PHYSFS_ARRAYLEN(case_fold1_16_138) }, + { case_fold1_16_139, __PHYSFS_ARRAYLEN(case_fold1_16_139) }, + { case_fold1_16_140, __PHYSFS_ARRAYLEN(case_fold1_16_140) }, + { case_fold1_16_141, __PHYSFS_ARRAYLEN(case_fold1_16_141) }, + { case_fold1_16_142, __PHYSFS_ARRAYLEN(case_fold1_16_142) }, + { case_fold1_16_143, __PHYSFS_ARRAYLEN(case_fold1_16_143) }, + { case_fold1_16_144, __PHYSFS_ARRAYLEN(case_fold1_16_144) }, + { case_fold1_16_145, __PHYSFS_ARRAYLEN(case_fold1_16_145) }, + { case_fold1_16_146, __PHYSFS_ARRAYLEN(case_fold1_16_146) }, + { case_fold1_16_147, __PHYSFS_ARRAYLEN(case_fold1_16_147) }, + { case_fold1_16_148, __PHYSFS_ARRAYLEN(case_fold1_16_148) }, + { case_fold1_16_149, __PHYSFS_ARRAYLEN(case_fold1_16_149) }, + { case_fold1_16_150, __PHYSFS_ARRAYLEN(case_fold1_16_150) }, + { case_fold1_16_151, __PHYSFS_ARRAYLEN(case_fold1_16_151) }, + { case_fold1_16_152, __PHYSFS_ARRAYLEN(case_fold1_16_152) }, + { case_fold1_16_153, __PHYSFS_ARRAYLEN(case_fold1_16_153) }, + { case_fold1_16_154, __PHYSFS_ARRAYLEN(case_fold1_16_154) }, + { case_fold1_16_155, __PHYSFS_ARRAYLEN(case_fold1_16_155) }, + { case_fold1_16_156, __PHYSFS_ARRAYLEN(case_fold1_16_156) }, + { case_fold1_16_157, __PHYSFS_ARRAYLEN(case_fold1_16_157) }, + { case_fold1_16_158, __PHYSFS_ARRAYLEN(case_fold1_16_158) }, + { case_fold1_16_159, __PHYSFS_ARRAYLEN(case_fold1_16_159) }, + { case_fold1_16_160, __PHYSFS_ARRAYLEN(case_fold1_16_160) }, + { case_fold1_16_161, __PHYSFS_ARRAYLEN(case_fold1_16_161) }, + { case_fold1_16_162, __PHYSFS_ARRAYLEN(case_fold1_16_162) }, + { case_fold1_16_163, __PHYSFS_ARRAYLEN(case_fold1_16_163) }, + { case_fold1_16_164, __PHYSFS_ARRAYLEN(case_fold1_16_164) }, + { case_fold1_16_165, __PHYSFS_ARRAYLEN(case_fold1_16_165) }, + { case_fold1_16_166, __PHYSFS_ARRAYLEN(case_fold1_16_166) }, + { case_fold1_16_167, __PHYSFS_ARRAYLEN(case_fold1_16_167) }, + { case_fold1_16_168, __PHYSFS_ARRAYLEN(case_fold1_16_168) }, + { case_fold1_16_169, __PHYSFS_ARRAYLEN(case_fold1_16_169) }, + { case_fold1_16_170, __PHYSFS_ARRAYLEN(case_fold1_16_170) }, + { case_fold1_16_171, __PHYSFS_ARRAYLEN(case_fold1_16_171) }, + { case_fold1_16_172, __PHYSFS_ARRAYLEN(case_fold1_16_172) }, + { case_fold1_16_173, __PHYSFS_ARRAYLEN(case_fold1_16_173) }, + { case_fold1_16_174, __PHYSFS_ARRAYLEN(case_fold1_16_174) }, + { case_fold1_16_175, __PHYSFS_ARRAYLEN(case_fold1_16_175) }, + { case_fold1_16_176, __PHYSFS_ARRAYLEN(case_fold1_16_176) }, + { case_fold1_16_177, __PHYSFS_ARRAYLEN(case_fold1_16_177) }, + { case_fold1_16_178, __PHYSFS_ARRAYLEN(case_fold1_16_178) }, + { case_fold1_16_179, __PHYSFS_ARRAYLEN(case_fold1_16_179) }, + { case_fold1_16_180, __PHYSFS_ARRAYLEN(case_fold1_16_180) }, + { case_fold1_16_181, __PHYSFS_ARRAYLEN(case_fold1_16_181) }, + { case_fold1_16_182, __PHYSFS_ARRAYLEN(case_fold1_16_182) }, + { case_fold1_16_183, __PHYSFS_ARRAYLEN(case_fold1_16_183) }, + { case_fold1_16_184, __PHYSFS_ARRAYLEN(case_fold1_16_184) }, + { case_fold1_16_185, __PHYSFS_ARRAYLEN(case_fold1_16_185) }, + { case_fold1_16_186, __PHYSFS_ARRAYLEN(case_fold1_16_186) }, + { case_fold1_16_187, __PHYSFS_ARRAYLEN(case_fold1_16_187) }, + { case_fold1_16_188, __PHYSFS_ARRAYLEN(case_fold1_16_188) }, + { case_fold1_16_189, __PHYSFS_ARRAYLEN(case_fold1_16_189) }, + { case_fold1_16_190, __PHYSFS_ARRAYLEN(case_fold1_16_190) }, + { case_fold1_16_191, __PHYSFS_ARRAYLEN(case_fold1_16_191) }, + { case_fold1_16_192, __PHYSFS_ARRAYLEN(case_fold1_16_192) }, + { case_fold1_16_193, __PHYSFS_ARRAYLEN(case_fold1_16_193) }, + { case_fold1_16_194, __PHYSFS_ARRAYLEN(case_fold1_16_194) }, + { case_fold1_16_195, __PHYSFS_ARRAYLEN(case_fold1_16_195) }, + { case_fold1_16_196, __PHYSFS_ARRAYLEN(case_fold1_16_196) }, + { case_fold1_16_197, __PHYSFS_ARRAYLEN(case_fold1_16_197) }, + { case_fold1_16_198, __PHYSFS_ARRAYLEN(case_fold1_16_198) }, + { case_fold1_16_199, __PHYSFS_ARRAYLEN(case_fold1_16_199) }, + { case_fold1_16_200, __PHYSFS_ARRAYLEN(case_fold1_16_200) }, + { case_fold1_16_201, __PHYSFS_ARRAYLEN(case_fold1_16_201) }, + { case_fold1_16_202, __PHYSFS_ARRAYLEN(case_fold1_16_202) }, + { case_fold1_16_203, __PHYSFS_ARRAYLEN(case_fold1_16_203) }, + { case_fold1_16_204, __PHYSFS_ARRAYLEN(case_fold1_16_204) }, + { case_fold1_16_205, __PHYSFS_ARRAYLEN(case_fold1_16_205) }, + { case_fold1_16_206, __PHYSFS_ARRAYLEN(case_fold1_16_206) }, + { case_fold1_16_207, __PHYSFS_ARRAYLEN(case_fold1_16_207) }, + { case_fold1_16_208, __PHYSFS_ARRAYLEN(case_fold1_16_208) }, + { case_fold1_16_209, __PHYSFS_ARRAYLEN(case_fold1_16_209) }, + { case_fold1_16_210, __PHYSFS_ARRAYLEN(case_fold1_16_210) }, + { case_fold1_16_211, __PHYSFS_ARRAYLEN(case_fold1_16_211) }, + { case_fold1_16_212, __PHYSFS_ARRAYLEN(case_fold1_16_212) }, + { case_fold1_16_213, __PHYSFS_ARRAYLEN(case_fold1_16_213) }, + { case_fold1_16_214, __PHYSFS_ARRAYLEN(case_fold1_16_214) }, + { case_fold1_16_215, __PHYSFS_ARRAYLEN(case_fold1_16_215) }, + { case_fold1_16_216, __PHYSFS_ARRAYLEN(case_fold1_16_216) }, + { case_fold1_16_217, __PHYSFS_ARRAYLEN(case_fold1_16_217) }, + { case_fold1_16_218, __PHYSFS_ARRAYLEN(case_fold1_16_218) }, + { case_fold1_16_219, __PHYSFS_ARRAYLEN(case_fold1_16_219) }, + { case_fold1_16_220, __PHYSFS_ARRAYLEN(case_fold1_16_220) }, + { case_fold1_16_221, __PHYSFS_ARRAYLEN(case_fold1_16_221) }, + { case_fold1_16_222, __PHYSFS_ARRAYLEN(case_fold1_16_222) }, + { case_fold1_16_223, __PHYSFS_ARRAYLEN(case_fold1_16_223) }, + { case_fold1_16_224, __PHYSFS_ARRAYLEN(case_fold1_16_224) }, + { case_fold1_16_225, __PHYSFS_ARRAYLEN(case_fold1_16_225) }, + { case_fold1_16_226, __PHYSFS_ARRAYLEN(case_fold1_16_226) }, + { case_fold1_16_227, __PHYSFS_ARRAYLEN(case_fold1_16_227) }, + { case_fold1_16_228, __PHYSFS_ARRAYLEN(case_fold1_16_228) }, + { case_fold1_16_229, __PHYSFS_ARRAYLEN(case_fold1_16_229) }, + { case_fold1_16_230, __PHYSFS_ARRAYLEN(case_fold1_16_230) }, + { case_fold1_16_231, __PHYSFS_ARRAYLEN(case_fold1_16_231) }, + { case_fold1_16_232, __PHYSFS_ARRAYLEN(case_fold1_16_232) }, + { case_fold1_16_233, __PHYSFS_ARRAYLEN(case_fold1_16_233) }, + { case_fold1_16_234, __PHYSFS_ARRAYLEN(case_fold1_16_234) }, + { case_fold1_16_235, __PHYSFS_ARRAYLEN(case_fold1_16_235) }, + { case_fold1_16_236, __PHYSFS_ARRAYLEN(case_fold1_16_236) }, + { case_fold1_16_237, __PHYSFS_ARRAYLEN(case_fold1_16_237) }, + { case_fold1_16_238, __PHYSFS_ARRAYLEN(case_fold1_16_238) }, + { case_fold1_16_239, __PHYSFS_ARRAYLEN(case_fold1_16_239) }, + { case_fold1_16_240, __PHYSFS_ARRAYLEN(case_fold1_16_240) }, + { case_fold1_16_241, __PHYSFS_ARRAYLEN(case_fold1_16_241) }, + { case_fold1_16_242, __PHYSFS_ARRAYLEN(case_fold1_16_242) }, + { case_fold1_16_243, __PHYSFS_ARRAYLEN(case_fold1_16_243) }, + { case_fold1_16_244, __PHYSFS_ARRAYLEN(case_fold1_16_244) }, + { case_fold1_16_245, __PHYSFS_ARRAYLEN(case_fold1_16_245) }, + { case_fold1_16_246, __PHYSFS_ARRAYLEN(case_fold1_16_246) }, + { case_fold1_16_247, __PHYSFS_ARRAYLEN(case_fold1_16_247) }, + { case_fold1_16_248, __PHYSFS_ARRAYLEN(case_fold1_16_248) }, + { case_fold1_16_249, __PHYSFS_ARRAYLEN(case_fold1_16_249) }, + { case_fold1_16_250, __PHYSFS_ARRAYLEN(case_fold1_16_250) }, + { case_fold1_16_251, __PHYSFS_ARRAYLEN(case_fold1_16_251) }, + { case_fold1_16_252, __PHYSFS_ARRAYLEN(case_fold1_16_252) }, + { case_fold1_16_253, __PHYSFS_ARRAYLEN(case_fold1_16_253) }, + { case_fold1_16_254, __PHYSFS_ARRAYLEN(case_fold1_16_254) }, + { case_fold1_16_255, __PHYSFS_ARRAYLEN(case_fold1_16_255) }, +}; + +static const CaseFoldHashBucket1_32 case_fold_hash1_32[] = { + { case_fold1_32_000, __PHYSFS_ARRAYLEN(case_fold1_32_000) }, + { case_fold1_32_001, __PHYSFS_ARRAYLEN(case_fold1_32_001) }, + { case_fold1_32_002, __PHYSFS_ARRAYLEN(case_fold1_32_002) }, + { case_fold1_32_003, __PHYSFS_ARRAYLEN(case_fold1_32_003) }, + { case_fold1_32_004, __PHYSFS_ARRAYLEN(case_fold1_32_004) }, + { case_fold1_32_005, __PHYSFS_ARRAYLEN(case_fold1_32_005) }, + { case_fold1_32_006, __PHYSFS_ARRAYLEN(case_fold1_32_006) }, + { case_fold1_32_007, __PHYSFS_ARRAYLEN(case_fold1_32_007) }, + { case_fold1_32_008, __PHYSFS_ARRAYLEN(case_fold1_32_008) }, + { case_fold1_32_009, __PHYSFS_ARRAYLEN(case_fold1_32_009) }, + { case_fold1_32_010, __PHYSFS_ARRAYLEN(case_fold1_32_010) }, + { case_fold1_32_011, __PHYSFS_ARRAYLEN(case_fold1_32_011) }, + { case_fold1_32_012, __PHYSFS_ARRAYLEN(case_fold1_32_012) }, + { case_fold1_32_013, __PHYSFS_ARRAYLEN(case_fold1_32_013) }, + { case_fold1_32_014, __PHYSFS_ARRAYLEN(case_fold1_32_014) }, + { case_fold1_32_015, __PHYSFS_ARRAYLEN(case_fold1_32_015) }, +}; + +static const CaseFoldHashBucket2_16 case_fold_hash2_16[] = { + { case_fold2_16_000, __PHYSFS_ARRAYLEN(case_fold2_16_000) }, + { case_fold2_16_001, __PHYSFS_ARRAYLEN(case_fold2_16_001) }, + { case_fold2_16_002, __PHYSFS_ARRAYLEN(case_fold2_16_002) }, + { case_fold2_16_003, __PHYSFS_ARRAYLEN(case_fold2_16_003) }, + { case_fold2_16_004, __PHYSFS_ARRAYLEN(case_fold2_16_004) }, + { case_fold2_16_005, __PHYSFS_ARRAYLEN(case_fold2_16_005) }, + { case_fold2_16_006, __PHYSFS_ARRAYLEN(case_fold2_16_006) }, + { case_fold2_16_007, __PHYSFS_ARRAYLEN(case_fold2_16_007) }, + { case_fold2_16_008, __PHYSFS_ARRAYLEN(case_fold2_16_008) }, + { case_fold2_16_009, __PHYSFS_ARRAYLEN(case_fold2_16_009) }, + { case_fold2_16_010, __PHYSFS_ARRAYLEN(case_fold2_16_010) }, + { case_fold2_16_011, __PHYSFS_ARRAYLEN(case_fold2_16_011) }, + { case_fold2_16_012, __PHYSFS_ARRAYLEN(case_fold2_16_012) }, + { case_fold2_16_013, __PHYSFS_ARRAYLEN(case_fold2_16_013) }, + { case_fold2_16_014, __PHYSFS_ARRAYLEN(case_fold2_16_014) }, + { case_fold2_16_015, __PHYSFS_ARRAYLEN(case_fold2_16_015) }, +}; + +static const CaseFoldHashBucket3_16 case_fold_hash3_16[] = { + { case_fold3_16_000, __PHYSFS_ARRAYLEN(case_fold3_16_000) }, + { case_fold3_16_001, __PHYSFS_ARRAYLEN(case_fold3_16_001) }, + { NULL, 0 }, + { case_fold3_16_003, __PHYSFS_ARRAYLEN(case_fold3_16_003) }, +}; + + +#endif /* _INCLUDE_PHYSFS_CASEFOLDING_H_ */ + +/* end of physfs_casefolding.h ... */ + diff --git a/desktop_version/physfs/physfs_internal.h b/desktop_version/physfs/physfs_internal.h new file mode 100644 index 00000000..29126234 --- /dev/null +++ b/desktop_version/physfs/physfs_internal.h @@ -0,0 +1,729 @@ +/* + * Internal function/structure declaration. Do NOT include in your + * application. + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon. + */ + +#ifndef _INCLUDE_PHYSFS_INTERNAL_H_ +#define _INCLUDE_PHYSFS_INTERNAL_H_ + +#ifndef __PHYSICSFS_INTERNAL__ +#error Do not include this header from your applications. +#endif + +/* Turn off MSVC warnings that are aggressively anti-portability. */ +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) +#define _CRT_SECURE_NO_WARNINGS 1 +#endif + +#include "physfs.h" + +/* The holy trinity. */ +#include +#include +#include + +#include "physfs_platforms.h" + +#include + +#define __PHYSFS_COMPILE_TIME_ASSERT(name, x) \ + typedef int __PHYSFS_compile_time_assert_##name[(x) * 2 - 1] + +/* !!! FIXME: remove this when revamping stack allocation code... */ +#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__WATCOMC__) +#include +#endif + +#ifdef PHYSFS_PLATFORM_SOLARIS +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __GNUC__ +#define PHYSFS_MINIMUM_GCC_VERSION(major, minor) \ + ( ((__GNUC__ << 16) + __GNUC_MINOR__) >= (((major) << 16) + (minor)) ) +#else +#define PHYSFS_MINIMUM_GCC_VERSION(major, minor) (0) +#endif + +#ifdef __cplusplus + /* C++ always has a real inline keyword. */ +#elif (defined macintosh) && !(defined __MWERKS__) +# define inline +#elif (defined _MSC_VER) +# define inline __inline +#endif + +#if defined(PHYSFS_PLATFORM_LINUX) && !defined(_FILE_OFFSET_BITS) +#define _FILE_OFFSET_BITS 64 +#endif + +/* All public APIs need to be in physfs.h with a PHYSFS_DECL. + All file-private symbols need to be marked "static". + Everything shared between PhysicsFS sources needs to be in this + file between the visibility pragma blocks. */ +#if PHYSFS_MINIMUM_GCC_VERSION(4,0) || defined(__clang__) +#define PHYSFS_HAVE_PRAGMA_VISIBILITY 1 +#endif + +#if PHYSFS_HAVE_PRAGMA_VISIBILITY +#pragma GCC visibility push(hidden) +#endif + +/* These are the build-in archivers. We list them all as "extern" here without + #ifdefs to keep it tidy, but obviously you need to make sure these are + wrapped in PHYSFS_SUPPORTS_* checks before actually referencing them. */ +extern const PHYSFS_Archiver __PHYSFS_Archiver_DIR; +extern const PHYSFS_Archiver __PHYSFS_Archiver_ZIP; +extern const PHYSFS_Archiver __PHYSFS_Archiver_7Z; +extern const PHYSFS_Archiver __PHYSFS_Archiver_GRP; +extern const PHYSFS_Archiver __PHYSFS_Archiver_QPAK; +extern const PHYSFS_Archiver __PHYSFS_Archiver_HOG; +extern const PHYSFS_Archiver __PHYSFS_Archiver_MVL; +extern const PHYSFS_Archiver __PHYSFS_Archiver_WAD; +extern const PHYSFS_Archiver __PHYSFS_Archiver_SLB; +extern const PHYSFS_Archiver __PHYSFS_Archiver_ISO9660; +extern const PHYSFS_Archiver __PHYSFS_Archiver_VDF; + +/* a real C99-compliant snprintf() is in Visual Studio 2015, + but just use this everywhere for binary compatibility. */ +#if defined(_MSC_VER) +int __PHYSFS_msvc_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap); +int __PHYSFS_msvc_snprintf(char *outBuf, size_t size, const char *format, ...); +#define vsnprintf __PHYSFS_msvc_vsnprintf +#define snprintf __PHYSFS_msvc_snprintf +#endif + +/* Some simple wrappers around WinRT C++ interfaces we can call from C. */ +#ifdef PHYSFS_PLATFORM_WINRT +const void *__PHYSFS_winrtCalcBaseDir(void); +const void *__PHYSFS_winrtCalcPrefDir(void); +#endif + +/* atomic operations. */ +#if defined(_MSC_VER) && (_MSC_VER >= 1500) +#include +__PHYSFS_COMPILE_TIME_ASSERT(LongEqualsInt, sizeof (int) == sizeof (long)); +#define __PHYSFS_ATOMIC_INCR(ptrval) _InterlockedIncrement((long*)(ptrval)) +#define __PHYSFS_ATOMIC_DECR(ptrval) _InterlockedDecrement((long*)(ptrval)) +#elif defined(__clang__) || (defined(__GNUC__) && (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100)) >= 40100)) +#define __PHYSFS_ATOMIC_INCR(ptrval) __sync_fetch_and_add(ptrval, 1) +#define __PHYSFS_ATOMIC_DECR(ptrval) __sync_fetch_and_add(ptrval, -1) +#else +#define PHYSFS_NEED_ATOMIC_OP_FALLBACK 1 +int __PHYSFS_ATOMIC_INCR(int *ptrval); +int __PHYSFS_ATOMIC_DECR(int *ptrval); +#endif + + +/* + * Interface for small allocations. If you need a little scratch space for + * a throwaway buffer or string, use this. It will make small allocations + * on the stack if possible, and use allocator.Malloc() if they are too + * large. This helps reduce malloc pressure. + * There are some rules, though: + * NEVER return a pointer from this, as stack-allocated buffers go away + * when your function returns. + * NEVER allocate in a loop, as stack-allocated pointers will pile up. Call + * a function that uses smallAlloc from your loop, so the allocation can + * free each time. + * NEVER call smallAlloc with any complex expression (it's a macro that WILL + * have side effects...it references the argument multiple times). Use a + * variable or a literal. + * NEVER free a pointer from this with anything but smallFree. It will not + * be a valid pointer to the allocator, regardless of where the memory came + * from. + * NEVER realloc a pointer from this. + * NEVER forget to use smallFree: it may not be a pointer from the stack. + * NEVER forget to check for NULL...allocation can fail here, of course! + */ +#define __PHYSFS_SMALLALLOCTHRESHOLD 256 +void *__PHYSFS_initSmallAlloc(void *ptr, const size_t len); + +#define __PHYSFS_smallAlloc(bytes) ( \ + __PHYSFS_initSmallAlloc( \ + (((bytes) < __PHYSFS_SMALLALLOCTHRESHOLD) ? \ + alloca((size_t)((bytes)+sizeof(void*))) : NULL), (bytes)) \ +) + +void __PHYSFS_smallFree(void *ptr); + + +/* Use the allocation hooks. */ +#define malloc(x) Do not use malloc() directly. +#define realloc(x, y) Do not use realloc() directly. +#define free(x) Do not use free() directly. +/* !!! FIXME: add alloca check here. */ + + +/* by default, enable things, so builds can opt out of a few things they + want to avoid. But you can build with this #defined to 0 if you would + like to turn off everything except a handful of things you opt into. */ +#ifndef PHYSFS_SUPPORTS_DEFAULT +#define PHYSFS_SUPPORTS_DEFAULT 1 +#endif + + +#ifndef PHYSFS_SUPPORTS_ZIP +#define PHYSFS_SUPPORTS_ZIP PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_7Z +#define PHYSFS_SUPPORTS_7Z PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_GRP +#define PHYSFS_SUPPORTS_GRP PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_HOG +#define PHYSFS_SUPPORTS_HOG PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_MVL +#define PHYSFS_SUPPORTS_MVL PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_WAD +#define PHYSFS_SUPPORTS_WAD PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_QPAK +#define PHYSFS_SUPPORTS_QPAK PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_SLB +#define PHYSFS_SUPPORTS_SLB PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_ISO9660 +#define PHYSFS_SUPPORTS_ISO9660 PHYSFS_SUPPORTS_DEFAULT +#endif +#ifndef PHYSFS_SUPPORTS_VDF +#define PHYSFS_SUPPORTS_VDF PHYSFS_SUPPORTS_DEFAULT +#endif + +#if PHYSFS_SUPPORTS_7Z +/* 7zip support needs a global init function called at startup (no deinit). */ +extern void SZIP_global_init(void); +#endif + +/* The latest supported PHYSFS_Io::version value. */ +#define CURRENT_PHYSFS_IO_API_VERSION 0 + +/* The latest supported PHYSFS_Archiver::version value. */ +#define CURRENT_PHYSFS_ARCHIVER_API_VERSION 0 + +/* This byteorder stuff was lifted from SDL. https://www.libsdl.org/ */ +#define PHYSFS_LIL_ENDIAN 1234 +#define PHYSFS_BIG_ENDIAN 4321 + +#ifdef __linux__ +#include +#define PHYSFS_BYTEORDER __BYTE_ORDER +#else /* __linux__ */ +#if defined(__hppa__) || \ + defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ + (defined(__MIPS__) && defined(__MISPEB__)) || \ + defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ + defined(__sparc__) +#define PHYSFS_BYTEORDER PHYSFS_BIG_ENDIAN +#else +#define PHYSFS_BYTEORDER PHYSFS_LIL_ENDIAN +#endif +#endif /* __linux__ */ + + +/* + * When sorting the entries in an archive, we use a modified QuickSort. + * When there are less then PHYSFS_QUICKSORT_THRESHOLD entries left to sort, + * we switch over to a BubbleSort for the remainder. Tweak to taste. + * + * You can override this setting by defining PHYSFS_QUICKSORT_THRESHOLD + * before #including "physfs_internal.h". + */ +#ifndef PHYSFS_QUICKSORT_THRESHOLD +#define PHYSFS_QUICKSORT_THRESHOLD 4 +#endif + +/* + * Sort an array (or whatever) of (max) elements. This uses a mixture of + * a QuickSort and BubbleSort internally. + * (cmpfn) is used to determine ordering, and (swapfn) does the actual + * swapping of elements in the list. + */ +void __PHYSFS_sort(void *entries, size_t max, + int (*cmpfn)(void *, size_t, size_t), + void (*swapfn)(void *, size_t, size_t)); + +/* These get used all over for lessening code clutter. */ +/* "ERRPASS" means "something else just set the error state for us" and is + just to make it clear where the responsibility for the error state lays. */ +#define BAIL(e, r) do { if (e) PHYSFS_setErrorCode(e); return r; } while (0) +#define BAIL_ERRPASS(r) do { return r; } while (0) +#define BAIL_IF(c, e, r) do { if (c) { if (e) PHYSFS_setErrorCode(e); return r; } } while (0) +#define BAIL_IF_ERRPASS(c, r) do { if (c) { return r; } } while (0) +#define BAIL_MUTEX(e, m, r) do { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); return r; } while (0) +#define BAIL_MUTEX_ERRPASS(m, r) do { __PHYSFS_platformReleaseMutex(m); return r; } while (0) +#define BAIL_IF_MUTEX(c, e, m, r) do { if (c) { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); return r; } } while (0) +#define BAIL_IF_MUTEX_ERRPASS(c, m, r) do { if (c) { __PHYSFS_platformReleaseMutex(m); return r; } } while (0) +#define GOTO(e, g) do { if (e) PHYSFS_setErrorCode(e); goto g; } while (0) +#define GOTO_ERRPASS(g) do { goto g; } while (0) +#define GOTO_IF(c, e, g) do { if (c) { if (e) PHYSFS_setErrorCode(e); goto g; } } while (0) +#define GOTO_IF_ERRPASS(c, g) do { if (c) { goto g; } } while (0) +#define GOTO_MUTEX(e, m, g) do { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); goto g; } while (0) +#define GOTO_MUTEX_ERRPASS(m, g) do { __PHYSFS_platformReleaseMutex(m); goto g; } while (0) +#define GOTO_IF_MUTEX(c, e, m, g) do { if (c) { if (e) PHYSFS_setErrorCode(e); __PHYSFS_platformReleaseMutex(m); goto g; } } while (0) +#define GOTO_IF_MUTEX_ERRPASS(c, m, g) do { if (c) { __PHYSFS_platformReleaseMutex(m); goto g; } } while (0) + +#define __PHYSFS_ARRAYLEN(x) ( (sizeof (x)) / (sizeof (x[0])) ) + +#ifdef PHYSFS_NO_64BIT_SUPPORT +#define __PHYSFS_SI64(x) ((PHYSFS_sint64) (x)) +#define __PHYSFS_UI64(x) ((PHYSFS_uint64) (x)) +#elif (defined __GNUC__) +#define __PHYSFS_SI64(x) x##LL +#define __PHYSFS_UI64(x) x##ULL +#elif (defined _MSC_VER) +#define __PHYSFS_SI64(x) x##i64 +#define __PHYSFS_UI64(x) x##ui64 +#else +#define __PHYSFS_SI64(x) ((PHYSFS_sint64) (x)) +#define __PHYSFS_UI64(x) ((PHYSFS_uint64) (x)) +#endif + + +/* + * Check if a ui64 will fit in the platform's address space. + * The initial sizeof check will optimize this macro out entirely on + * 64-bit (and larger?!) platforms, and the other condition will + * return zero or non-zero if the variable will fit in the platform's + * size_t, suitable to pass to malloc. This is kinda messy, but effective. + */ +#define __PHYSFS_ui64FitsAddressSpace(s) ( \ + (sizeof (PHYSFS_uint64) <= sizeof (size_t)) || \ + ((s) < (__PHYSFS_UI64(0xFFFFFFFFFFFFFFFF) >> (64-(sizeof(size_t)*8)))) \ +) + +/* + * Like strdup(), but uses the current PhysicsFS allocator. + */ +char *__PHYSFS_strdup(const char *str); + +/* + * Give a hash value for a C string (uses djb's xor hashing algorithm). + */ +PHYSFS_uint32 __PHYSFS_hashString(const char *str, size_t len); + + +/* + * The current allocator. Not valid before PHYSFS_init is called! + */ +extern PHYSFS_Allocator __PHYSFS_AllocatorHooks; + +/* convenience macro to make this less cumbersome internally... */ +#define allocator __PHYSFS_AllocatorHooks + +/* + * Create a PHYSFS_Io for a file in the physical filesystem. + * This path is in platform-dependent notation. (mode) must be 'r', 'w', or + * 'a' for Read, Write, or Append. + */ +PHYSFS_Io *__PHYSFS_createNativeIo(const char *path, const int mode); + +/* + * Create a PHYSFS_Io for a buffer of memory (READ-ONLY). If you already + * have one of these, just use its duplicate() method, and it'll increment + * its refcount without allocating a copy of the buffer. + */ +PHYSFS_Io *__PHYSFS_createMemoryIo(const void *buf, PHYSFS_uint64 len, + void (*destruct)(void *)); + + +/* + * Read (len) bytes from (io) into (buf). Returns non-zero on success, + * zero on i/o error. Literally: "return (io->read(io, buf, len) == len);" + */ +int __PHYSFS_readAll(PHYSFS_Io *io, void *buf, const size_t len); + + +/* These are shared between some archivers. */ + +void UNPK_abandonArchive(void *opaque); +void UNPK_closeArchive(void *opaque); +void *UNPK_openArchive(PHYSFS_Io *io); +void *UNPK_addEntry(void *opaque, char *name, const int isdir, + const PHYSFS_sint64 ctime, const PHYSFS_sint64 mtime, + const PHYSFS_uint64 pos, const PHYSFS_uint64 len); +PHYSFS_Io *UNPK_openRead(void *opaque, const char *name); +PHYSFS_Io *UNPK_openWrite(void *opaque, const char *name); +PHYSFS_Io *UNPK_openAppend(void *opaque, const char *name); +int UNPK_remove(void *opaque, const char *name); +int UNPK_mkdir(void *opaque, const char *name); +int UNPK_stat(void *opaque, const char *fn, PHYSFS_Stat *st); +#define UNPK_enumerate __PHYSFS_DirTreeEnumerate + + + +/* Optional API many archivers use this to manage their directory tree. */ +/* !!! FIXME: document this better. */ + +typedef struct __PHYSFS_DirTreeEntry +{ + char *name; /* Full path in archive. */ + struct __PHYSFS_DirTreeEntry *hashnext; /* next item in hash bucket. */ + struct __PHYSFS_DirTreeEntry *children; /* linked list of kids, if dir. */ + struct __PHYSFS_DirTreeEntry *sibling; /* next item in same dir. */ + int isdir; +} __PHYSFS_DirTreeEntry; + +typedef struct __PHYSFS_DirTree +{ + __PHYSFS_DirTreeEntry *root; /* root of directory tree. */ + __PHYSFS_DirTreeEntry **hash; /* all entries hashed for fast lookup. */ + size_t hashBuckets; /* number of buckets in hash. */ + size_t entrylen; /* size in bytes of entries (including subclass). */ +} __PHYSFS_DirTree; + + +int __PHYSFS_DirTreeInit(__PHYSFS_DirTree *dt, const size_t entrylen); +void *__PHYSFS_DirTreeAdd(__PHYSFS_DirTree *dt, char *name, const int isdir); +void *__PHYSFS_DirTreeFind(__PHYSFS_DirTree *dt, const char *path); +PHYSFS_EnumerateCallbackResult __PHYSFS_DirTreeEnumerate(void *opaque, + const char *dname, PHYSFS_EnumerateCallback cb, + const char *origdir, void *callbackdata); +void __PHYSFS_DirTreeDeinit(__PHYSFS_DirTree *dt); + + + +/*--------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------*/ +/*------------ ----------------*/ +/*------------ You MUST implement the following functions ----------------*/ +/*------------ if porting to a new platform. ----------------*/ +/*------------ (see platform/unix.c for an example) ----------------*/ +/*------------ ----------------*/ +/*--------------------------------------------------------------------------*/ +/*--------------------------------------------------------------------------*/ + + +/* + * The dir separator; '/' on unix, '\\' on win32, ":" on MacOS, etc... + * Obviously, this isn't a function. If you need more than one char for this, + * you'll need to pull some old pieces of PhysicsFS out of revision control. + */ +#if defined(PHYSFS_PLATFORM_WINDOWS) || defined(PHYSFS_PLATFORM_OS2) +#define __PHYSFS_platformDirSeparator '\\' +#else +#define __PHYSFS_STANDARD_DIRSEP 1 +#define __PHYSFS_platformDirSeparator '/' +#endif + +/* + * Initialize the platform. This is called when PHYSFS_init() is called from + * the application. + * + * Return zero if there was a catastrophic failure (which prevents you from + * functioning at all), and non-zero otherwise. + */ +int __PHYSFS_platformInit(void); + + +/* + * Deinitialize the platform. This is called when PHYSFS_deinit() is called + * from the application. You can use this to clean up anything you've + * allocated in your platform driver. + */ +void __PHYSFS_platformDeinit(void); + + +/* + * Open a file for reading. (filename) is in platform-dependent notation. The + * file pointer should be positioned on the first byte of the file. + * + * The return value will be some platform-specific datatype that is opaque to + * the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32. + * + * The same file can be opened for read multiple times, and each should have + * a unique file handle; this is frequently employed to prevent race + * conditions in the archivers. + * + * Call PHYSFS_setErrorCode() and return (NULL) if the file can't be opened. + */ +void *__PHYSFS_platformOpenRead(const char *filename); + + +/* + * Open a file for writing. (filename) is in platform-dependent notation. If + * the file exists, it should be truncated to zero bytes, and if it doesn't + * exist, it should be created as a zero-byte file. The file pointer should + * be positioned on the first byte of the file. + * + * The return value will be some platform-specific datatype that is opaque to + * the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32, + * etc. + * + * Opening a file for write multiple times has undefined results. + * + * Call PHYSFS_setErrorCode() and return (NULL) if the file can't be opened. + */ +void *__PHYSFS_platformOpenWrite(const char *filename); + + +/* + * Open a file for appending. (filename) is in platform-dependent notation. If + * the file exists, the file pointer should be place just past the end of the + * file, so that the first write will be one byte after the current end of + * the file. If the file doesn't exist, it should be created as a zero-byte + * file. The file pointer should be positioned on the first byte of the file. + * + * The return value will be some platform-specific datatype that is opaque to + * the caller; it could be a (FILE *) under Unix, or a (HANDLE *) under win32, + * etc. + * + * Opening a file for append multiple times has undefined results. + * + * Call PHYSFS_setErrorCode() and return (NULL) if the file can't be opened. + */ +void *__PHYSFS_platformOpenAppend(const char *filename); + +/* + * Read more data from a platform-specific file handle. (opaque) should be + * cast to whatever data type your platform uses. Read a maximum of (len) + * 8-bit bytes to the area pointed to by (buf). If there isn't enough data + * available, return the number of bytes read, and position the file pointer + * immediately after those bytes. + * On success, return (len) and position the file pointer immediately past + * the end of the last read byte. Return (-1) if there is a catastrophic + * error, and call PHYSFS_setErrorCode() to describe the problem; the file + * pointer should not move in such a case. A partial read is success; only + * return (-1) on total failure; presumably, the next read call after a + * partial read will fail as such. + */ +PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buf, PHYSFS_uint64 len); + +/* + * Write more data to a platform-specific file handle. (opaque) should be + * cast to whatever data type your platform uses. Write a maximum of (len) + * 8-bit bytes from the area pointed to by (buffer). If there is a problem, + * return the number of bytes written, and position the file pointer + * immediately after those bytes. Return (-1) if there is a catastrophic + * error, and call PHYSFS_setErrorCode() to describe the problem; the file + * pointer should not move in such a case. A partial write is success; only + * return (-1) on total failure; presumably, the next write call after a + * partial write will fail as such. + */ +PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, + PHYSFS_uint64 len); + +/* + * Set the file pointer to a new position. (opaque) should be cast to + * whatever data type your platform uses. (pos) specifies the number + * of 8-bit bytes to seek to from the start of the file. Seeking past the + * end of the file is an error condition, and you should check for it. + * + * Not all file types can seek; this is to be expected by the caller. + * + * On error, call PHYSFS_setErrorCode() and return zero. On success, return + * a non-zero value. + */ +int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos); + + +/* + * Get the file pointer's position, in an 8-bit byte offset from the start of + * the file. (opaque) should be cast to whatever data type your platform + * uses. + * + * Not all file types can "tell"; this is to be expected by the caller. + * + * On error, call PHYSFS_setErrorCode() and return -1. On success, return >= 0. + */ +PHYSFS_sint64 __PHYSFS_platformTell(void *opaque); + + +/* + * Determine the current size of a file, in 8-bit bytes, from an open file. + * + * The caller expects that this information may not be available for all + * file types on all platforms. + * + * Return -1 if you can't do it, and call PHYSFS_setErrorCode(). Otherwise, + * return the file length in 8-bit bytes. + */ +PHYSFS_sint64 __PHYSFS_platformFileLength(void *handle); + + +/* + * Read filesystem metadata for a specific path. + * + * This needs to fill in all the fields of (stat). For fields that might not + * mean anything on a platform (access time, perhaps), choose a reasonable + * default. if (follow), we want to follow symlinks and stat what they + * link to and not the link itself. + * + * Return zero on failure, non-zero on success. + */ +int __PHYSFS_platformStat(const char *fn, PHYSFS_Stat *stat, const int follow); + +/* + * Flush any pending writes to disk. (opaque) should be cast to whatever data + * type your platform uses. Be sure to check for errors; the caller expects + * that this function can fail if there was a flushing error, etc. + * + * Return zero on failure, non-zero on success. + */ +int __PHYSFS_platformFlush(void *opaque); + +/* + * Close file and deallocate resources. (opaque) should be cast to whatever + * data type your platform uses. This should close the file in any scenario: + * flushing is a separate function call, and this function should never fail. + * + * You should clean up all resources associated with (opaque); the pointer + * will be considered invalid after this call. + */ +void __PHYSFS_platformClose(void *opaque); + +/* + * Platform implementation of PHYSFS_getCdRomDirsCallback()... + * CD directories are discovered and reported to the callback one at a time. + * Pointers passed to the callback are assumed to be invalid to the + * application after the callback returns, so you can free them or whatever. + * Callback does not assume results will be sorted in any meaningful way. + */ +void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data); + +/* + * Calculate the base dir, if your platform needs special consideration. + * Just return NULL if the standard routines will suffice. (see + * calculateBaseDir() in physfs.c ...) + * Your string must end with a dir separator if you don't return NULL. + * Caller will allocator.Free() the retval if it's not NULL. + */ +char *__PHYSFS_platformCalcBaseDir(const char *argv0); + +/* + * Get the platform-specific user dir. + * As of PhysicsFS 2.1, returning NULL means fatal error. + * Your string must end with a dir separator if you don't return NULL. + * Caller will allocator.Free() the retval if it's not NULL. + */ +char *__PHYSFS_platformCalcUserDir(void); + + +/* This is the cached version from PHYSFS_init(). This is a fast call. */ +const char *__PHYSFS_getUserDir(void); /* not deprecated internal version. */ + + +/* + * Get the platform-specific pref dir. + * Returning NULL means fatal error. + * Your string must end with a dir separator if you don't return NULL. + * Caller will allocator.Free() the retval if it's not NULL. + * Caller will make missing directories if necessary; this just reports + * the final path. + */ +char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app); + + +/* + * Return a pointer that uniquely identifies the current thread. + * On a platform without threading, (0x1) will suffice. These numbers are + * arbitrary; the only requirement is that no two threads have the same + * pointer. + */ +void *__PHYSFS_platformGetThreadID(void); + + +/* + * Enumerate a directory of files. This follows the rules for the + * PHYSFS_Archiver::enumerate() method, except that the (dirName) that is + * passed to this function is converted to platform-DEPENDENT notation by + * the caller. The PHYSFS_Archiver version uses platform-independent + * notation. Note that ".", "..", and other meta-entries should always + * be ignored. + */ +PHYSFS_EnumerateCallbackResult __PHYSFS_platformEnumerate(const char *dirname, + PHYSFS_EnumerateCallback callback, + const char *origdir, void *callbackdata); + +/* + * Make a directory in the actual filesystem. (path) is specified in + * platform-dependent notation. On error, return zero and set the error + * message. Return non-zero on success. + */ +int __PHYSFS_platformMkDir(const char *path); + + +/* + * Remove a file or directory entry in the actual filesystem. (path) is + * specified in platform-dependent notation. Note that this deletes files + * _and_ directories, so you might need to do some determination. + * Non-empty directories should report an error and not delete themselves + * or their contents. + * + * Deleting a symlink should remove the link, not what it points to. + * + * On error, return zero and set the error message. Return non-zero on success. + */ +int __PHYSFS_platformDelete(const char *path); + + +/* + * Create a platform-specific mutex. This can be whatever datatype your + * platform uses for mutexes, but it is cast to a (void *) for abstractness. + * + * Return (NULL) if you couldn't create one. Systems without threads can + * return any arbitrary non-NULL value. + */ +void *__PHYSFS_platformCreateMutex(void); + +/* + * Destroy a platform-specific mutex, and clean up any resources associated + * with it. (mutex) is a value previously returned by + * __PHYSFS_platformCreateMutex(). This can be a no-op on single-threaded + * platforms. + */ +void __PHYSFS_platformDestroyMutex(void *mutex); + +/* + * Grab possession of a platform-specific mutex. Mutexes should be recursive; + * that is, the same thread should be able to call this function multiple + * times in a row without causing a deadlock. This function should block + * until a thread can gain possession of the mutex. + * + * Return non-zero if the mutex was grabbed, zero if there was an + * unrecoverable problem grabbing it (this should not be a matter of + * timing out! We're talking major system errors; block until the mutex + * is available otherwise.) + * + * _DO NOT_ call PHYSFS_setErrorCode() in here! Since setErrorCode calls this + * function, you'll cause an infinite recursion. This means you can't + * use the BAIL_*MACRO* macros, either. + */ +int __PHYSFS_platformGrabMutex(void *mutex); + +/* + * Relinquish possession of the mutex when this method has been called + * once for each time that platformGrabMutex was called. Once possession has + * been released, the next thread in line to grab the mutex (if any) may + * proceed. + * + * _DO NOT_ call PHYSFS_setErrorCode() in here! Since setErrorCode calls this + * function, you'll cause an infinite recursion. This means you can't + * use the BAIL_*MACRO* macros, either. + */ +void __PHYSFS_platformReleaseMutex(void *mutex); + +#if PHYSFS_HAVE_PRAGMA_VISIBILITY +#pragma GCC visibility pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +/* end of physfs_internal.h ... */ + diff --git a/desktop_version/physfs/physfs_miniz.h b/desktop_version/physfs/physfs_miniz.h new file mode 100644 index 00000000..30d6f4cc --- /dev/null +++ b/desktop_version/physfs/physfs_miniz.h @@ -0,0 +1,701 @@ +/* tinfl.c v1.11 - public domain inflate with zlib header parsing/adler32 checking (inflate-only subset of miniz.c) + See "unlicense" statement at the end of this file. + Rich Geldreich , last updated May 20, 2011 + Implements RFC 1950: https://www.ietf.org/rfc/rfc1950.txt and RFC 1951: https://www.ietf.org/rfc/rfc1951.txt + + The entire decompressor coroutine is implemented in tinfl_decompress(). The other functions are optional high-level helpers. +*/ +#ifndef TINFL_HEADER_INCLUDED +#define TINFL_HEADER_INCLUDED + +typedef PHYSFS_uint8 mz_uint8; +typedef PHYSFS_sint16 mz_int16; +typedef PHYSFS_uint16 mz_uint16; +typedef PHYSFS_uint32 mz_uint32; +typedef unsigned int mz_uint; +typedef PHYSFS_uint64 mz_uint64; + +/* For more compatibility with zlib, miniz.c uses unsigned long for some parameters/struct members. */ +typedef unsigned long mz_ulong; + +/* Heap allocation callbacks. */ +typedef void *(*mz_alloc_func)(void *opaque, unsigned int items, unsigned int size); +typedef void (*mz_free_func)(void *opaque, void *address); + +#if defined(_M_IX86) || defined(_M_X64) +/* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 if integer loads and stores to unaligned addresses are acceptable on the target platform (slightly faster). */ +#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 +/* Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian. */ +#define MINIZ_LITTLE_ENDIAN 1 +#endif + +#if defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) +/* Set MINIZ_HAS_64BIT_REGISTERS to 1 if the processor has 64-bit general purpose registers (enables 64-bit bitbuffer in inflator) */ +#define MINIZ_HAS_64BIT_REGISTERS 1 +#endif + +/* Works around MSVC's spammy "warning C4127: conditional expression is constant" message. */ +#ifdef _MSC_VER +#define MZ_MACRO_END while (0, 0) +#else +#define MZ_MACRO_END while (0) +#endif + +/* Decompression flags. */ +enum +{ + TINFL_FLAG_PARSE_ZLIB_HEADER = 1, + TINFL_FLAG_HAS_MORE_INPUT = 2, + TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4, + TINFL_FLAG_COMPUTE_ADLER32 = 8 +}; + +struct tinfl_decompressor_tag; typedef struct tinfl_decompressor_tag tinfl_decompressor; + +/* Max size of LZ dictionary. */ +#define TINFL_LZ_DICT_SIZE 32768 + +/* Return status. */ +typedef enum +{ + TINFL_STATUS_BAD_PARAM = -3, + TINFL_STATUS_ADLER32_MISMATCH = -2, + TINFL_STATUS_FAILED = -1, + TINFL_STATUS_DONE = 0, + TINFL_STATUS_NEEDS_MORE_INPUT = 1, + TINFL_STATUS_HAS_MORE_OUTPUT = 2 +} tinfl_status; + +/* Initializes the decompressor to its initial state. */ +#define tinfl_init(r) do { (r)->m_state = 0; } MZ_MACRO_END +#define tinfl_get_adler32(r) (r)->m_check_adler32 + +/* Main low-level decompressor coroutine function. This is the only function actually needed for decompression. All the other functions are just high-level helpers for improved usability. */ +/* This is a universal API, i.e. it can be used as a building block to build any desired higher level decompression API. In the limit case, it can be called once per every byte input or output. */ +static tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags); + +/* Internal/private bits follow. */ +enum +{ + TINFL_MAX_HUFF_TABLES = 3, TINFL_MAX_HUFF_SYMBOLS_0 = 288, TINFL_MAX_HUFF_SYMBOLS_1 = 32, TINFL_MAX_HUFF_SYMBOLS_2 = 19, + TINFL_FAST_LOOKUP_BITS = 10, TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS +}; + +typedef struct +{ + mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0]; + mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2]; +} tinfl_huff_table; + +#if MINIZ_HAS_64BIT_REGISTERS + #define TINFL_USE_64BIT_BITBUF 1 +#endif + +#if TINFL_USE_64BIT_BITBUF + typedef mz_uint64 tinfl_bit_buf_t; + #define TINFL_BITBUF_SIZE (64) +#else + typedef mz_uint32 tinfl_bit_buf_t; + #define TINFL_BITBUF_SIZE (32) +#endif + +struct tinfl_decompressor_tag +{ + mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, m_check_adler32, m_dist, m_counter, m_num_extra, m_table_sizes[TINFL_MAX_HUFF_TABLES]; + tinfl_bit_buf_t m_bit_buf; + size_t m_dist_from_out_buf_start; + tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES]; + mz_uint8 m_raw_header[4], m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137]; +}; + +#endif /* #ifdef TINFL_HEADER_INCLUDED */ + +/* ------------------- End of Header: Implementation follows. (If you only want the header, define MINIZ_HEADER_FILE_ONLY.) */ + +#ifndef TINFL_HEADER_FILE_ONLY + +#define MZ_MAX(a,b) (((a)>(b))?(a):(b)) +#define MZ_MIN(a,b) (((a)<(b))?(a):(b)) +#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj)) + +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN + #define MZ_READ_LE16(p) *((const mz_uint16 *)(p)) + #define MZ_READ_LE32(p) *((const mz_uint32 *)(p)) +#else + #define MZ_READ_LE16(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U)) + #define MZ_READ_LE32(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U)) +#endif + +#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) +#define TINFL_MEMSET(p, c, l) memset(p, c, l) + +#define TINFL_CR_BEGIN switch(r->m_state) { case 0: +#define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END +#define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END +#define TINFL_CR_FINISH } + +/* TODO: If the caller has indicated that there's no more input, and we attempt to read beyond the input buf, then something is wrong with the input because the inflator never */ +/* reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of the stream with 0's in this scenario. */ +#define TINFL_GET_BYTE(state_index, c) do { \ + if (pIn_buf_cur >= pIn_buf_end) { \ + for ( ; ; ) { \ + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ + TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ + if (pIn_buf_cur < pIn_buf_end) { \ + c = *pIn_buf_cur++; \ + break; \ + } \ + } else { \ + c = 0; \ + break; \ + } \ + } \ + } else c = *pIn_buf_cur++; } MZ_MACRO_END + +#define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n)) +#define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END +#define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END + +/* TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2. */ +/* It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a */ +/* Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the */ +/* bit buffer contains >=15 bits (deflate's max. Huffman code size). */ +#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ + do { \ + temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ + if (temp >= 0) { \ + code_len = temp >> 9; \ + if ((code_len) && (num_bits >= code_len)) \ + break; \ + } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ + code_len = TINFL_FAST_LOOKUP_BITS; \ + do { \ + temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ + } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \ + } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \ + } while (num_bits < 15); + +/* TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read */ +/* beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully */ +/* decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32. */ +/* The slow path is only executed at the very end of the input buffer. */ +#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \ + int temp; mz_uint code_len, c; \ + if (num_bits < 15) { \ + if ((pIn_buf_end - pIn_buf_cur) < 2) { \ + TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ + } else { \ + bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \ + } \ + } \ + if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \ + code_len = temp >> 9, temp &= 511; \ + else { \ + code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \ + } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END + +static tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags) +{ + static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 }; + static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; + static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; + static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; + static const int s_min_table_sizes[3] = { 257, 1, 4 }; + + tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf; + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; + size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start; + + /* Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter). */ + if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; } + + num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start; + TINFL_CR_BEGIN + + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1; + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) + { + TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1); + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); + if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); } + } + + do + { + TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1; + if (r->m_type == 0) + { + TINFL_SKIP_BITS(5, num_bits & 7); + for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); } + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); } + while ((counter) && (num_bits)) + { + TINFL_GET_BITS(51, dist, 8); + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); } + *pOut_buf_cur++ = (mz_uint8)dist; + counter--; + } + while (counter) + { + size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); } + while (pIn_buf_cur >= pIn_buf_end) + { + if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) + { + TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); + } + else + { + TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); + } + } + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter); + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n; + } + } + else if (r->m_type == 3) + { + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); + } + else + { + if (r->m_type == 1) + { + mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; + r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); + for ( i = 0; i <= 143; ++i) *p++ = 8; + for ( ; i <= 255; ++i) *p++ = 9; + for ( ; i <= 279; ++i) *p++ = 7; + for ( ; i <= 287; ++i) *p++ = 8; + } + else + { + for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; } + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; } + r->m_table_sizes[2] = 19; + } + for ( ; (int)r->m_type >= 0; r->m_type--) + { + int tree_next, tree_cur; tinfl_huff_table *pTable; + mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree); + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++; + used_syms = 0, total = 0; next_code[0] = next_code[1] = 0; + for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); } + if ((65536 != total) && (used_syms > 1)) + { + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); + } + for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index) + { + mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue; + cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1); + if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; } + if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) + { + tree_cur -= ((rev_code >>= 1) & 1); + if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1]; + } + tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; + } + if (r->m_type == 2) + { + for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); ) + { + mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; } + if ((dist == 16) && (!counter)) + { + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); + } + num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16]; + TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s; + } + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) + { + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); + } + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]); + } + } + for ( ; ; ) + { + mz_uint8 *pSrc; + for ( ; ; ) + { + if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2)) + { + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); + if (counter >= 256) + break; + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); } + *pOut_buf_cur++ = (mz_uint8)counter; + } + else + { + int sym2; mz_uint code_len; +#if TINFL_USE_64BIT_BITBUF + if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; } +#else + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } +#endif + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) + code_len = sym2 >> 9; + else + { + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); + } + counter = sym2; bit_buf >>= code_len; num_bits -= code_len; + if (counter & 256) + break; + +#if !TINFL_USE_64BIT_BITBUF + if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; } +#endif + if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) + code_len = sym2 >> 9; + else + { + code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0); + } + bit_buf >>= code_len; num_bits -= code_len; + + pOut_buf_cur[0] = (mz_uint8)counter; + if (sym2 & 256) + { + pOut_buf_cur++; + counter = sym2; + break; + } + pOut_buf_cur[1] = (mz_uint8)sym2; + pOut_buf_cur += 2; + } + } + if ((counter &= 511) == 256) break; + + num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257]; + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; } + + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); + num_extra = s_dist_extra[dist]; dist = s_dist_base[dist]; + if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; } + + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; + if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) + { + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); + } + + pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask); + + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) + { + while (counter--) + { + while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); } + *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask]; + } + continue; + } +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES + else if ((counter >= 9) && (counter <= dist)) + { + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); + do + { + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; + pOut_buf_cur += 8; + } while ((pSrc += 8) < pSrc_end); + if ((counter &= 7) < 3) + { + if (counter) + { + pOut_buf_cur[0] = pSrc[0]; + if (counter > 1) + pOut_buf_cur[1] = pSrc[1]; + pOut_buf_cur += counter; + } + continue; + } + } +#endif + do + { + pOut_buf_cur[0] = pSrc[0]; + pOut_buf_cur[1] = pSrc[1]; + pOut_buf_cur[2] = pSrc[2]; + pOut_buf_cur += 3; pSrc += 3; + } while ((int)(counter -= 3) > 2); + if ((int)counter > 0) + { + pOut_buf_cur[0] = pSrc[0]; + if ((int)counter > 1) + pOut_buf_cur[1] = pSrc[1]; + pOut_buf_cur += counter; + } + } + } + } while (!(r->m_final & 1)); + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) + { + TINFL_SKIP_BITS(32, num_bits & 7); for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; } + } + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); + TINFL_CR_FINISH + +common_exit: + r->m_num_bits = num_bits; r->m_bit_buf = bit_buf; r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start; + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next; + if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0)) + { + const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size; + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552; + while (buf_len) + { + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) + { + s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1; + s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1; + } + for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1; + s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552; + } + r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH; + } + return status; +} + +/* Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The other stuff is for advanced use. */ +enum { MZ_NO_FLUSH = 0, MZ_PARTIAL_FLUSH = 1, MZ_SYNC_FLUSH = 2, MZ_FULL_FLUSH = 3, MZ_FINISH = 4, MZ_BLOCK = 5 }; + +/* Return status codes. MZ_PARAM_ERROR is non-standard. */ +enum { MZ_OK = 0, MZ_STREAM_END = 1, MZ_NEED_DICT = 2, MZ_ERRNO = -1, MZ_STREAM_ERROR = -2, MZ_DATA_ERROR = -3, MZ_MEM_ERROR = -4, MZ_BUF_ERROR = -5, MZ_VERSION_ERROR = -6, MZ_PARAM_ERROR = -10000 }; + +/* Compression levels. */ +enum { MZ_NO_COMPRESSION = 0, MZ_BEST_SPEED = 1, MZ_BEST_COMPRESSION = 9, MZ_DEFAULT_COMPRESSION = -1 }; + +/* Window bits */ +#define MZ_DEFAULT_WINDOW_BITS 15 + +struct mz_internal_state; + +/* Compression/decompression stream struct. */ +typedef struct mz_stream_s +{ + const unsigned char *next_in; /* pointer to next byte to read */ + unsigned int avail_in; /* number of bytes available at next_in */ + mz_ulong total_in; /* total number of bytes consumed so far */ + + unsigned char *next_out; /* pointer to next byte to write */ + unsigned int avail_out; /* number of bytes that can be written to next_out */ + mz_ulong total_out; /* total number of bytes produced so far */ + + char *msg; /* error msg (unused) */ + struct mz_internal_state *state; /* internal state, allocated by zalloc/zfree */ + + mz_alloc_func zalloc; /* optional heap allocation function (defaults to malloc) */ + mz_free_func zfree; /* optional heap free function (defaults to free) */ + void *opaque; /* heap alloc function user pointer */ + + int data_type; /* data_type (unused) */ + mz_ulong adler; /* adler32 of the source or uncompressed data */ + mz_ulong reserved; /* not used */ +} mz_stream; + +typedef mz_stream *mz_streamp; + + +typedef struct +{ + tinfl_decompressor m_decomp; + mz_uint m_dict_ofs, m_dict_avail, m_first_call, m_has_flushed; int m_window_bits; + mz_uint8 m_dict[TINFL_LZ_DICT_SIZE]; + tinfl_status m_last_status; +} inflate_state; + +static int mz_inflateInit2(mz_streamp pStream, int window_bits) +{ + inflate_state *pDecomp; + if (!pStream) return MZ_STREAM_ERROR; + if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS)) return MZ_PARAM_ERROR; + + pStream->data_type = 0; + pStream->adler = 0; + pStream->msg = NULL; + pStream->total_in = 0; + pStream->total_out = 0; + pStream->reserved = 0; + /* if (!pStream->zalloc) pStream->zalloc = def_alloc_func; */ + /* if (!pStream->zfree) pStream->zfree = def_free_func; */ + + pDecomp = (inflate_state*)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state)); + if (!pDecomp) return MZ_MEM_ERROR; + + pStream->state = (struct mz_internal_state *)pDecomp; + + tinfl_init(&pDecomp->m_decomp); + pDecomp->m_dict_ofs = 0; + pDecomp->m_dict_avail = 0; + pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT; + pDecomp->m_first_call = 1; + pDecomp->m_has_flushed = 0; + pDecomp->m_window_bits = window_bits; + + return MZ_OK; +} + +static int mz_inflate(mz_streamp pStream, int flush) +{ + inflate_state* pState; + mz_uint n, first_call, decomp_flags = TINFL_FLAG_COMPUTE_ADLER32; + size_t in_bytes, out_bytes, orig_avail_in; + tinfl_status status; + + if ((!pStream) || (!pStream->state)) return MZ_STREAM_ERROR; + if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH; + if ((flush) && (flush != MZ_SYNC_FLUSH) && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; + + pState = (inflate_state*)pStream->state; + if (pState->m_window_bits > 0) decomp_flags |= TINFL_FLAG_PARSE_ZLIB_HEADER; + orig_avail_in = pStream->avail_in; + + first_call = pState->m_first_call; pState->m_first_call = 0; + if (pState->m_last_status < 0) return MZ_DATA_ERROR; + + if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; + pState->m_has_flushed |= (flush == MZ_FINISH); + + if ((flush == MZ_FINISH) && (first_call)) + { + /* MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file. */ + decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; + in_bytes = pStream->avail_in; out_bytes = pStream->avail_out; + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags); + pState->m_last_status = status; + pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes; + pStream->adler = tinfl_get_adler32(&pState->m_decomp); + pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes; + + if (status < 0) + return MZ_DATA_ERROR; + else if (status != TINFL_STATUS_DONE) + { + pState->m_last_status = TINFL_STATUS_FAILED; + return MZ_BUF_ERROR; + } + return MZ_STREAM_END; + } + /* flush != MZ_FINISH then we must assume there's more input. */ + if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; + + if (pState->m_dict_avail) + { + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); + pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; + pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); + return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; + } + + for ( ; ; ) + { + in_bytes = pStream->avail_in; + out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; + + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); + pState->m_last_status = status; + + pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; + pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp); + + pState->m_dict_avail = (mz_uint)out_bytes; + + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); + pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n; + pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); + + if (status < 0) + return MZ_DATA_ERROR; /* Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well). */ + else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) + return MZ_BUF_ERROR; /* Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH. */ + else if (flush == MZ_FINISH) + { + /* The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH. */ + if (status == TINFL_STATUS_DONE) + return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; + /* status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong. */ + else if (!pStream->avail_out) + return MZ_BUF_ERROR; + } + else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail)) + break; + } + + return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK; +} + +static int mz_inflateEnd(mz_streamp pStream) +{ + if (!pStream) + return MZ_STREAM_ERROR; + if (pStream->state) + { + pStream->zfree(pStream->opaque, pStream->state); + pStream->state = NULL; + } + return MZ_OK; +} + +/* make this a drop-in replacement for zlib... */ + #define voidpf void* + #define uInt unsigned int + #define z_stream mz_stream + #define inflateInit2 mz_inflateInit2 + #define inflate mz_inflate + #define inflateEnd mz_inflateEnd + #define Z_SYNC_FLUSH MZ_SYNC_FLUSH + #define Z_FINISH MZ_FINISH + #define Z_OK MZ_OK + #define Z_STREAM_END MZ_STREAM_END + #define Z_NEED_DICT MZ_NEED_DICT + #define Z_ERRNO MZ_ERRNO + #define Z_STREAM_ERROR MZ_STREAM_ERROR + #define Z_DATA_ERROR MZ_DATA_ERROR + #define Z_MEM_ERROR MZ_MEM_ERROR + #define Z_BUF_ERROR MZ_BUF_ERROR + #define Z_VERSION_ERROR MZ_VERSION_ERROR + #define MAX_WBITS 15 + +#endif /* #ifndef TINFL_HEADER_FILE_ONLY */ + +/* + This is free and unencumbered software released into the public domain. + + Anyone is free to copy, modify, publish, use, compile, sell, or + distribute this software, either in source code form or as a compiled + binary, for any purpose, commercial or non-commercial, and by any + means. + + In jurisdictions that recognize copyright laws, the author or authors + of this software dedicate any and all copyright interest in the + software to the public domain. We make this dedication for the benefit + of the public at large and to the detriment of our heirs and + successors. We intend this dedication to be an overt act of + relinquishment in perpetuity of all present and future rights to this + software under copyright law. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + For more information, please refer to +*/ diff --git a/desktop_version/physfs/physfs_platform_apple.m b/desktop_version/physfs/physfs_platform_apple.m new file mode 100644 index 00000000..e6207f5b --- /dev/null +++ b/desktop_version/physfs/physfs_platform_apple.m @@ -0,0 +1,188 @@ +/* + * Apple platform (macOS, iOS, watchOS, etc) support routines for PhysicsFS. + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon. + */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_platforms.h" + +#ifdef PHYSFS_PLATFORM_APPLE + +#include + +#include "physfs_internal.h" + +int __PHYSFS_platformInit(void) +{ + return 1; /* success. */ +} /* __PHYSFS_platformInit */ + + +void __PHYSFS_platformDeinit(void) +{ + /* no-op */ +} /* __PHYSFS_platformDeinit */ + + +char *__PHYSFS_platformCalcBaseDir(const char *argv0) +{ + @autoreleasepool + { + NSString *path = [[NSBundle mainBundle] bundlePath]; + BAIL_IF(!path, PHYSFS_ERR_OS_ERROR, NULL); + size_t len = [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; + char *retval = (char *) allocator.Malloc(len + 2); + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + [path getCString:retval maxLength:len+1 encoding:NSUTF8StringEncoding]; + retval[len] = '/'; + retval[len+1] = '\0'; + return retval; /* whew. */ + } /* @autoreleasepool */ +} /* __PHYSFS_platformCalcBaseDir */ + + +char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) +{ + @autoreleasepool + { + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, TRUE); + BAIL_IF(!paths, PHYSFS_ERR_OS_ERROR, NULL); + NSString *path = (NSString *) [paths objectAtIndex:0]; + BAIL_IF(!path, PHYSFS_ERR_OS_ERROR, NULL); + size_t len = [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; + const size_t applen = strlen(app); + char *retval = (char *) allocator.Malloc(len + applen + 3); + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + [path getCString:retval maxLength:len+1 encoding:NSUTF8StringEncoding]; + snprintf(retval + len, applen + 3, "/%s/", app); + return retval; /* whew. */ + } /* @autoreleasepool */ +} /* __PHYSFS_platformCalcPrefDir */ + + +/* CD-ROM detection code... */ + +/* + * Code based on sample from Apple Developer Connection: + * https://developer.apple.com/samplecode/Sample_Code/Devices_and_Hardware/Disks/VolumeToBSDNode/VolumeToBSDNode.c.htm + */ + +#if !defined(PHYSFS_NO_CDROM_SUPPORT) + +#include +#include +#include +#include +#include + +static int darwinIsWholeMedia(io_service_t service) +{ + int retval = 0; + CFTypeRef wholeMedia; + + if (!IOObjectConformsTo(service, kIOMediaClass)) + return 0; + + wholeMedia = IORegistryEntryCreateCFProperty(service, + CFSTR(kIOMediaWholeKey), + NULL, 0); + if (wholeMedia == NULL) + return 0; + + retval = CFBooleanGetValue(wholeMedia); + CFRelease(wholeMedia); + + return retval; +} /* darwinIsWholeMedia */ + + +static int darwinIsMountedDisc(char *bsdName, mach_port_t masterPort) +{ + int retval = 0; + CFMutableDictionaryRef matchingDict; + kern_return_t rc; + io_iterator_t iter; + io_service_t service; + + if ((matchingDict = IOBSDNameMatching(masterPort, 0, bsdName)) == NULL) + return 0; + + rc = IOServiceGetMatchingServices(masterPort, matchingDict, &iter); + if ((rc != KERN_SUCCESS) || (!iter)) + return 0; + + service = IOIteratorNext(iter); + IOObjectRelease(iter); + if (!service) + return 0; + + rc = IORegistryEntryCreateIterator(service, kIOServicePlane, + kIORegistryIterateRecursively | kIORegistryIterateParents, &iter); + + if (!iter) + return 0; + + if (rc != KERN_SUCCESS) + { + IOObjectRelease(iter); + return 0; + } /* if */ + + IOObjectRetain(service); /* add an extra object reference... */ + + do + { + if (darwinIsWholeMedia(service)) + { + if ( (IOObjectConformsTo(service, kIOCDMediaClass)) || + (IOObjectConformsTo(service, kIODVDMediaClass)) ) + { + retval = 1; + } /* if */ + } /* if */ + IOObjectRelease(service); + } while ((service = IOIteratorNext(iter)) && (!retval)); + + IOObjectRelease(iter); + IOObjectRelease(service); + + return retval; +} /* darwinIsMountedDisc */ + +#endif /* !defined(PHYSFS_NO_CDROM_SUPPORT) */ + + +void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) +{ +#if !defined(PHYSFS_NO_CDROM_SUPPORT) + const char *devPrefix = "/dev/"; + const int prefixLen = strlen(devPrefix); + mach_port_t masterPort = 0; + struct statfs *mntbufp; + int i, mounts; + + if (IOMasterPort(MACH_PORT_NULL, &masterPort) != KERN_SUCCESS) + BAIL(PHYSFS_ERR_OS_ERROR, ) /*return void*/; + + mounts = getmntinfo(&mntbufp, MNT_WAIT); /* NOT THREAD SAFE! */ + for (i = 0; i < mounts; i++) + { + char *dev = mntbufp[i].f_mntfromname; + char *mnt = mntbufp[i].f_mntonname; + if (strncmp(dev, devPrefix, prefixLen) != 0) /* a virtual device? */ + continue; + + dev += prefixLen; + if (darwinIsMountedDisc(dev, masterPort)) + cb(data, mnt); + } /* for */ +#endif /* !defined(PHYSFS_NO_CDROM_SUPPORT) */ +} /* __PHYSFS_platformDetectAvailableCDs */ + +#endif /* PHYSFS_PLATFORM_APPLE */ + +/* end of physfs_platform_apple.m ... */ + diff --git a/desktop_version/physfs/physfs_platform_posix.c b/desktop_version/physfs/physfs_platform_posix.c new file mode 100644 index 00000000..fa2159cd --- /dev/null +++ b/desktop_version/physfs/physfs_platform_posix.c @@ -0,0 +1,417 @@ +/* + * Posix-esque support routines for PhysicsFS. + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon. + */ + +/* !!! FIXME: check for EINTR? */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_platforms.h" + +#ifdef PHYSFS_PLATFORM_POSIX + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "physfs_internal.h" + + +static PHYSFS_ErrorCode errcodeFromErrnoError(const int err) +{ + switch (err) + { + case 0: return PHYSFS_ERR_OK; + case EACCES: return PHYSFS_ERR_PERMISSION; + case EPERM: return PHYSFS_ERR_PERMISSION; + case EDQUOT: return PHYSFS_ERR_NO_SPACE; + case EIO: return PHYSFS_ERR_IO; + case ELOOP: return PHYSFS_ERR_SYMLINK_LOOP; + case EMLINK: return PHYSFS_ERR_NO_SPACE; + case ENAMETOOLONG: return PHYSFS_ERR_BAD_FILENAME; + case ENOENT: return PHYSFS_ERR_NOT_FOUND; + case ENOSPC: return PHYSFS_ERR_NO_SPACE; + case ENOTDIR: return PHYSFS_ERR_NOT_FOUND; + case EISDIR: return PHYSFS_ERR_NOT_A_FILE; + case EROFS: return PHYSFS_ERR_READ_ONLY; + case ETXTBSY: return PHYSFS_ERR_BUSY; + case EBUSY: return PHYSFS_ERR_BUSY; + case ENOMEM: return PHYSFS_ERR_OUT_OF_MEMORY; + case ENOTEMPTY: return PHYSFS_ERR_DIR_NOT_EMPTY; + default: return PHYSFS_ERR_OS_ERROR; + } /* switch */ +} /* errcodeFromErrnoError */ + + +static inline PHYSFS_ErrorCode errcodeFromErrno(void) +{ + return errcodeFromErrnoError(errno); +} /* errcodeFromErrno */ + + +static char *getUserDirByUID(void) +{ + uid_t uid = getuid(); + struct passwd *pw; + char *retval = NULL; + + pw = getpwuid(uid); + if ((pw != NULL) && (pw->pw_dir != NULL) && (*pw->pw_dir != '\0')) + { + const size_t dlen = strlen(pw->pw_dir); + const size_t add_dirsep = (pw->pw_dir[dlen-1] != '/') ? 1 : 0; + retval = (char *) allocator.Malloc(dlen + 1 + add_dirsep); + if (retval != NULL) + { + strcpy(retval, pw->pw_dir); + if (add_dirsep) + { + retval[dlen] = '/'; + retval[dlen+1] = '\0'; + } /* if */ + } /* if */ + } /* if */ + + return retval; +} /* getUserDirByUID */ + + +char *__PHYSFS_platformCalcUserDir(void) +{ + char *retval = NULL; + char *envr = getenv("HOME"); + + /* if the environment variable was set, make sure it's really a dir. */ + if (envr != NULL) + { + struct stat statbuf; + if ((stat(envr, &statbuf) != -1) && (S_ISDIR(statbuf.st_mode))) + { + const size_t envrlen = strlen(envr); + const size_t add_dirsep = (envr[envrlen-1] != '/') ? 1 : 0; + retval = allocator.Malloc(envrlen + 1 + add_dirsep); + if (retval) + { + strcpy(retval, envr); + if (add_dirsep) + { + retval[envrlen] = '/'; + retval[envrlen+1] = '\0'; + } /* if */ + } /* if */ + } /* if */ + } /* if */ + + if (retval == NULL) + retval = getUserDirByUID(); + + return retval; +} /* __PHYSFS_platformCalcUserDir */ + + +PHYSFS_EnumerateCallbackResult __PHYSFS_platformEnumerate(const char *dirname, + PHYSFS_EnumerateCallback callback, + const char *origdir, void *callbackdata) +{ + DIR *dir; + struct dirent *ent; + PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; + + dir = opendir(dirname); + BAIL_IF(dir == NULL, errcodeFromErrno(), PHYSFS_ENUM_ERROR); + + while ((retval == PHYSFS_ENUM_OK) && ((ent = readdir(dir)) != NULL)) + { + const char *name = ent->d_name; + if (name[0] == '.') /* ignore "." and ".." */ + { + if ((name[1] == '\0') || ((name[1] == '.') && (name[2] == '\0'))) + continue; + } /* if */ + + retval = callback(callbackdata, origdir, name); + if (retval == PHYSFS_ENUM_ERROR) + PHYSFS_setErrorCode(PHYSFS_ERR_APP_CALLBACK); + } /* while */ + + closedir(dir); + + return retval; +} /* __PHYSFS_platformEnumerate */ + + +int __PHYSFS_platformMkDir(const char *path) +{ + const int rc = mkdir(path, S_IRWXU); + BAIL_IF(rc == -1, errcodeFromErrno(), 0); + return 1; +} /* __PHYSFS_platformMkDir */ + + +static void *doOpen(const char *filename, int mode) +{ + const int appending = (mode & O_APPEND); + int fd; + int *retval; + errno = 0; + + /* O_APPEND doesn't actually behave as we'd like. */ + mode &= ~O_APPEND; + + fd = open(filename, mode, S_IRUSR | S_IWUSR); + BAIL_IF(fd < 0, errcodeFromErrno(), NULL); + + if (appending) + { + if (lseek(fd, 0, SEEK_END) < 0) + { + const int err = errno; + close(fd); + BAIL(errcodeFromErrnoError(err), NULL); + } /* if */ + } /* if */ + + retval = (int *) allocator.Malloc(sizeof (int)); + if (!retval) + { + close(fd); + BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); + } /* if */ + + *retval = fd; + return ((void *) retval); +} /* doOpen */ + + +void *__PHYSFS_platformOpenRead(const char *filename) +{ + return doOpen(filename, O_RDONLY); +} /* __PHYSFS_platformOpenRead */ + + +void *__PHYSFS_platformOpenWrite(const char *filename) +{ + return doOpen(filename, O_WRONLY | O_CREAT | O_TRUNC); +} /* __PHYSFS_platformOpenWrite */ + + +void *__PHYSFS_platformOpenAppend(const char *filename) +{ + return doOpen(filename, O_WRONLY | O_CREAT | O_APPEND); +} /* __PHYSFS_platformOpenAppend */ + + +PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buffer, + PHYSFS_uint64 len) +{ + const int fd = *((int *) opaque); + ssize_t rc = 0; + + if (!__PHYSFS_ui64FitsAddressSpace(len)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); + + rc = read(fd, buffer, (size_t) len); + BAIL_IF(rc == -1, errcodeFromErrno(), -1); + assert(rc >= 0); + assert(rc <= len); + return (PHYSFS_sint64) rc; +} /* __PHYSFS_platformRead */ + + +PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, + PHYSFS_uint64 len) +{ + const int fd = *((int *) opaque); + ssize_t rc = 0; + + if (!__PHYSFS_ui64FitsAddressSpace(len)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); + + rc = write(fd, (void *) buffer, (size_t) len); + BAIL_IF(rc == -1, errcodeFromErrno(), rc); + assert(rc >= 0); + assert(rc <= len); + return (PHYSFS_sint64) rc; +} /* __PHYSFS_platformWrite */ + + +int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos) +{ + const int fd = *((int *) opaque); + const off_t rc = lseek(fd, (off_t) pos, SEEK_SET); + BAIL_IF(rc == -1, errcodeFromErrno(), 0); + return 1; +} /* __PHYSFS_platformSeek */ + + +PHYSFS_sint64 __PHYSFS_platformTell(void *opaque) +{ + const int fd = *((int *) opaque); + PHYSFS_sint64 retval; + retval = (PHYSFS_sint64) lseek(fd, 0, SEEK_CUR); + BAIL_IF(retval == -1, errcodeFromErrno(), -1); + return retval; +} /* __PHYSFS_platformTell */ + + +PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) +{ + const int fd = *((int *) opaque); + struct stat statbuf; + BAIL_IF(fstat(fd, &statbuf) == -1, errcodeFromErrno(), -1); + return ((PHYSFS_sint64) statbuf.st_size); +} /* __PHYSFS_platformFileLength */ + + +int __PHYSFS_platformFlush(void *opaque) +{ + const int fd = *((int *) opaque); + if ((fcntl(fd, F_GETFL) & O_ACCMODE) != O_RDONLY) + BAIL_IF(fsync(fd) == -1, errcodeFromErrno(), 0); + return 1; +} /* __PHYSFS_platformFlush */ + + +void __PHYSFS_platformClose(void *opaque) +{ + const int fd = *((int *) opaque); + (void) close(fd); /* we don't check this. You should have used flush! */ + allocator.Free(opaque); +} /* __PHYSFS_platformClose */ + + +int __PHYSFS_platformDelete(const char *path) +{ + BAIL_IF(remove(path) == -1, errcodeFromErrno(), 0); + return 1; +} /* __PHYSFS_platformDelete */ + + +int __PHYSFS_platformStat(const char *fname, PHYSFS_Stat *st, const int follow) +{ + struct stat statbuf; + const int rc = follow ? stat(fname, &statbuf) : lstat(fname, &statbuf); + BAIL_IF(rc == -1, errcodeFromErrno(), 0); + + if (S_ISREG(statbuf.st_mode)) + { + st->filetype = PHYSFS_FILETYPE_REGULAR; + st->filesize = statbuf.st_size; + } /* if */ + + else if(S_ISDIR(statbuf.st_mode)) + { + st->filetype = PHYSFS_FILETYPE_DIRECTORY; + st->filesize = 0; + } /* else if */ + + else if(S_ISLNK(statbuf.st_mode)) + { + st->filetype = PHYSFS_FILETYPE_SYMLINK; + st->filesize = 0; + } /* else if */ + + else + { + st->filetype = PHYSFS_FILETYPE_OTHER; + st->filesize = statbuf.st_size; + } /* else */ + + st->modtime = statbuf.st_mtime; + st->createtime = statbuf.st_ctime; + st->accesstime = statbuf.st_atime; + + st->readonly = (access(fname, W_OK) == -1); + return 1; +} /* __PHYSFS_platformStat */ + + +typedef struct +{ + pthread_mutex_t mutex; + pthread_t owner; + PHYSFS_uint32 count; +} PthreadMutex; + + +void *__PHYSFS_platformGetThreadID(void) +{ + return ( (void *) ((size_t) pthread_self()) ); +} /* __PHYSFS_platformGetThreadID */ + + +void *__PHYSFS_platformCreateMutex(void) +{ + int rc; + PthreadMutex *m = (PthreadMutex *) allocator.Malloc(sizeof (PthreadMutex)); + BAIL_IF(!m, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + rc = pthread_mutex_init(&m->mutex, NULL); + if (rc != 0) + { + allocator.Free(m); + BAIL(PHYSFS_ERR_OS_ERROR, NULL); + } /* if */ + + m->count = 0; + m->owner = (pthread_t) 0xDEADBEEF; + return ((void *) m); +} /* __PHYSFS_platformCreateMutex */ + + +void __PHYSFS_platformDestroyMutex(void *mutex) +{ + PthreadMutex *m = (PthreadMutex *) mutex; + + /* Destroying a locked mutex is a bug, but we'll try to be helpful. */ + if ((m->owner == pthread_self()) && (m->count > 0)) + pthread_mutex_unlock(&m->mutex); + + pthread_mutex_destroy(&m->mutex); + allocator.Free(m); +} /* __PHYSFS_platformDestroyMutex */ + + +int __PHYSFS_platformGrabMutex(void *mutex) +{ + PthreadMutex *m = (PthreadMutex *) mutex; + pthread_t tid = pthread_self(); + if (m->owner != tid) + { + if (pthread_mutex_lock(&m->mutex) != 0) + return 0; + m->owner = tid; + } /* if */ + + m->count++; + return 1; +} /* __PHYSFS_platformGrabMutex */ + + +void __PHYSFS_platformReleaseMutex(void *mutex) +{ + PthreadMutex *m = (PthreadMutex *) mutex; + assert(m->owner == pthread_self()); /* catch programming errors. */ + assert(m->count > 0); /* catch programming errors. */ + if (m->owner == pthread_self()) + { + if (--m->count == 0) + { + m->owner = (pthread_t) 0xDEADBEEF; + pthread_mutex_unlock(&m->mutex); + } /* if */ + } /* if */ +} /* __PHYSFS_platformReleaseMutex */ + +#endif /* PHYSFS_PLATFORM_POSIX */ + +/* end of physfs_platform_posix.c ... */ + diff --git a/desktop_version/physfs/physfs_platform_unix.c b/desktop_version/physfs/physfs_platform_unix.c new file mode 100644 index 00000000..10d93a7e --- /dev/null +++ b/desktop_version/physfs/physfs_platform_unix.c @@ -0,0 +1,367 @@ +/* + * Unix support routines for PhysicsFS. + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon. + */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_platforms.h" + +#ifdef PHYSFS_PLATFORM_UNIX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if PHYSFS_NO_CDROM_SUPPORT +#elif PHYSFS_PLATFORM_LINUX +# define PHYSFS_HAVE_MNTENT_H 1 +#elif defined __CYGWIN__ +# define PHYSFS_HAVE_MNTENT_H 1 +#elif PHYSFS_PLATFORM_SOLARIS +# define PHYSFS_HAVE_SYS_MNTTAB_H 1 +#elif PHYSFS_PLATFORM_BSD +# define PHYSFS_HAVE_SYS_UCRED_H 1 +#else +# warning No CD-ROM support included. Either define your platform here, +# warning or define PHYSFS_NO_CDROM_SUPPORT=1 to confirm this is intentional. +#endif + +#ifdef PHYSFS_HAVE_SYS_UCRED_H +# ifdef PHYSFS_HAVE_MNTENT_H +# undef PHYSFS_HAVE_MNTENT_H /* don't do both... */ +# endif +# include +# include +#endif + +#ifdef PHYSFS_HAVE_MNTENT_H +#include +#endif + +#ifdef PHYSFS_HAVE_SYS_MNTTAB_H +#include +#endif + +#ifdef PHYSFS_PLATFORM_FREEBSD +#include +#endif + + +#include "physfs_internal.h" + +int __PHYSFS_platformInit(void) +{ + return 1; /* always succeed. */ +} /* __PHYSFS_platformInit */ + + +void __PHYSFS_platformDeinit(void) +{ + /* no-op */ +} /* __PHYSFS_platformDeinit */ + + +void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) +{ +#if (defined PHYSFS_NO_CDROM_SUPPORT) + /* no-op. */ + +#elif (defined PHYSFS_HAVE_SYS_UCRED_H) + int i; + struct statfs *mntbufp = NULL; + int mounts = getmntinfo(&mntbufp, MNT_NOWAIT); + + for (i = 0; i < mounts; i++) + { + int add_it = 0; + + if (strcmp(mntbufp[i].f_fstypename, "iso9660") == 0) + add_it = 1; + else if (strcmp( mntbufp[i].f_fstypename, "cd9660") == 0) + add_it = 1; + + /* add other mount types here */ + + if (add_it) + cb(data, mntbufp[i].f_mntonname); + } /* for */ + +#elif (defined PHYSFS_HAVE_MNTENT_H) + FILE *mounts = NULL; + struct mntent *ent = NULL; + + mounts = setmntent("/etc/mtab", "r"); + BAIL_IF(mounts == NULL, PHYSFS_ERR_IO, /*return void*/); + + while ( (ent = getmntent(mounts)) != NULL ) + { + int add_it = 0; + if (strcmp(ent->mnt_type, "iso9660") == 0) + add_it = 1; + else if (strcmp(ent->mnt_type, "udf") == 0) + add_it = 1; + + /* !!! FIXME: these might pick up floppy drives, right? */ + else if (strcmp(ent->mnt_type, "auto") == 0) + add_it = 1; + else if (strcmp(ent->mnt_type, "supermount") == 0) + add_it = 1; + + /* add other mount types here */ + + if (add_it) + cb(data, ent->mnt_dir); + } /* while */ + + endmntent(mounts); + +#elif (defined PHYSFS_HAVE_SYS_MNTTAB_H) + FILE *mounts = fopen(MNTTAB, "r"); + struct mnttab ent; + + BAIL_IF(mounts == NULL, PHYSFS_ERR_IO, /*return void*/); + while (getmntent(mounts, &ent) == 0) + { + int add_it = 0; + if (strcmp(ent.mnt_fstype, "hsfs") == 0) + add_it = 1; + + /* add other mount types here */ + + if (add_it) + cb(data, ent.mnt_mountp); + } /* while */ + + fclose(mounts); +#endif +} /* __PHYSFS_platformDetectAvailableCDs */ + + +/* + * See where program (bin) resides in the $PATH specified by (envr). + * returns a copy of the first element in envr that contains it, or NULL + * if it doesn't exist or there were other problems. PHYSFS_SetError() is + * called if we have a problem. + * + * (envr) will be scribbled over, and you are expected to allocator.Free() the + * return value when you're done with it. + */ +static char *findBinaryInPath(const char *bin, char *envr) +{ + size_t alloc_size = 0; + char *exe = NULL; + char *start = envr; + char *ptr; + + assert(bin != NULL); + assert(envr != NULL); + + do + { + size_t size; + size_t binlen; + + ptr = strchr(start, ':'); /* find next $PATH separator. */ + if (ptr) + *ptr = '\0'; + + binlen = strlen(bin); + size = strlen(start) + binlen + 2; + if (size >= alloc_size) + { + char *x = (char *) allocator.Realloc(exe, size); + if (!x) + { + if (exe != NULL) + allocator.Free(exe); + BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); + } /* if */ + + alloc_size = size; + exe = x; + } /* if */ + + /* build full binary path... */ + strcpy(exe, start); + if ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/')) + strcat(exe, "/"); + strcat(exe, bin); + + if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */ + { + exe[(size - binlen) - 1] = '\0'; /* chop off filename, leave '/' */ + return exe; + } /* if */ + + start = ptr + 1; /* start points to beginning of next element. */ + } while (ptr != NULL); + + if (exe != NULL) + allocator.Free(exe); + + return NULL; /* doesn't exist in path. */ +} /* findBinaryInPath */ + + +static char *readSymLink(const char *path) +{ + ssize_t len = 64; + ssize_t rc = -1; + char *retval = NULL; + + while (1) + { + char *ptr = (char *) allocator.Realloc(retval, (size_t) len); + if (ptr == NULL) + break; /* out of memory. */ + retval = ptr; + + rc = readlink(path, retval, len); + if (rc == -1) + break; /* not a symlink, i/o error, etc. */ + + else if (rc < len) + { + retval[rc] = '\0'; /* readlink doesn't null-terminate. */ + return retval; /* we're good to go. */ + } /* else if */ + + len *= 2; /* grow buffer, try again. */ + } /* while */ + + if (retval != NULL) + allocator.Free(retval); + return NULL; +} /* readSymLink */ + + +char *__PHYSFS_platformCalcBaseDir(const char *argv0) +{ + char *retval = NULL; + const char *envr = NULL; + + /* Try to avoid using argv0 unless forced to. Try system-specific stuff. */ + + #if defined(PHYSFS_PLATFORM_FREEBSD) + { + char fullpath[PATH_MAX]; + size_t buflen = sizeof (fullpath); + int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; + if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) + retval = __PHYSFS_strdup(fullpath); + } + #elif defined(PHYSFS_PLATFORM_SOLARIS) + { + const char *path = getexecname(); + if ((path != NULL) && (path[0] == '/')) /* must be absolute path... */ + retval = __PHYSFS_strdup(path); + } + #endif + + /* If there's a Linux-like /proc filesystem, you can get the full path to + * the current process from a symlink in there. + */ + + if (!retval && (access("/proc", F_OK) == 0)) + { + retval = readSymLink("/proc/self/exe"); + if (!retval) retval = readSymLink("/proc/curproc/file"); + if (!retval) retval = readSymLink("/proc/curproc/exe"); + if (retval == NULL) + { + /* older kernels don't have /proc/self ... try PID version... */ + const unsigned long long pid = (unsigned long long) getpid(); + char path[64]; + const int rc = (int) snprintf(path,sizeof(path),"/proc/%llu/exe",pid); + if ( (rc > 0) && (rc < sizeof(path)) ) + retval = readSymLink(path); + } /* if */ + } /* if */ + + if (retval != NULL) /* chop off filename. */ + { + char *ptr = strrchr(retval, '/'); + if (ptr != NULL) + *(ptr+1) = '\0'; + else /* shouldn't happen, but just in case... */ + { + allocator.Free(retval); + retval = NULL; + } /* else */ + } /* if */ + + /* No /proc/self/exe, etc, but we have an argv[0] we can parse? */ + if ((retval == NULL) && (argv0 != NULL)) + { + /* fast path: default behaviour can handle this. */ + if (strchr(argv0, '/') != NULL) + return NULL; /* higher level parses out real path from argv0. */ + + /* If there's no dirsep on argv0, then look through $PATH for it. */ + envr = getenv("PATH"); + if (envr != NULL) + { + char *path = (char *) __PHYSFS_smallAlloc(strlen(envr) + 1); + BAIL_IF(!path, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + strcpy(path, envr); + retval = findBinaryInPath(argv0, path); + __PHYSFS_smallFree(path); + } /* if */ + } /* if */ + + if (retval != NULL) + { + /* try to shrink buffer... */ + char *ptr = (char *) allocator.Realloc(retval, strlen(retval) + 1); + if (ptr != NULL) + retval = ptr; /* oh well if it failed. */ + } /* if */ + + return retval; +} /* __PHYSFS_platformCalcBaseDir */ + + +char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) +{ + /* + * We use XDG's base directory spec, even if you're not on Linux. + * This isn't strictly correct, but the results are relatively sane + * in any case. + * + * https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html + */ + const char *envr = getenv("XDG_DATA_HOME"); + const char *append = "/"; + char *retval = NULL; + size_t len = 0; + + if (!envr) + { + /* You end up with "$HOME/.local/share/Game Name 2" */ + envr = __PHYSFS_getUserDir(); + BAIL_IF_ERRPASS(!envr, NULL); /* oh well. */ + append = ".local/share/"; + } /* if */ + + len = strlen(envr) + strlen(append) + strlen(app) + 2; + retval = (char *) allocator.Malloc(len); + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + snprintf(retval, len, "%s%s%s/", envr, append, app); + return retval; +} /* __PHYSFS_platformCalcPrefDir */ + +#endif /* PHYSFS_PLATFORM_UNIX */ + +/* end of physfs_platform_unix.c ... */ + diff --git a/desktop_version/physfs/physfs_platform_windows.c b/desktop_version/physfs/physfs_platform_windows.c new file mode 100644 index 00000000..c92e98d0 --- /dev/null +++ b/desktop_version/physfs/physfs_platform_windows.c @@ -0,0 +1,1028 @@ +/* + * Windows support routines for PhysicsFS. + * + * Please see the file LICENSE.txt in the source's root directory. + * + * This file written by Ryan C. Gordon, and made sane by Gregory S. Read. + */ + +#define __PHYSICSFS_INTERNAL__ +#include "physfs_platforms.h" + +#ifdef PHYSFS_PLATFORM_WINDOWS + +/* Forcibly disable UNICODE macro, since we manage this ourselves. */ +#ifdef UNICODE +#undef UNICODE +#endif + +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) +#define _CRT_SECURE_NO_WARNINGS 1 +#endif + +#define WIN32_LEAN_AND_MEAN 1 +#include + +#ifndef PHYSFS_PLATFORM_WINRT +#include +#include +#endif + +#if !defined(PHYSFS_NO_CDROM_SUPPORT) +#include +#endif + +#include +#include +#include + +#ifdef allocator /* apparently Windows 10 SDK conflicts here. */ +#undef allocator +#endif + +#include "physfs_internal.h" + +/* + * Users without the platform SDK don't have this defined. The original docs + * for SetFilePointer() just said to compare with 0xFFFFFFFF, so this should + * work as desired. + */ +#define PHYSFS_INVALID_SET_FILE_POINTER 0xFFFFFFFF + +/* just in case... */ +#define PHYSFS_INVALID_FILE_ATTRIBUTES 0xFFFFFFFF + +/* Not defined before the Vista SDK. */ +#define PHYSFS_FILE_ATTRIBUTE_REPARSE_POINT 0x400 +#define PHYSFS_IO_REPARSE_TAG_SYMLINK 0xA000000C + + +#define UTF8_TO_UNICODE_STACK(w_assignto, str) { \ + if (str == NULL) \ + w_assignto = NULL; \ + else { \ + const size_t len = (PHYSFS_uint64) ((strlen(str) + 1) * 2); \ + w_assignto = (WCHAR *) __PHYSFS_smallAlloc(len); \ + if (w_assignto != NULL) \ + PHYSFS_utf8ToUtf16(str, (PHYSFS_uint16 *) w_assignto, len); \ + } \ +} \ + +/* Note this counts WCHARs, not codepoints! */ +static PHYSFS_uint64 wStrLen(const WCHAR *wstr) +{ + PHYSFS_uint64 len = 0; + while (*(wstr++)) + len++; + return len; +} /* wStrLen */ + +static char *unicodeToUtf8Heap(const WCHAR *w_str) +{ + char *retval = NULL; + if (w_str != NULL) + { + void *ptr = NULL; + const PHYSFS_uint64 len = (wStrLen(w_str) * 4) + 1; + retval = allocator.Malloc(len); + BAIL_IF(!retval, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + PHYSFS_utf8FromUtf16((const PHYSFS_uint16 *) w_str, retval, len); + ptr = allocator.Realloc(retval, strlen(retval) + 1); /* shrink. */ + if (ptr != NULL) + retval = (char *) ptr; + } /* if */ + return retval; +} /* unicodeToUtf8Heap */ + + +/* Some older APIs aren't in WinRT (only the "Ex" version, etc). + Since non-WinRT might not have the "Ex" version, we tapdance to use + the perfectly-fine-and-available-even-on-Win95 API on non-WinRT targets. */ + +static inline HANDLE winFindFirstFileW(const WCHAR *path, LPWIN32_FIND_DATAW d) +{ + #ifdef PHYSFS_PLATFORM_WINRT + return FindFirstFileExW(path, FindExInfoStandard, d, + FindExSearchNameMatch, NULL, 0); + #else + return FindFirstFileW(path, d); + #endif +} /* winFindFirstFileW */ + +static inline BOOL winInitializeCriticalSection(LPCRITICAL_SECTION lpcs) +{ + #ifdef PHYSFS_PLATFORM_WINRT + return InitializeCriticalSectionEx(lpcs, 2000, 0); + #else + InitializeCriticalSection(lpcs); + return TRUE; + #endif +} /* winInitializeCriticalSection */ + +static inline HANDLE winCreateFileW(const WCHAR *wfname, const DWORD mode, + const DWORD creation) +{ + const DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE; + #ifdef PHYSFS_PLATFORM_WINRT + return CreateFile2(wfname, mode, share, creation, NULL); + #else + return CreateFileW(wfname, mode, share, NULL, creation, + FILE_ATTRIBUTE_NORMAL, NULL); + #endif +} /* winCreateFileW */ + +static BOOL winSetFilePointer(HANDLE h, const PHYSFS_sint64 pos, + PHYSFS_sint64 *_newpos, const DWORD whence) +{ + #ifdef PHYSFS_PLATFORM_WINRT + LARGE_INTEGER lipos; + LARGE_INTEGER linewpos; + BOOL rc; + lipos.QuadPart = (LONGLONG) pos; + rc = SetFilePointerEx(h, lipos, &linewpos, whence); + if (_newpos) + *_newpos = (PHYSFS_sint64) linewpos.QuadPart; + return rc; + #else + const LONG low = (LONG) (pos & 0xFFFFFFFF); + LONG high = (LONG) ((pos >> 32) & 0xFFFFFFFF); + const DWORD rc = SetFilePointer(h, low, &high, whence); + /* 0xFFFFFFFF could be valid, so you have to check GetLastError too! */ + if (_newpos) + *_newpos = ((PHYSFS_sint64) rc) | (((PHYSFS_sint64) high) << 32); + if ((rc == PHYSFS_INVALID_SET_FILE_POINTER) && (GetLastError() != NO_ERROR)) + return FALSE; + return TRUE; + #endif +} /* winSetFilePointer */ + +static PHYSFS_sint64 winGetFileSize(HANDLE h) +{ + #ifdef PHYSFS_PLATFORM_WINRT + FILE_STANDARD_INFO info; + const BOOL rc = GetFileInformationByHandleEx(h, FileStandardInfo, + &info, sizeof (info)); + return rc ? (PHYSFS_sint64) info.EndOfFile.QuadPart : -1; + #else + DWORD high = 0; + const DWORD rc = GetFileSize(h, &high); + if ((rc == PHYSFS_INVALID_SET_FILE_POINTER) && (GetLastError() != NO_ERROR)) + return -1; + return (PHYSFS_sint64) ((((PHYSFS_uint64) high) << 32) | rc); + #endif +} /* winGetFileSize */ + + +static PHYSFS_ErrorCode errcodeFromWinApiError(const DWORD err) +{ + /* + * win32 error codes are sort of a tricky thing; Microsoft intentionally + * doesn't list which ones a given API might trigger, there are several + * with overlapping and unclear meanings...and there's 16 thousand of + * them in Windows 7. It looks like the ones we care about are in the + * first 500, but I can't say this list is perfect; we might miss + * important values or misinterpret others. + * + * Don't treat this list as anything other than a work in progress. + */ + switch (err) + { + case ERROR_SUCCESS: return PHYSFS_ERR_OK; + case ERROR_ACCESS_DENIED: return PHYSFS_ERR_PERMISSION; + case ERROR_NETWORK_ACCESS_DENIED: return PHYSFS_ERR_PERMISSION; + case ERROR_NOT_READY: return PHYSFS_ERR_IO; + case ERROR_CRC: return PHYSFS_ERR_IO; + case ERROR_SEEK: return PHYSFS_ERR_IO; + case ERROR_SECTOR_NOT_FOUND: return PHYSFS_ERR_IO; + case ERROR_NOT_DOS_DISK: return PHYSFS_ERR_IO; + case ERROR_WRITE_FAULT: return PHYSFS_ERR_IO; + case ERROR_READ_FAULT: return PHYSFS_ERR_IO; + case ERROR_DEV_NOT_EXIST: return PHYSFS_ERR_IO; + case ERROR_BUFFER_OVERFLOW: return PHYSFS_ERR_BAD_FILENAME; + case ERROR_INVALID_NAME: return PHYSFS_ERR_BAD_FILENAME; + case ERROR_BAD_PATHNAME: return PHYSFS_ERR_BAD_FILENAME; + case ERROR_DIRECTORY: return PHYSFS_ERR_BAD_FILENAME; + case ERROR_FILE_NOT_FOUND: return PHYSFS_ERR_NOT_FOUND; + case ERROR_PATH_NOT_FOUND: return PHYSFS_ERR_NOT_FOUND; + case ERROR_DELETE_PENDING: return PHYSFS_ERR_NOT_FOUND; + case ERROR_INVALID_DRIVE: return PHYSFS_ERR_NOT_FOUND; + case ERROR_HANDLE_DISK_FULL: return PHYSFS_ERR_NO_SPACE; + case ERROR_DISK_FULL: return PHYSFS_ERR_NO_SPACE; + case ERROR_WRITE_PROTECT: return PHYSFS_ERR_READ_ONLY; + case ERROR_LOCK_VIOLATION: return PHYSFS_ERR_BUSY; + case ERROR_SHARING_VIOLATION: return PHYSFS_ERR_BUSY; + case ERROR_CURRENT_DIRECTORY: return PHYSFS_ERR_BUSY; + case ERROR_DRIVE_LOCKED: return PHYSFS_ERR_BUSY; + case ERROR_PATH_BUSY: return PHYSFS_ERR_BUSY; + case ERROR_BUSY: return PHYSFS_ERR_BUSY; + case ERROR_NOT_ENOUGH_MEMORY: return PHYSFS_ERR_OUT_OF_MEMORY; + case ERROR_OUTOFMEMORY: return PHYSFS_ERR_OUT_OF_MEMORY; + case ERROR_DIR_NOT_EMPTY: return PHYSFS_ERR_DIR_NOT_EMPTY; + default: return PHYSFS_ERR_OS_ERROR; + } /* switch */ +} /* errcodeFromWinApiError */ + +static inline PHYSFS_ErrorCode errcodeFromWinApi(void) +{ + return errcodeFromWinApiError(GetLastError()); +} /* errcodeFromWinApi */ + + +#if defined(PHYSFS_NO_CDROM_SUPPORT) +#define detectAvailableCDs(cb, data) +#define deinitCDThread() +#else +static HANDLE detectCDThreadHandle = NULL; +static HWND detectCDHwnd = NULL; +static volatile DWORD drivesWithMediaBitmap = 0; + +typedef BOOL (WINAPI *fnSTEM)(DWORD, LPDWORD b); + +static DWORD pollDiscDrives(void) +{ + /* Try to use SetThreadErrorMode(), which showed up in Windows 7. */ + HANDLE lib = LoadLibraryA("kernel32.dll"); + fnSTEM stem = NULL; + char drive[4] = { 'x', ':', '\\', '\0' }; + DWORD oldErrorMode = 0; + DWORD drives = 0; + DWORD i; + + if (lib) + stem = (fnSTEM) GetProcAddress(lib, "SetThreadErrorMode"); + + if (stem) + stem(SEM_FAILCRITICALERRORS, &oldErrorMode); + else + oldErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); + + /* Do detection. This may block if a disc is spinning up. */ + for (i = 'A'; i <= 'Z'; i++) + { + DWORD tmp = 0; + drive[0] = (char) i; + if (GetDriveTypeA(drive) != DRIVE_CDROM) + continue; + + /* If this function succeeds, there's media in the drive */ + if (GetVolumeInformationA(drive, NULL, 0, NULL, NULL, &tmp, NULL, 0)) + drives |= (1 << (i - 'A')); + } /* for */ + + if (stem) + stem(oldErrorMode, NULL); + else + SetErrorMode(oldErrorMode); + + if (lib) + FreeLibrary(lib); + + return drives; +} /* pollDiscDrives */ + + +static LRESULT CALLBACK detectCDWndProc(HWND hwnd, UINT msg, + WPARAM wp, LPARAM lparam) +{ + PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR) lparam; + PDEV_BROADCAST_VOLUME lpdbv = (PDEV_BROADCAST_VOLUME) lparam; + const int removed = (wp == DBT_DEVICEREMOVECOMPLETE); + + if (msg == WM_DESTROY) + return 0; + else if ((msg != WM_DEVICECHANGE) || + ((wp != DBT_DEVICEARRIVAL) && (wp != DBT_DEVICEREMOVECOMPLETE)) || + (lpdb->dbch_devicetype != DBT_DEVTYP_VOLUME) || + ((lpdbv->dbcv_flags & DBTF_MEDIA) == 0)) + { + return DefWindowProcW(hwnd, msg, wp, lparam); + } /* else if */ + + if (removed) + drivesWithMediaBitmap &= ~lpdbv->dbcv_unitmask; + else + drivesWithMediaBitmap |= lpdbv->dbcv_unitmask; + + return TRUE; +} /* detectCDWndProc */ + + +static DWORD WINAPI detectCDThread(LPVOID arg) +{ + HANDLE initialDiscDetectionComplete = *((HANDLE *) arg); + const char *classname = "PhysicsFSDetectCDCatcher"; + const char *winname = "PhysicsFSDetectCDMsgWindow"; + HINSTANCE hInstance = GetModuleHandleW(NULL); + ATOM class_atom = 0; + WNDCLASSEXA wce; + MSG msg; + + memset(&wce, '\0', sizeof (wce)); + wce.cbSize = sizeof (wce); + wce.lpfnWndProc = detectCDWndProc; + wce.lpszClassName = classname; + wce.hInstance = hInstance; + class_atom = RegisterClassExA(&wce); + if (class_atom == 0) + { + SetEvent(initialDiscDetectionComplete); /* let main thread go on. */ + return 0; + } /* if */ + + detectCDHwnd = CreateWindowExA(0, classname, winname, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + CW_USEDEFAULT, HWND_DESKTOP, NULL, hInstance, NULL); + + if (detectCDHwnd == NULL) + { + SetEvent(initialDiscDetectionComplete); /* let main thread go on. */ + UnregisterClassA(classname, hInstance); + return 0; + } /* if */ + + /* We'll get events when discs come and go from now on. */ + + /* Do initial detection, possibly blocking awhile... */ + drivesWithMediaBitmap = pollDiscDrives(); + + SetEvent(initialDiscDetectionComplete); /* let main thread go on. */ + + do + { + const BOOL rc = GetMessageW(&msg, detectCDHwnd, 0, 0); + if ((rc == 0) || (rc == -1)) + break; /* don't care if WM_QUIT or error break this loop. */ + TranslateMessage(&msg); + DispatchMessageW(&msg); + } while (1); + + /* we've been asked to quit. */ + DestroyWindow(detectCDHwnd); + UnregisterClassA(classname, hInstance); + return 0; +} /* detectCDThread */ + +static void detectAvailableCDs(PHYSFS_StringCallback cb, void *data) +{ + char drive_str[4] = { 'x', ':', '\\', '\0' }; + DWORD drives = 0; + DWORD i; + + /* + * If you poll a drive while a user is inserting a disc, the OS will + * block this thread until the drive has spun up. So we swallow the risk + * once for initial detection, and spin a thread that will get device + * events thereafter, for apps that use this interface to poll for + * disc insertion. + */ + if (!detectCDThreadHandle) + { + HANDLE initialDetectDone = CreateEvent(NULL, TRUE, FALSE, NULL); + if (!initialDetectDone) + return; /* oh well. */ + + detectCDThreadHandle = CreateThread(NULL, 0, detectCDThread, + &initialDetectDone, 0, NULL); + if (detectCDThreadHandle) + WaitForSingleObject(initialDetectDone, INFINITE); + CloseHandle(initialDetectDone); + + if (!detectCDThreadHandle) + return; /* oh well. */ + } /* if */ + + drives = drivesWithMediaBitmap; /* whatever the thread has seen, we take. */ + for (i = 'A'; i <= 'Z'; i++) + { + if (drives & (1 << (i - 'A'))) + { + drive_str[0] = (char) i; + cb(data, drive_str); + } /* if */ + } /* for */ +} /* detectAvailableCDs */ + +static void deinitCDThread(void) +{ + if (detectCDThreadHandle) + { + if (detectCDHwnd) + PostMessageW(detectCDHwnd, WM_QUIT, 0, 0); + CloseHandle(detectCDThreadHandle); + detectCDThreadHandle = NULL; + drivesWithMediaBitmap = 0; + } /* if */ +} /* deinitCDThread */ +#endif + + +void __PHYSFS_platformDetectAvailableCDs(PHYSFS_StringCallback cb, void *data) +{ + detectAvailableCDs(cb, data); +} /* __PHYSFS_platformDetectAvailableCDs */ + +#ifdef PHYSFS_PLATFORM_WINRT +static char *calcDirAppendSep(const WCHAR *wdir) +{ + size_t len; + void *ptr; + char *retval; + BAIL_IF(!wdir, errcodeFromWinApi(), NULL); + retval = unicodeToUtf8Heap(wdir); + BAIL_IF_ERRPASS(!retval, NULL); + len = strlen(retval); + ptr = allocator.Realloc(retval, len + 2); + if (!ptr) + { + allocator.Free(retval); + BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); + } /* if */ + retval = (char *) ptr; + retval[len] = '\\'; + retval[len+1] = '\0'; + return retval; +} /* calcDirAppendSep */ +#endif + +char *__PHYSFS_platformCalcBaseDir(const char *argv0) +{ +#ifdef PHYSFS_PLATFORM_WINRT + return calcDirAppendSep((const WCHAR *) __PHYSFS_winrtCalcBaseDir()); +#else + char *retval = NULL; + DWORD buflen = 64; + LPWSTR modpath = NULL; + + while (1) + { + DWORD rc; + void *ptr; + + if ( (ptr = allocator.Realloc(modpath, buflen*sizeof(WCHAR))) == NULL ) + { + allocator.Free(modpath); + BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); + } /* if */ + modpath = (LPWSTR) ptr; + + rc = GetModuleFileNameW(NULL, modpath, buflen); + if (rc == 0) + { + allocator.Free(modpath); + BAIL(errcodeFromWinApi(), NULL); + } /* if */ + + if (rc < buflen) + { + buflen = rc; + break; + } /* if */ + + buflen *= 2; + } /* while */ + + if (buflen > 0) /* just in case... */ + { + WCHAR *ptr = (modpath + buflen) - 1; + while (ptr != modpath) + { + if (*ptr == '\\') + break; + ptr--; + } /* while */ + + if ((ptr == modpath) && (*ptr != '\\')) + PHYSFS_setErrorCode(PHYSFS_ERR_OTHER_ERROR); /* oh well. */ + else + { + *(ptr+1) = '\0'; /* chop off filename. */ + retval = unicodeToUtf8Heap(modpath); + } /* else */ + } /* else */ + allocator.Free(modpath); + + return retval; /* w00t. */ +#endif +} /* __PHYSFS_platformCalcBaseDir */ + + +char *__PHYSFS_platformCalcPrefDir(const char *org, const char *app) +{ +#ifdef PHYSFS_PLATFORM_WINRT + return calcDirAppendSep((const WCHAR *) __PHYSFS_winrtCalcPrefDir()); +#else + /* + * Vista and later has a new API for this, but SHGetFolderPath works there, + * and apparently just wraps the new API. This is the new way to do it: + * + * SHGetKnownFolderPath(FOLDERID_RoamingAppData, KF_FLAG_CREATE, + * NULL, &wszPath); + */ + + WCHAR path[MAX_PATH]; + char *utf8 = NULL; + size_t len = 0; + char *retval = NULL; + + if (!SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, + NULL, 0, path))) + BAIL(PHYSFS_ERR_OS_ERROR, NULL); + + utf8 = unicodeToUtf8Heap(path); + BAIL_IF_ERRPASS(!utf8, NULL); + len = strlen(utf8) + strlen(org) + strlen(app) + 4; + retval = allocator.Malloc(len); + if (!retval) + { + allocator.Free(utf8); + BAIL(PHYSFS_ERR_OUT_OF_MEMORY, NULL); + } /* if */ + + snprintf(retval, len, "%s\\%s\\%s\\", utf8, org, app); + allocator.Free(utf8); + return retval; +#endif +} /* __PHYSFS_platformCalcPrefDir */ + + +char *__PHYSFS_platformCalcUserDir(void) +{ +#ifdef PHYSFS_PLATFORM_WINRT + return calcDirAppendSep((const WCHAR *) __PHYSFS_winrtCalcPrefDir()); +#else + typedef BOOL (WINAPI *fnGetUserProfDirW)(HANDLE, LPWSTR, LPDWORD); + fnGetUserProfDirW pGetDir = NULL; + HANDLE lib = NULL; + HANDLE accessToken = NULL; /* Security handle to process */ + char *retval = NULL; + + lib = LoadLibraryA("userenv.dll"); + BAIL_IF(!lib, errcodeFromWinApi(), NULL); + pGetDir=(fnGetUserProfDirW) GetProcAddress(lib,"GetUserProfileDirectoryW"); + GOTO_IF(!pGetDir, errcodeFromWinApi(), done); + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &accessToken)) + GOTO(errcodeFromWinApi(), done); + else + { + DWORD psize = 0; + LPWSTR wstr = NULL; + BOOL rc = 0; + + /* + * Should fail. Will write the size of the profile path in + * psize. Also note that the second parameter can't be + * NULL or the function fails on Windows XP, but has to be NULL on + * Windows 10 or it will fail. :( + */ + rc = pGetDir(accessToken, NULL, &psize); + GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */ + + if (psize == 0) /* probably on Windows XP, try a different way. */ + { + WCHAR x = 0; + rc = pGetDir(accessToken, &x, &psize); + GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done); /* should have failed! */ + GOTO_IF(!psize, PHYSFS_ERR_OS_ERROR, done); /* Uhoh... */ + } /* if */ + + /* Allocate memory for the profile directory */ + wstr = (LPWSTR) __PHYSFS_smallAlloc((psize + 1) * sizeof (WCHAR)); + if (wstr != NULL) + { + if (pGetDir(accessToken, wstr, &psize)) + { + /* Make sure it ends in a dirsep. We allocated +1 for this. */ + if (wstr[psize - 2] != '\\') + { + wstr[psize - 1] = '\\'; + wstr[psize - 0] = '\0'; + } /* if */ + retval = unicodeToUtf8Heap(wstr); + } /* if */ + __PHYSFS_smallFree(wstr); + } /* if */ + } /* if */ + +done: + if (accessToken) + CloseHandle(accessToken); + FreeLibrary(lib); + return retval; /* We made it: hit the showers. */ +#endif +} /* __PHYSFS_platformCalcUserDir */ + + +int __PHYSFS_platformInit(void) +{ + return 1; /* It's all good */ +} /* __PHYSFS_platformInit */ + + +void __PHYSFS_platformDeinit(void) +{ + deinitCDThread(); +} /* __PHYSFS_platformDeinit */ + + +void *__PHYSFS_platformGetThreadID(void) +{ + return ( (void *) ((size_t) GetCurrentThreadId()) ); +} /* __PHYSFS_platformGetThreadID */ + + +PHYSFS_EnumerateCallbackResult __PHYSFS_platformEnumerate(const char *dirname, + PHYSFS_EnumerateCallback callback, + const char *origdir, void *callbackdata) +{ + PHYSFS_EnumerateCallbackResult retval = PHYSFS_ENUM_OK; + HANDLE dir = INVALID_HANDLE_VALUE; + WIN32_FIND_DATAW entw; + size_t len = strlen(dirname); + char *searchPath = NULL; + WCHAR *wSearchPath = NULL; + + /* Allocate a new string for path, maybe '\\', "*", and NULL terminator */ + searchPath = (char *) __PHYSFS_smallAlloc(len + 3); + BAIL_IF(!searchPath, PHYSFS_ERR_OUT_OF_MEMORY, PHYSFS_ENUM_ERROR); + + /* Copy current dirname */ + strcpy(searchPath, dirname); + + /* if there's no '\\' at the end of the path, stick one in there. */ + if (searchPath[len - 1] != '\\') + { + searchPath[len++] = '\\'; + searchPath[len] = '\0'; + } /* if */ + + /* Append the "*" to the end of the string */ + strcat(searchPath, "*"); + + UTF8_TO_UNICODE_STACK(wSearchPath, searchPath); + __PHYSFS_smallFree(searchPath); + BAIL_IF_ERRPASS(!wSearchPath, PHYSFS_ENUM_ERROR); + + dir = winFindFirstFileW(wSearchPath, &entw); + __PHYSFS_smallFree(wSearchPath); + BAIL_IF(dir==INVALID_HANDLE_VALUE, errcodeFromWinApi(), PHYSFS_ENUM_ERROR); + + do + { + const WCHAR *fn = entw.cFileName; + char *utf8; + + if (fn[0] == '.') /* ignore "." and ".." */ + { + if ((fn[1] == '\0') || ((fn[1] == '.') && (fn[2] == '\0'))) + continue; + } /* if */ + + utf8 = unicodeToUtf8Heap(fn); + if (utf8 == NULL) + retval = -1; + else + { + retval = callback(callbackdata, origdir, utf8); + allocator.Free(utf8); + if (retval == PHYSFS_ENUM_ERROR) + PHYSFS_setErrorCode(PHYSFS_ERR_APP_CALLBACK); + } /* else */ + } while ((retval == PHYSFS_ENUM_OK) && (FindNextFileW(dir, &entw) != 0)); + + FindClose(dir); + + return retval; +} /* __PHYSFS_platformEnumerate */ + + +int __PHYSFS_platformMkDir(const char *path) +{ + WCHAR *wpath; + DWORD rc; + UTF8_TO_UNICODE_STACK(wpath, path); + rc = CreateDirectoryW(wpath, NULL); + __PHYSFS_smallFree(wpath); + BAIL_IF(rc == 0, errcodeFromWinApi(), 0); + return 1; +} /* __PHYSFS_platformMkDir */ + + +static HANDLE doOpen(const char *fname, DWORD mode, DWORD creation) +{ + HANDLE fileh; + WCHAR *wfname; + + UTF8_TO_UNICODE_STACK(wfname, fname); + BAIL_IF(!wfname, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + + fileh = winCreateFileW(wfname, mode, creation); + __PHYSFS_smallFree(wfname); + + if (fileh == INVALID_HANDLE_VALUE) + BAIL(errcodeFromWinApi(), INVALID_HANDLE_VALUE); + + return fileh; +} /* doOpen */ + + +void *__PHYSFS_platformOpenRead(const char *filename) +{ + HANDLE h = doOpen(filename, GENERIC_READ, OPEN_EXISTING); + return (h == INVALID_HANDLE_VALUE) ? NULL : (void *) h; +} /* __PHYSFS_platformOpenRead */ + + +void *__PHYSFS_platformOpenWrite(const char *filename) +{ + HANDLE h = doOpen(filename, GENERIC_WRITE, CREATE_ALWAYS); + return (h == INVALID_HANDLE_VALUE) ? NULL : (void *) h; +} /* __PHYSFS_platformOpenWrite */ + + +void *__PHYSFS_platformOpenAppend(const char *filename) +{ + HANDLE h = doOpen(filename, GENERIC_WRITE, OPEN_ALWAYS); + BAIL_IF_ERRPASS(h == INVALID_HANDLE_VALUE, NULL); + + if (!winSetFilePointer(h, 0, NULL, FILE_END)) + { + const PHYSFS_ErrorCode err = errcodeFromWinApi(); + CloseHandle(h); + BAIL(err, NULL); + } /* if */ + + return (void *) h; +} /* __PHYSFS_platformOpenAppend */ + + +PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buf, PHYSFS_uint64 len) +{ + HANDLE h = (HANDLE) opaque; + PHYSFS_sint64 totalRead = 0; + + if (!__PHYSFS_ui64FitsAddressSpace(len)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); + + while (len > 0) + { + const DWORD thislen = (len > 0xFFFFFFFF) ? 0xFFFFFFFF : (DWORD) len; + DWORD numRead = 0; + if (!ReadFile(h, buf, thislen, &numRead, NULL)) + BAIL(errcodeFromWinApi(), -1); + len -= (PHYSFS_uint64) numRead; + totalRead += (PHYSFS_sint64) numRead; + if (numRead != thislen) + break; + } /* while */ + + return totalRead; +} /* __PHYSFS_platformRead */ + + +PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, + PHYSFS_uint64 len) +{ + HANDLE h = (HANDLE) opaque; + PHYSFS_sint64 totalWritten = 0; + + if (!__PHYSFS_ui64FitsAddressSpace(len)) + BAIL(PHYSFS_ERR_INVALID_ARGUMENT, -1); + + while (len > 0) + { + const DWORD thislen = (len > 0xFFFFFFFF) ? 0xFFFFFFFF : (DWORD) len; + DWORD numWritten = 0; + if (!WriteFile(h, buffer, thislen, &numWritten, NULL)) + BAIL(errcodeFromWinApi(), -1); + len -= (PHYSFS_uint64) numWritten; + totalWritten += (PHYSFS_sint64) numWritten; + if (numWritten != thislen) + break; + } /* while */ + + return totalWritten; +} /* __PHYSFS_platformWrite */ + + +int __PHYSFS_platformSeek(void *opaque, PHYSFS_uint64 pos) +{ + HANDLE h = (HANDLE) opaque; + const PHYSFS_sint64 spos = (PHYSFS_sint64) pos; + BAIL_IF(!winSetFilePointer(h,spos,NULL,FILE_BEGIN), errcodeFromWinApi(), 0); + return 1; /* No error occured */ +} /* __PHYSFS_platformSeek */ + + +PHYSFS_sint64 __PHYSFS_platformTell(void *opaque) +{ + HANDLE h = (HANDLE) opaque; + PHYSFS_sint64 pos = 0; + BAIL_IF(!winSetFilePointer(h,0,&pos,FILE_CURRENT), errcodeFromWinApi(), -1); + return pos; +} /* __PHYSFS_platformTell */ + + +PHYSFS_sint64 __PHYSFS_platformFileLength(void *opaque) +{ + HANDLE h = (HANDLE) opaque; + const PHYSFS_sint64 retval = winGetFileSize(h); + BAIL_IF(retval < 0, errcodeFromWinApi(), -1); + return retval; +} /* __PHYSFS_platformFileLength */ + + +int __PHYSFS_platformFlush(void *opaque) +{ + HANDLE h = (HANDLE) opaque; + BAIL_IF(!FlushFileBuffers(h), errcodeFromWinApi(), 0); + return 1; +} /* __PHYSFS_platformFlush */ + + +void __PHYSFS_platformClose(void *opaque) +{ + HANDLE h = (HANDLE) opaque; + (void) CloseHandle(h); /* ignore errors. You should have flushed! */ +} /* __PHYSFS_platformClose */ + + +static int doPlatformDelete(LPWSTR wpath) +{ + WIN32_FILE_ATTRIBUTE_DATA info; + if (!GetFileAttributesExW(wpath, GetFileExInfoStandard, &info)) + BAIL(errcodeFromWinApi(), 0); + else + { + const int isdir = (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); + const BOOL rc = isdir ? RemoveDirectoryW(wpath) : DeleteFileW(wpath); + BAIL_IF(!rc, errcodeFromWinApi(), 0); + } /* else */ + return 1; /* if you made it here, it worked. */ +} /* doPlatformDelete */ + + +int __PHYSFS_platformDelete(const char *path) +{ + int retval = 0; + LPWSTR wpath = NULL; + UTF8_TO_UNICODE_STACK(wpath, path); + BAIL_IF(!wpath, PHYSFS_ERR_OUT_OF_MEMORY, 0); + retval = doPlatformDelete(wpath); + __PHYSFS_smallFree(wpath); + return retval; +} /* __PHYSFS_platformDelete */ + + +void *__PHYSFS_platformCreateMutex(void) +{ + LPCRITICAL_SECTION lpcs; + lpcs = (LPCRITICAL_SECTION) allocator.Malloc(sizeof (CRITICAL_SECTION)); + BAIL_IF(!lpcs, PHYSFS_ERR_OUT_OF_MEMORY, NULL); + + if (!winInitializeCriticalSection(lpcs)) + { + allocator.Free(lpcs); + BAIL(errcodeFromWinApi(), NULL); + } /* if */ + + return lpcs; +} /* __PHYSFS_platformCreateMutex */ + + +void __PHYSFS_platformDestroyMutex(void *mutex) +{ + DeleteCriticalSection((LPCRITICAL_SECTION) mutex); + allocator.Free(mutex); +} /* __PHYSFS_platformDestroyMutex */ + + +int __PHYSFS_platformGrabMutex(void *mutex) +{ + EnterCriticalSection((LPCRITICAL_SECTION) mutex); + return 1; +} /* __PHYSFS_platformGrabMutex */ + + +void __PHYSFS_platformReleaseMutex(void *mutex) +{ + LeaveCriticalSection((LPCRITICAL_SECTION) mutex); +} /* __PHYSFS_platformReleaseMutex */ + + +static PHYSFS_sint64 FileTimeToPhysfsTime(const FILETIME *ft) +{ + SYSTEMTIME st_utc; + SYSTEMTIME st_localtz; + TIME_ZONE_INFORMATION tzi; + DWORD tzid; + PHYSFS_sint64 retval; + struct tm tm; + BOOL rc; + + BAIL_IF(!FileTimeToSystemTime(ft, &st_utc), errcodeFromWinApi(), -1); + tzid = GetTimeZoneInformation(&tzi); + BAIL_IF(tzid == TIME_ZONE_ID_INVALID, errcodeFromWinApi(), -1); + rc = SystemTimeToTzSpecificLocalTime(&tzi, &st_utc, &st_localtz); + BAIL_IF(!rc, errcodeFromWinApi(), -1); + + /* Convert to a format that mktime() can grok... */ + tm.tm_sec = st_localtz.wSecond; + tm.tm_min = st_localtz.wMinute; + tm.tm_hour = st_localtz.wHour; + tm.tm_mday = st_localtz.wDay; + tm.tm_mon = st_localtz.wMonth - 1; + tm.tm_year = st_localtz.wYear - 1900; + tm.tm_wday = -1 /*st_localtz.wDayOfWeek*/; + tm.tm_yday = -1; + tm.tm_isdst = -1; + + /* Convert to a format PhysicsFS can grok... */ + retval = (PHYSFS_sint64) mktime(&tm); + BAIL_IF(retval == -1, PHYSFS_ERR_OS_ERROR, -1); + return retval; +} /* FileTimeToPhysfsTime */ + + +/* check for symlinks. These exist in NTFS 3.1 (WinXP), even though + they aren't really available to userspace before Vista. I wonder + what would happen if you put an NTFS disk with a symlink on it + into an XP machine, though; would this flag get set? + NTFS symlinks are a form of "reparse point" (junction, volume mount, + etc), so if the REPARSE_POINT attribute is set, check for the symlink + tag thereafter. This assumes you already read in the file attributes. */ +static int isSymlink(const WCHAR *wpath, const DWORD attr) +{ + WIN32_FIND_DATAW w32dw; + HANDLE h; + + if ((attr & PHYSFS_FILE_ATTRIBUTE_REPARSE_POINT) == 0) + return 0; /* not a reparse point? Definitely not a symlink. */ + + h = winFindFirstFileW(wpath, &w32dw); + if (h == INVALID_HANDLE_VALUE) + return 0; /* ...maybe the file just vanished...? */ + + FindClose(h); + return (w32dw.dwReserved0 == PHYSFS_IO_REPARSE_TAG_SYMLINK); +} /* isSymlink */ + + +int __PHYSFS_platformStat(const char *filename, PHYSFS_Stat *st, const int follow) +{ + WIN32_FILE_ATTRIBUTE_DATA winstat; + WCHAR *wstr = NULL; + DWORD err = 0; + BOOL rc = 0; + int issymlink = 0; + + UTF8_TO_UNICODE_STACK(wstr, filename); + BAIL_IF(!wstr, PHYSFS_ERR_OUT_OF_MEMORY, 0); + rc = GetFileAttributesExW(wstr, GetFileExInfoStandard, &winstat); + + if (!rc) + err = GetLastError(); + else /* check for symlink while wstr is still available */ + issymlink = !follow && isSymlink(wstr, winstat.dwFileAttributes); + + __PHYSFS_smallFree(wstr); + BAIL_IF(!rc, errcodeFromWinApiError(err), 0); + + st->modtime = FileTimeToPhysfsTime(&winstat.ftLastWriteTime); + st->accesstime = FileTimeToPhysfsTime(&winstat.ftLastAccessTime); + st->createtime = FileTimeToPhysfsTime(&winstat.ftCreationTime); + + if (issymlink) + { + st->filetype = PHYSFS_FILETYPE_SYMLINK; + st->filesize = 0; + } /* if */ + + else if (winstat.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + st->filetype = PHYSFS_FILETYPE_DIRECTORY; + st->filesize = 0; + } /* else if */ + + else if (winstat.dwFileAttributes & (FILE_ATTRIBUTE_OFFLINE | FILE_ATTRIBUTE_DEVICE)) + { + st->filetype = PHYSFS_FILETYPE_OTHER; + st->filesize = (((PHYSFS_uint64) winstat.nFileSizeHigh) << 32) | winstat.nFileSizeLow; + } /* else if */ + + else + { + st->filetype = PHYSFS_FILETYPE_REGULAR; + st->filesize = (((PHYSFS_uint64) winstat.nFileSizeHigh) << 32) | winstat.nFileSizeLow; + } /* else */ + + st->readonly = ((winstat.dwFileAttributes & FILE_ATTRIBUTE_READONLY) != 0); + + return 1; +} /* __PHYSFS_platformStat */ + +#endif /* PHYSFS_PLATFORM_WINDOWS */ + +/* end of physfs_platform_windows.c ... */ + + diff --git a/desktop_version/physfs/physfs_platforms.h b/desktop_version/physfs/physfs_platforms.h new file mode 100644 index 00000000..d4e4bfdc --- /dev/null +++ b/desktop_version/physfs/physfs_platforms.h @@ -0,0 +1,80 @@ +#ifndef _INCL_PHYSFS_PLATFORMS +#define _INCL_PHYSFS_PLATFORMS + +#ifndef __PHYSICSFS_INTERNAL__ +#error Do not include this header from your applications. +#endif + +/* + * These only define the platforms to determine which files in the platforms + * directory should be compiled. For example, technically BeOS can be called + * a "unix" system, but since it doesn't use unix.c, we don't define + * PHYSFS_PLATFORM_UNIX on that system. + */ + +#if (defined __HAIKU__) +# define PHYSFS_PLATFORM_HAIKU 1 +# define PHYSFS_PLATFORM_POSIX 1 +#elif ((defined __BEOS__) || (defined __beos__)) +# error BeOS support was dropped since PhysicsFS 2.1. Sorry. Try Haiku! +#elif (defined _WIN32_WCE) || (defined _WIN64_WCE) +# error PocketPC support was dropped since PhysicsFS 2.1. Sorry. Try WinRT! +#elif (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */ +# include +# define PHYSFS_PLATFORM_WINDOWS 1 +# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +# define PHYSFS_NO_CDROM_SUPPORT 1 +# define PHYSFS_PLATFORM_WINRT 1 +# endif +#elif (((defined _WIN32) || (defined _WIN64)) && (!defined __CYGWIN__)) +# define PHYSFS_PLATFORM_WINDOWS 1 +#elif defined(__OS2__) || defined(OS2) +# define PHYSFS_PLATFORM_OS2 1 +#elif ((defined __MACH__) && (defined __APPLE__)) +/* To check if iOS or not, we need to include this file */ +# include +# if ((TARGET_IPHONE_SIMULATOR) || (TARGET_OS_IPHONE)) +# define PHYSFS_NO_CDROM_SUPPORT 1 +# endif +# define PHYSFS_PLATFORM_APPLE 1 +# define PHYSFS_PLATFORM_POSIX 1 +#elif defined(macintosh) +# error Classic Mac OS support was dropped from PhysicsFS 2.0. Move to OS X. +#elif defined(ANDROID) +# define PHYSFS_PLATFORM_LINUX 1 +# define PHYSFS_PLATFORM_UNIX 1 +# define PHYSFS_PLATFORM_POSIX 1 +# define PHYSFS_NO_CDROM_SUPPORT 1 +#elif defined(__linux) +# define PHYSFS_PLATFORM_LINUX 1 +# define PHYSFS_PLATFORM_UNIX 1 +# define PHYSFS_PLATFORM_POSIX 1 +#elif defined(__sun) || defined(sun) +# define PHYSFS_PLATFORM_SOLARIS 1 +# define PHYSFS_PLATFORM_UNIX 1 +# define PHYSFS_PLATFORM_POSIX 1 +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +# define PHYSFS_PLATFORM_FREEBSD 1 +# define PHYSFS_PLATFORM_BSD 1 +# define PHYSFS_PLATFORM_UNIX 1 +# define PHYSFS_PLATFORM_POSIX 1 +#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) +# define PHYSFS_PLATFORM_BSD 1 +# define PHYSFS_PLATFORM_UNIX 1 +# define PHYSFS_PLATFORM_POSIX 1 +#elif defined(__EMSCRIPTEN__) +# define PHYSFS_NO_CDROM_SUPPORT 1 +# define PHYSFS_PLATFORM_UNIX 1 +# define PHYSFS_PLATFORM_POSIX 1 +#elif defined(__QNX__) +# define PHYSFS_PLATFORM_QNX 1 +# define PHYSFS_PLATFORM_POSIX 1 +#elif defined(unix) || defined(__unix__) +# define PHYSFS_PLATFORM_UNIX 1 +# define PHYSFS_PLATFORM_POSIX 1 +#else +# error Unknown platform. +#endif + +#endif /* include-once blocker. */ + diff --git a/desktop_version/physfs/physfs_unicode.c b/desktop_version/physfs/physfs_unicode.c new file mode 100644 index 00000000..0e006022 --- /dev/null +++ b/desktop_version/physfs/physfs_unicode.c @@ -0,0 +1,567 @@ +#define __PHYSICSFS_INTERNAL__ +#include "physfs_internal.h" + +#include "physfs_casefolding.h" + + +/* + * From rfc3629, the UTF-8 spec: + * https://www.ietf.org/rfc/rfc3629.txt + * + * Char. number range | UTF-8 octet sequence + * (hexadecimal) | (binary) + * --------------------+--------------------------------------------- + * 0000 0000-0000 007F | 0xxxxxxx + * 0000 0080-0000 07FF | 110xxxxx 10xxxxxx + * 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + * 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + */ + + +/* + * This may not be the best value, but it's one that isn't represented + * in Unicode (0x10FFFF is the largest codepoint value). We return this + * value from utf8codepoint() if there's bogus bits in the + * stream. utf8codepoint() will turn this value into something + * reasonable (like a question mark), for text that wants to try to recover, + * whereas utf8valid() will use the value to determine if a string has bad + * bits. + */ +#define UNICODE_BOGUS_CHAR_VALUE 0xFFFFFFFF + +/* + * This is the codepoint we currently return when there was bogus bits in a + * UTF-8 string. May not fly in Asian locales? + */ +#define UNICODE_BOGUS_CHAR_CODEPOINT '?' + +static PHYSFS_uint32 utf8codepoint(const char **_str) +{ + const char *str = *_str; + PHYSFS_uint32 retval = 0; + PHYSFS_uint32 octet = (PHYSFS_uint32) ((PHYSFS_uint8) *str); + PHYSFS_uint32 octet2, octet3, octet4; + + if (octet == 0) /* null terminator, end of string. */ + return 0; + + else if (octet < 128) /* one octet char: 0 to 127 */ + { + (*_str)++; /* skip to next possible start of codepoint. */ + return octet; + } /* else if */ + + else if ((octet > 127) && (octet < 192)) /* bad (starts with 10xxxxxx). */ + { + /* + * Apparently each of these is supposed to be flagged as a bogus + * char, instead of just resyncing to the next valid codepoint. + */ + (*_str)++; /* skip to next possible start of codepoint. */ + return UNICODE_BOGUS_CHAR_VALUE; + } /* else if */ + + else if (octet < 224) /* two octets */ + { + (*_str)++; /* advance at least one byte in case of an error */ + octet -= (128+64); + octet2 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet2 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + *_str += 1; /* skip to next possible start of codepoint. */ + retval = ((octet << 6) | (octet2 - 128)); + if ((retval >= 0x80) && (retval <= 0x7FF)) + return retval; + } /* else if */ + + else if (octet < 240) /* three octets */ + { + (*_str)++; /* advance at least one byte in case of an error */ + octet -= (128+64+32); + octet2 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet2 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet3 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet3 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + *_str += 2; /* skip to next possible start of codepoint. */ + retval = ( ((octet << 12)) | ((octet2-128) << 6) | ((octet3-128)) ); + + /* There are seven "UTF-16 surrogates" that are illegal in UTF-8. */ + switch (retval) + { + case 0xD800: + case 0xDB7F: + case 0xDB80: + case 0xDBFF: + case 0xDC00: + case 0xDF80: + case 0xDFFF: + return UNICODE_BOGUS_CHAR_VALUE; + } /* switch */ + + /* 0xFFFE and 0xFFFF are illegal, too, so we check them at the edge. */ + if ((retval >= 0x800) && (retval <= 0xFFFD)) + return retval; + } /* else if */ + + else if (octet < 248) /* four octets */ + { + (*_str)++; /* advance at least one byte in case of an error */ + octet -= (128+64+32+16); + octet2 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet2 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet3 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet3 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet4 = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet4 & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + *_str += 3; /* skip to next possible start of codepoint. */ + retval = ( ((octet << 18)) | ((octet2 - 128) << 12) | + ((octet3 - 128) << 6) | ((octet4 - 128)) ); + if ((retval >= 0x10000) && (retval <= 0x10FFFF)) + return retval; + } /* else if */ + + /* + * Five and six octet sequences became illegal in rfc3629. + * We throw the codepoint away, but parse them to make sure we move + * ahead the right number of bytes and don't overflow the buffer. + */ + + else if (octet < 252) /* five octets */ + { + (*_str)++; /* advance at least one byte in case of an error */ + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + *_str += 4; /* skip to next possible start of codepoint. */ + return UNICODE_BOGUS_CHAR_VALUE; + } /* else if */ + + else /* six octets */ + { + (*_str)++; /* advance at least one byte in case of an error */ + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + octet = (PHYSFS_uint32) ((PHYSFS_uint8) *(++str)); + if ((octet & (128+64)) != 128) /* Format isn't 10xxxxxx? */ + return UNICODE_BOGUS_CHAR_VALUE; + + *_str += 6; /* skip to next possible start of codepoint. */ + return UNICODE_BOGUS_CHAR_VALUE; + } /* else if */ + + return UNICODE_BOGUS_CHAR_VALUE; +} /* utf8codepoint */ + +static PHYSFS_uint32 utf16codepoint(const PHYSFS_uint16 **_str) +{ + const PHYSFS_uint16 *src = *_str; + PHYSFS_uint32 cp = (PHYSFS_uint32) *(src++); + + if (cp == 0) /* null terminator, end of string. */ + return 0; + /* Orphaned second half of surrogate pair? */ + else if ((cp >= 0xDC00) && (cp <= 0xDFFF)) + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + else if ((cp >= 0xD800) && (cp <= 0xDBFF)) /* start surrogate pair! */ + { + const PHYSFS_uint32 pair = (PHYSFS_uint32) *src; + if (pair == 0) + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + else if ((pair < 0xDC00) || (pair > 0xDFFF)) + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + else + { + src++; /* eat the other surrogate. */ + cp = (((cp - 0xD800) << 10) | (pair - 0xDC00)); + } /* else */ + } /* else if */ + + *_str = src; + return cp; +} /* utf16codepoint */ + +static PHYSFS_uint32 utf32codepoint(const PHYSFS_uint32 **_str) +{ + const PHYSFS_uint32 *src = *_str; + PHYSFS_uint32 cp = *(src++); + + if (cp == 0) /* null terminator, end of string. */ + return 0; + else if (cp > 0x10FFF) + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + + *_str = src; + return cp; +} /* utf32codepoint */ + + +void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, PHYSFS_uint64 len) +{ + len -= sizeof (PHYSFS_uint32); /* save room for null char. */ + while (len >= sizeof (PHYSFS_uint32)) + { + PHYSFS_uint32 cp = utf8codepoint(&src); + if (cp == 0) + break; + else if (cp == UNICODE_BOGUS_CHAR_VALUE) + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + *(dst++) = cp; + len -= sizeof (PHYSFS_uint32); + } /* while */ + + *dst = 0; +} /* PHYSFS_utf8ToUcs4 */ + + +void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) +{ + len -= sizeof (PHYSFS_uint16); /* save room for null char. */ + while (len >= sizeof (PHYSFS_uint16)) + { + PHYSFS_uint32 cp = utf8codepoint(&src); + if (cp == 0) + break; + else if (cp == UNICODE_BOGUS_CHAR_VALUE) + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + + if (cp > 0xFFFF) /* UTF-16 surrogates (bogus chars in UCS-2) */ + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + + *(dst++) = cp; + len -= sizeof (PHYSFS_uint16); + } /* while */ + + *dst = 0; +} /* PHYSFS_utf8ToUcs2 */ + + +void PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len) +{ + len -= sizeof (PHYSFS_uint16); /* save room for null char. */ + while (len >= sizeof (PHYSFS_uint16)) + { + PHYSFS_uint32 cp = utf8codepoint(&src); + if (cp == 0) + break; + else if (cp == UNICODE_BOGUS_CHAR_VALUE) + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + + if (cp > 0xFFFF) /* encode as surrogate pair */ + { + if (len < (sizeof (PHYSFS_uint16) * 2)) + break; /* not enough room for the pair, stop now. */ + + cp -= 0x10000; /* Make this a 20-bit value */ + + *(dst++) = 0xD800 + ((cp >> 10) & 0x3FF); + len -= sizeof (PHYSFS_uint16); + + cp = 0xDC00 + (cp & 0x3FF); + } /* if */ + + *(dst++) = cp; + len -= sizeof (PHYSFS_uint16); + } /* while */ + + *dst = 0; +} /* PHYSFS_utf8ToUtf16 */ + +static void utf8fromcodepoint(PHYSFS_uint32 cp, char **_dst, PHYSFS_uint64 *_len) +{ + char *dst = *_dst; + PHYSFS_uint64 len = *_len; + + if (len == 0) + return; + + if (cp > 0x10FFFF) + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + else if ((cp == 0xFFFE) || (cp == 0xFFFF)) /* illegal values. */ + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + else + { + /* There are seven "UTF-16 surrogates" that are illegal in UTF-8. */ + switch (cp) + { + case 0xD800: + case 0xDB7F: + case 0xDB80: + case 0xDBFF: + case 0xDC00: + case 0xDF80: + case 0xDFFF: + cp = UNICODE_BOGUS_CHAR_CODEPOINT; + } /* switch */ + } /* else */ + + /* Do the encoding... */ + if (cp < 0x80) + { + *(dst++) = (char) cp; + len--; + } /* if */ + + else if (cp < 0x800) + { + if (len < 2) + len = 0; + else + { + *(dst++) = (char) ((cp >> 6) | 128 | 64); + *(dst++) = (char) (cp & 0x3F) | 128; + len -= 2; + } /* else */ + } /* else if */ + + else if (cp < 0x10000) + { + if (len < 3) + len = 0; + else + { + *(dst++) = (char) ((cp >> 12) | 128 | 64 | 32); + *(dst++) = (char) ((cp >> 6) & 0x3F) | 128; + *(dst++) = (char) (cp & 0x3F) | 128; + len -= 3; + } /* else */ + } /* else if */ + + else + { + if (len < 4) + len = 0; + else + { + *(dst++) = (char) ((cp >> 18) | 128 | 64 | 32 | 16); + *(dst++) = (char) ((cp >> 12) & 0x3F) | 128; + *(dst++) = (char) ((cp >> 6) & 0x3F) | 128; + *(dst++) = (char) (cp & 0x3F) | 128; + len -= 4; + } /* else if */ + } /* else */ + + *_dst = dst; + *_len = len; +} /* utf8fromcodepoint */ + +#define UTF8FROMTYPE(typ, src, dst, len) \ + if (len == 0) return; \ + len--; \ + while (len) \ + { \ + const PHYSFS_uint32 cp = (PHYSFS_uint32) ((typ) (*(src++))); \ + if (cp == 0) break; \ + utf8fromcodepoint(cp, &dst, &len); \ + } \ + *dst = '\0'; \ + +void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, PHYSFS_uint64 len) +{ + UTF8FROMTYPE(PHYSFS_uint32, src, dst, len); +} /* PHYSFS_utf8FromUcs4 */ + +void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) +{ + UTF8FROMTYPE(PHYSFS_uint64, src, dst, len); +} /* PHYSFS_utf8FromUcs2 */ + +/* latin1 maps to unicode codepoints directly, we just utf-8 encode it. */ +void PHYSFS_utf8FromLatin1(const char *src, char *dst, PHYSFS_uint64 len) +{ + UTF8FROMTYPE(PHYSFS_uint8, src, dst, len); +} /* PHYSFS_utf8FromLatin1 */ + +#undef UTF8FROMTYPE + + +void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len) +{ + if (len == 0) + return; + + len--; + while (len) + { + const PHYSFS_uint32 cp = utf16codepoint(&src); + if (!cp) + break; + utf8fromcodepoint(cp, &dst, &len); + } /* while */ + + *dst = '\0'; +} /* PHYSFS_utf8FromUtf16 */ + + +int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to) +{ + int i; + + if (from < 128) /* low-ASCII, easy! */ + { + if ((from >= 'A') && (from <= 'Z')) + *to = from - ('A' - 'a'); + else + *to = from; + return 1; + } /* if */ + + else if (from <= 0xFFFF) + { + const PHYSFS_uint8 hash = ((from ^ (from >> 8)) & 0xFF); + const PHYSFS_uint16 from16 = (PHYSFS_uint16) from; + + { + const CaseFoldHashBucket1_16 *bucket = &case_fold_hash1_16[hash]; + const int count = (int) bucket->count; + for (i = 0; i < count; i++) + { + const CaseFoldMapping1_16 *mapping = &bucket->list[i]; + if (mapping->from == from16) + { + *to = mapping->to0; + return 1; + } /* if */ + } /* for */ + } + + { + const CaseFoldHashBucket2_16 *bucket = &case_fold_hash2_16[hash & 15]; + const int count = (int) bucket->count; + for (i = 0; i < count; i++) + { + const CaseFoldMapping2_16 *mapping = &bucket->list[i]; + if (mapping->from == from16) + { + to[0] = mapping->to0; + to[1] = mapping->to1; + return 2; + } /* if */ + } /* for */ + } + + { + const CaseFoldHashBucket3_16 *bucket = &case_fold_hash3_16[hash & 3]; + const int count = (int) bucket->count; + for (i = 0; i < count; i++) + { + const CaseFoldMapping3_16 *mapping = &bucket->list[i]; + if (mapping->from == from16) + { + to[0] = mapping->to0; + to[1] = mapping->to1; + to[2] = mapping->to2; + return 3; + } /* if */ + } /* for */ + } + } /* else if */ + + else /* codepoint that doesn't fit in 16 bits. */ + { + const PHYSFS_uint8 hash = ((from ^ (from >> 8)) & 0xFF); + const CaseFoldHashBucket1_32 *bucket = &case_fold_hash1_32[hash & 15]; + const int count = (int) bucket->count; + for (i = 0; i < count; i++) + { + const CaseFoldMapping1_32 *mapping = &bucket->list[i]; + if (mapping->from == from) + { + *to = mapping->to0; + return 1; + } /* if */ + } /* for */ + } /* else */ + + + /* Not found...there's no remapping for this codepoint. */ + *to = from; + return 1; +} /* PHYSFS_caseFold */ + + +#define UTFSTRICMP(bits) \ + PHYSFS_uint32 folded1[3], folded2[3]; \ + int head1 = 0, tail1 = 0, head2 = 0, tail2 = 0; \ + while (1) { \ + PHYSFS_uint32 cp1, cp2; \ + if (head1 != tail1) { \ + cp1 = folded1[tail1++]; \ + } else { \ + head1 = PHYSFS_caseFold(utf##bits##codepoint(&str1), folded1); \ + cp1 = folded1[0]; \ + tail1 = 1; \ + } \ + if (head2 != tail2) { \ + cp2 = folded2[tail2++]; \ + } else { \ + head2 = PHYSFS_caseFold(utf##bits##codepoint(&str2), folded2); \ + cp2 = folded2[0]; \ + tail2 = 1; \ + } \ + if (cp1 < cp2) { \ + return -1; \ + } else if (cp1 > cp2) { \ + return 1; \ + } else if (cp1 == 0) { \ + break; /* complete match. */ \ + } \ + } \ + return 0 + +int PHYSFS_utf8stricmp(const char *str1, const char *str2) +{ + UTFSTRICMP(8); +} /* PHYSFS_utf8stricmp */ + +int PHYSFS_utf16stricmp(const PHYSFS_uint16 *str1, const PHYSFS_uint16 *str2) +{ + UTFSTRICMP(16); +} /* PHYSFS_utf16stricmp */ + +int PHYSFS_ucs4stricmp(const PHYSFS_uint32 *str1, const PHYSFS_uint32 *str2) +{ + UTFSTRICMP(32); +} /* PHYSFS_ucs4stricmp */ + +#undef UTFSTRICMP + +/* end of physfs_unicode.c ... */ + diff --git a/desktop_version/src/BinaryBlob.cpp b/desktop_version/src/BinaryBlob.cpp new file mode 100644 index 00000000..ee7b6e11 --- /dev/null +++ b/desktop_version/src/BinaryBlob.cpp @@ -0,0 +1,145 @@ +#include "BinaryBlob.h" + +#include +#include +#include + +/* FIXME: Abstract to FileSystemUtils! */ +#include + +binaryBlob::binaryBlob() +{ + numberofHeaders = 0; + for (int i = 0; i < 128; i += 1) + { + m_headers[i].valid = false; + + for (int j = 0; j < 48; j += 1) + { + m_headers[i].name[j] = '\0'; + } + } +} + +#ifdef VVV_COMPILEMUSIC +void binaryBlob::AddFileToBinaryBlob(const char* _path) +{ + long size; + char * memblock; + + FILE *file = fopen(_path, "rb"); + if (file != NULL) + { + fseek(file, 0, SEEK_END); + size = ftell(file); + fseek(file, 0, SEEK_SET); + + memblock = (char*) malloc(size); + fread(memblock, 1, size, file); + + fclose(file); + + printf("The complete file size: %li\n", size); + + m_memblocks[numberofHeaders] = memblock; + for (int i = 0; _path[i]; i += 1) + { + m_headers[numberofHeaders].name[i] = _path[i]; + } + + m_headers[numberofHeaders].valid = true; + m_headers[numberofHeaders].size = size; + numberofHeaders += 1; + } + else + { + printf("Unable to open file\n"); + } +} + +void binaryBlob::writeBinaryBlob(const char* _name) +{ + FILE *file = fopen(_name, "wb"); + if (file != NULL) + { + fwrite((char*) &m_headers, 1, sizeof(resourceheader) * 128, file); + + for (int i = 0; i < numberofHeaders; i += 1) + { + fwrite(m_memblocks[i], 1, m_headers[i].size, file); + } + + fclose(file); + } + else + { + printf("Unable to open new file for writing. Feels bad.\n"); + } +} +#endif + +bool binaryBlob::unPackBinary(const char* name) +{ + PHYSFS_sint64 size; + + PHYSFS_File *handle = PHYSFS_openRead(name); + if (handle == NULL) + { + printf("Unable to open file %s\n", name); + return false; + } + + size = PHYSFS_fileLength(handle); + + PHYSFS_read(handle, &m_headers, 1, sizeof(resourceheader) * 128); + + int offset = 0 + (sizeof(resourceheader) * 128); + + for (int i = 0; i < 128; i += 1) + { + if (m_headers[i].valid) + { + PHYSFS_seek(handle, offset); + m_memblocks[i] = (char*) malloc(m_headers[i].size); + PHYSFS_read(handle, m_memblocks[i], 1, m_headers[i].size); + offset += m_headers[i].size; + } + } + PHYSFS_close(handle); + + printf("The complete reloaded file size: %li\n", size); + + for (int i = 0; i < 128; i += 1) + { + if (m_headers[i].valid == false) + { + break; + } + + printf("%s unpacked\n", m_headers[i].name); + } + + return true; +} + +int binaryBlob::getIndex(const char* _name) +{ + for (int i = 0; i < 128; i += 1) + { + if (strcmp(_name, m_headers[i].name) == 0) + { + return i; + } + } + return -1; +} + +int binaryBlob::getSize(int _index) +{ + return m_headers[_index].size; +} + +char* binaryBlob::getAddress(int _index) +{ + return m_memblocks[_index]; +} diff --git a/desktop_version/src/BinaryBlob.h b/desktop_version/src/BinaryBlob.h new file mode 100644 index 00000000..5aa2827d --- /dev/null +++ b/desktop_version/src/BinaryBlob.h @@ -0,0 +1,41 @@ +#ifndef BINARYBLOB_H +#define BINARYBLOB_H + +/* Laaaazyyyyyyy -flibit */ +// #define VVV_COMPILEMUSIC + +struct resourceheader +{ + char name[48]; + int start; + int size; + bool valid; +}; + +class binaryBlob +{ +public: + binaryBlob(); + +#ifdef VVV_COMPILEMUSIC + void AddFileToBinaryBlob(const char* _path); + + void writeBinaryBlob(const char* _name); +#endif + + bool unPackBinary(const char* _name); + + int getIndex(const char* _name); + + int getSize(int _index); + + char* getAddress(int _index); + +private: + int numberofHeaders; + resourceheader m_headers[128]; + char* m_memblocks[128]; +}; + + +#endif /* BINARYBLOB_H */ diff --git a/desktop_version/src/BlockV.cpp b/desktop_version/src/BlockV.cpp new file mode 100644 index 00000000..82c39b70 --- /dev/null +++ b/desktop_version/src/BlockV.cpp @@ -0,0 +1,36 @@ +#include "BlockV.h" + +blockclass::blockclass() +{ + clear(); +} + +void blockclass::clear() +{ + active = false; + type = 0; + trigger = 0; + + xp = 0; + yp = 0; + wp = 0; + hp = 0; + rect.x = xp; + rect.y = yp; + rect.w = wp; + rect.h = hp; + + prompt = ""; + script = ""; + r = 0; + g = 0; + b = 0; +} + +void blockclass::rectset(const int xi, const int yi, const int wi, const int hi) +{ + rect.x = xi; + rect.y = yi; + rect.w = wi; + rect.h = hi; +} diff --git a/desktop_version/src/BlockV.h b/desktop_version/src/BlockV.h new file mode 100644 index 00000000..40b31efb --- /dev/null +++ b/desktop_version/src/BlockV.h @@ -0,0 +1,31 @@ +#ifndef BLOCKV_H +#define BLOCKV_H + +#include "SDL.h" +#include + +class blockclass +{ +public: + blockclass(); + + void clear(); + + void rectset(const int xi, const int yi, const int wi, const int hi); +public: + //Fundamentals + bool active; + SDL_Rect rect; + int type; + int trigger; + int xp, yp, wp, hp; + std::string script, prompt; + int r, g, b; + + //These would come from the sprite in the flash + float x; + float y; + +}; + +#endif /* BLOCKV_H */ diff --git a/desktop_version/src/Ent.cpp b/desktop_version/src/Ent.cpp new file mode 100644 index 00000000..2f9f75bc --- /dev/null +++ b/desktop_version/src/Ent.cpp @@ -0,0 +1,88 @@ +#include "Ent.h" + +entclass::entclass() +{ + clear(); +} + +void entclass::clear() +{ + // Set all values to a default, required for creating a new entity + active = false; + invis = false; + type = 0; + size = 0; + tile = 0; + rule = 0; + state = 0; + statedelay = 0; + life = 0; + colour = 0; + para = 0; + behave = 0; + animate = 0; + + xp = 0; + yp = 0; + ax = 0; + ay = 0; + vx = 0; + vy = 0; + w = 16; + h = 16; + cx = 0; + cy = 0; + newxp = 0; + newyp = 0; + + x1 = 0; + y1 = 0; + x2 = 320; + y2 = 240; + + jumping = false; + gravity = false; + onground = 0; + onroof = 0; + jumpframe = 0; + + onentity = 0; + harmful = false; + onwall = 0; + onxwall = 0; + onywall = 0; + isplatform = false; + + framedelay = 0; + drawframe = 0; + walkingframe = 0; + dir = 0; + actionframe = 0; +} + +bool entclass::outside() +{ + // Returns true if any point of the entity is outside the map. + // Adjusts velocity for a clean collision. + if (xp < x1) + { + xp = x1; + return true; + } + if (yp < y1) + { + yp = y1; + return true; + } + if (xp + w > x2) + { + xp = x2 - w; + return true; + } + if (yp + h > y2) + { + yp = y2 - h; + return true; + } + return false; +} diff --git a/desktop_version/src/Ent.h b/desktop_version/src/Ent.h new file mode 100644 index 00000000..f3e41f93 --- /dev/null +++ b/desktop_version/src/Ent.h @@ -0,0 +1,44 @@ +#ifndef ENT_H +#define ENT_H + +class entclass +{ +public: + entclass(); + + void clear(); + + bool outside(); + +public: + //Fundamentals + bool active, invis; + int type, size, tile, rule; + int state, statedelay; + int behave, animate; + float para; + int life, colour; + + //Position and velocity + int oldxp, oldyp; + float ax, ay, vx, vy; + int cx, cy, w, h; + float newxp, newyp; + bool isplatform; + int x1,y1,x2,y2; + //Collision Rules + int onentity; + bool harmful; + int onwall, onxwall, onywall; + + //Platforming specific + bool jumping; + bool gravity; + int onground, onroof; + int jumpframe; + //Animation + int framedelay, drawframe, walkingframe, dir, actionframe; + int yp;int xp; +}; + +#endif /* ENT_H */ diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp new file mode 100644 index 00000000..e3d6381b --- /dev/null +++ b/desktop_version/src/Entity.cpp @@ -0,0 +1,5528 @@ +#include "Entity.h" +#include "Game.h" +#include "Map.h" +#include "UtilityClass.h" + +bool entityclass::checktowerspikes(int t, mapclass& map) +{ + tempx = entities[t].xp + entities[t].cx; + tempy = entities[t].yp + entities[t].cy; + tempw = entities[t].w; + temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + tempx = getgridpoint(temprect.x); + tempy = getgridpoint(temprect.y); + tempw = getgridpoint(temprect.x + temprect.w - 1); + temph = getgridpoint(temprect.y + temprect.h - 1); + if (map.spikecollide(tempx, tempy)) return true; + if (map.spikecollide(tempw, tempy)) return true; + if (map.spikecollide(tempx, temph)) return true; + if (map.spikecollide(tempw, temph)) return true; + if (temprect.h >= 12) + { + tpy1 = getgridpoint(temprect.y + 6); + if (map.spikecollide(tempx, tpy1)) return true; + if (map.spikecollide(tempw, tpy1)) return true; + if (temprect.h >= 18) + { + tpy1 = getgridpoint(temprect.y + 12); + if (map.spikecollide(tempx, tpy1)) return true; + if (map.spikecollide(tempw, tpy1)) return true; + if (temprect.h >= 24) + { + tpy1 = getgridpoint(temprect.y + 18); + if (map.spikecollide(tempx, tpy1)) return true; + if (map.spikecollide(tempw, tpy1)) return true; + } + } + } + if (temprect.w >= 12) + { + tpx1 = getgridpoint(temprect.x + 6); + if (map.collide(tpx1, tempy)) return true; + if (map.collide(tpx1, temph)) return true; + } + return false; +} + +void entityclass::init() +{ + nentity = 0; + nblocks = 0; + + skipdirblocks = false; + platformtile = 0; + customplatformtile=0; + vertplatforms = false; + horplatforms = false; + + nearelephant = false; + upsetmode = false; + upset = 0; + + customenemy=0; + customwarpmode=false; customwarpmodevon=false; customwarpmodehon=false; + trophytext = 0 ; + trophytype = 0; + altstates = 0; + + + for (int i = 0; i < 6; i++) + { + customcrewmoods[i]=1; + } + + for (int i = 0; i < 100; i++) + { + int t =0; + flags.push_back(t); + } + + for (int i = 0; i < 500; i++) + { + blocks.push_back(blockclass()); + } + + for (int z = 0; z < 200; z++) + { + entities.push_back(entclass()); + } + + for (int i = 0; i < 100; i++) + { + linecrosskludge.push_back(entclass()); + collect.push_back(0); + customcollect.push_back(0); + } + nlinecrosskludge = 0; +} + +void entityclass::resetallflags() +{ + for (int i = 0; i < 100; i++) + { + flags[i] = 0; + } +} + +void entityclass::resetflags() +{ + for (int i = 0; i < 100; i++) + { + if (flags[i] == 2) flags[i] = 0; + } +} + +void entityclass::confirmflags() +{ + for (int i = 0; i < 100; i++) + { + if (flags[i] == 2) flags[i] = 1; + } +} + +void entityclass::changecollect( int t, int s ) +{ + collect[t] = s; +} + + +void entityclass::changecustomcollect( int t, int s ) +{ + collect[t] = s; +} + +void entityclass::changeflag( int t, int s ) +{ + flags[t] = s; +} + +void entityclass::setblockcolour( int t, std::string col ) +{ + if (col == "cyan") + { + blocks[t].r = 164; + blocks[t].g = 164; + blocks[t].b = 255; + } + else if (col == "red") + { + blocks[t].r = 255; + blocks[t].g = 60; + blocks[t].b = 60; + } + else if (col == "green") + { + blocks[t].r = 144; + blocks[t].g = 255; + blocks[t].b = 144; + } + else if (col == "yellow") + { + blocks[t].r = 255; + blocks[t].g = 255; + blocks[t].b = 134; + } + else if (col == "blue") + { + blocks[t].r = 95; + blocks[t].g = 95; + blocks[t].b = 255; + } + else if (col == "purple") + { + blocks[t].r = 255; + blocks[t].g = 134; + blocks[t].b = 255; + } + else if (col == "white") + { + blocks[t].r = 244; + blocks[t].g = 244; + blocks[t].b = 244; + } + else if (col == "gray") + { + blocks[t].r = 174; + blocks[t].g = 174; + blocks[t].b = 174; + } + else if (col == "orange") + { + blocks[t].r = 255; + blocks[t].g = 130; + blocks[t].b = 20; + } + else + { + //use a gray + blocks[t].r = 174; + blocks[t].g = 174; + blocks[t].b = 174; + } +} + +int entityclass::swncolour( int t ) +{ + //given colour t, return colour in setcol + if (t == 0) return 11; + if (t == 1) return 6; + if (t == 2) return 8; + if (t == 3) return 12; + if (t == 4) return 9; + if (t == 5) return 7; + return 0; +} + +void entityclass::swnenemiescol( int t ) +{ + //change the colour of all SWN enemies to the current one + for (int i = 0; i < nentity; i++) + { + if (entities[i].active) + { + if (entities[i].type == 23) + { + entities[i].colour = swncolour(t); + } + } + } +} + +void entityclass::gravcreate( Game& game, int ypos, int dir, int xoff /*= 0*/, int yoff /*= 0*/ ) +{ + if (dir == 0) + { + createentity(game, -150 - xoff, 58 + (ypos * 20)+yoff, 23, 0, 0); + } + else + { + createentity(game, 320+150 + xoff, 58 + (ypos * 20)+yoff, 23, 1, 0); + } +} + +void entityclass::generateswnwave( Game& game, UtilityClass& help, int t ) +{ + //generate a wave for the SWN game + if(game.swndelay<=0) + { + if (t == 0) //game 0, survive for 30 seconds + { + switch(game.swnstate) + { + case 0: + //Decide on a wave here + //default case + game.swnstate = 1; + game.swndelay = 5; + + if (game.swntimer <= 150) //less than 5 seconds + { + game.swnstate = 9; + game.swndelay = 8; + } + else if (game.swntimer <= 300) //less than 10 seconds + { + game.swnstate = 6; + game.swndelay = 12; + } + else if (game.swntimer <= 360) //less than 12 seconds + { + game.swnstate = 5+game.swnstate2; + game.swndelay = 15; + } + else if (game.swntimer <= 420) //less than 14 seconds + { + game.swnstate = 7+game.swnstate2; + game.swndelay = 15; + } + else if (game.swntimer <= 480) //less than 16 seconds + { + game.swnstate = 5+game.swnstate2; + game.swndelay = 15; + } + else if (game.swntimer <= 540) //less than 18 seconds + { + game.swnstate = 7+game.swnstate2; + game.swndelay = 15; + } + else if (game.swntimer <= 600) //less than 20 seconds + { + game.swnstate = 5+game.swnstate2; + game.swndelay = 15; + } + else if (game.swntimer <= 900) //less than 30 seconds + { + game.swnstate = 4; + game.swndelay = 20; + } + else if (game.swntimer <= 1050) //less than 35 seconds + { + game.swnstate = 3; + game.swndelay = 10; + } + else if (game.swntimer <= 1200) //less than 40 seconds + { + game.swnstate = 3; + game.swndelay = 20; + } + else if (game.swntimer <= 1500) //less than 50 seconds + { + game.swnstate = 2; + game.swndelay = 10; + } + else if (game.swntimer <= 1650) //less than 55 seconds + { + game.swnstate = 1; + game.swndelay = 15; + } + else if (game.swntimer <= 1800) //less than 60 seconds + { + game.swnstate = 1; + game.swndelay = 25; + } + + if (game.deathcounts - game.swndeaths > 7) game.swndelay += 2; + if (game.deathcounts - game.swndeaths > 15) game.swndelay += 2; + if (game.deathcounts - game.swndeaths > 25) game.swndelay += 4; + break; + case 1: + createentity(game, -150, 58 + (int(fRandom() * 6) * 20), 23, 0, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + break; + case 2: + if(game.swnstate3==0) + { + game.swnstate2++; + if (game.swnstate2 >= 6) + { + game.swnstate3 = 1; + game.swnstate2--; + } + } + else + { + game.swnstate2--; + if (game.swnstate2 < 0) + { + game.swnstate3 = 0; + game.swnstate2++; + } + } + createentity(game, -150, 58 + (int(game.swnstate2) * 20), 23, 0, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + break; + case 3: + createentity(game, 320+150, 58 + (int(fRandom() * 6) * 20), 23, 1, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + break; + case 4: + //left and right compliments + game.swnstate2 = int(fRandom() * 6); + createentity(game, -150, 58 + (game.swnstate2 * 20), 23, 0, 0); + createentity(game, 320+150, 58 + ((5-game.swnstate2) * 20), 23, 1, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + game.swnstate2 = 0; + break; + case 5: + //Top and bottom + createentity(game, -150, 58, 23, 0, 0); + createentity(game, -150, 58 + (5 * 20), 23, 0, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + game.swnstate2 = 1; + break; + case 6: + //Middle + createentity(game, -150, 58 + (2 * 20), 23, 0, 0); + createentity(game, -150, 58 + (3 * 20), 23, 0, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + game.swnstate2 = 0; + break; + case 7: + //Top and bottom + createentity(game, 320+150, 58, 23, 1, 0); + createentity(game, 320+150, 58 + (5 * 20), 23, 1, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + game.swnstate2 = 1; + break; + case 8: + //Middle + createentity(game, 320+150, 58 + (2 * 20), 23, 1, 0); + createentity(game, 320+150, 58 + (3 * 20), 23, 1, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + game.swnstate2 = 0; + break; + case 9: + if(game.swnstate3==0) + { + game.swnstate2++; + if (game.swnstate2 >= 6) + { + game.swnstate3 = 1; + game.swnstate2--; + } + } + else + { + game.swnstate2--; + if (game.swnstate2 < 0) + { + game.swnstate3 = 0; + game.swnstate2++; + } + } + createentity(game, 320 + 150, 58 + (int(game.swnstate2) * 20), 23, 1, 0); + game.swnstate = 0; + game.swndelay = 0; //return to decision state + break; + } + } + else if (t == 1) + { + //Game 2, super gravitron + switch(game.swnstate) + { + case 0: + //Choose either simple or filler + game.swnstate2 = 0; + game.swnstate3 = 0; + game.swnstate4 = 0; + + game.swnstate2 = int(fRandom() * 100); + if (game.swnstate2 < 25) + { + //simple + game.swnstate = 2; + game.swndelay = 0; + } + else + { + //filler + game.swnstate = 4; + game.swndelay = 0; + } + game.swnstate2 = 0; + break; + case 1: + //complex chain + game.swnstate2 = int(fRandom() * 8); + if (game.swnstate2 == 0) + { + game.swnstate = 10; + game.swndelay = 0; + } + else if (game.swnstate2 == 1) + { + game.swnstate = 12; + game.swndelay = 0; + } + else if (game.swnstate2 == 2) + { + game.swnstate = 14; + game.swndelay = 0; + } + else if (game.swnstate2 == 3) + { + game.swnstate = 20; + game.swndelay = 0; + } + else if (game.swnstate2 == 4) + { + game.swnstate = 21; + game.swndelay = 0; + } + else if (game.swnstate2 == 5) + { + game.swnstate = 22; + game.swndelay = 0; + } + else if (game.swnstate2 == 6) + { + game.swnstate = 22; + game.swndelay = 0; + } + else if (game.swnstate2 == 7) + { + game.swnstate = 14; + game.swndelay = 0; + } + + game.swnstate2 = 0; + break; + case 2: + //simple chain + game.swnstate2 = int(fRandom() * 6); + if (game.swnstate2 == 0) + { + game.swnstate = 23; + game.swndelay = 0; + } + else if (game.swnstate2 == 1) + { + game.swnstate = 24; + game.swndelay = 0; + } + else if (game.swnstate2 == 2) + { + game.swnstate = 25; + game.swndelay = 0; + } + else if (game.swnstate2 == 3) + { + game.swnstate = 26; + game.swndelay = 0; + } + else if (game.swnstate2 == 4) + { + game.swnstate = 27; + game.swndelay = 0; + } + else if (game.swnstate2 == 5) + { + game.swnstate = 14; + game.swndelay = 0; + } + + game.swnstate2 = 0; + break; + case 3: + //Choose a major action + game.swnstate2 = int(fRandom() * 100); + if (game.swnstate2 < 25) + { + //complex + game.swnstate = 1; + game.swndelay = 0; + } + else + { + //simple + game.swnstate = 2; + game.swndelay = 0; + } + break; + case 4: + //filler chain + game.swnstate2 = int(fRandom() * 6); + if (game.swnstate2 == 0) + { + game.swnstate = 28; + game.swndelay = 0; + } + else if (game.swnstate2 == 1) + { + game.swnstate = 29; + game.swndelay = 0; + } + else if (game.swnstate2 == 2) + { + game.swnstate = 28; + game.swndelay = 0; + } + else if (game.swnstate2 == 3) + { + game.swnstate = 29; + game.swndelay = 0; + } + else if (game.swnstate2 == 4) + { + game.swnstate = 30; + game.swndelay = 0; + } + else if (game.swnstate2 == 5) + { + game.swnstate = 31; + game.swndelay = 0; + } + + game.swnstate2 = 0; + break; + case 10: + gravcreate(game, 0, 0); + gravcreate(game, 1, 0); + gravcreate(game, 2, 0); + game.swnstate++; + game.swndelay = 10; //return to decision state + break; + case 11: + gravcreate(game, 3, 0); + gravcreate(game, 4, 0); + gravcreate(game, 5, 0); + game.swnstate2++; + if(game.swnstate2==3) + { + game.swnstate = 0; + game.swndelay = 30; //return to decision state + } + else + { + game.swnstate--; + game.swndelay = 10; //return to decision state + } + break; + case 12: + gravcreate(game, 0, 1); + gravcreate(game, 1, 1); + gravcreate(game, 2, 1); + game.swnstate++; + game.swndelay = 10; //return to decision state + break; + case 13: + gravcreate(game, 3, 1); + gravcreate(game, 4, 1); + gravcreate(game, 5, 1); + game.swnstate2++; + if(game.swnstate2==3) + { + game.swnstate = 0; + game.swndelay = 30; //return to decision state + } + else + { + game.swnstate--; + game.swndelay = 10; //return to decision state + } + break; + case 14: + gravcreate(game, 0, 0, 0); + gravcreate(game, 5, 1, 0); + + game.swnstate++; + game.swndelay = 20; //return to decision state + break; + case 15: + gravcreate(game, 1, 0); + gravcreate(game, 4, 1); + + game.swnstate++; + game.swndelay = 20; //return to decision state + break; + case 16: + gravcreate(game, 2, 0); + gravcreate(game, 3, 1); + + game.swnstate++; + game.swndelay = 20; //return to decision state + break; + case 17: + gravcreate(game, 3, 0); + gravcreate(game, 2, 1); + + game.swnstate++; + game.swndelay = 20; //return to decision state + break; + case 18: + gravcreate(game, 4, 0); + gravcreate(game, 1, 1); + + game.swnstate++; + game.swndelay = 20; //return to decision state + break; + case 19: + gravcreate(game, 5, 0); + gravcreate(game, 0, 1); + + game.swnstate=0; + game.swndelay = 20; //return to decision state + break; + case 20: + game.swnstate4++; + if(game.swnstate3==0) + { + game.swnstate2++; + if (game.swnstate2 >= 6) + { + game.swnstate3 = 1; + game.swnstate2--; + } + } + else + { + game.swnstate2--; + if (game.swnstate2 < 0) + { + game.swnstate3 = 0; + game.swnstate2++; + } + } + createentity(game, -150, 58 + (int(game.swnstate2) * 20), 23, 0, 0); + if(game.swnstate4<=6) + { + game.swnstate = 20; + game.swndelay = 10; //return to decision state + } + else + { + game.swnstate = 0; + game.swndelay = 10; //return to decision state + } + break; + case 21: + game.swnstate4++; + if(game.swnstate3==0) + { + game.swnstate2++; + if (game.swnstate2 >= 6) + { + game.swnstate3 = 1; + game.swnstate2--; + } + } + else + { + game.swnstate2--; + if (game.swnstate2 < 0) + { + game.swnstate3 = 0; + game.swnstate2++; + } + } + createentity(game, 320+150, 58 + (int(game.swnstate2) * 20), 23, 1, 0); + if(game.swnstate4<=6) + { + game.swnstate = 21; + game.swndelay = 10; //return to decision state + } + else + { + game.swnstate = 0; + game.swndelay = 10; //return to decision state + } + break; + case 22: + game.swnstate4++; + //left and right compliments + game.swnstate2 = int(fRandom() * 6); + createentity(game, -150, 58 + (game.swnstate2 * 20), 23, 0, 0); + createentity(game, 320 + 150, 58 + ((5 - game.swnstate2) * 20), 23, 1, 0); + if(game.swnstate4<=12) + { + game.swnstate = 22; + game.swndelay = 18; //return to decision state + } + else + { + game.swnstate = 0; + game.swndelay = 18; //return to decision state + } + game.swnstate2 = 0; + break; + case 23: + gravcreate(game, 1, 0); + gravcreate(game, 2, 0, 15); + gravcreate(game, 2, 0, -15); + gravcreate(game, 3, 0, 15); + gravcreate(game, 3, 0, -15); + gravcreate(game, 4, 0); + game.swnstate = 0; + game.swndelay = 15; //return to decision state + break; + case 24: + gravcreate(game, 1, 1); + gravcreate(game, 2, 1, 15); + gravcreate(game, 2, 1, -15); + gravcreate(game, 3, 1, 15); + gravcreate(game, 3, 1, -15); + gravcreate(game, 4, 1); + game.swnstate = 0; + game.swndelay = 15; //return to decision state + break; + case 25: + gravcreate(game, 0, 0); + gravcreate(game, 1, 1,0,10); + gravcreate(game, 4, 1,0,-10); + gravcreate(game, 5, 0); + game.swnstate = 0; + game.swndelay = 20; //return to decision state + break; + case 26: + gravcreate(game, 0, 1, 0); + gravcreate(game, 1, 1, 10); + gravcreate(game, 4, 1, 40); + gravcreate(game, 5, 1, 50); + game.swnstate = 0; + game.swndelay = 20; //return to decision state + break; + case 27: + gravcreate(game, 0, 0, 0); + gravcreate(game, 1, 0, 10); + gravcreate(game, 4, 0, 40); + gravcreate(game, 5, 0, 50); + game.swnstate = 0; + game.swndelay = 20; //return to decision state + break; + case 28: + game.swnstate4++; + game.swnstate2 = int(fRandom() * 6); + createentity(game, -150, 58 + (game.swnstate2 * 20), 23, 0, 0); + if(game.swnstate4<=6) + { + game.swnstate = 28; + game.swndelay = 8; //return to decision state + } + else + { + game.swnstate = 3; + game.swndelay = 15; //return to decision state + } + game.swnstate2 = 0; + break; + case 29: + game.swnstate4++; + game.swnstate2 = int(fRandom() * 6); + gravcreate(game, game.swnstate2, 1); + if(game.swnstate4<=6) + { + game.swnstate = 29; + game.swndelay = 8; //return to decision state + } + else + { + game.swnstate = 3; + game.swndelay = 15; //return to decision state + } + game.swnstate2 = 0; + break; + case 30: + game.swnstate4++; + game.swnstate2 = int(fRandom() * 3); + gravcreate(game, game.swnstate2, 0); + gravcreate(game, 5-game.swnstate2, 0); + if(game.swnstate4<=2) + { + game.swnstate = 30; + game.swndelay = 14; //return to decision state + } + else + { + game.swnstate = 3; + game.swndelay = 15; //return to decision state + } + game.swnstate2 = 0; + break; + case 31: + game.swnstate4++; + game.swnstate2 = int(fRandom() * 3); + gravcreate(game, game.swnstate2, 1); + gravcreate(game, 5-game.swnstate2, 1); + if(game.swnstate4<=2) + { + game.swnstate = 31; + game.swndelay = 14; //return to decision state + } + else + { + game.swnstate = 3; + game.swndelay = 15; //return to decision state + } + game.swnstate2 = 0; + break; + } + } + } + else + { + game.swndelay--; + } +} + +void entityclass::createblock( int t, int xp, int yp, int w, int h, int trig /*= 0*/ ) +{ + if(nblocks == 0) + { + //If there are no active blocks, Z=0; + k = 0; + nblocks++; + } + else + { + int i = 0; + k = -1; + while (i < nblocks) + { + if (!blocks[i].active) + { + k = i; + i = nblocks; + } + i++; + } + if (k == -1) + { + k = nblocks; + nblocks++; + } + } + + blocks[k].clear(); + blocks[k].active = true; + switch(t) + { + case BLOCK: //Block + blocks[k].type = BLOCK; + blocks[k].xp = xp; + blocks[k].yp = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + + nblocks++; + break; + case TRIGGER: //Trigger + blocks[k].type = TRIGGER; + blocks[k].x = xp; + blocks[k].y = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + blocks[k].trigger = trig; + + nblocks++; + break; + case DAMAGE: //Damage + blocks[k].type = DAMAGE; + blocks[k].x = xp; + blocks[k].y = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + + nblocks++; + break; + case DIRECTIONAL: //Directional + blocks[k].type = DIRECTIONAL; + blocks[k].x = xp; + blocks[k].y = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + blocks[k].trigger = trig; + + nblocks++; + break; + case SAFE: //Safe block + blocks[k].type = SAFE; + blocks[k].xp = xp; + blocks[k].yp = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + + nblocks++; + break; + case ACTIVITY: //Activity Zone + blocks[k].type = ACTIVITY; + blocks[k].x = xp; + blocks[k].y = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + + //Ok, each and every activity zone in the game is initilised here. "Trig" in this case is a variable that + //assigns all the details. + switch(trig) + { + case 0: //testing zone + blocks[k].prompt = "Press ENTER to explode"; + blocks[k].script = "intro"; + setblockcolour(k, "orange"); + trig=1; + break; + case 1: + blocks[k].prompt = "Press ENTER to talk to Violet"; + blocks[k].script = "talkpurple"; + setblockcolour(k, "purple"); + trig=0; + break; + case 2: + blocks[k].prompt = "Press ENTER to talk to Vitellary"; + blocks[k].script = "talkyellow"; + setblockcolour(k, "yellow"); + trig=0; + break; + case 3: + blocks[k].prompt = "Press ENTER to talk to Vermilion"; + blocks[k].script = "talkred"; + setblockcolour(k, "red"); + trig=0; + break; + case 4: + blocks[k].prompt = "Press ENTER to talk to Verdigris"; + blocks[k].script = "talkgreen"; + setblockcolour(k, "green"); + trig=0; + break; + case 5: + blocks[k].prompt = "Press ENTER to talk to Victoria"; + blocks[k].script = "talkblue"; + setblockcolour(k, "blue"); + trig=0; + break; + case 6: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_station_1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 7: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_outside_1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 8: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_outside_2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 9: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_outside_3"; + setblockcolour(k, "orange"); + trig=0; + break; + case 10: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_outside_4"; + setblockcolour(k, "orange"); + trig=0; + break; + case 11: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_outside_5"; + setblockcolour(k, "orange"); + trig=0; + break; + case 12: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_outside_6"; + setblockcolour(k, "orange"); + trig=0; + break; + case 13: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_finallevel"; + setblockcolour(k, "orange"); + trig=0; + break; + case 14: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_station_2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 15: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_station_3"; + setblockcolour(k, "orange"); + trig=0; + break; + case 16: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_station_4"; + setblockcolour(k, "orange"); + trig=0; + break; + case 17: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_warp_1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 18: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_warp_2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 19: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_lab_1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 20: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_lab_2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 21: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_secretlab"; + setblockcolour(k, "orange"); + trig=0; + break; + case 22: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_shipcomputer"; + setblockcolour(k, "orange"); + trig=0; + break; + case 23: + blocks[k].prompt = "Press ENTER to activate terminals"; + blocks[k].script = "terminal_radio"; + setblockcolour(k, "orange"); + trig=0; + break; + case 24: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "terminal_jukebox"; + setblockcolour(k, "orange"); + trig=0; + break; + case 25: + blocks[k].prompt = "Passion for exploring"; + blocks[k].script = "terminal_juke1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 26: + blocks[k].prompt = "Pushing onwards"; + blocks[k].script = "terminal_juke2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 27: + blocks[k].prompt = "Positive force"; + blocks[k].script = "terminal_juke3"; + setblockcolour(k, "orange"); + trig=0; + break; + case 28: + blocks[k].prompt = "Presenting VVVVVV"; + blocks[k].script = "terminal_juke4"; + setblockcolour(k, "orange"); + trig=0; + break; + case 29: + blocks[k].prompt = "Potential for anything"; + blocks[k].script = "terminal_juke5"; + setblockcolour(k, "orange"); + trig=0; + break; + case 30: + blocks[k].prompt = "Predestined fate"; + blocks[k].script = "terminal_juke6"; + setblockcolour(k, "orange"); + trig=0; + break; + case 31: + blocks[k].prompt = "Pipe Dream"; + blocks[k].script = "terminal_juke7"; + setblockcolour(k, "orange"); + trig=0; + break; + case 32: + blocks[k].prompt = "Popular Potpourri"; + blocks[k].script = "terminal_juke8"; + setblockcolour(k, "orange"); + trig=0; + break; + case 33: + blocks[k].prompt = "Pressure Cooker"; + blocks[k].script = "terminal_juke9"; + setblockcolour(k, "orange"); + trig=0; + break; + case 34: + blocks[k].prompt = "ecrof evitisoP"; + blocks[k].script = "terminal_juke10"; + setblockcolour(k, "orange"); + trig=0; + break; + case 35: + blocks[k].prompt = "Press ENTER to activate terminal"; + blocks[k].script = "custom_"+customscript; + setblockcolour(k, "orange"); + trig=0; + break; + } + nblocks++; + break; + } +} + +void entityclass::removeallblocks() +{ + for(int i=0; i= 0 && !(blocks[i].active)) + { + nblocks--; + i--; + } +} + +void entityclass::removeblockat( int x, int y ) +{ + for (int i = 0; i < nblocks; i++) + { + if(blocks[i].xp == int(x) && blocks[i].yp == int(y)) removeblock(i); + } +} + +void entityclass::removetrigger( int t ) +{ + for(int i=0; i= 113 && game.roomx <= 117)) + { + setenemy(0, k); + setenemyroom(k, game.roomx, game.roomy); //For colour + } + else if (game.roomx == 113 && (game.roomy <= 110 && game.roomy >= 108)) + { + setenemy(1, k); + setenemyroom(k, game.roomx, game.roomy); //For colour + } + else if (game.roomx == 113 && game.roomy == 107) + { + //MAVVERRRICK + entities[k].tile = 96; + entities[k].colour = 6; + entities[k].size = 9; + entities[k].w = 64; + entities[k].h = 44; + entities[k].animate = 4; + } + else + { + setenemyroom(k, game.roomx, game.roomy); + } + + //}else{*/ + /* + entities[k].tile = 24; + entities[k].animate = 0; + entities[k].colour = 8; + //for warpzone: + if (game.roomx == 51 && game.roomy == 51) entities[k].colour = 6; + if (game.roomx == 52 && game.roomy == 51) entities[k].colour = 7; + if (game.roomx == 54 && game.roomy == 49) entities[k].colour = 11; + if (game.roomx == 55 && game.roomy == 50) entities[k].colour = 9; + if (game.roomx == 55 && game.roomy == 51) entities[k].colour = 6; + if (game.roomx == 54 && game.roomy == 51) entities[k].colour = 12; + if (game.roomx == 54 && game.roomy == 52) entities[k].colour = 7; + if (game.roomx == 53 && game.roomy == 52) entities[k].colour = 8; + if (game.roomx == 51 && game.roomy == 52) entities[k].colour = 6; + if (game.roomx == 52 && game.roomy == 49) entities[k].colour = 8; + //} + */ + break; + case 2: //A moving platform + entities[k].rule = 2; + entities[k].type = 1; + entities[k].size = 2; + entities[k].tile = 1; + + if (customplatformtile > 0){ + entities[k].tile = customplatformtile; + }else if (platformtile > 0) { + entities[k].tile = platformtile; + }else{ + //appearance again depends on location + if (gridmatch(p1, p2, p3, p4, 100, 70, 320, 160)) entities[k].tile = 616; + if (gridmatch(p1, p2, p3, p4, 72, 0, 248, 240)) entities[k].tile = 610; + if (gridmatch(p1, p2, p3, p4, -20, 0, 320, 240)) entities[k].tile = 413; + + if (gridmatch(p1, p2, p3, p4, -96, -72, 400, 312)) entities[k].tile = 26; + if (gridmatch(p1, p2, p3, p4, -32, -40, 352, 264)) entities[k].tile = 27; + } + + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 32; + entities[k].h = 8; + + if (int(vx) <= 1) vertplatforms = true; + if (int(vx) >= 2 && int(vx) <= 5) horplatforms = true; + if (int(vx) == 14 || int(vx) == 15) horplatforms = true; //special case for last part of Space Station + if (int(vx) >= 6 && int(vx) <= 7) vertplatforms = true; + + if (int(vx) >= 10 && int(vx) <= 11) + { + //Double sized threadmills + entities[k].w = 64; + entities[k].h = 8; + vx -= 2; + entities[k].size = 8; + } + + entities[k].behave = vx; + entities[k].para = vy; + + if (int(vx) >= 8 && int(vx) <= 9) + { + horplatforms = true; //threadmill! + entities[k].animate = 10; + if(customplatformtile>0){ + entities[k].tile = customplatformtile+4; + if (int(vx) == 8) entities[k].tile += 4; + if (int(vx) == 9) entities[k].animate = 11; + }else{ + settreadmillcolour(k, game.roomx, game.roomy); + if (int(vx) == 8) entities[k].tile += 40; + if (int(vx) == 9) entities[k].animate = 11; + } + } + else + { + entities[k].animate = 100; + } + + entities[k].x1 = p1; + entities[k].y1 = p2; + entities[k].x2 = p3; + entities[k].y2 = p4; + + entities[k].isplatform = true; + + createblock(0, xp, yp, 32, 8); + break; + case 3: //Disappearing platforms + entities[k].rule = 3; + entities[k].type = 2; + entities[k].size = 2; + entities[k].tile = 2; + //appearance again depends on location + if(customplatformtile>0) + { + entities[k].tile=customplatformtile; + } + else if (vx > 0) + { + entities[k].tile = int(vx); + } + else + { + if(game.roomx==49 && game.roomy==52) entities[k].tile = 18; + if (game.roomx == 50 && game.roomy == 52) entities[k].tile = 22; + } + + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cy = -1; + entities[k].w = 32; + entities[k].h = 10; + entities[k].behave = vx; + entities[k].para = vy; + entities[k].onentity = 1; + entities[k].animate = 100; + + createblock(0, xp, yp, 32, 8); + break; + case 4: //Breakable blocks + entities[k].rule = 6; + entities[k].type = 3; + entities[k].size = 1; + entities[k].tile = 10; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cy = -1; + entities[k].w = 8; + entities[k].h = 10; + entities[k].behave = vx; + entities[k].para = vy; + entities[k].onentity = 1; + entities[k].animate = 100; + + createblock(0, xp, yp, 8, 8); + break; + case 5: //Gravity Tokens + entities[k].rule = 3; + entities[k].type = 4; + entities[k].size = 0; + entities[k].tile = 11; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 16; + entities[k].h = 16; + entities[k].behave = vx; + entities[k].para = vy; + entities[k].onentity = 1; + entities[k].animate = 100; + break; + case 6: //Decorative particles + entities[k].rule = 2; + entities[k].type = 5; //Particles + entities[k].colour = 1; + entities[k].size = 3; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].vx = vx; + entities[k].vy = vy; + + entities[k].life = 12; + break; + case 7: //Decorative particles + entities[k].rule = 2; + entities[k].type = 5; //Particles + entities[k].colour = 2; + entities[k].size = 3; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].vx = vx; + entities[k].vy = vy; + + entities[k].life = 12; + break; + case 8: //Small collectibles + entities[k].rule = 3; + entities[k].type = 6; + entities[k].size = 4; + entities[k].tile = 48; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 8; + entities[k].h = 8; + entities[k].onentity = 1; + entities[k].animate = 100; + + //Check if it's already been collected + entities[k].para = vx; + if (collect[vx] == 1) entities[k].active = false; + break; + case 9: //Something Shiny + entities[k].rule = 3; + entities[k].type = 7; + entities[k].size = 0; + entities[k].tile = 22; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 16; + entities[k].h = 16; + entities[k].colour = 3; + entities[k].onentity = 1; + entities[k].animate = 100; + + //Check if it's already been collected + entities[k].para = vx; + if (collect[vx] == 1) entities[k].active = false; + break; + case 10: //Savepoint + entities[k].rule = 3; + entities[k].type = 8; + entities[k].size = 0; + entities[k].tile = 20 + vx; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 16; + entities[k].h = 16; + entities[k].colour = 4; + entities[k].onentity = 1; + entities[k].animate = 100; + entities[k].para = vy; + + if (game.savepoint == (vy)) + { + entities[k].colour = 5; + entities[k].onentity = 0; + } + + if (game.nodeathmode) + { + entities[k].active = false; + } + break; + case 11: //Horizontal Gravity Line + entities[k].rule = 4; + entities[k].type = 9; + entities[k].size = 5; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = vx; + entities[k].h = 1; + entities[k].onentity = 1; + break; + case 12: //Vertical Gravity Line + entities[k].rule = 5; + entities[k].type = 10; + entities[k].size = 6; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 1; + entities[k].h = vx; + //entities[k].colour = 0; + entities[k].onentity = 1; + break; + case 13: //Warp token + entities[k].rule = 3; + entities[k].type = 11; + entities[k].size = 0; + entities[k].tile = 18; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 16; + entities[k].h = 16; + entities[k].colour = 10; + entities[k].onentity = 1; + entities[k].animate = 2; + //Added in port, hope it doesn't break anything + entities[k].behave = vx; + entities[k].para = vy; + break; + case 14: // Teleporter + entities[k].rule = 3; + entities[k].type = 100; + entities[k].size = 7; + entities[k].tile = 1; //inactive + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 96; + entities[k].h = 96; + entities[k].colour = 100; + entities[k].onentity = 1; + entities[k].animate = 100; + entities[k].para = vy; + + //we'll init it's activeness here later + /*if (game.savepoint == vy) { + entities[k].colour = 5; + entities[k].onentity = 0; + }*/ + break; + case 15: // Crew Member (warp zone) + entities[k].rule = 6; + entities[k].type = 12; //A special case! + entities[k].tile = 144; + entities[k].colour = 13; //144 for sad :( + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cx = 6; + entities[k].cy = 2; + entities[k].w = 12; + entities[k].h = 21; + entities[k].dir = 0; + + entities[k].state = vx; + + entities[k].gravity = true; + break; + case 16: // Crew Member, upside down (space station) + entities[k].rule = 7; + entities[k].type = 12; //A special case! + entities[k].tile = 144+6; + entities[k].colour = 14; //144 for sad (upside down+12):( + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cx = 6; + entities[k].cy = 2; + entities[k].w = 12; + entities[k].h = 21; + entities[k].dir = 1; + + entities[k].state = vx; + + entities[k].gravity = true; + break; + case 17: // Crew Member (Lab) + entities[k].rule = 6; + entities[k].type = 12; //A special case! + entities[k].tile = 144; + entities[k].colour = 16; //144 for sad :( + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cx = 6; + entities[k].cy = 2; + entities[k].w = 12; + entities[k].h = 21; + entities[k].dir = 1; + + entities[k].state = vx; + + entities[k].gravity = true; + break; + case 18: // Crew Member (Ship) + //This is the scriping crewmember + entities[k].rule = 6; + entities[k].type = 12; //A special case! + entities[k].colour = vx; + if (int(vy) == 0) + { + entities[k].tile = 0; + } + else + { + entities[k].tile = 144; + } + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cx = 6; + entities[k].cy = 2; + entities[k].w = 12; + entities[k].h = 21; + entities[k].dir = 0; + + entities[k].state = p1; + entities[k].para = p2; + + if (p1 == 17) + { + entities[k].dir = p2; + } + + entities[k].gravity = true; + break; + case 19: // Crew Member (Ship) More tests! + entities[k].rule = 6; + entities[k].type = 12; //A special case! + entities[k].tile = 0; + entities[k].colour = 6; //54 for sad :( + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cx = 6; + entities[k].cy = 2; + entities[k].w = 12; + entities[k].h = 21; + entities[k].dir = 1; + + entities[k].state = vx; + + entities[k].gravity = true; + break; + case 20: //Terminal + entities[k].rule = 3; + entities[k].type = 13; + entities[k].size = 0; + entities[k].tile = 16 + vx; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 16; + entities[k].h = 16; + entities[k].colour = 4; + entities[k].onentity = 1; + entities[k].animate = 100; + entities[k].para = vy; + + /*if (game.savepoint == vy) { + entities[k].colour = 5; + entities[k].onentity = 0; + }*/ + break; + case 21: //as above, except doesn't highlight + entities[k].rule = 3; + entities[k].type = 13; + entities[k].size = 0; + entities[k].tile = 16 + vx; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 16; + entities[k].h = 16; + entities[k].colour = 4; + entities[k].onentity = 0; + entities[k].animate = 100; + entities[k].para = vy; + + /*if (game.savepoint == vy) { + entities[k].colour = 5; + entities[k].onentity = 0; + }*/ + break; + case 22: //Fake trinkets, only appear if you've collected them + entities[k].rule = 3; + entities[k].type = 7; + entities[k].size = 0; + entities[k].tile = 22; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 16; + entities[k].h = 16; + entities[k].colour = 3; + entities[k].onentity = 0; + entities[k].animate = 100; + + //Check if it's already been collected + entities[k].para = vx; + if (collect[ (vx)] == 0) entities[k].active = false; + break; + case 23: //SWN Enemies + //Given a different behavior, these enemies are especially for SWN mode and disappear outside the screen. + entities[k].rule = 1; + entities[k].type = 23; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].behave = vx; + entities[k].para = vy; + entities[k].w = 16; + entities[k].h = 16; + entities[k].cx = 0; + entities[k].cy = 0; + + entities[k].x1 = -2000; + entities[k].y1 = -100; + entities[k].x2 = 5200; + entities[k].y2 = 340; + + entities[k].harmful = true; + + //initilise tiles here based on behavior + entities[k].size = 12; //don't wrap around + entities[k].colour = 21; + entities[k].tile = 78; //default case + entities[k].animate = 1; + if (game.swngame == 1) + { + //set colour based on current state + entities[k].colour = swncolour(game.swncolstate); + } + break; + case 24: // Super Crew Member + //This special crewmember is way more advanced than the usual kind, and can interact with game objects + entities[k].rule = 6; + entities[k].type = 14; //A special case! + entities[k].colour = vx; + if( (vx)==16) + { + //victoria is sad! + if (int(vy) == 2) vy = 1; + } + else + { + if (int(vy) == 2) vy = 0; + } + if (int(vy) == 0) + { + entities[k].tile = 0; + } + else + { + entities[k].tile = 144; + } + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cx = 6; + entities[k].cy = 2; + entities[k].w = 12; + entities[k].h = 21; + entities[k].dir = 1; + + entities[k].x1 = -2000; + entities[k].y1 = -100; + entities[k].x2 = 5200; + entities[k].y2 = 340; + + entities[k].state = p1; + entities[k].para = p2; + + if (p1 == 17) + { + entities[k].dir = p2; + } + + entities[k].gravity = true; + break; + case 25: //Trophies + entities[k].rule = 3; + entities[k].type = 15; + entities[k].size = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 16; + entities[k].h = 16; + entities[k].colour = 4; + entities[k].onentity = 1; + entities[k].animate = 100; + entities[k].para = vy; + + //Decide tile here based on given achievement: both whether you have them and what they are + //default is just a trophy base: + entities[k].tile = 180 + vx; + switch(int(vy)) + { + case 1: + if(game.bestrank[0]>=3) + { + entities[k].tile = 184 + vx; + entities[k].colour = 31; + } + break; + case 2: + if(game.bestrank[1]>=3) + { + entities[k].tile = 186 + vx; + entities[k].colour = 35; + } + break; + case 3: + if(game.bestrank[2]>=3) + { + entities[k].tile = 184 + vx; + entities[k].colour = 33; + } + break; + case 4: + if(game.bestrank[3]>=3) + { + entities[k].tile = 184 + vx; + entities[k].colour = 32; + } + break; + case 5: + if(game.bestrank[4]>=3) + { + entities[k].tile = 184 + vx; + entities[k].colour = 34; + } + break; + case 6: + if(game.bestrank[5]>=3) + { + entities[k].tile = 184 + vx; + entities[k].colour = 30; + } + break; + + case 7: + if(game.unlock[5]) + { + entities[k].tile = 188 + vx; + entities[k].colour = 37; + entities[k].h += 3; + } + break; + case 8: + if(game.unlock[19]) + { + entities[k].tile = 188 + vx; + entities[k].colour = 37; + entities[k].h += 3; + } + break; + + case 9: + if (game.bestgamedeaths > -1) + { + if (game.bestgamedeaths <= 50) + { + entities[k].tile = 182 + vx; + entities[k].colour = 40; + } + } + break; + case 10: + if (game.bestgamedeaths > -1) + { + if (game.bestgamedeaths <= 100) + { + entities[k].tile = 182 + vx; + entities[k].colour = 36; + } + } + break; + case 11: + if (game.bestgamedeaths > -1) + { + if (game.bestgamedeaths <= 250) + { + entities[k].tile = 182 + vx; + entities[k].colour = 38; + } + } + break; + case 12: + if (game.bestgamedeaths > -1) + { + if (game.bestgamedeaths <= 500) + { + entities[k].tile = 182 + vx; + entities[k].colour = 39; + } + } + break; + + case 13: + if(game.swnbestrank>=1) + { + entities[k].tile = 182 + vx; + entities[k].colour = 39; + } + break; + case 14: + if(game.swnbestrank>=2) + { + entities[k].tile = (182 + vx); + entities[k].colour = 39; + } + break; + case 15: + if(game.swnbestrank>=3) + { + entities[k].tile = (182 + vx); + entities[k].colour = 39; + } + break; + case 16: + if(game.swnbestrank>=4) + { + entities[k].tile = (182 + vx); + entities[k].colour = 38; + } + break; + case 17: + if(game.swnbestrank>=5) + { + entities[k].tile = (182 + vx); + entities[k].colour = 36; + } + break; + case 18: + if(game.swnbestrank>=6) + { + entities[k].tile = (182 + vx); + entities[k].colour = 40; + } + break; + + case 19: + if(game.unlock[20]) + { + entities[k].tile = 3; + entities[k].colour = 102; + entities[k].size = 13; + entities[k].xp -= 64; + entities[k].yp -= 128; + } + break; + + } + + break; + case 26: //Epilogue super warp token + entities[k].rule = 3; + entities[k].type = 11; + entities[k].size = 0; + entities[k].tile = 18; + entities[k].xp = (xp); + entities[k].yp = (yp); + entities[k].w = 16; + entities[k].h = 16; + entities[k].colour = 3; + entities[k].onentity = 0; + entities[k].animate = 100; + entities[k].para = vy; + entities[k].size = 13; + break; + + case 51: //Vertical Warp Line + entities[k].rule = 5; + entities[k].type = 51; + entities[k].size = 6; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 1; + entities[k].h = vx; + //entities[k].colour = 0; + entities[k].onentity = 1; + entities[k].invis=true; + break; + case 52: //Vertical Warp Line + entities[k].rule = 5; + entities[k].type = 52; + entities[k].size = 6; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 1; + entities[k].h = vx; + //entities[k].colour = 0; + entities[k].onentity = 1; + entities[k].invis=true; + break; + case 53: //Horizontal Warp Line + entities[k].rule = 7; + entities[k].type = 53; + entities[k].size = 5; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = vx; + entities[k].h = 1; + entities[k].onentity = 1; + entities[k].invis=true; + break; + case 54: //Horizontal Warp Line + entities[k].rule = 7; + entities[k].type = 54; + entities[k].size = 5; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = vx; + entities[k].h = 1; + entities[k].onentity = 1; + entities[k].invis=true; + break; + case 55: // Crew Member (custom, collectable) + //1 - position in array + //2 - colour + entities[k].rule = 3; + entities[k].type = 55; + if(customcrewmoods[int(vy)]==1){ + entities[k].tile = 144; + }else{ + entities[k].tile = 0; + } + entities[k].colour = crewcolour(int(vy)); + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cx = 6; + entities[k].cy = 2; + entities[k].w = 12; + entities[k].h = 21; + entities[k].dir = 0; + + entities[k].state = 0; + entities[k].onentity = 1; + //entities[k].state = vx; + + entities[k].gravity = true; + + //Check if it's already been collected + entities[k].para = vx; + if (customcollect[vx] == 1) entities[k].active = false; + break; + case 56: //Custom enemy + entities[k].rule = 1; + entities[k].type = 1; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].behave = vx; + entities[k].para = vy; + entities[k].w = 16; + entities[k].h = 16; + entities[k].cx = 0; + entities[k].cy = 0; + + entities[k].x1 = p1; + entities[k].y1 = p2; + entities[k].x2 = p3; + entities[k].y2 = p4; + + entities[k].harmful = true; + + switch(customenemy){ + case 0: setenemyroom(k, 4+100, 0+100); break; + case 1: setenemyroom(k, 2+100, 0+100); break; + case 2: setenemyroom(k, 12+100, 3+100); break; + case 3: setenemyroom(k, 13+100, 12+100); break; + case 4: setenemyroom(k, 16+100, 9+100); break; + case 5: setenemyroom(k, 19+100, 1+100); break; + case 6: setenemyroom(k, 19+100, 2+100); break; + case 7: setenemyroom(k, 18+100, 3+100); break; + case 8: setenemyroom(k, 16+100, 0+100); break; + case 9: setenemyroom(k, 14+100, 2+100); break; + default: setenemyroom(k, 4+100, 0+100); break; + } + + //Set colour based on room tile + //Set custom colours + if(customplatformtile>0){ + int entcol=(customplatformtile/12); + switch(entcol){ + //RED + case 3: case 7: case 12: case 23: case 28: + case 34: case 42: case 48: case 58: + entities[k].colour = 6; break; + //GREEN + case 5: case 9: case 22: case 25: case 29: + case 31: case 38: case 46: case 52: case 53: + entities[k].colour = 7; break; + //BLUE + case 1: case 6: case 14: case 27: case 33: + case 44: case 50: case 57: + entities[k].colour = 12; break; + //YELLOW + case 4: case 17: case 24: case 30: case 37: + case 45: case 51: case 55: + entities[k].colour = 9; break; + //PURPLE + case 2: case 11: case 15: case 19: case 32: + case 36: case 49: + entities[k].colour = 20; break; + //CYAN + case 8: case 10: case 13: case 18: case 26: + case 35: case 41: case 47: case 54: + entities[k].colour = 11; break; + //PINK + case 16: case 20: case 39: case 43: case 56: + entities[k].colour = 8; break; + //ORANGE + case 21: case 40: + entities[k].colour = 17; break; + default: + entities[k].colour = 6; + break; + } + } + + break; + } +} + +bool entityclass::updateentities( int i, UtilityClass& help, Game& game, musicclass& music ) +{ + if(entities[i].active) + { + if(entities[i].statedelay<=0) + { + switch(entities[i].type) + { + case 0: //Player + if (entities[i].state == 0) + { + } + break; + case 1: //Movement behaviors + //Enemies can have a number of different behaviors: + switch(entities[i].behave) + { + case 0: //Bounce, Start moving down + if (entities[i].state == 0) //Init + { + entities[i].state = 3; + updateentities(i, help, game, music); + } + else if (entities[i].state == 1) + { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + } + else if (entities[i].state == 2) + { + entities[i].vy = -entities[i].para; + entities[i].onwall = 3; + entities[i].state = 1; + } + else if (entities[i].state == 3) + { + entities[i].vy = entities[i].para; + entities[i].onwall = 2; + entities[i].state = 1; + } + break; + case 1: //Bounce, Start moving up + if (entities[i].state == 0) //Init + { + entities[i].state = 2; + updateentities(i, help, game, music); + } + else if (entities[i].state == 1) + { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + } + else if (entities[i].state == 2) + { + entities[i].vy = -entities[i].para; + entities[i].onwall = 3; + entities[i].state = 1; + } + else if (entities[i].state == 3) + { + entities[i].vy = entities[i].para; + entities[i].onwall = 2; + entities[i].state = 1; + } + break; + case 2: //Bounce, Start moving left + if (entities[i].state == 0) //Init + { + entities[i].state = 3; + updateentities(i, help, game, music); + } + else if (entities[i].state == 1) + { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + } + else if (entities[i].state == 2) + { + entities[i].vx = entities[i].para; + entities[i].onwall = 3; + entities[i].state = 1; + } + else if (entities[i].state == 3) + { + entities[i].vx = -entities[i].para; + entities[i].onwall = 2; + entities[i].state = 1; + } + break; + case 3: //Bounce, Start moving right + if (entities[i].state == 0) //Init + { + entities[i].state = 3; + updateentities(i, help, game, music); + } + else if (entities[i].state == 1) + { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + } + else if (entities[i].state == 2) + { + entities[i].vx = -entities[i].para; + entities[i].onwall = 3; + entities[i].state = 1; + } + else if (entities[i].state == 3) + { + entities[i].vx = entities[i].para; + entities[i].onwall = 2; + entities[i].state = 1; + } + break; + case 4: //Always move left + if (entities[i].state == 0) //Init + { + entities[i].vx = entities[i].para; + } + break; + case 5: //Always move right + if (entities[i].state == 0) + { + //Init + entities[i].vx = static_cast(entities[i].para); + entities[i].state = 1; + entities[i].onwall = 2; + } + else if (entities[i].state == 2) + { + entities[i].vx = 0; + entities[i].onwall = 0; + entities[i].xp -= static_cast(entities[i].para); + entities[i].statedelay=8; + entities[i].state=0; + } + break; + case 6: //Always move up + if (entities[i].state == 0) //Init + { + entities[i].vy = static_cast(entities[i].para); + entities[i].state = 1; + entities[i].onwall = 2; + } + else if (entities[i].state == 2) + { + entities[i].vy = static_cast(-entities[i].para); + entities[i].onwall = 0; + entities[i].yp -= (entities[i].para); + entities[i].statedelay=8; + entities[i].state=0; + } + break; + case 7: //Always move down + if (entities[i].state == 0) //Init + { + entities[i].vx = static_cast(entities[i].para); + } + break; + case 8: + case 9: + //Threadmill: don't move, just impart velocity + if (entities[i].state == 0) //Init + { + entities[i].vx = 0; + entities[i].state = 1; + entities[i].onwall = 0; + } + break; + case 10: + //Emitter: shoot an enemy every so often + if (entities[i].state == 0) + { + createentity(game, entities[i].xp+28, entities[i].yp, 1, 10, 1); + entities[i].state = 1; + entities[i].statedelay = 12; + } + else if (entities[i].state == 1) + { + entities[i].state = 0; + } + break; + case 11: //Always move right, destroy when outside screen + if (entities[i].state == 0) //Init + { + entities[i].vx = entities[i].para; + entities[i].state = 1; + } + else if (entities[i].state == 1) + { + if (entities[i].xp >= 335) entities[i].active = false; + if (game.roomx == 117) + { + if (entities[i].xp >= (33*8)-32) entities[i].active = false; + //collector for LIES + } + } + break; + case 12: + //Emitter: shoot an enemy every so often (up) + if (entities[i].state == 0) + { + createentity(game, entities[i].xp, entities[i].yp, 1, 12, 1); + entities[i].state = 1; + entities[i].statedelay = 16; + } + else if (entities[i].state == 1) + { + entities[i].state = 0; + } + break; + case 13: //Always move up, destroy when outside screen + if (entities[i].state == 0) //Init + { + entities[i].vy = entities[i].para; + entities[i].state = 1; + } + else if (entities[i].state == 1) + { + if (entities[i].yp <= -60) entities[i].active = false; + if (game.roomy == 108) + { + if (entities[i].yp <= 60) entities[i].active = false; + //collector for factory + } + } + break; + case 14: //Very special hack: as two, but doesn't move in specific circumstances + if (entities[i].state == 0) //Init + { + for (int j = 0; j < nentity; j++) + { + if (entities[j].type == 2 && entities[j].state== 3 && entities[j].xp == (entities[i].xp-32) ) + { + entities[i].state = 3; + updateentities(i, help, game, music); + } + } + } + else if (entities[i].state == 1) + { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + } + else if (entities[i].state == 2) + { + entities[i].vx = entities[i].para; + entities[i].onwall = 3; + entities[i].state = 1; + } + else if (entities[i].state == 3) + { + entities[i].vx = -entities[i].para; + entities[i].onwall = 2; + entities[i].state = 1; + } + break; + case 15: //As above, but for 3! + if (entities[i].state == 0) //Init + { + for (int j = 0; j < nentity; j++) + { + if (entities[j].type == 2 && entities[j].state==3 && entities[j].xp==entities[i].xp+32) + { + entities[i].state = 3; + updateentities(i, help, game, music); + } + } + } + else if (entities[i].state == 1) + { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + } + else if (entities[i].state == 2) + { + entities[i].vx = -entities[i].para; + entities[i].onwall = 3; + entities[i].state = 1; + } + else if (entities[i].state == 3) + { + entities[i].vx = entities[i].para; + entities[i].onwall = 2; + entities[i].state = 1; + } + break; + case 16: //MAVERICK BUS FOLLOWS HIS OWN RULES + if (entities[i].state == 0) //Init + { + //first, y position + if (entities[getplayer()].yp > 14 * 8) + { + entities[i].tile = 120; + entities[i].yp = (28*8)-62; + } + else + { + entities[i].tile = 96; + entities[i].yp = 24; + } + //now, x position + if (entities[getplayer()].xp > 20 * 8) + { + //approach from the left + entities[i].xp = -64; + entities[i].state = 2; + updateentities(i, help, game, music); //right + } + else + { + //approach from the left + entities[i].xp = 320; + entities[i].state = 3; + updateentities(i, help, game, music); //left + } + + } + else if (entities[i].state == 1) + { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + } + else if (entities[i].state == 2) + { + entities[i].vx = int(entities[i].para); + entities[i].onwall = 3; + entities[i].state = 1; + } + else if (entities[i].state == 3) + { + entities[i].vx = int(-entities[i].para); + entities[i].onwall = 2; + entities[i].state = 1; + } + break; + case 17: //Special for ASCII Snake (left) + if (entities[i].state == 0) //Init + { + entities[i].statedelay = 6; + entities[i].xp -= int(entities[i].para); + } + break; + case 18: //Special for ASCII Snake (right) + if (entities[i].state == 0) //Init + { + entities[i].statedelay = 6; + entities[i].xp += int(entities[i].para); + } + break; + } + break; + case 2: //Disappearing platforms + //wait for collision + if (entities[i].state == 1) + { + entities[i].life = 12; + entities[i].state = 2; + entities[i].onentity = 0; + + music.playef(7,10); + } + else if (entities[i].state == 2) + { + entities[i].life--; + if (entities[i].life % 3 == 0) entities[i].tile++; + if (entities[i].life <= 0) + { + removeblockat(entities[i].xp, entities[i].yp); + entities[i].state = 3;// = false; + entities[i].invis = true; + } + } + else if (entities[i].state == 3) + { + //wait until recharged! + } + else if (entities[i].state == 4) + { + //restart! + createblock(0, entities[i].xp, entities[i].yp, 32, 8); + entities[i].state = 4; + entities[i].invis = false; + entities[i].tile--; + entities[i].state++; + entities[i].onentity = 1; + } + else if (entities[i].state == 5) + { + entities[i].life+=3; + if (entities[i].life % 3 == 0) entities[i].tile--; + if (entities[i].life >= 12) + { + entities[i].life = 12; + entities[i].state = 0; + entities[i].tile++; + } + } + break; + case 3: //Breakable blocks + //Only counts if vy of player entity is non zero + if (entities[i].state == 1) + { + // int j = getplayer(); + //if (entities[j].vy > 0.5 && (entities[j].yp+entities[j].h<=entities[i].yp+6)) { + entities[i].life = 4; + entities[i].state = 2; + entities[i].onentity = 0; + music.playef(6,10); + /*}else if (entities[j].vy <= -0.5 && (entities[j].yp>=entities[i].yp+2)) { + entities[i].life = 4; + entities[i].state = 2; entities[i].onentity = 0; + }else { + entities[i].state = 0; + }*/ + } + else if (entities[i].state == 2) + { + entities[i].life--; + entities[i].tile++; + if (entities[i].life <= 0) + { + removeblockat(entities[i].xp, entities[i].yp); + entities[i].active = false; + } + } + break; + case 4: //Gravity token + //wait for collision + if (entities[i].state == 1) + { + entities[i].active = false; + game.gravitycontrol = (game.gravitycontrol + 1) % 2; + + } + break; + case 5: //Particle sprays + if (entities[i].state == 0) + { + entities[i].life--; + if (entities[i].life < 0) entities[i].active = false; + } + break; + case 6: //Small pickup + //wait for collision + if (entities[i].state == 1) + { + game.coins++; + music.playef(4,10); + collect[entities[i].para] = 1; + + entities[i].active = false; + } + break; + case 7: //Found a trinket + //wait for collision + if (entities[i].state == 1) + { + game.trinkets++; + if (game.intimetrial) + { + collect[entities[i].para] = 1; + music.playef(25,10); + } + else + { + game.state = 1000; + //music.haltdasmusik(); + if(music.currentsong!=-1) music.silencedasmusik(); + music.playef(3,10); + collect[entities[i].para] = 1; + if (game.trinkets > game.stat_trinkets) + { + game.stat_trinkets = game.trinkets; + } + } + + entities[i].active = false; + } + break; + case 8: //Savepoints + //wait for collision + if (entities[i].state == 1) + { + //First, deactivate all other savepoints + for (int j = 0; j < nentity; j++) + { + if (entities[j].type == 8 && entities[j].active) + { + entities[j].colour = 4; + entities[j].onentity = 1; + } + } + entities[i].colour = 5; + entities[i].onentity = 0; + game.savepoint = entities[i].para; + music.playef(5,10); + + game.savex = entities[i].xp - 4; + + if (entities[i].tile == 20) + { + game.savey = entities[i].yp - 1; + game.savegc = 1; + } + else if (entities[i].tile == 21) + { + game.savey = entities[i].yp-8; + game.savegc = 0; + } + + game.saverx = game.roomx; + game.savery = game.roomy; + game.savedir = entities[getplayer()].dir; + entities[i].state = 0; + } + break; + case 9: //Gravity Lines + if (entities[i].state == 1) + { + entities[i].life--; + entities[i].onentity = 0; + + if (entities[i].life <= 0) + { + entities[i].state = 0; + entities[i].onentity = 1; + } + } + break; + case 10: //Vertical gravity Lines + if (entities[i].state == 1) + { + entities[i].onentity = 3; + entities[i].state = 2; + + + music.playef(8,10); + game.gravitycontrol = (game.gravitycontrol + 1) % 2; + game.totalflips++; + temp = getplayer(); + if (game.gravitycontrol == 0) + { + if (entities[temp].vy < 3) entities[temp].vy = 3; + } + else + { + if (entities[temp].vy > -3) entities[temp].vy = -3; + } + } + else if (entities[i].state == 2) + { + entities[i].life--; + if (entities[i].life <= 0) + { + entities[i].state = 0; + entities[i].onentity = 1; + } + } + else if (entities[i].state == 3) + { + entities[i].state = 2; + entities[i].life = 4; + entities[i].onentity = 3; + } + else if (entities[i].state == 4) + { + //Special case for room initilisations: As state one, except without the reversal + entities[i].onentity = 3; + entities[i].state = 2; + } + break; + case 11: //Warp point + //wait for collision + if (entities[i].state == 1) + { + //Depending on the room the warp point is in, teleport to a new location! + entities[i].onentity = 0; + //play a sound or somefink + music.playef(10); + game.teleport = true; + + game.edteleportent = i; + //for the multiple room: + if (int(entities[i].xp) == 12*8) game.teleportxpos = 1; + if (int(entities[i].xp) == 5*8) game.teleportxpos = 2; + if (int(entities[i].xp) == 28*8) game.teleportxpos = 3; + if (int(entities[i].xp) == 21*8) game.teleportxpos = 4; + } + break; + case 12: //Crew member + //Somewhat complex AI: exactly what they do depends on room, location, state etc + //At state 0, do nothing at all. + if (entities[i].state == 1) + { + //happy! + if (entities[k].rule == 6) entities[k].tile = 0; + if (entities[k].rule == 7) entities[k].tile = 6; + //Stay close to the hero! + int j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + + //Special rules: + if (game.roomx == 110 && game.roomy == 105) + { + if (entities[i].xp < 155) + { + if (entities[i].ax < 0) entities[i].ax = 0; + } + } + } + else if (entities[i].state == 2) + { + //Basic rules, don't change expression + int j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + } + else if (entities[i].state == 10) + { + //Everything from 10 on is for cutscenes + //Basic rules, don't change expression + int j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + } + else if (entities[i].state == 11) + { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + int j=getcrewman(1); //purple + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + } + else if (entities[i].state == 12) + { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + int j=getcrewman(2); //yellow + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + } + else if (entities[i].state == 13) + { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + int j=getcrewman(3); //red + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + } + else if (entities[i].state == 14) + { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + int j=getcrewman(4); //green + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + } + else if (entities[i].state == 15) + { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + int j=getcrewman(5); //blue + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + } + else if (entities[i].state == 16) + { + //Follow a position: given an x coordinate, seek it out. + if (entities[i].para > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[i].para < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[i].para > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[i].para < entities[i].xp - 45) + { + entities[i].ax = -3; + } + } + else if (entities[i].state == 17) + { + //stand still + } + else if (entities[i].state == 18) + { + //Stand still and face the player + int j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + } + else if (entities[i].state == 19) + { + //Walk right off the screen after time t + if (entities[i].para <= 0) + { + entities[i].dir = 1; + entities[i].ax = 3; + } + else + { + entities[i].para--; + } + } + else if (entities[i].state == 20) + { + //Panic! For briefing script + if (entities[i].life == 0) + { + //walk left for a bit + entities[i].ax = 0; + if (40 > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (40 < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (40 > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (40 < entities[i].xp - 45) + { + entities[i].ax = -3; + } + if ( (entities[i].ax) == 0) + { + entities[i].life = 1; + entities[i].para = 30; + } + } + else if (entities[i].life == 1) + { + //Stand around for a bit + entities[i].para--; + if (entities[i].para <= 0) + { + entities[i].life++; + } + } + else if (entities[i].life == 2) + { + //walk right for a bit + entities[i].ax = 0; + if (280 > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (280 < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (280 > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (280 < entities[i].xp - 45) + { + entities[i].ax = -3; + } + if ( (entities[i].ax) == 0) + { + entities[i].life = 3; + entities[i].para = 30; + } + } + else if (entities[i].life == 3) + { + //Stand around for a bit + entities[i].para--; + if (entities[i].para <= 0) + { + entities[i].life=0; + } + } + } + break; + case 13: //Terminals (very similar to savepoints) + //wait for collision + if (entities[i].state == 1) + { + entities[i].colour = 5; + entities[i].onentity = 0; + music.playef(17,10); + + entities[i].state = 0; + } + break; + case 14: //Super Crew member + //Actually needs less complex AI than the scripting crewmember + if (entities[i].state == 0) + { + //follow player, but only if he's on the floor! + int j = getplayer(); + if(entities[j].onground>0) + { + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp>15 && entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + if (entities[j].xp > entities[i].xp + 45) + { + entities[i].ax = 3; + } + else if (entities[j].xp < entities[i].xp - 45) + { + entities[i].ax = -3; + } + if (entities[i].ax < 0 && entities[i].xp < 60) + { + entities[i].ax = 0; + } + } + else + { + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + + entities[i].ax = 0; + } + + if (entities[i].xp > 240) + { + entities[i].ax = 3; + entities[i].dir = 1; + } + if (entities[i].xp >= 310) + { + game.scmprogress++; + entities[i].active = false; + } + } + break; + case 15: //Trophy + //wait for collision + if (entities[i].state == 1) + { + trophytext+=2; + if (trophytext > 30) trophytext = 30; + trophytype = entities[i].para; + + entities[i].state = 0; + } + break; + case 23: + //swn game! + switch(entities[i].behave) + { + case 0: + if (entities[i].state == 0) //Init + { + entities[i].vx = 7; + if (entities[i].xp > 320) entities[i].active = false; + } + break; + case 1: + if (entities[i].state == 0) //Init + { + entities[i].vx = -7; + if (entities[i].xp <-20) entities[i].active = false; + } + break; + } + break; + + case 51: //Vertical warp line + if (entities[i].state == 2){ + int j=getplayer(); + if(entities[j].xp<=307){ + customwarpmodevon=false; + entities[i].state = 0; + } + }else if (entities[i].state == 1) + { + entities[i].state = 2; + entities[i].statedelay = 2; + entities[i].onentity = 1; + customwarpmodevon=true; + } + break; + case 52: //Vertical warp line + if (entities[i].state == 2){ + int j=getplayer(); + if(entities[j].xp<=307){ + customwarpmodevon=false; + entities[i].state = 0; + } + }else if (entities[i].state == 1) + { + entities[i].state = 2; + entities[i].statedelay = 2; + entities[i].onentity = 1; + customwarpmodevon=true; + } + break; + case 53: //Warp lines Horizonal + if (entities[i].state == 2){ + customwarpmodehon=false; + entities[i].state = 0; + }else if (entities[i].state == 1) + { + entities[i].state = 2; + entities[i].statedelay = 2; + entities[i].onentity = 1; + customwarpmodehon=true; + } + break; + case 54: //Warp lines Horizonal + if (entities[i].state == 2){ + customwarpmodehon=false; + entities[i].state = 0; + }else if (entities[i].state == 1) + { + entities[i].state = 2; + entities[i].statedelay = 2; + entities[i].onentity = 1; + customwarpmodehon=true; + } + break; + case 55: //Collectable crewmate + //wait for collision + if (entities[i].state == 0) + { + //Basic rules, don't change expression + int j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) + { + entities[i].dir = 1; + } + else if (entities[j].xp < entities[i].xp - 5) + { + entities[i].dir = 0; + } + } + else if (entities[i].state == 1) + { + game.crewmates++; + if (game.intimetrial) + { + customcollect[entities[i].para] = 1; + music.playef(27,10); + } + else + { + game.state = 1010; + //music.haltdasmusik(); + if(music.currentsong!=-1) music.silencedasmusik(); + music.playef(27,10); + customcollect[entities[i].para] = 1; + } + + entities[i].active = false; + } + break; + case 100: //The teleporter + if (entities[i].state == 1) + { + //if inactive, activate! + if (entities[i].tile == 1) + { + music.playef(18, 10); + entities[i].onentity = 0; + entities[i].tile = 2; + entities[i].colour = 101; + if(!game.intimetrial && !game.nodeathmode) + { + game.state = 2000; + game.statedelay = 0; + } + + game.activetele = true; + game.teleblock.x = entities[i].xp - 32; + game.teleblock.y = entities[i].yp - 32; + game.teleblock.w = 160; + game.teleblock.h = 160; + + + //Alright, let's set this as our savepoint too + //First, deactivate all other savepoints + for (int j = 0; j < nentity; j++) + { + if (entities[j].type == 8 && entities[j].active) + { + entities[j].colour = 4; + entities[j].onentity = 1; + } + } + game.savepoint = static_cast(entities[i].para); + game.savex = entities[i].xp + 44; + game.savey = entities[i].yp + 44; + game.savegc = 0; + + game.saverx = game.roomx; + game.savery = game.roomy; + game.savedir = entities[getplayer()].dir; + entities[i].state = 0; + } + + entities[i].state = 0; + } + else if (entities[i].state == 2) + { + //Initilise the teleporter without changing the game state or playing sound + entities[i].onentity = 0; + entities[i].tile = 6; + entities[i].colour = 102; + + game.activetele = true; + game.teleblock.x = entities[i].xp - 32; + game.teleblock.y = entities[i].yp - 32; + game.teleblock.w = 160; + game.teleblock.h = 160; + + entities[i].state = 0; + } + break; + } + } + else + { + entities[i].statedelay--; + if (entities[i].statedelay < 0) + { + entities[i].statedelay = 0; + } + } + } + + return true; +} + +void entityclass::animateentities( int _i, Game& game, UtilityClass& help ) +{ + if(entities[_i].active) + { + if(entities[_i].statedelay < 1) + { + switch(entities[_i].type) + { + case 0: + entities[_i].framedelay--; + if(entities[_i].dir==1) + { + entities[_i].drawframe=entities[_i].tile; + } + else + { + entities[_i].drawframe=entities[_i].tile+3; + } + + if(entities[_i].onground>0 || entities[_i].onroof>0) + { + if(entities[_i].vx > 0.00f || entities[_i].vx < -0.00f) + { + //Walking + if(entities[_i].framedelay<=1) + { + entities[_i].framedelay=4; + entities[_i].walkingframe++; + } + if (entities[_i].walkingframe >=2) entities[_i].walkingframe=0; + entities[_i].drawframe += entities[_i].walkingframe + 1; + } + + if (entities[_i].onroof > 0) entities[_i].drawframe += 6; + } + else + { + entities[_i].drawframe ++; + if (game.gravitycontrol == 1) + { + entities[_i].drawframe += 6; + } + } + + if (game.deathseq > -1) + { + entities[_i].drawframe=13; + if (entities[_i].dir == 1) entities[_i].drawframe = 12; + if (game.gravitycontrol == 1) entities[_i].drawframe += 2; + } + break; + case 1: + case 23: + //Variable animation + switch(entities[_i].animate) + { + case 0: + //Simple oscilation + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 8; + if(entities[_i].actionframe==0) + { + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 4) + { + entities[_i].walkingframe = 2; + entities[_i].actionframe = 1; + } + } + else + { + entities[_i].walkingframe--; + if (entities[_i].walkingframe == -1) + { + entities[_i].walkingframe = 1; + entities[_i].actionframe = 0; + } + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + break; + case 1: + //Simple Loop + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 8; + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 4) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + break; + case 2: + //Simpler Loop (just two frames) + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 2; + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 2) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + break; + case 3: + //Simpler Loop (just two frames, but double sized) + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 2; + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 2) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += (entities[_i].walkingframe*2); + break; + case 4: + //Simpler Loop (just two frames, but double sized) (as above but slower) + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 6; + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 2) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += (entities[_i].walkingframe*2); + break; + case 5: + //Simpler Loop (just two frames) (slower) + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 6; + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 2) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + break; + case 6: + //Normal Loop (four frames, double sized) + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 4; + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 4) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += (entities[_i].walkingframe*2); + break; + case 7: + //Simpler Loop (just two frames) (slower) (with directions!) + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 6; + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 2) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + + if (entities[_i].vx > 0.000f ) entities[_i].drawframe += 2; + break; + case 10: + //Threadmill left + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 3;//(6-entities[_i].para); + entities[_i].walkingframe--; + if (entities[_i].walkingframe == -1) + { + entities[_i].walkingframe = 3; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + break; + case 11: + //Threadmill right + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 3;//(6-entities[_i].para); + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 4) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + break; + case 100: + //Simple case for no animation (platforms, etc) + entities[_i].drawframe = entities[_i].tile; + break; + default: + entities[_i].drawframe = entities[_i].tile; + break; + } + break; + case 11: + entities[_i].drawframe = entities[_i].tile; + if(entities[_i].animate==2) + { + //Simpler Loop (just two frames) + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 10; + entities[_i].walkingframe++; + if (entities[_i].walkingframe == 2) + { + entities[_i].walkingframe = 0; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + } + break; + case 12: + case 55: + case 14: //Crew member! Very similar to hero + entities[_i].framedelay--; + if(entities[_i].dir==1) + { + entities[_i].drawframe=entities[_i].tile; + } + else + { + entities[_i].drawframe=entities[_i].tile+3; + } + + if(entities[_i].onground>0 || entities[_i].onroof>0) + { + if(entities[_i].vx > 0.0000f || entities[_i].vx < -0.000f) + { + //Walking + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay=4; + entities[_i].walkingframe++; + } + if (entities[_i].walkingframe >=2) entities[_i].walkingframe=0; + entities[_i].drawframe += entities[_i].walkingframe + 1; + } + + //if (entities[_i].onroof > 0) entities[_i].drawframe += 6; + } + else + { + entities[_i].drawframe ++; + //if (game.gravitycontrol == 1) { + // entities[_i].drawframe += 6; + //} + } + + if (game.deathseq > -1) + { + entities[_i].drawframe=13; + if (entities[_i].dir == 1) entities[_i].drawframe = 12; + if (entities[_i].rule == 7) entities[_i].drawframe += 2; + //if (game.gravitycontrol == 1) entities[_i].drawframe += 2; + } + break; + case 100: //the teleporter! + if (entities[_i].tile == 1) + { + //it's inactive + entities[_i].drawframe = entities[_i].tile; + } + else if (entities[_i].tile == 2) + { + entities[_i].drawframe = entities[_i].tile; + + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 1; + entities[_i].walkingframe = int(fRandom() * 6); + if (entities[_i].walkingframe >= 4) + { + entities[_i].walkingframe = -1; + entities[_i].framedelay = 4; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + } + else if (entities[_i].tile == 6) + { + //faster! + entities[_i].drawframe = entities[_i].tile; + + entities[_i].framedelay--; + if(entities[_i].framedelay<=0) + { + entities[_i].framedelay = 2; + entities[_i].walkingframe = int(fRandom() * 6); + if (entities[_i].walkingframe >= 4) + { + entities[_i].walkingframe = -5; + entities[_i].framedelay = 4; + } + } + + entities[_i].drawframe = entities[_i].tile; + entities[_i].drawframe += entities[_i].walkingframe; + } + break; + default: + entities[_i].drawframe = entities[_i].tile; + break; + } + } + else + { + //entities[_i].statedelay--; + if (entities[_i].statedelay < 0) entities[_i].statedelay = 0; + } + } +} + +bool entityclass::gettype( int t ) +{ + //Returns true is there is an entity of type t onscreen + for (int i = 0; i < nentity; i++) + { + if(entities[i].type==t) + { + return true; + } + } + + return false; +} + +int entityclass::getcompanion( int t ) +{ + //Returns the index of the companion with rule t + for (int i = 0; i < nentity; i++) + { + if(entities[i].rule==6 || entities[i].rule==7) + { + return i; + } + } + + return -1; +} + +int entityclass::getplayer() +{ + //Returns the index of the first player entity + for (int i = 0; i < nentity; i++) + { + if(entities[i].type==0) + { + return i; + } + } + + return -1; +} + +int entityclass::getscm() +{ + //Returns the supercrewmate + for (int i = 0; i < nentity; i++) + { + if(entities[i].type==14) + { + return i; + } + } + + return 0; +} + +int entityclass::getlineat( int t ) +{ + //Get the entity which is a horizontal line at height t (for SWN game) + for (int i = 0; i < nentity; i++) + { + if (entities[i].size == 5) + { + if (entities[i].yp == t) + { + return i; + } + } + } + + return 0; +} + +int entityclass::getcrewman( int t ) +{ + //Returns the index of the crewman with colour index given by t + if (t == 0) t = 0; + if (t == 1) t = 20; + if (t == 2) t = 14; + if (t == 3) t = 15; + if (t == 4) t = 13; + if (t == 5) t = 16; + + for (int i = 0; i < nentity; i++) + { + if (entities[i].rule == 6 || entities[i].rule == 7) + { + if(entities[i].colour==t) + { + return i; + } + } + } + + return 0; +} + +int entityclass::getcustomcrewman( int t ) +{ + //Returns the index of the crewman with colour index given by t + if (t == 0) t = 0; + if (t == 1) t = 20; + if (t == 2) t = 14; + if (t == 3) t = 15; + if (t == 4) t = 13; + if (t == 5) t = 16; + + for (int i = 0; i < nentity; i++) + { + if (entities[i].type == 55) + { + if(entities[i].colour==t) + { + return i; + } + } + } + + return 0; +} + +int entityclass::getteleporter() +{ + for (int i = 0; i < nentity; i++) + { + if(entities[i].type==100 && entities[i].active) + { + return i; + } + } + + return -1; +} + +void entityclass::rectset( int xi, int yi, int wi, int hi ) +{ + temprect.x = xi; + temprect.y = yi; + temprect.w = wi; + temprect.h = hi; +} + +void entityclass::rect2set( int xi, int yi, int wi, int hi ) +{ + temprect2.x = xi; + temprect2.y = yi; + temprect2.w = wi; + temprect2.h = hi; +} + +bool entityclass::entitycollide( int a, int b ) +{ + //Do entities a and b collide? + tempx = entities[a].xp + entities[a].cx; + tempy = entities[a].yp + entities[a].cy; + tempw = entities[a].w; + temph = entities[a].h; + rectset(tempx, tempy, tempw, temph); + + tempx = entities[b].xp + entities[b].cx; + tempy = entities[b].yp + entities[b].cy; + tempw = entities[b].w; + temph = entities[b].h; + rect2set(tempx, tempy, tempw, temph); + + if (UtilityClass::intersects(temprect, temprect2)) return true; + return false; +} + +bool entityclass::checkdirectional( int t ) +{ + //Returns true if player entity (rule 0) moving in dir t through directional block + for(int i=0; i < nentity; i++) + { + if(entities[i].rule==0) + { + tempx = entities[i].xp + entities[i].cx; + tempy = entities[i].yp + entities[i].cy; + tempw = entities[i].w; + temph = entities[i].h; + rectset(tempx, tempy, tempw, temph); + + for (int j=0; j 0 && blocks[i].trigger == 0) if (UtilityClass::intersects(blocks[i].rect, temprect)) return true; + if (dy <= 0 && blocks[i].trigger == 1) if (UtilityClass::intersects(blocks[i].rect, temprect)) return true; + if (dx > 0 && blocks[i].trigger == 2) if (UtilityClass::intersects(blocks[i].rect, temprect)) return true; + if (dx <= 0 && blocks[i].trigger == 3) if (UtilityClass::intersects(blocks[i].rect, temprect)) return true; + } + } + if (blocks[i].type == BLOCK) + { + if (UtilityClass::intersects(blocks[i].rect, temprect)) + { + return true; + } + } + if (blocks[i].type == SAFE) + { + if( (dr)==1) + { + if (UtilityClass::intersects(blocks[i].rect, temprect)) + { + return true; + } + } + } + } + } + return false; +} + +bool entityclass::checkwall( mapclass& map ) +{ + //Returns true if entity setup in temprect collides with a wall + //used for proper collision functions; you can't just, like, call it + //whenever you feel like it and expect a response + // + //that won't work at all + if(skipblocks) + { + if (checkblocks()) return true; + } + + tempx = getgridpoint(temprect.x); + tempy = getgridpoint(temprect.y); + tempw = getgridpoint(temprect.x + temprect.w - 1); + temph = getgridpoint(temprect.y + temprect.h - 1); + if (map.collide(tempx, tempy)) return true; + if (map.collide(tempw, tempy)) return true; + if (map.collide(tempx, temph)) return true; + if (map.collide(tempw, temph)) return true; + if (temprect.h >= 12) + { + tpy1 = getgridpoint(temprect.y + 6); + if (map.collide(tempx, tpy1)) return true; + if (map.collide(tempw, tpy1)) return true; + if (temprect.h >= 18) + { + tpy1 = getgridpoint(temprect.y + 12); + if (map.collide(tempx, tpy1)) return true; + if (map.collide(tempw, tpy1)) return true; + if (temprect.h >= 24) + { + tpy1 = getgridpoint(temprect.y + 18); + if (map.collide(tempx, tpy1)) return true; + if (map.collide(tempw, tpy1)) return true; + } + } + } + if (temprect.w >= 12) + { + tpx1 = getgridpoint(temprect.x + 6); + if (map.collide(tpx1, tempy)) return true; + if (map.collide(tpx1, temph)) return true; + } + return false; +} + +float entityclass::hplatformat() +{ + //Returns first entity of horizontal platform at (px, py), -1000 otherwise. + for (int i = 0; i < nentity; i++) + { + if (entities[i].active) + { + if (entities[i].rule == 2) + { + if (entities[i].behave >= 2) + { + if (entities[i].xp == px && entities[i].yp == py) + { + if (entities[i].behave == 8) //threadmill! + { + return entities[i].para; + } + else if(entities[i].behave == 9) //threadmill! + { + return -entities[i].para; + } + else + { + return entities[i].vx; + } + } + } + } + } + } + return -1000; +} + +int entityclass::yline( int a, int b ) +{ + if (a < b) return -1; + return 1; +} + +bool entityclass::entityhlinecollide( int t, int l ) +{ + //Returns true is entity t collided with the horizontal line l. + if(entities[t].xp + entities[t].cx+entities[t].w>=entities[l].xp) + { + if(entities[t].xp + entities[t].cx<=entities[l].xp+entities[l].w) + { + linetemp = 0; + + linetemp += yline(entities[t].yp, entities[l].yp); + linetemp += yline(entities[t].yp + entities[t].h, entities[l].yp); + linetemp += yline(entities[t].oldyp, entities[l].yp); + linetemp += yline(entities[t].oldyp + entities[t].h, entities[l].yp); + + if (linetemp > -4 && linetemp < 4) return true; + return false; + } + } + return false; +} + +bool entityclass::entityvlinecollide( int t, int l ) +{ + //Returns true is entity t collided with the vertical line l. + if(entities[t].yp + entities[t].cy+entities[t].h>=entities[l].yp) + { + if(entities[t].yp + entities[t].cy<=entities[l].yp+entities[l].h) + { + linetemp = 0; + + linetemp += yline(entities[t].xp + entities[t].cx+1, entities[l].xp); + linetemp += yline(entities[t].xp + entities[t].cx+1 + entities[t].w, entities[l].xp); + linetemp += yline(entities[t].oldxp + entities[t].cx+1, entities[l].xp); + linetemp += yline(entities[t].oldxp + entities[t].cx+1 + entities[t].w, entities[l].xp); + + if (linetemp > -4 && linetemp < 4) return true; + return false; + } + } + return false; +} + +bool entityclass::entitywarphlinecollide(int t, int l) { + //Returns true is entity t collided with the horizontal line l. + if(entities[t].xp + entities[t].cx+entities[t].w>=entities[l].xp){ + if(entities[t].xp + entities[t].cx<=entities[l].xp+entities[l].w){ + linetemp = 0; + if (entities[l].yp < 120) { + //Top line + if (entities[t].vy < 0) { + if (entities[t].yp < entities[l].yp + 10) linetemp++; + if (entities[t].yp + entities[t].h < entities[l].yp + 10) linetemp++; + if (entities[t].oldyp < entities[l].yp + 10) linetemp++; + if (entities[t].oldyp + entities[t].h < entities[l].yp + 10) linetemp++; + } + + if (linetemp > 0) return true; + return false; + }else { + //Bottom line + if (entities[t].vy > 0) { + if (entities[t].yp > entities[l].yp - 10) linetemp++; + if (entities[t].yp + entities[t].h > entities[l].yp - 10) linetemp++; + if (entities[t].oldyp > entities[l].yp - 10) linetemp++; + if (entities[t].oldyp + entities[t].h > entities[l].yp - 10) linetemp++; + } + + if (linetemp > 0) return true; + return false; + } + } + } + return false; +} + +bool entityclass::entitywarpvlinecollide(int t, int l) { + //Returns true is entity t collided with the vertical warp line l. + if(entities[t].yp + entities[t].cy+entities[t].h>=entities[l].yp){ + if (entities[t].yp + entities[t].cy <= entities[l].yp + entities[l].h) { + linetemp = 0; + if (entities[l].xp < 160) { + //Left hand line + if (entities[t].xp + entities[t].cx + 1 < entities[l].xp + 10) linetemp++; + if (entities[t].xp + entities[t].cx+1 + entities[t].w < entities[l].xp + 10) linetemp++; + if (entities[t].oldxp + entities[t].cx + 1 < entities[l].xp + 10) linetemp++; + if (entities[t].oldxp + entities[t].cx + 1 + entities[t].w < entities[l].xp + 10) linetemp++; + + if (linetemp > 0) return true; + return false; + }else { + //Right hand line + if (entities[t].xp + entities[t].cx + 1 > entities[l].xp - 10) linetemp++; + if (entities[t].xp + entities[t].cx+1 + entities[t].w > entities[l].xp - 10) linetemp++; + if (entities[t].oldxp + entities[t].cx + 1 > entities[l].xp - 10) linetemp++; + if (entities[t].oldxp + entities[t].cx + 1 + entities[t].w > entities[l].xp - 10) linetemp++; + + if (linetemp > 0) return true; + return false; + } + } + } + return false; +} + +float entityclass::entitycollideplatformroof( mapclass& map, int t ) +{ + tempx = entities[t].xp + entities[t].cx; + tempy = entities[t].yp + entities[t].cy -1; + tempw = entities[t].w; + temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (checkplatform()) + { + //px and py now contain an x y coordinate for a platform, find it + return hplatformat(); + } + return -1000; +} + +float entityclass::entitycollideplatformfloor( mapclass& map, int t ) +{ + tempx = entities[t].xp + entities[t].cx; + tempy = entities[t].yp + entities[t].cy + 1; + tempw = entities[t].w; + temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (checkplatform()) + { + //px and py now contain an x y coordinate for a platform, find it + return hplatformat(); + } + return -1000; +} + +bool entityclass::entitycollidefloor( mapclass& map, int t ) +{ + //see? like here, for example! + tempx = entities[t].xp + entities[t].cx; + tempy = entities[t].yp + entities[t].cy + 1; + tempw = entities[t].w; + temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (checkwall(map)) return true; + return false; +} + +bool entityclass::entitycollideroof( mapclass& map, int t ) +{ + //and here! + tempx = entities[t].xp + entities[t].cx; + tempy = entities[t].yp + entities[t].cy - 1; + tempw = entities[t].w; + temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (checkwall(map)) return true; + return false; +} + +bool entityclass::testwallsx( int t, mapclass& map, int tx, int ty ) +{ + tempx = tx + entities[t].cx; + tempy = ty + entities[t].cy; + tempw = entities[t].w; + temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (entities[t].rule < 2) + { + skipblocks = true; + } + else + { + skipblocks = false; + } + if (entities[t].type == 14) skipblocks = true; + dx = 0; + dy = 0; + if (entities[t].rule == 0) dx = entities[t].vx; + dr = entities[t].rule; + + //Ok, now we check walls + if (checkwall(map)) + { + if (entities[t].vx > 1.0f) + { + entities[t].vx--; + entities[t].newxp = entities[t].xp + entities[t].vx; + return testwallsx(t, map, entities[t].newxp, entities[t].yp); + } + else if (entities[t].vx < -1.0f) + { + entities[t].vx++; + entities[t].newxp = entities[t].xp + entities[t].vx; + return testwallsx(t, map, entities[t].newxp, entities[t].yp); + } + else + { + entities[t].vx=0; + return false; + } + } + return true; +} + +bool entityclass::testwallsy( int t, mapclass& map, float tx, float ty ) +{ + tempx = static_cast(tx) + entities[t].cx; + tempy = static_cast(ty) + entities[t].cy; + tempw = entities[t].w; + temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (entities[t].rule < 2) + { + skipblocks = true; + } + else + { + skipblocks = false; + } + if (entities[t].type == 14) skipblocks = true; + + dx = 0; + dy = 0; + if (entities[t].rule == 0) dy = entities[t].vy; + dr = entities[t].rule; + + //Ok, now we check walls + if (checkwall(map)) + { + if (entities[t].vy > 1) + { + entities[t].vy--; + entities[t].newyp = int(entities[t].yp + entities[t].vy); + return testwallsy(t, map, entities[t].xp, entities[t].newyp); + } + else if (entities[t].vy < -1) + { + entities[t].vy++; + entities[t].newyp = int(entities[t].yp + entities[t].vy); + return testwallsy(t, map, entities[t].xp, entities[t].newyp); + } + else + { + entities[t].vy=0; + return false; + } + } + return true; +} + +void entityclass::fixfriction( int t, float xfix, float xrate, float yrate ) +{ + if (entities[t].vx > xfix) entities[t].vx -= xrate; + if (entities[t].vx < xfix) entities[t].vx += xrate; + if (entities[t].vy > 0) entities[t].vy -= yrate; + if (entities[t].vy < 0) entities[t].vy += yrate; + if (entities[t].vy > 10) entities[t].vy = 10; + if (entities[t].vy < -10) entities[t].vy = -10; + if (entities[t].vx > 6) entities[t].vx = 6.0f; + if (entities[t].vx < -6) entities[t].vx = -6.0f; + + if (std::abs(entities[t].vx-xfix) <= xrate) entities[t].vx = xfix; + if (std::abs(entities[t].vy) < yrate) entities[t].vy = 0; +} + +void entityclass::applyfriction( int t, float xrate, float yrate ) +{ + if (entities[t].vx > 0.00f) entities[t].vx -= xrate; + if (entities[t].vx < 0.00f) entities[t].vx += xrate; + if (entities[t].vy > 0.00f) entities[t].vy -= yrate; + if (entities[t].vy < 0.00f) entities[t].vy += yrate; + if (entities[t].vy > 10.00f) entities[t].vy = 10.0f; + if (entities[t].vy < -10.00f) entities[t].vy = -10.0f; + if (entities[t].vx > 6.00f) entities[t].vx = 6.0f; + if (entities[t].vx < -6.00f) entities[t].vx = -6.0f; + + if (std::abs(entities[t].vx) < xrate) entities[t].vx = 0.0f; + if (std::abs(entities[t].vy) < yrate) entities[t].vy = 0.0f; +} + +void entityclass::cleanup() +{ + int i = nentity - 1; + while (i >= 0 && !entities[i].active) + { + nentity--; + i--; + } +} + +void entityclass::updateentitylogic( int t, Game& game ) +{ + entities[t].oldxp = entities[t].xp; + entities[t].oldyp = entities[t].yp; + + entities[t].vx = entities[t].vx + entities[t].ax; + entities[t].vy = entities[t].vy + entities[t].ay; + entities[t].ax = 0; + + if (entities[t].gravity) + { + if (entities[t].rule == 0) + { + if(game.gravitycontrol==0) + { + entities[t].ay = 3; + } + else + { + entities[t].ay = -3; + } + } + else if (entities[t].rule == 7) + { + entities[t].ay = -3; + } + else + { + entities[t].ay = 3; + } + applyfriction(t, game.inertia, 0.25f); + } + + entities[t].newxp = entities[t].xp + entities[t].vx; + entities[t].newyp = entities[t].yp + entities[t].vy; +} + +void entityclass::entitymapcollision( int t, mapclass& map ) +{ + if (testwallsx(t, map, entities[t].newxp, entities[t].yp)) + { + entities[t].xp = entities[t].newxp; + } + else + { + if (entities[t].onwall > 0) entities[t].state = entities[t].onwall; + if (entities[t].onxwall > 0) entities[t].state = entities[t].onxwall; + } + if (testwallsy(t, map, entities[t].xp, entities[t].newyp)) + { + entities[t].yp = entities[t].newyp; + } + else + { + if (entities[t].onwall > 0) entities[t].state = entities[t].onwall; + if (entities[t].onywall > 0) entities[t].state = entities[t].onywall; + entities[t].jumpframe = 0; + } +} + +void entityclass::movingplatformfix( int t, mapclass& map ) +{ + //If this intersects the player, then we move the player along it + int j = getplayer(); + if (entitycollide(t, j)) + { + //ok, bollox, let's make sure + entities[j].yp = entities[j].yp + int(entities[j].vy); + if (entitycollide(t, j)) + { + entities[j].yp = entities[j].yp - int(entities[j].vy); + entities[j].vy = entities[t].vy; + entities[j].newyp = entities[j].yp + int(entities[j].vy); + if (testwallsy(j, map, entities[j].xp, entities[j].newyp)) + { + if (entities[t].vy > 0) + { + entities[j].yp = entities[t].yp + entities[t].h; + entities[j].vy = 0; + entities[j].onroof = true; + } + else + { + entities[j].yp = entities[t].yp - entities[j].h-entities[j].cy; + entities[j].vy = 0; + entities[j].onground = true; + } + } + else + { + entities[t].state = entities[t].onwall; + } + } + } +} + +void entityclass::scmmovingplatformfix( int t, mapclass& map ) +{ + //If this intersects the SuperCrewMate, then we move them along it + int j = getscm(); + if (entitycollide(t, j)) + { + //ok, bollox, let's make sure + entities[j].yp = entities[j].yp + (entities[j].vy); + if (entitycollide(t, j)) + { + entities[j].yp = entities[j].yp - (entities[j].vy); + entities[j].vy = entities[t].vy; + entities[j].newyp = static_cast(entities[j].yp) + entities[j].vy; + if (testwallsy(j, map, entities[j].xp, entities[j].newyp)) + { + if (entities[t].vy > 0) + { + entities[j].yp = entities[t].yp + entities[t].h; + entities[j].vy = 0; + //entities[j].onroof = true; + } + else + { + entities[j].yp = entities[t].yp - entities[j].h-entities[j].cy; + entities[j].vy = 0; + //entities[j].onground = true; + } + } + else + { + entities[t].state = entities[t].onwall; + } + } + } +} + +void entityclass::hormovingplatformfix( int t, mapclass& map ) +{ + //If this intersects the player, then we move the player along it + //for horizontal platforms, this is simplier + createblock(0, entities[t].xp, entities[t].yp, entities[t].w, entities[t].h); + /*j = getplayer(); + if (entitycollide(t, j)) { + //ok, bollox, let's make sure + entities[j].yp = entities[j].yp + entities[j].vy; + if (entitycollide(t, j)) { + //entities[t].state = entities[t].onwall; + } + }*/ +} + +void entityclass::customwarplinecheck(int i) { + //Turns on obj.customwarpmodevon and obj.customwarpmodehon if player collides + //with warp lines + + if (entities[i].active) { + //We test entity to entity + for (int j = 0; j < nentity; j++) { + if (entities[j].active && i != j) {//Active + if (entities[i].rule == 0 && entities[j].rule == 5) { //Player vs vertical line! + if (entities[j].type == 51 || entities[j].type == 52) { + if (entitywarpvlinecollide(i, j)) { + customwarpmodevon = true; + } + } + } + + if (entities[i].rule == 0 && entities[j].rule == 7){ //Player vs horizontal WARP line + if (entities[j].type == 53 || entities[j].type == 54) { + if (entitywarphlinecollide(i, j)) { + customwarpmodehon = true; + } + } + } + } + } + } +} + +void entityclass::entitycollisioncheck( Graphics& dwgfx, Game& game, mapclass& map, musicclass& music ) +{ + for (int i = 0; i < nentity; i++) + { + if (entities[i].active) + { + //We test entity to entity + for (int j = 0; j < nentity; j++) + { + if (entities[j].active && i!=j) //Active + { + if (entities[i].rule == 0 && entities[j].rule == 1 && entities[j].harmful) + { + //player i hits enemy or enemy bullet j + if (entitycollide(i, j) && !map.invincibility) + { + if (entities[i].size == 0 && (entities[j].size == 0 || entities[j].size == 12)) + { + //They're both sprites, so do a per pixel collision + colpoint1.x = entities[i].xp; + colpoint1.y = entities[i].yp; + colpoint2.x = entities[j].xp; + colpoint2.y = entities[j].yp; + if (dwgfx.flipmode) + { + if (dwgfx.Hitest(dwgfx.flipsprites[entities[i].drawframe], + colpoint1, 1, dwgfx.flipsprites[entities[j].drawframe], colpoint2, 1)) + { + //Do the collision stuff + game.deathseq = 30; + } + } + else + { + if (dwgfx.Hitest(dwgfx.sprites[entities[i].drawframe], + colpoint1, 1, dwgfx.sprites[entities[j].drawframe], colpoint2, 1) ) + { + //Do the collision stuff + game.deathseq = 30; + } + } + } + else + { + //Ok, then we just assume a normal bounding box collision + game.deathseq = 30; + } + } + } + if (entities[i].rule == 0 && entities[j].rule == 2) //Moving platforms + { + if (entitycollide(i, j)) removeblockat(entities[j].xp, entities[j].yp); + } + if (entities[i].rule == 0 && entities[j].rule == 3) //Entity to entity + { + if(entities[j].onentity>0) + { + if (entitycollide(i, j)) entities[j].state = entities[j].onentity; + } + } + if (entities[i].rule == 0 && entities[j].rule == 4) //Player vs horizontal line! + { + if(game.deathseq==-1) + { + //Here we compare the player's old position versus his new one versus the line. + //All points either be above or below it. Otherwise, there was a collision this frame. + if (entities[j].onentity > 0) + { + if (entityhlinecollide(i, j)) + { + music.playef(8,10); + game.gravitycontrol = (game.gravitycontrol + 1) % 2; + game.totalflips++; + if (game.gravitycontrol == 0) + { + if (entities[i].vy < 1) entities[i].vy = 1; + } + else + { + if (entities[i].vy > -1) entities[i].vy = -1; + } + + entities[j].state = entities[j].onentity; + entities[j].life = 6; + } + } + } + } + if (entities[i].rule == 0 && entities[j].rule == 5) //Player vs vertical line! + { + if(game.deathseq==-1) + { + if(entities[j].onentity>0) + { + if (entityvlinecollide(i, j)) + { + entities[j].state = entities[j].onentity; + entities[j].life = 4; + } + } + } + } + if (entities[i].rule == 0 && entities[j].rule == 6) //Player versus crumbly blocks! Special case + { + if (entities[j].onentity > 0) + { + //ok; only check the actual collision if they're in a close proximity + temp = entities[i].yp - entities[j].yp; + if (temp < 30 || temp > -30) + { + temp = entities[i].xp - entities[j].xp; + if (temp < 30 || temp > -30) + { + if (entitycollide(i, j)) entities[j].state = entities[j].onentity; + } + } + } + } + /* + if (entities[i].rule == 0 && entities[j].rule == 7) //Player vs horizontal WARP line + { + if(game.deathseq==-1) + { + if(entities[j].onentity>0) + { + if (entityhlinecollide(i, j)) + { + entities[j].state = entities[j].onentity; + entities[j].life = 4; + } + } + } + } + */ + if (game.supercrewmate) + { + //some extra collisions + if (entities[i].type == 14) //i is the supercrewmate + { + if (entities[j].rule == 1 && entities[j].harmful) //j is a harmful enemy + { + //player i hits enemy or enemy bullet j + if (entitycollide(i, j) && !map.invincibility) + { + if (entities[i].size == 0 && entities[j].size == 0) + { + //They're both sprites, so do a per pixel collision + colpoint1.x = entities[i].xp; + colpoint1.y = entities[i].yp; + colpoint2.x = entities[j].xp; + colpoint2.y = entities[j].yp; + if (dwgfx.flipmode) + { + if (dwgfx.Hitest(dwgfx.flipsprites[entities[i].drawframe], + colpoint1, 1, dwgfx.flipsprites[entities[j].drawframe], colpoint2, 1)) + { + //Do the collision stuff + game.deathseq = 30; + game.scmhurt = true; + } + } + else + { + if (dwgfx.Hitest(dwgfx.sprites[entities[i].drawframe], + colpoint1, 1, dwgfx.sprites[entities[j].drawframe], colpoint2, 1)) + { + //Do the collision stuff + game.deathseq = 30; + game.scmhurt = true; + } + } + } + else + { + //Ok, then we just assume a normal bounding box collision + game.deathseq = 30; + game.scmhurt = true; + } + } + } + if (entities[j].rule == 2) //Moving platforms + { + if (entitycollide(i, j)) removeblockat(entities[j].xp, entities[j].yp); + } + if (entities[j].type == 8 && entities[j].rule == 3) //Entity to entity (well, checkpoints anyway!) + { + if(entities[j].onentity>0) + { + if (entitycollide(i, j)) entities[j].state = entities[j].onentity; + } + } + } + } + } + } + } + } + + //can't have the player being stuck... + int j = getplayer(); + skipdirblocks = true; + if (!testwallsx(j, map, entities[j].xp, entities[j].yp)) + { + //Let's try to get out... + if (entities[j].rule == 0) + { + if(game.gravitycontrol==0) + { + entities[j].yp -= 3; + } + else + { + entities[j].yp += 3; + } + } + } + skipdirblocks = false; + + //Can't have the supercrewmate getting stuck either! + if (game.supercrewmate) + { + j = getscm(); + skipdirblocks = true; + if (!testwallsx(j, map, entities[j].xp, entities[j].yp)) + { + //Let's try to get out... + if(game.gravitycontrol==0) + { + entities[j].yp -= 3; + } + else + { + entities[j].yp += 3; + } + } + skipdirblocks = false; + } + + //Is the player colliding with any damageblocks? + if (checkdamage() && !map.invincibility) + { + //usual player dead stuff + game.deathseq = 30; + } + + //how about the supercrewmate? + if (game.supercrewmate) + { + if (scmcheckdamage() && !map.invincibility) + { + //usual player dead stuff + game.scmhurt = true; + game.deathseq = 30; + } + } + + activetrigger = -1; + if (checktrigger() > -1) + { + game.state = activetrigger; + game.statedelay = 0; + } +} diff --git a/desktop_version/src/Entity.h b/desktop_version/src/Entity.h new file mode 100644 index 00000000..c25098c7 --- /dev/null +++ b/desktop_version/src/Entity.h @@ -0,0 +1,245 @@ +#ifndef ENTITY_H +#define ENTITY_H + +#include "Maths.h" +#include "Ent.h" +#include "BlockV.h" + +#include +#include + +#define rn( rx, ry) ((rx) + ((ry) * 100)) + +enum +{ + BLOCK = 0, + TRIGGER = 1, + DAMAGE = 2, + DIRECTIONAL = 3, + SAFE = 4, + ACTIVITY = 5 +}; + +class mapclass; +class musicclass; +class Graphics; +class Game; +class UtilityClass; + +class entityclass +{ +public: + void init(); + + void resetallflags(); + + void resetflags(); + + void confirmflags(); + + void changecollect(int t, int s); + + void changecustomcollect(int t, int s); + + void changeflag(int t, int s); + + void fatal_top() + { + createblock(DAMAGE, -8, -8, 384, 16); + } + void fatal_bottom() + { + createblock(DAMAGE, -8, 224, 384, 16); + } + void fatal_left() + { + createblock(DAMAGE, -8, -8, 16, 260); + } + void fatal_right() + { + createblock(DAMAGE, 312, -8, 16, 260); + } + + void setblockcolour(int t, std::string col); + + int swncolour(int t ); + + void swnenemiescol(int t); + + void gravcreate(Game& game, int ypos, int dir, int xoff = 0, int yoff = 0); + + void generateswnwave(Game& game, UtilityClass& help, int t); + + void createblock(int t, int xp, int yp, int w, int h, int trig = 0); + + void removeallblocks(); + + void removeblock(int t); + + void removeblockat(int x, int y); + + void removetrigger(int t); + + void copylinecross(int t); + + void revertlinecross(int t, int s); + + bool gridmatch(int p1, int p2, int p3, int p4, int p11, int p21, int p31, int p41); + + int crewcolour(int t); + + void setenemyroom(int t, int rx, int ry); + + void setenemy(int t, int r); + + void settreadmillcolour(int t, int rx, int ry); + + void createentity(Game& game, float xp, float yp, int t, float vx = 0, float vy = 0, + int p1 = 0, int p2 = 0, int p3 = 320, int p4 = 240 ); + + bool updateentities(int i, UtilityClass& help, Game& game, musicclass& music); + + void animateentities(int i, Game& game, UtilityClass& help); + + bool gettype(int t); + + int getcompanion(int t); + + int getplayer(); + + int getscm(); + + int getlineat(int t); + + int getcrewman(int t); + int getcustomcrewman(int t); + + int getteleporter(); + + void rectset(int xi, int yi, int wi, int hi); + + void rect2set(int xi, int yi, int wi, int hi); + + bool entitycollide(int a, int b); + + bool checkdirectional(int t); + + bool checkdamage(); + + bool scmcheckdamage(); + + void settemprect(int t); + + int checktrigger(); + + int checkactivity(); + + int getgridpoint(int t); + + bool cblocks(int t); + + bool checkplatform(); + + bool checkblocks(); + + bool checktowerspikes(int t, mapclass& map); + + bool checkwall(mapclass& map); + + float hplatformat(); + + int yline(int a, int b); + + bool entityhlinecollide(int t, int l); + + bool entityvlinecollide(int t, int l); + + bool entitywarphlinecollide(int t, int l); + bool entitywarpvlinecollide(int t, int l); + + void customwarplinecheck(int i); + + float entitycollideplatformroof(mapclass& map, int t); + + float entitycollideplatformfloor(mapclass& map, int t); + + bool entitycollidefloor(mapclass& map, int t); + + bool entitycollideroof(mapclass& map, int t); + + bool testwallsx(int t, mapclass& map, int tx, int ty); + + bool testwallsy(int t, mapclass& map, float tx, float ty); + + void fixfriction(int t, float xfix, float xrate, float yrate); + + void applyfriction(int t, float xrate, float yrate); + + void cleanup(); + + void updateentitylogic(int t, Game& game); + + + void entitymapcollision(int t, mapclass& map); + + void movingplatformfix(int t, mapclass& map); + + void scmmovingplatformfix(int t, mapclass& map); + + void hormovingplatformfix(int t, mapclass& map); + + void entitycollisioncheck(Graphics& dwgfx, Game& game, mapclass& map, musicclass& music); + + + std::vector entities; + + int nentity; + + std::vector linecrosskludge; + int nlinecrosskludge; + + point colpoint1, colpoint2; + + int tempx, tempy, tempw, temph, temp, temp2; + //public var tempx:int, tempy:int, tempw:int, temph:int, temp:int, temp2:int; + int tpx1, tpy1, tpx2, tpy2; + + SDL_Rect temprect, temprect2; + + int x, k; + float dx, dy, dr; + + int px, py, linetemp; + int activetrigger; + + + std::vector blocks; + std::vector flags; + std::vector collect; + std::vector customcollect; + + int nblocks; + bool skipblocks, skipdirblocks; + + int platformtile; + bool vertplatforms, horplatforms; + + // :( + bool nearelephant, upsetmode; + int upset; + + //Trophy Text + int trophytext, trophytype; + + //Secret lab scripts + int altstates; + + //Custom stuff + int customenemy; + int customplatformtile; + bool customwarpmode, customwarpmodevon, customwarpmodehon; + std::string customscript; + int customcrewmoods[6]; +}; + +#endif /* ENTITY_H */ diff --git a/desktop_version/src/Enums.h b/desktop_version/src/Enums.h new file mode 100644 index 00000000..6f2e43b0 --- /dev/null +++ b/desktop_version/src/Enums.h @@ -0,0 +1,11 @@ +#ifndef ENUMGAME_H +#define ENUMGAME_H + +enum +{ + + GAMEMODE, TITLEMODE, CLICKTOSTART, FOCUSMODE, MAPMODE, TELEPORTERMODE, GAMECOMPLETE, GAMECOMPLETE2, EDITORMODE, PRELOADER + +}; + +#endif /* ENUMGAME_H */ diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp new file mode 100644 index 00000000..c2f936c9 --- /dev/null +++ b/desktop_version/src/FileSystemUtils.cpp @@ -0,0 +1,363 @@ +#include "FileSystemUtils.h" + +#include +#include + +#include +#include +#include + +#include + +#if defined(_WIN32) +#include +#include +#define mkdir(a, b) CreateDirectory(a, NULL) +#define VNEEDS_MIGRATION (mkdirResult != 0) +#elif defined(__linux__) || defined(__APPLE__) +#include +#include +#define VNEEDS_MIGRATION (mkdirResult == 0) +/* These are needed for PLATFORM_* crap */ +#include +#include +#define MAX_PATH PATH_MAX +#endif + +char saveDir[MAX_PATH]; +char levelDir[MAX_PATH]; + +void PLATFORM_getOSDirectory(char* output); +void PLATFORM_migrateSaveData(char* output); +void PLATFORM_copyFile(const char *oldLocation, const char *newLocation); + +void FILESYSTEM_init(char *argvZero) +{ + char output[MAX_PATH]; + int mkdirResult; + + PHYSFS_init(argvZero); + + /* Determine the OS user directory */ + PLATFORM_getOSDirectory(output); + + /* Create base user directory, mount */ + mkdirResult = mkdir(output, 0777); + + /* Mount our base user directory */ + PHYSFS_mount(output, NULL, 1); + printf("Base directory: %s\n", output); + + /* Create save directory */ + strcpy(saveDir, output); + strcat(saveDir, "saves"); + strcat(saveDir, PHYSFS_getDirSeparator()); + mkdir(saveDir, 0777); + printf("Save directory: %s\n", saveDir); + + /* Create level directory */ + strcpy(levelDir, output); + strcat(levelDir, "levels"); + strcat(levelDir, PHYSFS_getDirSeparator()); + mkdirResult |= mkdir(levelDir, 0777); + printf("Level directory: %s\n", levelDir); + + /* We didn't exist until now, migrate files! */ + if (VNEEDS_MIGRATION) + { + PLATFORM_migrateSaveData(output); + } + + /* Mount the stock content last */ +#ifdef _WIN32 + strcpy(output, PHYSFS_getBaseDir()); + strcat(output, "data.zip"); +#else + strcpy(output, "data.zip"); +#endif + PHYSFS_mount(output, NULL, 1); +} + +void FILESYSTEM_deinit() +{ + PHYSFS_deinit(); +} + +char *FILESYSTEM_getUserSaveDirectory() +{ + return saveDir; +} + +char *FILESYSTEM_getUserLevelDirectory() +{ + return levelDir; +} + +void FILESYSTEM_loadFileToMemory(const char *name, unsigned char **mem, size_t *len) +{ + PHYSFS_File *handle = PHYSFS_openRead(name); + if (handle == NULL) + { + return; + } + PHYSFS_uint32 length = PHYSFS_fileLength(handle); + if (len != NULL) + { + *len = length; + } + *mem = (unsigned char*) malloc(length); + PHYSFS_read(handle, *mem, 1, length); + PHYSFS_close(handle); +} + +void FILESYSTEM_freeMemory(unsigned char **mem) +{ + free(*mem); + *mem = NULL; +} + +std::vector FILESYSTEM_getLevelDirFileNames() +{ + std::vector list; + char **fileList = PHYSFS_enumerateFiles("/levels"); + char **i; + std::string builtLocation; + + for (i = fileList; *i != NULL; i++) + { + if (strcmp(*i, "data") == 0) + { + continue; /* FIXME: lolwut -flibit */ + } + builtLocation = "levels/"; + builtLocation += *i; + list.push_back(builtLocation); + } + + PHYSFS_freeList(fileList); + + return list; +} + +void PLATFORM_getOSDirectory(char* output) +{ +#if defined(__linux__) + const char *homeDir = getenv("XDG_DATA_HOME"); + if (homeDir == NULL) + { + strcpy(output, PHYSFS_getUserDir()); + strcat(output, ".local/share/VVVVVV/"); + } + else + { + strcpy(output, homeDir); + strcat(output, "/VVVVVV/"); + } +#elif defined(__APPLE__) + strcpy(output, PHYSFS_getUserDir()); + strcat(output, "Library/Application Support/VVVVVV/"); +#elif defined(_WIN32) + SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, output); + strcat(output, "\\VVVVVV\\"); +#else +#error See PLATFORM_getOSDirectory +#endif +} + +void PLATFORM_migrateSaveData(char* output) +{ + char oldLocation[MAX_PATH]; + char newLocation[MAX_PATH]; + char oldDirectory[MAX_PATH]; +#if defined(__linux__) || defined(__APPLE__) + DIR *dir = NULL; + struct dirent *de = NULL; + DIR *subDir = NULL; + struct dirent *subDe = NULL; + char subDirLocation[MAX_PATH]; + const char *homeDir = getenv("HOME"); + if (homeDir == NULL) + { + /* Uhh, I don't want to get near this. -flibit */ + return; + } + strcpy(oldDirectory, homeDir); +#if defined(__linux__) + strcat(oldDirectory, "/.vvvvvv/"); +#elif defined(__APPLE__) + strcat(oldDirectory, "/Documents/VVVVVV/"); +#endif + dir = opendir(oldDirectory); + if (!dir) + { + printf("Could not find directory %s\n", oldDirectory); + return; + } + + printf("Migrating old savedata to new location...\n"); + for (de = readdir(dir); de != NULL; de = readdir(dir)) + { + if ( strcmp(de->d_name, "..") == 0 || + strcmp(de->d_name, ".") == 0 ) + { + continue; + } + #define COPY_SAVEFILE(name) \ + else if (strcmp(de->d_name, name) == 0) \ + { \ + strcpy(oldLocation, oldDirectory); \ + strcat(oldLocation, name); \ + strcpy(newLocation, output); \ + strcat(newLocation, "saves/"); \ + strcat(newLocation, name); \ + PLATFORM_copyFile(oldLocation, newLocation); \ + } + COPY_SAVEFILE("unlock.vvv") + COPY_SAVEFILE("tsave.vvv") + COPY_SAVEFILE("qsave.vvv") + #undef COPY_SAVEFILE + else if (strstr(de->d_name, ".vvvvvv.vvv") != NULL) + { + strcpy(oldLocation, oldDirectory); + strcat(oldLocation, de->d_name); + strcpy(newLocation, output); + strcat(newLocation, "saves/"); + strcat(newLocation, de->d_name); + PLATFORM_copyFile(oldLocation, newLocation); + } + else if (strstr(de->d_name, ".vvvvvv") != NULL) + { + strcpy(oldLocation, oldDirectory); + strcat(oldLocation, de->d_name); + strcpy(newLocation, output); + strcat(newLocation, "levels/"); + strcat(newLocation, de->d_name); + PLATFORM_copyFile(oldLocation, newLocation); + } + else if (strcmp(de->d_name, "Saves") == 0) + { + strcpy(subDirLocation, oldDirectory); + strcat(subDirLocation, "Saves/"); + subDir = opendir(subDirLocation); + if (!subDir) + { + printf("Could not open Saves/ subdir!\n"); + continue; + } + for ( + subDe = readdir(subDir); + subDe != NULL; + subDe = readdir(subDir) + ) { + #define COPY_SAVEFILE(name) \ + (strcmp(subDe->d_name, name) == 0) \ + { \ + strcpy(oldLocation, subDirLocation); \ + strcat(oldLocation, name); \ + strcpy(newLocation, output); \ + strcat(newLocation, "saves/"); \ + strcat(newLocation, name); \ + PLATFORM_copyFile(oldLocation, newLocation); \ + } + if COPY_SAVEFILE("unlock.vvv") + else if COPY_SAVEFILE("tsave.vvv") + else if COPY_SAVEFILE("qsave.vvv") + #undef COPY_SAVEFILE + } + } + } +#elif defined(_WIN32) + WIN32_FIND_DATA findHandle; + HANDLE hFind = NULL; + char fileSearch[MAX_PATH]; + + /* Same place, different layout. */ + strcpy(oldDirectory, output); + + /* In theory we don't need to worry about this, thanks case insensitivity! + sprintf(fileSearch, "%s\\Saves\\*.vvv", oldDirectory); + hFind = FindFirstFile(fileSearch, &findHandle); + if (hFind == INVALID_HANDLE_VALUE) + { + printf("Could not find directory %s\\Saves\\\n", oldDirectory); + } + else do + { + if ((findHandle.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) + { + #define COPY_SAVEFILE(name) \ + (strcmp(findHandle.cFileName, name) == 0) \ + { \ + strcpy(oldLocation, oldDirectory); \ + strcat(oldLocation, "Saves\\"); \ + strcat(oldLocation, name); \ + strcpy(newLocation, output); \ + strcat(newLocation, "saves\\"); \ + strcat(newLocation, name); \ + PLATFORM_copyFile(oldLocation, newLocation); \ + } + if COPY_SAVEFILE("unlock.vvv") + else if COPY_SAVEFILE("tsave.vvv") + else if COPY_SAVEFILE("qsave.vvv") + #undef COPY_SAVEFILE + } + } while (FindNextFile(hFind, &findHandle)); + */ + + sprintf(fileSearch, "%s\\*.vvvvvv", oldDirectory); + hFind = FindFirstFile(fileSearch, &findHandle); + if (hFind == INVALID_HANDLE_VALUE) + { + printf("Could not find directory %s\n", oldDirectory); + } + else do + { + if ((findHandle.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) + { + strcpy(oldLocation, oldDirectory); + strcat(oldLocation, findHandle.cFileName); + strcpy(newLocation, output); + strcat(newLocation, "levels\\"); + strcat(newLocation, findHandle.cFileName); + PLATFORM_copyFile(oldLocation, newLocation); + } + } while (FindNextFile(hFind, &findHandle)); +#else +#error See PLATFORM_migrateSaveData +#endif +} + +void PLATFORM_copyFile(const char *oldLocation, const char *newLocation) +{ + char *data; + long int length; + + /* Read data */ + FILE *file = fopen(oldLocation, "rb"); + if (!file) + { + printf("Cannot open/copy %s\n", oldLocation); + return; + } + fseek(file, 0, SEEK_END); + length = ftell(file); + fseek(file, 0, SEEK_SET); + data = (char*) malloc(length); + fread(data, 1, length, file); + fclose(file); + + /* Write data */ + file = fopen(newLocation, "wb"); + if (!file) + { + printf("Could not write to %s\n", newLocation); + free(data); + return; + } + fwrite(data, 1, length, file); + fclose(file); + free(data); + + /* WTF did we just do */ + printf("Copied:\n\tOld: %s\n\tNew: %s\n", oldLocation, newLocation); +} diff --git a/desktop_version/src/FileSystemUtils.h b/desktop_version/src/FileSystemUtils.h new file mode 100644 index 00000000..bcc7c5f5 --- /dev/null +++ b/desktop_version/src/FileSystemUtils.h @@ -0,0 +1,18 @@ +#ifndef FILESYSTEMUTILS_H +#define FILESYSTEMUTILS_H + +#include +#include + +void FILESYSTEM_init(char *argvZero); +void FILESYSTEM_deinit(); + +char *FILESYSTEM_getUserSaveDirectory(); +char *FILESYSTEM_getUserLevelDirectory(); + +void FILESYSTEM_loadFileToMemory(const char *name, unsigned char **mem, size_t *len); +void FILESYSTEM_freeMemory(unsigned char **mem); + +std::vector FILESYSTEM_getLevelDirFileNames(); + +#endif /* FILESYSTEMUTILS_H */ diff --git a/desktop_version/src/Finalclass.cpp b/desktop_version/src/Finalclass.cpp new file mode 100644 index 00000000..2d5aad62 --- /dev/null +++ b/desktop_version/src/Finalclass.cpp @@ -0,0 +1,2317 @@ +#include "Finalclass.h" + +std::vector finalclass::loadlevel(int rx, int ry, Game& game, entityclass& obj) +{ + int t; + + t = rx + (ry * 100); + std::vector tmap; + coin = 0; + rcol = 0; + warpx = false; + warpy = false; + + roomname = "Untitled room ["+UtilityClass::String(rx) + "," + UtilityClass::String(ry)+"]"; + + switch(t) + { + case rn(50,52): + + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,258,259,259,259"); + tmap.push_back("7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98"); + + obj.createentity(game, 163, 32, 12, 168); // (vertical gravity line) + obj.createentity(game, 99, 32, 12, 168); // (vertical gravity line) + obj.createentity(game, 227, 32, 12, 168); // (vertical gravity line) + obj.createentity(game, 35, 32, 12, 168); // (vertical gravity line) + obj.createentity(game, 291, 32, 12, 168); // (vertical gravity line) + + warpx = true; + roomname = "1954 World Cup Vinyl"; + break; + + case rn(50,51): + + tmap.push_back("0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,258,259,259,260,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,180,218,98,220,740"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,220,218,98,220,740"); + tmap.push_back("0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,260,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,178,179,179,180,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,218,98,220,740"); + tmap.push_back("0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,220,740"); + + obj.createentity(game, -8, 116, 11, 40); // (horizontal gravity line) + obj.createentity(game, 48, 116, 11, 184); // (horizontal gravity line) + obj.createentity(game, 32, 88, 10, 1, 51500); // (savepoint) + obj.createentity(game, 32, 128, 10, 0, 51501); // (savepoint) + obj.createentity(game, 256, 88, 10, 1, 51502); // (savepoint) + obj.createentity(game, 256, 128, 10, 0, 51503); // (savepoint) + warpy = true; + roomname = "The V Stooges"; + break; + + + case rn(49,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,50,218,98,98,220,49,0,0,0,0,0,0,0,0,50,218,98,98,220,49,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,50,258,259,259,260,49,0,0,0,0,0,0,0,0,50,258,259,259,260,49,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0"); + tmap.push_back("0,0,0,0,178,179,180,49,0,0,0,0,0,0,0,0,50,178,179,179,179,179,180,49,0,0,0,0,0,0,0,0,50,178,179,180,0,0,0,0"); + tmap.push_back("0,0,0,0,218,98,220,49,0,0,0,0,0,0,0,0,50,218,98,98,98,98,220,49,0,0,0,0,0,0,0,0,50,218,98,220,0,0,0,0"); + tmap.push_back("0,0,0,0,258,259,260,49,0,0,0,0,0,0,0,0,50,258,259,259,259,259,260,49,0,0,0,0,0,0,0,0,50,258,259,260,0,0,0,0"); + tmap.push_back("0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,50,178,179,179,180,49,0,0,0,0,0,0,0,0,50,178,179,179,180,49,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,50,218,98,98,220,49,0,0,0,0,0,0,0,0,50,218,98,98,220,49,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 116, 11, 40); // (horizontal gravity line) + obj.createentity(game, 288, 116, 11, 32); // (horizontal gravity line) + obj.createentity(game, 64, 116, 11, 64); // (horizontal gravity line) + obj.createentity(game, 192, 116, 11, 64); // (horizontal gravity line) + + warpy = true; + roomname = "glitch"; + break; + + case rn(48,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); + tmap.push_back("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); + tmap.push_back("0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 116, 11, 40); // (horizontal gravity line) + obj.createentity(game, 48, 116, 11, 224); // (horizontal gravity line) + obj.createentity(game, 288, 116, 11, 32); // (horizontal gravity line) + obj.createentity(game, 56, 88, 1, 3, 10); // Enemy + obj.createentity(game, 248-16, 128, 1, 2, 10); // Enemy + obj.createentity(game, 272, 168, 10, 0, 51480); // (savepoint) + obj.createentity(game, 32, 48, 10, 1, 51481); // (savepoint) + + warpy = true; + roomname = "glitch"; + break; + + case rn(47,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 148, 11, 104); // (horizontal gravity line) + obj.createentity(game, -8, 84, 11, 80); // (horizontal gravity line) + obj.createentity(game, 176, 116, 11, 144); // (horizontal gravity line) + obj.createentity(game, 128, 96, 10, 0, 51470); // (savepoint) + obj.createentity(game, 128, 56, 10, 1, 51471); // (savepoint) + + warpy = true; + roomname = "change"; + break; + + case rn(46,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 84, 11, 328); // (horizontal gravity line) + obj.createentity(game, -8, 148, 11, 328); // (horizontal gravity line) + obj.createentity(game, 96, 120, 1, 2, 4); // Enemy + obj.createentity(game, 144, 96, 1, 2, 4); // Enemy + obj.createentity(game, 192, 120, 1, 2, 4); // Enemy + obj.createentity(game, 240, 96, 1, 2, 4); // Enemy + obj.createentity(game, 288, 120, 1, 2, 4); // Enemy + + warpy = true; + roomname = "change"; + break; + + case rn(45,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 248, 84, 11, 72); // (horizontal gravity line) + obj.createentity(game, 224, 148, 11, 96); // (horizontal gravity line) + obj.createentity(game, 176, 56, 10, 1, 51450); // (savepoint) + obj.createentity(game, 176, 96, 10, 0, 51451); // (savepoint) + + warpy = true; + roomname = "change"; + break; + + + case rn(44,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 64+32-8, 32-16, 1, 0, 7, 0, -48, 320, 312); // Enemy, bounded + obj.createentity(game, 96+32-8, 32-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded + obj.createentity(game, 128+32-8, 32-16, 1, 0, 7, 0, -40, 320, 320); // Enemy, bounded + obj.createentity(game, 160+32-8, 32-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded + obj.createentity(game, 192+32-8, 32-16, 1, 0, 7, 0, -64, 320, 336); // Enemy, bounded + obj.createentity(game, 64+32-8, 64-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded + obj.createentity(game, 64+32-8, 96-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded + obj.createentity(game, 64+32-8, 128-16, 1, 0, 7, 0, -64, 320, 320); // Enemy, bounded + obj.createentity(game, 64+32-8, 160-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded + obj.createentity(game, 192+32-8, 128-16+8, 1, 0, 7, 0, -64, 320, 320); // Enemy, bounded + obj.createentity(game, 192+32-8, 160-16+8, 1, 0, 7, 0, -80, 320, 320); // Enemy, bounded + obj.createentity(game, 192+32-8, 192-16+8, 1, 0, 7, 0, -80, 320, 304); // Enemy, bounded + obj.createentity(game, 192+32-8, 192+24, 1, 0, 7, 0, -80, 320, 304); // Enemy, bounded + + warpy = true; + roomname = "Vertigo"; + break; + + case rn(43,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 155, 24, 12, 184); // (vertical gravity line) + obj.createentity(game, 120, 152, 1, 1, 8, 0, -56, 320, 296); // Enemy, bounded + obj.createentity(game, 104, 136, 1, 1, 8, 0, -64, 320, 296); // Enemy, bounded + obj.createentity(game, 88, 120, 1, 1, 8, 0, -56, 320, 312); // Enemy, bounded + obj.createentity(game, 72, 104, 1, 1, 8, 0, -56, 320, 296); // Enemy, bounded + obj.createentity(game, 56, 88, 1, 1, 8, 0, -48, 320, 328); // Enemy, bounded + obj.createentity(game, 176, 56, 1, 0, 8, 0, -64, 320, 288); // Enemy, bounded + obj.createentity(game, 192, 72, 1, 0, 8, 0, -48, 320, 296); // Enemy, bounded + obj.createentity(game, 208, 88, 1, 0, 8, 0, -72, 320, 296); // Enemy, bounded + obj.createentity(game, 224, 104, 1, 0, 8, 0, -56, 320, 296); // Enemy, bounded + obj.createentity(game, 240, 120, 1, 0, 8, 0, -48, 320, 296); // Enemy, bounded + + warpy = true; + roomname = "The Voon Show"; + break; + + case rn(42,51): + + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,180,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,178,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,260,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 168, 72, 10, 0, 51420); // (savepoint) + obj.createentity(game, 24, 60, 11, 120); // (horizontal gravity line) + obj.createentity(game, 24, 148, 11, 120); // (horizontal gravity line) + + warpy = true; + roomname = "glitch"; + break; + + + case rn(41,51): + + tmap.push_back("740,740,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,139,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,260,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,218,220,258,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,178,180,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,258,260,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,180,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,178,179,179,179,179"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,218,220,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,98,98,98"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,218,220,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0,218,98,98,98,98"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,218,220,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,218,98,98,98,98"); + tmap.push_back("259,259,100,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,220,178,179,179,179,179,179,179,179,179,179,180,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + + obj.createentity(game, 280, 120, 10, 1, 51410); // (savepoint) + obj.createentity(game, 40, 28, 11, 192); // (horizontal gravity line) + obj.createentity(game, 96, 204, 11, 88); // (horizontal gravity line) + obj.createentity(game, 144, 156, 11, 88); // (horizontal gravity line) + obj.createentity(game, 96, 92, 11, 88); // (horizontal gravity line) + + warpx = true; + roomname = "1950 Silverstone Grand V"; + break; + + + case rn(41,52): + + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("179,179,140,98,220,0,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,260,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,740,740,740,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,740,740,740,740,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,180,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,100,98,220,0,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,218,98,220,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + + obj.createentity(game, 264, 168, 10, 1, 52410); // (savepoint) + obj.createentity(game, 152, 112, 20, 1); // (terminal) + + if(obj.flags[72] == 0) + { + if (game.intimetrial || game.nocutscenes) + { + obj.createblock(1, 152 - 4, 112, 20, 16, 85); + } + else + { + obj.createblock(5, 152 - 4, 112, 20, 16, 13); + } + } + + warpx = true; + warpy = true; + roomname = "DIY V Repair"; + break; + + case rn(42,52): + + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,100,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,99,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,218,98,220,218,98,99,259,259,259,259,259,259,259,259,100,98,220,218,98,220,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,218,98,220,218,98,220,740,740,740,740,740,740,740,740,218,98,220,218,98,220,740,740,740,740,740,740,740,740,740,740"); + roomname = "Party Time!"; + break; + + + case rn(43,52): + + tmap.push_back("218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,258,259,259,260,218,98,98,220,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,218,98,98,220,218,98,98,220,258,259,259,260,218,98,98,220,258,259,259,260,0,0,0,0,258,259,259,260,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,218,98,98,220,258,259,259,260,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,258,259,259,260,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("258,259,259,260,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,218,98,98,220,218,98,98,220"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,258,259,259,260"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,178,179,179,180,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("178,179,179,180,218,98,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,178,179,179,180,0,0,0,0,0,0,0,0"); + tmap.push_back("218,98,98,220,218,98,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220,178,179,179,180,0,0,0,0"); + tmap.push_back("218,98,98,220,218,98,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220,218,98,98,220,178,179,179,180"); + tmap.push_back("218,98,98,220,218,98,98,220,218,98,98,220,178,179,179,180,0,0,0,0,178,179,179,180,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,178,179,179,180,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220"); + tmap.push_back("218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220"); + + obj.createentity(game, 264, 176, 10, 1, 52430); // (savepoint) + obj.createentity(game, 96, 180, 11, 96); // (horizontal gravity line) + obj.createentity(game, 160, 52, 11, 96); // (horizontal gravity line) + obj.createentity(game, 240, 136, 1, 2, 8); // Enemy + obj.createentity(game, 96, 88, 1, 3, 8); // Enemy + obj.createentity(game, 72, 32, 10, 0, 52431); // (savepoint) + roomname = "Upstairs, Downstairs"; + break; + + + case rn(44,52): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,258,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,178,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,218,98,98"); + tmap.push_back("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("179,179,179,179,179,179,180,218,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,98"); + tmap.push_back("98,98,98,98,98,98,220,218,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98"); + tmap.push_back("98,98,98,98,98,98,220,218,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98"); + tmap.push_back("98,98,98,98,98,98,220,218,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98"); + + obj.createentity(game, 64, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 192, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 32, 112, 2, 9, 4); //Threadmill, <<< + + obj.createentity(game, 0, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 104, 2, 8, 4); //Threadmill, >>> + + obj.createentity(game, 80+8, 128, 1, 0, 5, 0, 120, 320, 200); // Enemy, bounded + obj.createentity(game, 128+16, 168, 1, 1, 5, 0, 120, 320, 200); // Enemy, bounded + obj.createentity(game, 176+24, 128, 1, 0, 5, 0, 120, 320, 200); // Enemy, bounded + //obj.createentity(game, 224, 168, 1, 1, 5, 0, 120, 320, 200); // Enemy, bounded + obj.createentity(game, 24, 184, 10, 1, 52440); // (savepoint) + roomname = "Timeslip"; + break; + + case rn(45,52): + + tmap.push_back("98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,218,98,98,98,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,218,98,98,98,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("259,259,259,259,259,259,259,260,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,258,259,259,259,260,218,98,139,179,179,179,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,7,7,7,7,7,218,98,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("179,179,179,180,0,0,0,0,218,98,139,179,179,179,179,179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("259,100,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,178,179,179,180,740,740,6,6,740,740,6,6,740,740,6,6,178,179,179,179,179,180,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,258,259,259,260,7,7,740,740,7,7,740,740,7,7,740,740,258,259,259,259,259,260,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259"); + tmap.push_back("740,218,98,220,178,179,179,179,179,179,179,180,0,0,0,0,0,740,0,0,0,0,0,0,740,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179"); + tmap.push_back("740,218,98,220,218,98,98,98,98,98,98,220,6,6,6,6,6,740,6,6,6,6,6,6,740,6,6,6,6,6,218,98,98,98,98,98,98,98,98,98"); + tmap.push_back("740,218,98,220,218,98,99,259,259,100,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,99,259,259,259,259,259,259,259"); + tmap.push_back("740,218,98,220,218,98,220,740,740,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,218,98,220,740,740,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740"); + + obj.createentity(game, 40, 176, 10, 1, 52450); // (savepoint) + obj.createentity(game, 80, 156, 11, 176); // (horizontal gravity line) + obj.createentity(game, 128, 88, 10, 1, 52451); // (savepoint) + obj.createentity(game, 160, 76, 11, 96); // (horizontal gravity line) + roomname = "Three's Company"; + break; + + case rn(47,52): + + tmap.push_back("740,218,98,220,218,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,258,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,7,7,7,7,7,7,7,7,7,7,7,7,7,178,179,179"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259"); + tmap.push_back("740,218,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7"); + tmap.push_back("740,218,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,218,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,218,98,220,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,6,6,6,6,6,6,6,6,6,218,220,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,178,179,179,179,179,179,179,179,180,218,220,178,179,179,179,179,179,179,179,179,179,179,179,180,218,98,220,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,218,98,220,218,98,98,98,98,98,98,98,220,218,220,218,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740"); + + obj.createentity(game, 68-4, 56, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 132-4, 56, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 44, 192, 3); //Disappearing Platform + obj.createentity(game, 92, 104, 3); //Disappearing Platform + obj.createentity(game, 120, 192, 2, 3, 6); // Platform + obj.createentity(game, 264, 48, 2, 2, 6); // Platform + roomname = "Cosmic Creepers"; + break; + + case rn(48,52): + + tmap.push_back("98,98,220,218,98,98,98,98,98,98,98,98,98,220,218,98,220,218,98,98,98,98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("98,98,220,258,259,259,259,259,259,259,259,259,259,260,218,98,220,258,259,259,259,259,259,259,259,259,259,259,260,218,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,260,7,7,7,7,7,7,7,7,7,7,7,258,259,260,7,7,7,7,7,7,7,7,7,7,7,7,258,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("179,180,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,178,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98"); + tmap.push_back("98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,99,259,259,259,259,259,259,259"); + tmap.push_back("98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,740,740,740,740,740,740,740"); + tmap.push_back("259,260,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,740,740,740,740,740,740,740"); + tmap.push_back("7,7,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,139,179,179,179,179,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,258,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,6,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,7,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,180,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,259,259,259,259,100,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6"); + tmap.push_back("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,178,179"); + tmap.push_back("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98"); + tmap.push_back("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98"); + tmap.push_back("179,179,179,179,179,179,140,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98"); + tmap.push_back("98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98"); + tmap.push_back("259,259,259,259,259,259,259,259,260,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,258,259"); + tmap.push_back("179,179,179,179,179,179,179,179,179,180,6,6,6,6,6,6,6,6,6,6,6,6,178,179,180,6,6,6,6,6,6,6,6,6,6,6,6,178,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,220,178,179,179,179,179,179,179,179,179,179,179,180,218,98,220,178,179,179,179,179,179,179,179,179,179,179,180,218,98,98"); + + obj.createentity(game, 16, 112, 10, 1, 52480); // (savepoint) + obj.createentity(game, 67, 24, 12, 96); // (vertical gravity line) + obj.createentity(game, 243, 112, 12, 104); // (vertical gravity line) + obj.createentity(game, 288, 104, 10, 0, 52481); // (savepoint) + obj.createentity(game, 187, 24, 12, 80); // (vertical gravity line) + obj.createentity(game, 123, 128, 12, 88); // (vertical gravity line) + + roomname = "The Villi People"; + break; + + case rn(50,53): + + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740,740"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,220,218,98,139,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,220,218,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,218,220,258,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("6,6,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,6,6,6,6,6,6,6"); + tmap.push_back("179,180,0,0,0,218,220,0,0,0,178,179,179,179,179,179,179,179,179,179,180,178,179,179,179,179,179,179,179,180,0,0,0,178,179,179,179,179,179,179"); + tmap.push_back("98,220,0,0,0,218,220,0,0,0,218,98,98,98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,220,0,0,0,218,98,98,98,98,98,98"); + tmap.push_back("98,220,0,0,0,218,220,0,0,0,218,98,98,98,98,98,98,98,98,98,220,258,259,259,259,259,259,259,259,260,0,0,0,218,98,98,98,98,98,98"); + tmap.push_back("259,260,0,0,0,218,220,0,0,0,218,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,178,180,0,0,0,258,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,218,220,0,0,0,218,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,220,0,0,0,178,180,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,220,0,0,0,258,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,258,260,0,0,0,218,220,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0"); + tmap.push_back("179,179,179,179,180,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,178,179"); + tmap.push_back("98,98,98,98,220,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,218,98"); + tmap.push_back("259,259,259,259,260,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,258,259"); + tmap.push_back("0,0,0,0,0,178,179,179,179,179,180,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,220,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,220,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,98,98,98,98,220,0,0,0,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259,100,98,220,218,220,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,98,98,98,98,220,178,179,179,179,179,179,180,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,218,220,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,218,98,98,98,98,220,218,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,258,260,0,0,0,0,0"); + tmap.push_back("179,180,0,0,0,218,98,98,98,98,220,218,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,178,179,179,179,179,179,179"); + tmap.push_back("98,220,0,0,0,218,98,98,98,98,220,218,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,218,98,98,98,98,98,98"); + tmap.push_back("98,220,0,0,0,218,98,98,98,98,220,218,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,218,98,98,98,98,98,98"); + + obj.createentity(game, 192, 56, 10, 1, 53500); // (savepoint) + obj.createentity(game, 288, 104, 10, 0, 53501); // (savepoint) + + obj.createentity(game, 168, 96, 1, 0, 5); // Enemy + obj.createentity(game, 184+2, 104, 1, 0, 5); // Enemy + obj.createentity(game, 200+4, 112, 1, 0, 5); // Enemy + + obj.createentity(game, 88, 176-4, 1, 1, 5); // Enemy + obj.createentity(game, 104+2, 168-4, 1, 1, 5); // Enemy + obj.createentity(game, 120 + 4, 160 - 4, 1, 1, 5); // Enemy + + warpx = true; + roomname = "change"; + break; + + case rn(50,54): + + tmap.push_back("98,220,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("98,220,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,100,98"); + tmap.push_back("98,220,0,0,0,740,740,7,7,7,7,7,7,7,740,740,740,740,7,7,7,7,7,7,740,740,740,740,7,7,7,7,7,7,7,7,7,7,218,98"); + tmap.push_back("98,220,0,0,0,740,740,0,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,220,0,0,0,740,740,0,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,220,0,0,0,740,740,0,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,220,0,0,0,7,7,0,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,7,740,49,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,218,98"); + tmap.push_back("179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,740,0,0,0,0,218,98"); + tmap.push_back("98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,740,740,0,0,0,0,218,98"); + tmap.push_back("259,259,259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,218,98"); + tmap.push_back("740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,218,98"); + tmap.push_back("740,740,740,740,740,218,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,740,740,740,0,0,0,0,218,98"); + tmap.push_back("179,179,179,179,179,140,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98"); + tmap.push_back("259,259,259,259,259,259,259,260,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,258,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,260,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + + obj.createentity(game, 24, 88, 10, 1, 54500); // (savepoint) + obj.createentity(game, 280, 184, 10, 1, 54501); // (savepoint) + obj.createentity(game, 56, 44, 11, 56); // (horizontal gravity line) + obj.createentity(game, 131, 72, 12, 64); // (vertical gravity line) + obj.createentity(game, 144, 36, 11, 48); // (horizontal gravity line) + obj.createentity(game, 211, 80, 12, 56); // (vertical gravity line) + obj.createentity(game, 224, 52, 11, 80); // (horizontal gravity line) + + warpx = true; + roomname = "change"; + break; + + + case rn(52,53): + + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,7,7,7,7,7,7,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,7,7,7,0,0,0,0,0,0,7,7,7,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,0,0,0,0,0,0,7,740,740,740,740,740,740,740,740,7,7,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,6,6,6,6,6,6,6,0,0,0,0,0,6,6,6,6,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,6,6,6,6,6,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + + obj.createentity(game, 16, 48, 10, 1, 53520); // (savepoint) + obj.createentity(game, 96, 144, 3); //Disappearing Platform + obj.createentity(game, 128, 144, 3); //Disappearing Platform + obj.createentity(game, 160, 144, 3); //Disappearing Platform + obj.createentity(game, 208, 80, 3); //Disappearing Platform + obj.createentity(game, 240, 80, 3); //Disappearing Platform + obj.createentity(game, 272, 80, 3); //Disappearing Platform + obj.createentity(game, 304, 80, 3); //Disappearing Platform + roomname = "The Last Straw"; + break; + + case rn(53,53): + + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,7,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,7,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,7,0,7,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,7,0,7,740,740,740,740,740,740,740,740,740,740,740,7,740,740,740,740,740,740,740,740,740,7,0,0,0,7,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,7,0,0,0,7,740,740,740,740,740,740,740,740,740,7,0,7,740,740,740,740,740,740,740,7,0,0,0,0,0,7,740,740,740,740,740"); + tmap.push_back("740,740,740,7,0,0,0,0,0,7,740,740,740,740,740,740,740,7,0,0,0,7,740,740,740,740,740,7,0,0,0,0,0,0,0,7,740,740,740,740"); + tmap.push_back("740,740,7,0,0,0,0,0,0,0,7,740,740,740,740,740,7,0,0,0,0,0,7,740,740,740,7,0,0,0,0,0,0,0,0,0,7,740,740,740"); + tmap.push_back("740,7,0,0,0,0,0,0,0,0,0,7,740,740,740,7,0,0,0,0,0,0,0,7,740,7,0,0,0,0,0,0,0,0,0,0,0,7,740,740"); + tmap.push_back("7,0,0,0,0,0,0,0,0,0,0,0,7,740,7,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,6,740,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,6,740,740,740,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("6,6,740,740,740,740,740,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6"); + tmap.push_back("740,740,740,740,740,740,740,740,6,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,6,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,6,0,0,0,0,0,0,0,6,740,6,0,0,0,0,0,0,0,0,0,6,740,6,0,0,0,0,0,6,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,6,0,0,0,0,0,6,740,740,740,6,0,0,0,0,0,0,0,6,740,740,740,6,0,0,0,6,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,6,0,0,0,6,740,740,740,740,740,6,0,0,0,0,0,6,740,740,740,740,740,6,0,6,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,6,0,6,740,740,740,740,740,740,740,6,0,0,0,6,740,740,740,740,740,740,740,6,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,6,740,740,740,740,740,740,740,740,740,6,0,6,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,6,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + + obj.createentity(game, 0, 80, 3); //Disappearing Platform + obj.createentity(game, 288, 88, 3); //Disappearing Platform + obj.createentity(game, 32, 80, 3); //Disappearing Platform + obj.createentity(game, 64, 136, 3); //Disappearing Platform + obj.createentity(game, 96, 136, 3); //Disappearing Platform + obj.createentity(game, 224, 144, 3); //Disappearing Platform + obj.createentity(game, 192, 144, 3); //Disappearing Platform + obj.createentity(game, 256, 88, 3); //Disappearing Platform + obj.createentity(game, 128, 88, 3); //Disappearing Platform + obj.createentity(game, 160, 88, 3); //Disappearing Platform + roomname = "W"; + break; + + case rn(54,53): + + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("7,7,7,7,7,7,7,7,7,7,7,7,7,7,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("6,6,6,6,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,6,6,6,6,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,6,6,6,6,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + + obj.createentity(game, 0, 88, 3); //Disappearing Platform + obj.createentity(game, 32, 88, 3); //Disappearing Platform + obj.createentity(game, 64, 88, 3); //Disappearing Platform + obj.createentity(game, 120, 128, 9, 19); // (shiny trinket) + + roomname="V"; + break; + + + case rn(54,52): + + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + roomname = "VV"; + break; + + + case rn(54,51): + + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + roomname = "VVV"; + break; + + + case rn(54,50): + + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); + roomname = "VVVV"; + break; + + case rn(54,49): + + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + + roomname = "VVVVV"; + break; + + case rn(54,48): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740"); + tmap.push_back("740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740"); + tmap.push_back("740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740"); + tmap.push_back("740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + tmap.push_back("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + + obj.createblock(0, 0, 0, 5, 240); + obj.createblock(0, 315, 0, 5, 240); + + + if(game.intimetrial) + { + obj.createblock(1, 0, 0, 320, 120, 82); + } + else + { + obj.createblock(1, 0, 0, 320, 120, 3500); //Game complete + } + roomname = "VVVVVV"; + break; + + + case rn(46,54): + + tmap.push_back("98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,178,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,258,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,178,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,258,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,178,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,218,220,0,258,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,178,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,218,220,0,258,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,178,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,258,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + rcol = 6; + warpy = true; + roomname = "Temporary Fault..."; + break; + + case rn(47,54): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + warpy = true; + roomname = "Do Not Adjust the V-hold"; + break; + + case rn(48,54): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,99,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,218,98,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,218,98,220,218,98,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,218,98,220,218,98,220,218,98,220,218,98,220,740,740,740,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,218,98,220,218,98,220,218,98,220,218,98,220,218,98,220,740,740,740,740,740,740"); + + obj.createentity(game, 264, 32, 10, 0, 54480); // (savepoint) + + /*if(!game.nocutscenes && obj.flags[71]==0){ + obj.createblock(1, 72, 0, 320, 240, 49); + }*/ + + warpy = true; + roomname = "Regular Service Will Return Shortly"; + break; + + case rn(49,54): + + tmap.push_back("98,98,98,98,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,220,740,740,740"); + tmap.push_back("98,98,98,98,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,220,740,740,740"); + tmap.push_back("98,98,98,98,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,258,259,260,0,0,218,220,0,0,218,98,220,740,740,740"); + tmap.push_back("259,259,259,259,259,260,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,740,740,740"); + tmap.push_back("0,0,0,0,0,0,0,0,258,260,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,258,260,0,0,218,98,220,740,740,740"); + tmap.push_back("179,179,179,179,179,179,179,179,179,180,0,0,218,98,220,0,0,0,0,258,260,0,0,0,0,178,179,179,179,179,179,180,0,0,218,98,220,740,740,740"); + tmap.push_back("98,98,98,98,98,98,98,98,98,220,0,0,218,98,220,0,0,0,0,7,7,0,0,0,0,218,98,98,98,98,98,220,0,0,218,98,220,740,740,740"); + tmap.push_back("98,98,98,98,98,98,98,98,98,220,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,220,0,0,218,98,220,740,740,740"); + tmap.push_back("259,259,259,259,259,259,259,259,259,260,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,260,0,0,218,98,220,740,740,740"); + tmap.push_back("179,179,179,179,179,180,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,178,179,180,0,0,0,0,0,0,218,98,220,740,740,740"); + tmap.push_back("98,98,98,98,98,220,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,218,98,220,740,740,740"); + tmap.push_back("259,259,259,100,98,220,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,218,98,139,179,179,179"); + tmap.push_back("740,740,740,218,98,220,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,218,98,98,98,98,98"); + tmap.push_back("740,740,740,218,98,220,0,0,0,0,0,0,258,259,260,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,258,259,259,259,259,259"); + tmap.push_back("740,740,740,218,98,220,0,0,178,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,178,179,179,179,179,179,179,179,179,179"); + tmap.push_back("740,740,740,218,98,220,0,0,218,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,218,98,98,98,98,98,98,98,98,98"); + tmap.push_back("740,740,740,218,98,220,0,0,218,98,98,98,98,98,220,0,0,0,0,6,6,0,0,0,0,218,98,220,0,0,218,98,98,98,98,98,98,98,98,98"); + tmap.push_back("740,740,740,218,98,220,0,0,258,259,259,259,259,259,260,0,0,0,0,178,180,0,0,0,0,218,98,220,0,0,258,259,259,259,259,259,259,259,259,259"); + tmap.push_back("740,740,740,218,98,220,0,0,178,180,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,178,180,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0"); + tmap.push_back("740,740,740,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,178,179,179,179,179,179"); + tmap.push_back("740,740,740,218,98,220,0,0,218,220,0,0,178,179,180,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,98,98,98,98"); + tmap.push_back("740,740,740,218,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,98,98,98,98"); + tmap.push_back("740,740,740,218,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,98,98,98,98"); + + obj.createentity(game, 120, 116, 11, 80); // (horizontal gravity line) + warpy = true; + roomname = "Origami Room"; + break; + + + //Tower Hallways from here + case rn(108,109): + + tmap.push_back("12,12,12,12,13,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,21,7,7,9,7,7,7,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,21,28,28,0,28,28,28,20,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,21,28,28,0,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,21,28,28,0,28,28,28,20,21,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,14,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,21,28,28,0,28,28,28,20,21,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,21,28,28,0,28,28,28,20,21,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,23,23,23,23,23,23"); + tmap.push_back("23,23,23,23,24,28,28,0,28,28,28,20,21,28,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,28,28,28,28"); + tmap.push_back("0,0,0,28,28,28,28,0,28,28,28,20,21,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,0,28,28,28,28"); + tmap.push_back("0,0,0,28,28,28,28,0,28,28,28,20,21,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,0,28,28,28,28"); + tmap.push_back("0,0,0,28,28,28,28,0,28,28,28,20,21,28,0,28,28,0,28,28,0,0,0,0,0,0,0,0,0,0,28,28,0,28,28,0,28,28,28,28"); + tmap.push_back("0,0,0,28,28,28,28,0,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,0,28,28,0,28,28,0,28,28,28,28"); + tmap.push_back("0,0,0,28,17,18,18,19,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,0,28,28,0,28,28,0,28,28,28,28"); + tmap.push_back("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,0,0,0,0,28,28,0,28,28,0,28,28,17,18,18,18,18"); + tmap.push_back("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,22,14,12,12,12"); + tmap.push_back("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,20,12,12,12"); + tmap.push_back("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,0,0,0,0,28,28,0,28,28,0,28,28,0,22,14,12,12"); + tmap.push_back("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,0,28,28,0,28,28,0,28,20,12,12"); + tmap.push_back("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,0,28,28,0,28,28,0,28,22,14,12"); + tmap.push_back("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,0,0,0,0,0,0,0,0,0,28,28,0,28,28,0,28,28,20,12"); + tmap.push_back("0,0,0,28,20,12,12,21,28,28,28,22,24,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,0,28,28,20,12"); + tmap.push_back("18,18,18,18,16,12,12,21,28,28,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,0,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,0,28,28,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + + obj.createentity(game, 40, 80, 10, 1, 50500); // (savepoint) + + roomname = "Teleporter Divot"; + break; + + case rn(110,104): + + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("18,18,18,18,18,18,18,19,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); + tmap.push_back("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); + tmap.push_back("12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + + obj.createentity(game, 16, 112, 10, 1, 50520); // (savepoint) + roomname = "Seeing Red"; + + if(!game.intimetrial) + { + if(game.companion==0 && obj.flags[8]==0 && !game.crewstats[3]) //also need to check if he's rescued in a previous game + { + obj.createentity(game, 264, 185, 18, 15, 1, 17, 0); + obj.createblock(1, 26*8, 0, 32, 240, 36); + } + } + break; + + case rn(111,104): + + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + + obj.createentity(game, 128-16, 80-32, 14); //Teleporter! + roomname = "Building Apport"; + + if(game.intimetrial) + { + obj.createblock(1, 40, 0, 32, 240, 82); + } + break; + + //Intermission level 2 + case rn(53,48): + + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,178,179,179,179,179,180,178,180,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,258,259,259,259,259,260,218,220,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,178,180,0,0,0,0,218,220,0,0,0,0,0,178,179,179,180,178,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,258,260,0,0,0,0,258,260,0,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,258,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,178,179,180,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,180,178,179,179,180,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,178,179,179"); + tmap.push_back("98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98"); + tmap.push_back("259,259,259,259,259,260,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,258,259,259"); + tmap.push_back("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("179,179,180,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,178,179,179,179,179,179,179"); + tmap.push_back("98,98,220,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98"); + tmap.push_back("259,259,260,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,258,259,259,260,258,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,258,259,259,260,0,0,0,0,218,98,98,220,0,0,0,0,258,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + + roomname = "Whee Sports"; + warpx = true; + break; + + case rn(53,49): + + tmap.push_back("98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,100,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,180,178,179,179"); + tmap.push_back("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98"); + tmap.push_back("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,98"); + tmap.push_back("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,178,179,180,178,179,179,179,179,179,179,180,178,179,180,0,218,98,98"); + tmap.push_back("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,218,98,98,98,98,98,98,220,218,98,220,0,218,98,98"); + tmap.push_back("179,179,179,179,179,179,179,140,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,258,259,259,259,259,259,259,260,218,98,220,0,218,98,98"); + tmap.push_back("98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,258,259,260,0,218,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,260,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,178,179,179,180,0,0,0,0,0,0,0,258,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,220,0,0,0,0,218,98,220,0,258,260,0,0,0,0,0,178,179,180,0,178,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,218,98,220,0,218,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,100,98,220,218,98,98,220,0,0,0,0,218,98,220,178,179,179,179,179,179,179,180,218,98,220,0,218,98,98"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,0,0,0,0,218,98,220,218,98,98,98,98,98,98,220,218,98,220,0,218,98,98"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,0,0,0,0,258,259,260,258,259,259,259,259,259,259,260,258,259,260,0,218,98,98"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259,260,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + roomname = "Whizz Down The Shaft"; + warpx = true; + break; + + case rn(53, 50): + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + + //obj.createentity(game, -8, 84-32, 11, 328); // (horizontal gravity line) + obj.createentity(game, -8, 148 + 32, 11, 328); // (horizontal gravity line) + + obj.createblock(1, -10, 84 - 16, 340, 32, 10); //create the second line! + + roomname = "The Gravitron"; + warpx = true; //warpy = true; + break; + + case rn(53,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,178,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,98,98"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,99,259"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,220,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,218,98,220,219"); + tmap.push_back("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259"); + tmap.push_back("219,218,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + obj.createentity(game, 264, 176, 10, 1, 51530); // (savepoint) + + if(game.companion==0) //also need to check if he's rescued in a previous game + { + if (game.lastsaved == 2) + { + obj.createentity(game, 112, 169, 18, 14, 0, 17, 1); + obj.createblock(1, 22 * 8, 16*8, 32, 240, 37); + } + else if (game.lastsaved ==3) + { + obj.createentity(game, 112, 169, 18, 15, 0, 17, 1); + obj.createblock(1, 22 * 8, 16*8, 32, 240, 38); + } + else if (game.lastsaved == 4) + { + obj.createentity(game, 112, 169, 18, 13, 0, 17, 1); + obj.createblock(1, 22 * 8, 16*8, 32, 240, 39); + } + else + { + obj.createentity(game, 112, 169, 18, 16, 1, 17, 1); + obj.createblock(1, 22 * 8, 16*8, 32, 240, 40); + } + } + + roomname = "Tunnel of Terror"; + warpx = true; + + game.swnmode = false; + break; + + + case rn(53,52): + + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,218,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,218,98,220,0,0,0,0,178,179,180,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,219,219,219,219,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,258,259,260,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); + tmap.push_back("179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219"); + tmap.push_back("259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,180,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,220,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,100,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + obj.createentity(game, (22 * 8)+4, (9 * 8) + 4, 14); //Teleporter! + + roomname = "House of Mirrors"; + warpx = true; + break; + + //Intermission 1 + + case rn(41,56): + + tmap.push_back("259,259,259,259,259,259,259,259,259,260,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,180,178,180,0,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,260,218,220,0,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,218,220,0,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,139,179,179,179,179,179"); + tmap.push_back("179,179,180,178,179,180,0,218,220,0,258,259,260,0,218,98,98,220,0,258,259,259,259,260,0,218,98,98,98,98,220,0,218,98,98,98,98,98,98,98"); + tmap.push_back("98,98,220,258,259,260,0,258,260,0,0,0,0,0,258,259,259,260,0,7,7,7,7,7,0,218,98,98,98,98,220,0,258,259,259,259,259,259,259,259"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,260,0,7,7,7,7,7,7,7,7"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,220,178,179,180,0,178,179,179,179,179,180,0,6,6,6,6,0,178,179,179,179,180,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179"); + tmap.push_back("259,259,260,258,259,260,0,218,98,98,98,98,220,0,178,179,179,180,0,218,98,98,98,220,0,6,6,6,6,6,6,0,218,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,258,259,259,259,259,260,0,258,259,259,260,0,258,259,259,259,260,0,178,179,179,179,179,180,0,258,259,259,259,259,259,259,259"); + tmap.push_back("179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,260,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,180,0,178,179,179,180,0,178,179,179,179,180,0,178,179,179,179,179,180,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,178,179,179,179,179,179,179,179"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,100,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,99,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); + + //obj.createentity(game, 164, 96, 10, 1, 56410); // (savepoint) + + warpy = true; + roomname = "Now Take My Lead"; + break; + + + case rn(42,56): + + tmap.push_back("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,139,179,179,179"); + tmap.push_back("179,179,179,179,179,140,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,98,98,98"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,258,259,259,259,259,259"); + tmap.push_back("259,259,259,259,259,259,259,260,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,7,7,7,7,7,7"); + tmap.push_back("7,7,7,7,7,7,7,7,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,180,178,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,260,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,258,259,260,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("259,100,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,218,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + if(!game.nodeathmode) + { + obj.createblock(1, 0, 0, 32, 240, 41); //scene 2 + obj.createblock(1, 280, 0, 32, 240, 12); //scene 2 + } + + roomname = "What Are You Waiting For?"; + warpy = true; + break; + + case rn(43,56): + + tmap.push_back("219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,178,179,179,180,0,0,0,0,178,179,179,180,0,0,0,0,178,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,6,6,6,6,218,98,98,220,6,6,6,6,218,98,98,220,6,6,6,6,218,98,98,220,6,6,6,6,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,178,179,179,180,218,98,98,220,178,179,179,180,218,98,98,220,178,179,179,180,218,98,98,220,178,179,179,180,218,98,99,259"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,220,219"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,220,219"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,258,259,259,260,218,98,98,220,258,259,259,260,218,98,98,220,258,259,259,260,218,98,98,220,218,98,220,219"); + tmap.push_back("179,179,179,179,179,179,179,180,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,218,98,220,219"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,218,98,220,219"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,218,98,139,179"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,218,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,260,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,258,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,258,259,259,260,0,0,0,0,258,259,259,260,0,0,0,0,258,259,259,260,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + if(!game.nodeathmode) + { + obj.createblock(1, 20, 0, 32, 240, 13); //scene 2 + } + obj.createentity(game, 104, 120, 1, 0, 3); // Enemy + obj.createentity(game, 168, 176, 1, 1, 3); // Enemy + obj.createentity(game, 232, 120, 1, 0, 3); // Enemy + + warpy = true; + roomname = "Don't Get Ahead of Yourself!"; + break; + + case rn(44,56): + + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,100,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,258,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,100,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + + obj.createentity(game, 144, 40, 10, 1, 56440); // (savepoint) + + if(!game.nodeathmode) + { + obj.createblock(1, 200, 0, 32, 240, 42); //scene 3 + } + + + roomname = "Very Good"; + warpy = true; + break; + + case rn(45,56): + + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,180,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179,179,179,179,179"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,178,179,179,180,178,179,179,180,178,179,179,179,179,179,179,180,178,179,179,180,178,179,179,179,180,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,218,98,98,220,258,259,259,260,218,98,98,98,98,98,98,220,258,259,259,260,218,98,98,98,220,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,218,98,98,98,220,178,179,179,179,179,179,179"); + tmap.push_back("179,179,179,179,179,140,98,220,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,218,98,98,98,220,218,98,98,98,98,98,98"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,258,259,259,259,259,259,259,260,0,0,0,0,218,98,98,98,220,218,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,260,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,220,258,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,260,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + + obj.createentity(game, 104, 152, 1, 0, 3); // Enemy + obj.createentity(game, 200, 152, 1, 0, 3); // Enemy + + roomname = "Must I Do Everything For You?"; + warpy = true; + + break; + + case rn(46,56): + + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + + obj.createentity(game, 56, 192, 10, 1, 56460); // (savepoint) + + if(!game.nodeathmode) + { + obj.createblock(1, 200, 0, 32, 240, 43); //scene 3 + } + + roomname = "Now Stay Close To Me..."; + warpy = true; + break; + + case rn(47,56): + + tmap.push_back("219,219,219,218,98,220,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("219,219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,178,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("179,179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,6,6,6,6,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,100,98,220,178,179,179,180,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + + obj.createentity(game, 144, 64, 2, 0, 2, 144, 64, 176, 216); // Platform, bounded + + roomname = "...But Not Too Close"; + warpy = true; + break; + + case rn(48,56): + + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,180,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,139,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,180,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,50,258,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,6,6,6,6,6,6,6,6,258,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("219,219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,218,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + warpy = true; + roomname = "Don't Be Afraid"; + break; + + case rn(49,56): + + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + obj.createentity(game, 152, 176, 10, 1, 56490); // (savepoint) + if(!game.nodeathmode) + { + obj.createblock(1, 200, 0, 32, 240, 44); //scene 3 + } + warpy = true; + roomname = "Do as I Say..."; + break; + + case rn(50,56): + + tmap.push_back("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,218,98,220,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,219,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,218,98,220,178,179,179,180,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7"); + tmap.push_back("219,219,218,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,218,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,218,98,220,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,180,178,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,220,218,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,260,218,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); + tmap.push_back("259,259,259,259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,218,98"); + tmap.push_back("219,219,219,219,219,219,218,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,98,220,218,98"); + tmap.push_back("219,219,219,219,219,219,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,220,218,98"); + + obj.createentity(game, 88, 200, 2, 1, 4, 88, 128, 216, 208); // Platform, bounded + obj.createentity(game, 136, 136, 2, 0, 4, 88, 128, 216, 208); // Platform, bounded + obj.createentity(game, 184, 200, 2, 1, 4, 88, 128, 216, 208); // Platform, bounded + + roomname = "...Not as I Do"; + warpy = true; + break; + + case rn(51,56): + + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,218,98,98,220,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + obj.createentity(game, 192, 136, 10, 1, 56510); // (savepoint) + if(!game.nodeathmode) + { + obj.createblock(1, 80, 0, 32, 240, 45); //scene 3 + } + warpy = true; + roomname = "Mind Your Head"; + break; + + case rn(52,56): + + tmap.push_back("219,218,98,220,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219"); + tmap.push_back("219,218,98,220,7,7,7,7,7,178,180,7,7,7,7,7,7,7,178,180,7,7,7,7,178,179,179,180,7,7,7,7,7,7,7,7,218,98,220,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,258,260,0,0,0,0,0,0,0,258,260,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,218,98,139,179"); + tmap.push_back("219,218,98,220,0,0,0,0,0,7,7,0,0,0,0,0,0,0,7,7,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,218,98,98,98"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98"); + tmap.push_back("259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,99,259"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); + tmap.push_back("219,218,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,220,219"); + tmap.push_back("219,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,220,219"); + + obj.createentity(game, 48, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded + obj.createentity(game, 80, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded + obj.createentity(game, 112, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded + obj.createentity(game, 144, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded + obj.createentity(game, 176, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded + obj.createentity(game, 208, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded + obj.createentity(game, 240, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded + + roomname = "Do Try To Keep Up"; + warpy = true; + break; + + case rn(53,56): + + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,220,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,180,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("259,259,259,259,259,100,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,139,179,179,179,179,179"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("219,219,219,219,219,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("219,219,219,219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("219,219,219,219,219,218,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + obj.createentity(game, 72, 72, 10, 1, 56530); // (savepoint) + + roomname = "You're Falling Behind"; + warpy = true; + break; + + case rn(54,56): + + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,139,179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179,179,179,179"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + tmap.push_back("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + + obj.createentity(game, (18 * 8) + 4, (10 * 8) + 4, 14); //Teleporter! + + if(!game.nodeathmode) + { + obj.createblock(1, 104, 0, 32, 240, 46); //scene 3 + } + + roomname = "Class Dismissed!"; + warpy = true; + break; + + + + default: + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + roomname = "Outer Space"; + + //game.test = true; + //game.teststring = "ERROR: Map not found in Final Area"; + break; + } + + return tmap; +} diff --git a/desktop_version/src/Finalclass.h b/desktop_version/src/Finalclass.h new file mode 100644 index 00000000..f498e345 --- /dev/null +++ b/desktop_version/src/Finalclass.h @@ -0,0 +1,20 @@ +#ifndef FINALCLASS_H +#define FINALCLASS_H + +#include "Game.h" +#include "Entity.h" + +#include +#include + +class finalclass +{ +public: + std::vector loadlevel(int rx, int ry, Game& game, entityclass& obj); + + std::string roomname; + int coin, rcol; + bool warpx, warpy; +}; + +#endif /* FINALCLASS_H */ diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp new file mode 100644 index 00000000..ae936583 --- /dev/null +++ b/desktop_version/src/Game.cpp @@ -0,0 +1,7707 @@ +#include "Enums.h" + +#include "Game.h" +#include "Graphics.h" +#include "Entity.h" +#include "Map.h" + +#include +#include +#include + +#include + +#include "FileSystemUtils.h" + +#include "tinyxml.h" + +#include "Network.h" + +#include "MakeAndPlay.h" + +// lol, Win32 -flibit +#ifdef _WIN32 +#define strcasecmp stricmp +#endif + +//TODO: Non Urgent code cleanup +const char* BoolToString(bool _b) +{ + if(_b) + { + return "1"; + } + else + { + return "0"; + } +} + +bool GetButtonFromString(const char *pText, SDL_GameControllerButton *button) +{ + if ( *pText == '0' || + *pText == 'a' || + *pText == 'A' ) + { + *button = SDL_CONTROLLER_BUTTON_A; + return true; + } + if ( strcmp(pText, "1") == 0 || + *pText == 'b' || + *pText == 'B' ) + { + *button = SDL_CONTROLLER_BUTTON_B; + return true; + } + if ( *pText == '2' || + *pText == 'x' || + *pText == 'X' ) + { + *button = SDL_CONTROLLER_BUTTON_X; + return true; + } + if ( *pText == '3' || + *pText == 'y' || + *pText == 'Y' ) + { + *button = SDL_CONTROLLER_BUTTON_Y; + return true; + } + if ( *pText == '4' || + strcasecmp(pText, "BACK") == 0 ) + { + *button = SDL_CONTROLLER_BUTTON_BACK; + return true; + } + if ( *pText == '5' || + strcasecmp(pText, "GUIDE") == 0 ) + { + *button = SDL_CONTROLLER_BUTTON_GUIDE; + return true; + } + if ( *pText == '6' || + strcasecmp(pText, "START") == 0 ) + { + *button = SDL_CONTROLLER_BUTTON_START; + return true; + } + if ( *pText == '7' || + strcasecmp(pText, "LS") == 0 ) + { + *button = SDL_CONTROLLER_BUTTON_LEFTSTICK; + return true; + } + if ( *pText == '8' || + strcasecmp(pText, "RS") == 0 ) + { + *button = SDL_CONTROLLER_BUTTON_RIGHTSTICK; + return true; + } + if ( *pText == '9' || + strcasecmp(pText, "LB") == 0 ) + { + *button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER; + return true; + } + if ( strcmp(pText, "10") == 0 || + strcasecmp(pText, "RB") == 0 ) + { + *button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER; + return true; + } + return false; +} + + +Game::Game(void): + mutebutton(0) +{ + infocus = true; + paused = false; + muted = false; + globalsound = 128; + m_globalVol = 1.0f; + + timerStartTime= SDL_GetTicks(); + + glitchrunkludge = false; + hascontrol = true; + jumpheld = false; + advancetext = false; + jumppressed = 0; + gravitycontrol = 0; + teleport = false; + edteleportent = 0; //Added in the port! + companion = 0; + roomchange = false; + + + teleportscript = ""; + savemystats = false; + menukludge = false; + quickrestartkludge = false; + + tapleft = 0; + tapright = 0; + + press_right = 0; + press_left = 0; + + + recording = 0; + recordinit = false; + playbackfinished = false; + recordstring = ""; + + advancetext = false; + pausescript = false; + completestop = false; + activeactivity = -1; + act_fade = 0; + backgroundtext = false; + startscript = false; + newscript = ""; + inintermission = false; + + alarmon = false; + alarmdelay = 0; + blackout = false; + creditposx = 0; + creditposy = 0; + creditposdelay = 0; + + useteleporter = false; + teleport_to_teleporter = 0; + + activetele = false; + readytotele = 0; + activity_lastprompt = ""; + activity_r = 0; + activity_g = 0; + activity_b = 0; + creditposition = 0; + bestgamedeaths = -1; + + fullScreenEffect_badSignal = false; + + //Accessibility Options + colourblindmode = false; + noflashingmode = false; + slowdown = 30; + gameframerate=34; + + fullscreen = false;// true; //Assumed true at first unless overwritten at some point! + stretchMode = 0; + useLinearFilter = false; + advanced_mode = false; + fullScreenEffect_badSignal = false; + // 0..5 + controllerSensitivity = 2; + + nodeathmode = false; + nocutscenes = false; + + for(int i=0; i<50; i++) + { + customscript[i]=""; + } + customcol=0; + + for (int i = 0; i < 6; i++) + { + bool cstats; + cstats = false; + crewstats.push_back(cstats); + tele_crewstats.push_back(false); + quick_crewstats.push_back(false); + besttimes.push_back( -1); + besttrinkets.push_back( -1); + bestlives.push_back( -1); + bestrank.push_back( -1); + } + crewstats[0] = true; + lastsaved = 0; + + tele_gametime = "00:00"; + tele_trinkets = 0; + tele_currentarea = "Error! Error!"; + quick_gametime = "00:00"; + quick_trinkets = 0; + quick_currentarea = "Error! Error!"; + + //Menu stuff initiliased here: + for (int mi = 0; mi < 25; mi++) + { + menuoptions.push_back(std::string()); + menuoptionsactive.push_back(bool()); + + bool nb1, nb2; + nb1 = false; + nb2 = false; + unlock.push_back(nb1); + unlocknotify.push_back(nb2); + } + + for (int ui = 0; ui < 25; ui++) + { + unlock[ui] = false; + unlocknotify[ui] = false; + } + + nummenuoptions = 0; + currentmenuoption = 0; + menuselection = "null"; + currentmenuname = "null"; + menuxoff = 0; + menuyoff = 0; + menucountdown = 0; + menudest="null"; + levelpage=0; + playcustomlevel=0; + customleveltitle=""; + createmenu("mainmenu"); + + deathcounts = 0; + gameoverdelay = 0; + frames = 0; + seconds = 0; + minutes = 0; + hours = 0; + gamesaved = false; + savetime = "00:00"; + savearea = "nowhere"; + savetrinkets = 0; + + intimetrial = false; + timetrialcountdown = 0; + timetrialshinytarget = 0; + timetrialparlost = false; + timetrialpar = 0; + timetrialresulttime = 0; + + totalflips = 0; + hardestroom = "Welcome Aboard"; + hardestroomdeaths = 0; + currentroomdeaths=0; + + sfpsmode = false; //by default, play at 30 fps + inertia = 1.1f; + swnmode = false; + swntimer = 0; + swngame = 0;//Not playing sine wave ninja! + swnstate = 0; + swnstate2 = 0; + swnstate3 = 0; + swnstate4 = 0; + swndelay = 0; + swndeaths = 0; + supercrewmate = false; + scmhurt = false; + scmprogress = 0; + scmmoveme = false; + swncolstate = 0; + swncoldelay = 0; + swnrecord = 0; + swnbestrank = 0; + swnrank = 0; + swnmessage = 0; + + clearcustomlevelstats(); + + saveFilePath = FILESYSTEM_getUserSaveDirectory(); + + TiXmlDocument doc((saveFilePath + "qsave.vvv").c_str()); + if (!doc.LoadFile()) + { + quickcookieexists = false; + quicksummary = ""; + printf("Quick Save Not Found\n"); + } + else + { + quickcookieexists = true; + TiXmlHandle hDoc(&doc); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + pElem=hDoc.FirstChildElement().Element(); + if (!pElem) + { + printf("Quick Save Appears Corrupted: No XML Root\n"); + } + + // save this for later + hRoot=TiXmlHandle(pElem); + + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + + if (pKey == "summary") + { + quicksummary = pText; + } + + + } + } + + + TiXmlDocument docTele((saveFilePath+"tsave.vvv").c_str()); + if (!docTele.LoadFile()) + { + telecookieexists = false; + telesummary = ""; + printf("Teleporter Save Not Found\n"); + } + else + { + telecookieexists = true; + TiXmlHandle hDoc(&docTele); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + + { + pElem=hDoc.FirstChildElement().Element(); + // should always have a valid root but handle gracefully if it does + if (!pElem) + { + printf("Teleporter Save Appears Corrupted: No XML Root\n"); + } + + // save this for later + hRoot=TiXmlHandle(pElem); + } + + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + + if (pKey == "summary") + { + telesummary = pText; + } + + + } + } + + //if (telecookie.data.savex == undefined) { + // telecookieexists = false; telesummary = ""; + //} else { + // telecookieexists = true; telesummary = telecookie.data.summary; + //} + + //if (quickcookie.data.savex == undefined) { + // quickcookieexists = false; quicksummary = ""; + //} else { + // quickcookieexists = true; quicksummary = quickcookie.data.summary; + //} + + screenshake = flashlight = 0 ; + + stat_trinkets = 0; + + test = false; + teststring = "TEST = True"; + state = 1; + statedelay = 0; + //updatestate(dwgfx, map, obj, help, music); +} + +Game::~Game(void) +{ +} + +void Game::lifesequence( entityclass& obj ) +{ + if (lifeseq > 0) + { + int i = obj.getplayer(); + obj.entities[i].invis = false; + if (lifeseq == 2) obj.entities[i].invis = true; + if (lifeseq == 6) obj.entities[i].invis = true; + if (lifeseq >= 8) obj.entities[i].invis = true; + if (lifeseq > 5) gravitycontrol = savegc; + + lifeseq--; + if (lifeseq <= 0) + { + obj.entities[i].invis = false; + } + } +} + +void Game::clearcustomlevelstats() +{ + //just clearing the arrays + for(int i=0; i<200; i++) + { + customlevelstats[i]=""; + customlevelscore[i]=0; + } + numcustomlevelstats=0; + + customlevelstatsloaded=false; //To ensure we don't load it where it isn't needed +} + + +void Game::updatecustomlevelstats(std::string clevel, int cscore) +{ + if (clevel.find("levels/") != std::string::npos) + { + clevel = clevel.substr(7); + } + int tvar=-1; + for(int j=0; j=0) + { + //update existing entry + customlevelscore[tvar]=cscore; + } + else + { + //add a new entry + if(numcustomlevelstats<200) + { + customlevelstats[numcustomlevelstats]=clevel; + customlevelscore[numcustomlevelstats]=cscore; + numcustomlevelstats++; + } + } + savecustomlevelstats(); +} + +void Game::loadcustomlevelstats() +{ + //testing + if(!customlevelstatsloaded) + { + TiXmlDocument doc((saveFilePath+"levelstats.vvv").c_str()); + if (!doc.LoadFile()) + { + //No levelstats file exists; start new + numcustomlevelstats=0; + savecustomlevelstats(); + } + else + { + TiXmlHandle hDoc(&doc); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + { + pElem=hDoc.FirstChildElement().Element(); + // should always have a valid root but handle gracefully if it does + if (!pElem) + { + printf("Error: Levelstats file corrupted\n"); + } + + // save this for later + hRoot=TiXmlHandle(pElem); + } + + + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + if(pText == NULL) + { + pText = ""; + } + + if (pKey == "numcustomlevelstats") + { + numcustomlevelstats = atoi(pText); + if(numcustomlevelstats>=200) numcustomlevelstats=199; + } + + if (pKey == "customlevelscore") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + for(size_t i = 0; i < values.size(); i++) + { + if(i<200) customlevelscore[i]=(atoi(values[i].c_str())); + } + } + } + + if (pKey == "customlevelstats") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,'|'); + for(size_t i = 0; i < values.size(); i++) + { + if(i<200) customlevelstats[i]=values[i]; + } + } + } + } + } + } +} + +void Game::savecustomlevelstats() +{ + TiXmlDocument doc; + TiXmlElement* msg; + TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" ); + doc.LinkEndChild( decl ); + + TiXmlElement * root = new TiXmlElement( "Levelstats" ); + doc.LinkEndChild( root ); + + TiXmlComment * comment = new TiXmlComment(); + comment->SetValue(" Levelstats Save file " ); + root->LinkEndChild( comment ); + + TiXmlElement * msgs = new TiXmlElement( "Data" ); + root->LinkEndChild( msgs ); + + if(numcustomlevelstats>=200)numcustomlevelstats=199; + msg = new TiXmlElement( "numcustomlevelstats" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(numcustomlevelstats).c_str() )); + msgs->LinkEndChild( msg ); + + std::string customlevelscorestr; + for(int i = 0; i < numcustomlevelstats; i++ ) + { + customlevelscorestr += UtilityClass::String(customlevelscore[i]) + ","; + } + msg = new TiXmlElement( "customlevelscore" ); + msg->LinkEndChild( new TiXmlText( customlevelscorestr.c_str() )); + msgs->LinkEndChild( msg ); + + std::string customlevelstatsstr; + for(int i = 0; i < numcustomlevelstats; i++ ) + { + customlevelstatsstr += customlevelstats[i] + "|"; + } + msg = new TiXmlElement( "customlevelstats" ); + msg->LinkEndChild( new TiXmlText( customlevelstatsstr.c_str() )); + msgs->LinkEndChild( msg ); + + if(doc.SaveFile( (saveFilePath+"levelstats.vvv").c_str() )) + { + printf("Level stats saved\n"); + } + else + { + printf("Could Not Save level stats!\n"); + printf("Failed: %s%s\n", saveFilePath.c_str(), "levelstats.vvv"); + } +} + +void Game::updatestate( Graphics& dwgfx, mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music ) +{ + int i; + statedelay--; + if(statedelay<=0){ + statedelay=0; + glitchrunkludge=false; + } + if (statedelay <= 0) + { + switch(state) + { + case 0: + //Do nothing here! Standard game state + break; + case 1: + //Game initilisation + state = 0; + break; + case 2: + //Opening cutscene + advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!"); + //Oh no! what happen to rest of crew etc crash into dimension + break; + case 4: + //End of opening cutscene for now + dwgfx.createtextbox(" Press arrow keys or WASD to move ", -1, 195, 174, 174, 174); + dwgfx.textboxtimer(60); + state = 0; + break; + case 5: + //Demo over + advancetext = true; + hascontrol = false; + /*dwgfx.createtextbox(" Prototype Complete ", 50, 80, 164, 164, 255); + dwgfx.addline("Congrats! More Info Soon!"); + dwgfx.textboxcenter(); + */ + + startscript = true; + newscript="returntohub"; + obj.removetrigger(5); + state = 6; + break; + case 7: + //End of opening cutscene for now + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + state = 0; + break; + case 8: + //Enter dialogue + obj.removetrigger(8); + if (obj.flags[13] == 0) + { + obj.changeflag(13, 1); + dwgfx.createtextbox(" Press ENTER to view map ", -1, 155, 174, 174, 174); + dwgfx.addline(" and quicksave"); + dwgfx.textboxtimer(60); + } + state = 0; + break; + + case 9: + //Start SWN Minigame Mode B + obj.removetrigger(9); + + swnmode = true; + swngame = 6; + swndelay = 150; + swntimer = 60 * 30; + + //set the checkpoint in the middle of the screen + savepoint = 0; + savex = 148; + savey = 100; + savegc = 0; + saverx = roomx; + savery = roomy; + savedir = 0; + + state = 0; + break; + + case 10: + //Start SWN Minigame Mode A + obj.removetrigger(10); + + swnmode = true; + swngame = 4; + swndelay = 150; + swntimer = 60 * 30; + + //set the checkpoint in the middle of the screen + savepoint = 0; + savex = 148; + savey = 100; + savegc = 0; + saverx = roomx; + savery = roomy; + savedir = 0; + + state = 0; + break; + + case 11: + //Intermission 1 instructional textbox, depends on last saved + dwgfx.textboxremovefast(); + dwgfx.createtextbox(" When you're NOT standing on ", -1, 3, 174, 174, 174); + if (dwgfx.flipmode) + { + if (lastsaved == 2) + { + dwgfx.addline(" the ceiling, Vitellary will"); + } + else if (lastsaved == 3) + { + dwgfx.addline(" the ceiling, Vermilion will"); + } + else if (lastsaved == 4) + { + dwgfx.addline(" the ceiling, Verdigris will"); + } + else if (lastsaved == 5) + { + dwgfx.addline(" the ceiling, Victoria will"); + } + } + else + { + if (lastsaved == 2) + { + dwgfx.addline(" the floor, Vitellary will"); + } + else if (lastsaved == 3) + { + dwgfx.addline(" the floor, Vermilion will"); + } + else if (lastsaved == 4) + { + dwgfx.addline(" the floor, Verdigris will"); + } + else if (lastsaved == 5) + { + dwgfx.addline(" the floor, Victoria will"); + } + } + + dwgfx.addline(" stop and wait for you."); + dwgfx.textboxtimer(180); + state = 0; + break; + case 12: + //Intermission 1 instructional textbox, depends on last saved + obj.removetrigger(12); + if (obj.flags[61] == 0) + { + obj.changeflag(61, 1); + dwgfx.textboxremovefast(); + dwgfx.createtextbox(" You can't continue to the next ", -1, 8, 174, 174, 174); + if (lastsaved == 5) + { + dwgfx.addline(" room until she is safely across. "); + } + else + { + dwgfx.addline(" room until he is safely across. "); + } + dwgfx.textboxtimer(120); + } + state = 0; + break; + case 13: + //textbox removal + obj.removetrigger(13); + dwgfx.textboxremovefast(); + state = 0; + break; + case 14: + //Intermission 1 instructional textbox, depends on last saved + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" When you're standing on the ceiling, ", -1, 3, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" When you're standing on the floor, ", -1, 3, 174, 174, 174); + } + if (lastsaved == 2) + { + dwgfx.addline(" Vitellary will try to walk to you. "); + } + else if (lastsaved == 3) + { + dwgfx.addline(" Vermilion will try to walk to you. "); + } + else if (lastsaved == 4) + { + dwgfx.addline(" Verdigris will try to walk to you. "); + } + else if (lastsaved == 5) + { + dwgfx.addline(" Victoria will try to walk to you. "); + } + dwgfx.textboxtimer(280); + + state = 0; + break; + + case 15: + //leaving the naughty corner + obj.entities[obj.getplayer()].tile = 0; + state = 0; + break; + case 16: + //entering the naughty corner + if(obj.entities[obj.getplayer()].tile == 0) + { + obj.entities[obj.getplayer()].tile = 144; + music.playef(2, 10); + } + state = 0; + break; + + case 17: + //Arrow key tutorial + obj.removetrigger(17); + dwgfx.createtextbox(" If you prefer, you can press UP or ", -1, 195, 174, 174, 174); + dwgfx.addline(" DOWN instead of ACTION to flip."); + dwgfx.textboxtimer(100); + state = 0; + break; + + case 20: + if (obj.flags[1] == 0) + { + obj.changeflag(1, 1); + state = 0; + dwgfx.textboxremove(); + } + obj.removetrigger(20); + break; + case 21: + if (obj.flags[2] == 0) + { + obj.changeflag(2, 1); + state = 0; + dwgfx.textboxremove(); + } + obj.removetrigger(21); + break; + case 22: + if (obj.flags[3] == 0) + { + dwgfx.textboxremovefast(); + obj.changeflag(3, 1); + state = 0; + dwgfx.createtextbox(" Press ACTION to flip ", -1, 25, 174, 174, 174); + dwgfx.textboxtimer(60); + } + obj.removetrigger(22); + break; + + case 30: + //Generic "run script" + if (obj.flags[4] == 0) + { + obj.changeflag(4, 1); + startscript = true; + newscript="firststeps"; + state = 0; + } + obj.removetrigger(30); + state = 0; + break; + case 31: + //state = 55; statedelay = 50; + state = 0; + statedelay = 0; + if (obj.flags[6] == 0) + { + obj.changeflag(6, 1); + + obj.changeflag(5, 1); + startscript = true; + newscript="communicationstation"; + state = 0; + statedelay = 0; + } + obj.removetrigger(31); + break; + case 32: + //Generic "run script" + if (obj.flags[7] == 0) + { + obj.changeflag(7, 1); + startscript = true; + newscript="teleporterback"; + state = 0; + } + obj.removetrigger(32); + state = 0; + break; + case 33: + //Generic "run script" + if (obj.flags[9] == 0) + { + obj.changeflag(9, 1); + startscript = true; + newscript="rescueblue"; + state = 0; + } + obj.removetrigger(33); + state = 0; + break; + case 34: + //Generic "run script" + if (obj.flags[10] == 0) + { + obj.changeflag(10, 1); + startscript = true; + newscript="rescueyellow"; + state = 0; + } + obj.removetrigger(34); + state = 0; + break; + case 35: + //Generic "run script" + if (obj.flags[11] == 0) + { + obj.changeflag(11, 1); + startscript = true; + newscript="rescuegreen"; + state = 0; + } + obj.removetrigger(35); + state = 0; + break; + case 36: + //Generic "run script" + if (obj.flags[8] == 0) + { + obj.changeflag(8, 1); + startscript = true; + newscript="rescuered"; + state = 0; + } + obj.removetrigger(36); + state = 0; + break; + + case 37: + //Generic "run script" + if (companion == 0) + { + startscript = true; + newscript="int2_yellow"; + state = 0; + } + obj.removetrigger(37); + state = 0; + break; + case 38: + //Generic "run script" + if (companion == 0) + { + startscript = true; + newscript="int2_red"; + state = 0; + } + obj.removetrigger(38); + state = 0; + break; + case 39: + //Generic "run script" + if (companion == 0) + { + startscript = true; + newscript="int2_green"; + state = 0; + } + obj.removetrigger(39); + state = 0; + break; + case 40: + //Generic "run script" + if (companion == 0) + { + startscript = true; + newscript="int2_blue"; + state = 0; + } + obj.removetrigger(40); + state = 0; + break; + + case 41: + //Generic "run script" + if (obj.flags[60] == 0) + { + obj.changeflag(60, 1); + startscript = true; + if (lastsaved == 2) + { + newscript = "int1yellow_2"; + } + else if (lastsaved == 3) + { + newscript = "int1red_2"; + } + else if (lastsaved == 4) + { + newscript = "int1green_2"; + } + else if (lastsaved == 5) + { + newscript = "int1blue_2"; + } + state = 0; + } + obj.removetrigger(41); + state = 0; + break; + case 42: + //Generic "run script" + if (obj.flags[62] == 0) + { + obj.changeflag(62, 1); + startscript = true; + if (lastsaved == 2) + { + newscript = "int1yellow_3"; + } + else if (lastsaved == 3) + { + newscript = "int1red_3"; + } + else if (lastsaved == 4) + { + newscript = "int1green_3"; + } + else if (lastsaved == 5) + { + newscript = "int1blue_3"; + } + state = 0; + } + obj.removetrigger(42); + state = 0; + break; + case 43: + //Generic "run script" + if (obj.flags[63] == 0) + { + obj.changeflag(63, 1); + startscript = true; + if (lastsaved == 2) + { + newscript = "int1yellow_4"; + } + else if (lastsaved == 3) + { + newscript = "int1red_4"; + } + else if (lastsaved == 4) + { + newscript = "int1green_4"; + } + else if (lastsaved == 5) + { + newscript = "int1blue_4"; + } + state = 0; + } + obj.removetrigger(43); + state = 0; + break; + case 44: + //Generic "run script" + if (obj.flags[64] == 0) + { + obj.changeflag(64, 1); + startscript = true; + if (lastsaved == 2) + { + newscript = "int1yellow_5"; + } + else if (lastsaved == 3) + { + newscript = "int1red_5"; + } + else if (lastsaved == 4) + { + newscript = "int1green_5"; + } + else if (lastsaved == 5) + { + newscript = "int1blue_5"; + } + state = 0; + } + obj.removetrigger(44); + state = 0; + break; + case 45: + //Generic "run script" + if (obj.flags[65] == 0) + { + obj.changeflag(65, 1); + startscript = true; + if (lastsaved == 2) + { + newscript = "int1yellow_6"; + } + else if (lastsaved == 3) + { + newscript = "int1red_6"; + } + else if (lastsaved == 4) + { + newscript = "int1green_6"; + } + else if (lastsaved == 5) + { + newscript = "int1blue_6"; + } + state = 0; + } + obj.removetrigger(45); + state = 0; + break; + case 46: + //Generic "run script" + if (obj.flags[66] == 0) + { + obj.changeflag(66, 1); + startscript = true; + if (lastsaved == 2) + { + newscript = "int1yellow_7"; + } + else if (lastsaved == 3) + { + newscript = "int1red_7"; + } + else if (lastsaved == 4) + { + newscript = "int1green_7"; + } + else if (lastsaved == 5) + { + newscript = "int1blue_7"; + } + state = 0; + } + obj.removetrigger(46); + state = 0; + break; + + case 47: + //Generic "run script" + if (obj.flags[69] == 0) + { + obj.changeflag(69, 1); + startscript = true; + newscript="trenchwarfare"; + state = 0; + } + obj.removetrigger(47); + state = 0; + break; + case 48: + //Generic "run script" + if (obj.flags[70] == 0) + { + obj.changeflag(70, 1); + startscript = true; + newscript="trinketcollector"; + state = 0; + } + obj.removetrigger(48); + state = 0; + break; + case 49: + //Start final level music + if (obj.flags[71] == 0) + { + obj.changeflag(71, 1); + music.niceplay(15); //Final level remix + state = 0; + } + obj.removetrigger(49); + state = 0; + break; + + case 50: + music.playef(15, 10); + dwgfx.createtextbox("Help! Can anyone hear", 35, 15, 255, 134, 255); + dwgfx.addline("this message?"); + dwgfx.textboxtimer(60); + state++; + statedelay = 100; + break; + case 51: + music.playef(15, 10); + dwgfx.createtextbox("Verdigris? Are you out", 30, 12, 255, 134, 255); + dwgfx.addline("there? Are you ok?"); + dwgfx.textboxtimer(60); + state++; + statedelay = 100; + break; + case 52: + music.playef(15, 10); + dwgfx.createtextbox("Please help us! We've crashed", 5, 22, 255, 134, 255); + dwgfx.addline("and need assistance!"); + dwgfx.textboxtimer(60); + state++; + statedelay = 100; + break; + case 53: + music.playef(15, 10); + dwgfx.createtextbox("Hello? Anyone out there?", 40, 15, 255, 134, 255); + dwgfx.textboxtimer(60); + state++; + statedelay = 100; + break; + case 54: + music.playef(15, 10); + dwgfx.createtextbox("This is Doctor Violet from the", 5, 8, 255, 134, 255); + dwgfx.addline("D.S.S. Souleye! Please respond!"); + dwgfx.textboxtimer(60); + state++; + statedelay = 100; + break; + case 55: + music.playef(15, 10); + dwgfx.createtextbox("Please... Anyone...", 45, 14, 255, 134, 255); + dwgfx.textboxtimer(60); + state++; + statedelay = 100; + break; + case 56: + music.playef(15, 10); + dwgfx.createtextbox("Please be alright, everyone...", 25, 18, 255, 134, 255); + dwgfx.textboxtimer(60); + state=50; + statedelay = 100; + break; + + + case 80: + //Used to return to menu from the game + if(dwgfx.fademode == 1) state++; + break; + case 81: + gamestate = 1; + dwgfx.fademode = 4; + music.play(6); + dwgfx.backgrounddrawn = false; + map.tdrawback = true; + dwgfx.flipmode = false; + createmenu("mainmenu"); + state = 0; + break; + + case 82: + //Time Trial Complete! + obj.removetrigger(82); + hascontrol = false; + timetrialresulttime = seconds + (minutes * 60); + timetrialrank = 0; + if (timetrialresulttime <= timetrialpar) timetrialrank++; + if (trinkets >= timetrialshinytarget) timetrialrank++; + if (deathcounts == 0) timetrialrank++; + + if (timetrialresulttime < besttimes[timetriallevel] || besttimes[timetriallevel]==-1) + { + besttimes[timetriallevel] = timetrialresulttime; + } + if (trinkets > besttrinkets[timetriallevel] || besttrinkets[timetriallevel]==-1) + { + besttrinkets[timetriallevel] = trinkets; + } + if (deathcounts < bestlives[timetriallevel] || bestlives[timetriallevel]==-1) + { + bestlives[timetriallevel] = deathcounts; + } + if (timetrialrank > bestrank[timetriallevel] || bestrank[timetriallevel]==-1) + { + bestrank[timetriallevel] = timetrialrank; + if(timetrialrank>=3){ + if(timetriallevel==0) NETWORK_unlockAchievement("vvvvvvtimetrial_station1_fixed"); + if(timetriallevel==1) NETWORK_unlockAchievement("vvvvvvtimetrial_lab_fixed"); + if(timetriallevel==2) NETWORK_unlockAchievement("vvvvvvtimetrial_tower_fixed"); + if(timetriallevel==3) NETWORK_unlockAchievement("vvvvvvtimetrial_station2_fixed"); + if(timetriallevel==4) NETWORK_unlockAchievement("vvvvvvtimetrial_warp_fixed"); + if(timetriallevel==5) NETWORK_unlockAchievement("vvvvvvtimetrial_final_fixed"); + } + } + + savestats(map, dwgfx); + + dwgfx.fademode = 2; + music.fadeout(); + state++; + break; + case 83: + frames--; + if(dwgfx.fademode == 1) state++; + break; + case 84: + dwgfx.flipmode = false; + gamestate = 1; + dwgfx.fademode = 4; + dwgfx.backgrounddrawn = true; + map.tdrawback = true; + createmenu("timetrialcomplete"); + state = 0; + break; + + + case 85: + //Cutscene skip version of final level change + obj.removetrigger(85); + //Init final stretch + state++; + music.playef(9, 10); + music.play(2); + obj.flags[72] = 1; + + screenshake = 10; + flashlight = 5; + map.finalstretch = true; + map.warpx = false; + map.warpy = false; + map.background = 6; + + map.final_colormode = true; + map.final_colorframe = 1; + + state = 0; + break; + + //From 90-100 are run scripts for the eurogamer expo only, remove later + case 90: + //Generic "run script" + startscript = true; + newscript="startexpolevel_station1"; + obj.removetrigger(90); + state = 0; + break; + case 91: + //Generic "run script" + startscript = true; + newscript="startexpolevel_lab"; + obj.removetrigger(91); + state = 0; + break; + case 92: + //Generic "run script" + startscript = true; + newscript="startexpolevel_warp"; + obj.removetrigger(92); + state = 0; + break; + case 93: + //Generic "run script" + startscript = true; + newscript="startexpolevel_tower"; + obj.removetrigger(93); + state = 0; + break; + case 94: + //Generic "run script" + startscript = true; + newscript="startexpolevel_station2"; + obj.removetrigger(94); + state = 0; + break; + case 95: + //Generic "run script" + startscript = true; + newscript="startexpolevel_final"; + obj.removetrigger(95); + state = 0; + break; + + case 96: + //Used to return to gravitron to game + if(dwgfx.fademode == 1) state++; + break; + case 97: + gamestate = 0; + dwgfx.fademode = 4; + startscript = true; + newscript="returntolab"; + state = 0; + break; + + case 100: + // + // Meeting crewmate in the warpzone + // + obj.removetrigger(100); + if (obj.flags[4] == 0) + { + obj.changeflag(4, 1); + state++; + } + break; + case 101: + { + + + i = obj.getplayer(); + hascontrol = false; + if (obj.entities[i].onroof > 0 && gravitycontrol == 1) + { + gravitycontrol = 0; + music.playef(1, 10); + } + if (obj.entities[i].onground > 0) + { + state++; + } + } + break; + case 102: + { + + + companion = 6; + i = obj.getcompanion(6); + obj.entities[i].tile = 0; + obj.entities[i].state = 1; + + advancetext = true; + hascontrol = false; + + dwgfx.createtextbox("Captain! I've been so worried!", 60, 90, 164, 255, 164); + state++; + music.playef(12, 10); + } + break; + case 104: + dwgfx.createtextbox("I'm glad you're ok!", 135, 152, 164, 164, 255); + state++; + music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 106: + { + dwgfx.createtextbox("I've been trying to find a", 74, 70, 164, 255, 164); + dwgfx.addline("way out, but I keep going"); + dwgfx.addline("around in circles..."); + state++; + music.playef(2, 10); + dwgfx.textboxactive(); + i = obj.getcompanion(6); + obj.entities[i].tile = 54; + obj.entities[i].state = 0; + } + break; + case 108: + dwgfx.createtextbox("Don't worry! I have a", 125, 152, 164, 164, 255); + dwgfx.addline("teleporter key!"); + state++; + music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 110: + { + + i = obj.getcompanion(6); + obj.entities[i].tile = 0; + obj.entities[i].state = 1; + dwgfx.createtextbox("Follow me!", 185, 154, 164, 164, 255); + state++; + music.playef(11, 10); + dwgfx.textboxactive(); + + } + break; + case 112: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + + state = 0; + break; + + case 115: + // + // Test script for space station, totally delete me! + // + { + i = obj.getplayer(); + hascontrol = false; + state++; + } + break; + case 116: + advancetext = true; + hascontrol = false; + + dwgfx.createtextbox("Sorry Eurogamers! Teleporting around", 60 - 20, 200, 255, 64, 64); + dwgfx.addline("the map doesn't work in this version!"); + dwgfx.textboxcenterx(); + state++; + break; + case 118: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + + state = 0; + break; + + case 120: + // + // Meeting crewmate in the space station + // + obj.removetrigger(120); + if (obj.flags[5] == 0) + { + obj.changeflag(5, 1); + state++; + } + break; + case 121: + { + + i = obj.getplayer(); + hascontrol = false; + if (obj.entities[i].onground > 0 && gravitycontrol == 0) + { + gravitycontrol = 1; + music.playef(1, 10); + } + if (obj.entities[i].onroof > 0) + { + state++; + } + + } + break; + case 122: + companion = 7; + i = obj.getcompanion(7); + obj.entities[i].tile = 6; + obj.entities[i].state = 1; + + advancetext = true; + hascontrol = false; + + dwgfx.createtextbox("Captain! You're ok!", 60-10, 90-40, 255, 255, 134); + state++; + music.playef(14, 10); + break; + case 124: + dwgfx.createtextbox("I've found a teleporter, but", 60-20, 90 - 40, 255, 255, 134); + dwgfx.addline("I can't get it to go anywhere..."); + state++; + music.playef(2, 10); + dwgfx.textboxactive(); + i = obj.getcompanion(7); //obj.entities[i].tile = 66; obj.entities[i].state = 0; + break; + case 126: + dwgfx.createtextbox("I can help with that!", 125, 152-40, 164, 164, 255); + state++; + music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 128: + dwgfx.createtextbox("I have the teleporter", 130, 152-35, 164, 164, 255); + dwgfx.addline("codex for our ship!"); + state++; + music.playef(11, 10); + dwgfx.textboxactive(); + break; + + case 130: + dwgfx.createtextbox("Yey! Let's go home!", 60-30, 90-35, 255, 255, 134); + state++; + music.playef(14, 10); + dwgfx.textboxactive(); + i = obj.getcompanion(7); + obj.entities[i].tile = 6; + obj.entities[i].state = 1; + break; + case 132: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + + state = 0; + break; + + case 200: + //Init final stretch + state++; + music.playef(9, 10); + //music.play(2); + obj.flags[72] = 1; + + screenshake = 10; + flashlight = 5; + map.finalstretch = true; + map.warpx = false; + map.warpy = false; + map.background = 6; + + map.final_colormode = true; + map.final_colorframe = 1; + + startscript = true; + newscript="finalterminal_finish"; + state = 0; + break; + + + case 300: + startscript = true; + newscript="custom_"+customscript[0]; + obj.removetrigger(300); + state = 0; + break; + case 301: + startscript = true; + newscript="custom_"+customscript[1]; + obj.removetrigger(301); + state = 0; + break; + case 302: + startscript = true; + newscript="custom_"+customscript[2]; + obj.removetrigger(302); + state = 0; + break; + case 303: + startscript = true; + newscript="custom_"+customscript[3]; + obj.removetrigger(303); + state = 0; + break; + case 304: + startscript = true; + newscript="custom_"+customscript[4]; + obj.removetrigger(304); + state = 0; + break; + case 305: + startscript = true; + newscript="custom_"+customscript[5]; + obj.removetrigger(305); + state = 0; + break; + case 306: + startscript = true; + newscript="custom_"+customscript[6]; + obj.removetrigger(306); + state = 0; + break; + case 307: + startscript = true; + newscript="custom_"+customscript[7]; + obj.removetrigger(307); + state = 0; + break; + case 308: + startscript = true; + newscript="custom_"+customscript[8]; + obj.removetrigger(308); + state = 0; + break; + case 309: + startscript = true; + newscript="custom_"+customscript[9]; + obj.removetrigger(309); + state = 0; + break; + case 310: + startscript = true; + newscript="custom_"+customscript[10]; + obj.removetrigger(310); + state = 0; + break; + case 311: + startscript = true; + newscript="custom_"+customscript[11]; + obj.removetrigger(311); + state = 0; + break; + case 312: + startscript = true; + newscript="custom_"+customscript[12]; + obj.removetrigger(312); + state = 0; + break; + case 313: + startscript = true; + newscript="custom_"+customscript[13]; + obj.removetrigger(313); + state = 0; + break; + case 314: + startscript = true; + newscript="custom_"+customscript[14]; + obj.removetrigger(314); + state = 0; + break; + case 315: + startscript = true; + newscript="custom_"+customscript[15]; + obj.removetrigger(315); + state = 0; + break; + case 316: + startscript = true; + newscript="custom_"+customscript[16]; + obj.removetrigger(316); + state = 0; + break; + case 317: + startscript = true; + newscript="custom_"+customscript[17]; + obj.removetrigger(317); + state = 0; + break; + case 318: + startscript = true; + newscript="custom_"+customscript[18]; + obj.removetrigger(318); + state = 0; + break; + case 319: + startscript = true; + newscript="custom_"+customscript[19]; + obj.removetrigger(319); + state = 0; + break; + case 320: + startscript = true; + newscript="custom_"+customscript[20]; + obj.removetrigger(320); + state = 0; + break; + case 321: + startscript = true; + newscript="custom_"+customscript[21]; + obj.removetrigger(321); + state = 0; + break; + case 322: + startscript = true; + newscript="custom_"+customscript[22]; + obj.removetrigger(322); + state = 0; + break; + case 323: + startscript = true; + newscript="custom_"+customscript[23]; + obj.removetrigger(323); + state = 0; + break; + case 324: + startscript = true; + newscript="custom_"+customscript[24]; + obj.removetrigger(324); + state = 0; + break; + case 325: + startscript = true; + newscript="custom_"+customscript[25]; + obj.removetrigger(325); + state = 0; + break; + case 326: + startscript = true; + newscript="custom_"+customscript[26]; + obj.removetrigger(326); + state = 0; + break; + case 327: + startscript = true; + newscript="custom_"+customscript[27]; + obj.removetrigger(327); + state = 0; + break; + case 328: + startscript = true; + newscript="custom_"+customscript[28]; + obj.removetrigger(328); + state = 0; + break; + case 329: + startscript = true; + newscript="custom_"+customscript[29]; + obj.removetrigger(329); + state = 0; + break; + case 330: + startscript = true; + newscript="custom_"+customscript[30]; + obj.removetrigger(330); + state = 0; + break; + case 331: + startscript = true; + newscript="custom_"+customscript[31]; + obj.removetrigger(331); + state = 0; + break; + case 332: + startscript = true; + newscript="custom_"+customscript[32]; + obj.removetrigger(332); + state = 0; + break; + case 333: + startscript = true; + newscript="custom_"+customscript[33]; + obj.removetrigger(333); + state = 0; + break; + case 334: + startscript = true; + newscript="custom_"+customscript[34]; + obj.removetrigger(334); + state = 0; + break; + case 335: + startscript = true; + newscript="custom_"+customscript[35]; + obj.removetrigger(335); + state = 0; + break; + case 336: + startscript = true; + newscript="custom_"+customscript[36]; + obj.removetrigger(336); + state = 0; + break; + + case 1000: + dwgfx.showcutscenebars = true; + hascontrol = false; + completestop = true; + state++; + statedelay = 15; + break; + case 1001: + //Found a trinket! + advancetext = true; + state++; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Congratulations! ", 50, 105, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a shiny trinket!"); + dwgfx.textboxcenterx(); + + if(map.custommode) + { + dwgfx.createtextbox(" " + help.number(trinkets) + " out of " + help.number(map.customtrinkets)+ " ", 50, 65, 174, 174, 174); + dwgfx.textboxcenterx(); + } + else + { + dwgfx.createtextbox(" " + help.number(trinkets) + " out of Twenty ", 50, 65, 174, 174, 174); + dwgfx.textboxcenterx(); + } + } + else + { + dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a shiny trinket!"); + dwgfx.textboxcenterx(); + + if(map.custommode) + { + dwgfx.createtextbox(" " + help.number(trinkets) + " out of " + help.number(map.customtrinkets)+ " ", 50, 135, 174, 174, 174); + dwgfx.textboxcenterx(); + } + else + { + dwgfx.createtextbox(" " + help.number(trinkets) + " out of Twenty ", 50, 135, 174, 174, 174); + dwgfx.textboxcenterx(); + } + } + break; + case 1003: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + completestop = false; + state = 0; + //music.play(music.resumesong); + if(!muted && music.currentsong>-1) music.fadeMusicVolumeIn(3000); + dwgfx.showcutscenebars = false; + break; + + case 1010: + dwgfx.showcutscenebars = true; + hascontrol = false; + completestop = true; + state++; + statedelay = 15; + break; + case 1011: + //Found a trinket! + advancetext = true; + state++; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Congratulations! ", 50, 105, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a lost crewmate!"); + dwgfx.textboxcenterx(); + + if(int(map.customcrewmates-crewmates)==0) + { + dwgfx.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174); + } + else if(map.customcrewmates-crewmates==1) + { + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 135, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 135, 174, 174, 174); + } + dwgfx.textboxcenterx(); + + } + else + { + dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a lost crewmate!"); + dwgfx.textboxcenterx(); + + if(int(map.customcrewmates-crewmates)==0) + { + dwgfx.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174); + } + else if(map.customcrewmates-crewmates==1) + { + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 135, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 135, 174, 174, 174); + } + dwgfx.textboxcenterx(); + } + break; + case 1013: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + completestop = false; + state = 0; + + if(map.customcrewmates-crewmates==0) + { + if(map.custommodeforreal) + { + dwgfx.fademode = 2; + if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000); + if(ed.levmusic>0) music.fadeout(); + state=1014; + } + else + { + gamestate = EDITORMODE; + dwgfx.backgrounddrawn=false; + if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000); + if(ed.levmusic>0) music.fadeout(); + } + } + else + { + if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000); + } + dwgfx.showcutscenebars = false; + break; + case 1014: + frames--; + if(dwgfx.fademode == 1) state++; + break; + case 1015: + dwgfx.flipmode = false; + gamestate = TITLEMODE; + dwgfx.fademode = 4; + music.play(6); + dwgfx.backgrounddrawn = true; + map.tdrawback = true; + //Update level stats + if(map.customcrewmates-crewmates==0) + { + //Finished level + if(map.customtrinkets-trinkets==0) + { + //and got all the trinkets! + updatecustomlevelstats(customlevelfilename, 3); + } + else + { + updatecustomlevelstats(customlevelfilename, 1); + } + } + createmenu("levellist"); + state = 0; + break; + + + case 2000: + //Game Saved! + if (intimetrial || nodeathmode || inintermission) + { + state = 0; + } + else + { + savetele(map, obj, music); + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Game Saved ", -1, 202, 174, 174, 174); + dwgfx.textboxtimer(25); + } + else + { + dwgfx.createtextbox(" Game Saved ", -1, 12, 174, 174, 174); + dwgfx.textboxtimer(25); + } + state = 0; + } + break; + + case 2500: + + music.play(5); + //Activating a teleporter (appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 2501: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + //we're done here! + music.playef(10, 10); + break; + case 2502: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + + obj.entities[i].xp = obj.entities[obj.getteleporter()].xp+44; + obj.entities[i].yp = obj.entities[obj.getteleporter()].yp+44; + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + + i = obj.getteleporter(); + obj.entities[i].tile = 1; + obj.entities[i].colour = 101; + break; + case 2503: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 2504: + state++; + i = obj.getplayer(); + //obj.entities[i].xp += 10; + break; + case 2505: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 8; + break; + case 2506: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 6; + break; + case 2507: + state++; + i = obj.getplayer(); + //obj.entities[i].xp += 4; + break; + case 2508: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 2; + break; + case 2509: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 1; + break; + case 2510: + advancetext = true; + hascontrol = false; + dwgfx.createtextbox("Hello?", 125+24, 152-20, 164, 164, 255); + state++; + music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 2512: + advancetext = true; + hascontrol = false; + dwgfx.createtextbox("Is anyone there?", 125+8, 152-24, 164, 164, 255); + state++; + music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 2514: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + + state = 0; + music.play(3); + break; + + + case 3000: + //Activating a teleporter (long version for level complete) + state++; + statedelay = 30; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 3001: + //Activating a teleporter 2 + state++; + statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3002: + //Activating a teleporter 2 + state++; + statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3003: + //Activating a teleporter 2 + state++; + statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3004: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + //we're done here! + music.playef(10, 10); + break; + case 3005: + //Activating a teleporter 2 + state++; + statedelay = 50; + //testing! + //state = 3006; //Warp Zone + //state = 3020; //Space Station + switch(companion) + { + case 6: + state = 3006; + break; //Warp Zone + case 7: + state = 3020; + break; //Space Station + case 8: + state = 3040; + break; //Lab + case 9: + state = 3060; + break; //Tower + case 10: + state = 3080; + break; //Intermission 2 + case 11: + state = 3085; + break; //Intermission 1 + } + + i = obj.getplayer(); + obj.entities[i].colour = 0; + obj.entities[i].invis = true; + + i = obj.getcompanion(companion); + if(i>-1) + { + obj.entities[i].active = false; + } + + i = obj.getteleporter(); + obj.entities[i].tile = 1; + obj.entities[i].colour = 100; + break; + + case 3006: + //Level complete! (warp zone) + unlocknum(4, map, dwgfx); + lastsaved = 4; + music.play(0); + state++; + statedelay = 75; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 180, 165, 165, 255); + } + else + { + dwgfx.createtextbox("", -1, 12, 165, 165, 255); + } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + + /* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3007: + state++; + statedelay = 45; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 104, 175,174,174); + } + else + { + dwgfx.createtextbox("", -1, 64+8+16, 175,174,174); + } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3008: + state++; + statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) + { + tempstring = " One remains "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else if (temp > 0) + { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else + { + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + } + } + dwgfx.textboxcenterx(); + break; + case 3009: + state++; + statedelay = 0; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + } + else + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + } + dwgfx.textboxcenterx(); + break; + case 3010: + if (jumppressed) + { + state++; + statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3011: + state = 3070; + statedelay = 0; + break; + + case 3020: + //Level complete! (Space Station 2) + unlocknum(3, map, dwgfx); + lastsaved = 2; + music.play(0); + state++; + statedelay = 75; + + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 180, 165, 165, 255); + } + else + { + dwgfx.createtextbox("", -1, 12, 165, 165, 255); + } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + + /* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3021: + state++; + statedelay = 45; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 104, 174,175,174); + } + else + { + dwgfx.createtextbox("", -1, 64+8+16, 174,175,174); + } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3022: + state++; + statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) + { + tempstring = " One remains "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else if (temp > 0) + { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else + { + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + } + } + dwgfx.textboxcenterx(); + break; + case 3023: + state++; + statedelay = 0; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + } + else + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + } + dwgfx.textboxcenterx(); + break; + case 3024: + if (jumppressed) + { + state++; + statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3025: + state = 3070; + statedelay = 0; + break; + + case 3040: + //Level complete! (Lab) + unlocknum(1, map, dwgfx); + lastsaved = 5; + music.play(0); + state++; + statedelay = 75; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 180, 165, 165, 255); + } + else + { + dwgfx.createtextbox("", -1, 12, 165, 165, 255); + } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + + /* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3041: + state++; + statedelay = 45; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 104, 174,174,175); + } + else + { + dwgfx.createtextbox("", -1, 64+8+16, 174,174,175); + } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3042: + state++; + statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) + { + tempstring = " One remains "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else if (temp > 0) + { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else + { + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + } + } + dwgfx.textboxcenterx(); + break; + case 3043: + state++; + statedelay = 0; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + } + else + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + } + dwgfx.textboxcenterx(); + break; + case 3044: + if (jumppressed) + { + state++; + statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3045: + state = 3070; + statedelay = 0; + break; + + case 3050: + //Level complete! (Space Station 1) + unlocknum(0, map, dwgfx); + lastsaved = 1; + music.play(0); + state++; + statedelay = 75; + + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 180, 165, 165, 255); + } + else + { + dwgfx.createtextbox("", -1, 12, 165, 165, 255); + } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + + /* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3051: + state++; + statedelay = 45; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 104, 175,175,174); + } + else + { + dwgfx.createtextbox("", -1, 64+8+16, 175,175,174); + } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3052: + state++; + statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) + { + tempstring = " One remains "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else if (temp > 0) + { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else + { + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + } + } + dwgfx.textboxcenterx(); + break; + case 3053: + state++; + statedelay = 0; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + } + else + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + } + dwgfx.textboxcenterx(); + break; + case 3054: + if (jumppressed) + { + state++; + statedelay = 30; + dwgfx.textboxremove(); + crewstats[1] = 0; //Set violet's rescue script to 0 to make the next bit easier + teleportscript = ""; + } + break; + case 3055: + dwgfx.fademode = 2; + state++; + statedelay = 10; + break; + case 3056: + if(dwgfx.fademode==1) + { + startscript = true; + if (nocutscenes) + { + newscript="bigopenworldskip"; + } + else + { + newscript = "bigopenworld"; + } + state = 0; + } + break; + + + case 3060: + //Level complete! (Tower) + unlocknum(2, map, dwgfx); + lastsaved = 3; + music.play(0); + state++; + statedelay = 75; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 180, 165, 165, 255); + } + else + { + dwgfx.createtextbox("", -1, 12, 165, 165, 255); + } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + + /* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3061: + state++; + statedelay = 45; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 104, 175,174,175); + } + else + { + dwgfx.createtextbox("", -1, 64+8+16, 175,174,175); + } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3062: + state++; + statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) + { + tempstring = " One remains "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else if (temp > 0) + { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); + } + } + else + { + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); + } + } + dwgfx.textboxcenterx(); + break; + case 3063: + state++; + statedelay = 0; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + } + else + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + } + dwgfx.textboxcenterx(); + break; + case 3064: + if (jumppressed) + { + state++; + statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3065: + state = 3070; + statedelay = 0; + break; + + + case 3070: + dwgfx.fademode = 2; + state++; + break; + case 3071: + if (dwgfx.fademode == 1) state++; + break; + case 3072: + //Ok, we need to adjust some flags based on who've we've rescued. Some of there conversation options + //change depending on when they get back to the ship. + if (lastsaved == 2) + { + if (crewstats[3]) obj.flags[25] = 1; + if (crewstats[4]) obj.flags[26] = 1; + if (crewstats[5]) obj.flags[24] = 1; + } + else if (lastsaved == 3) + { + if (crewstats[2]) obj.flags[50] = 1; + if (crewstats[4]) obj.flags[49] = 1; + if (crewstats[5]) obj.flags[48] = 1; + } + else if (lastsaved == 4) + { + if (crewstats[2]) obj.flags[54] = 1; + if (crewstats[3]) obj.flags[55] = 1; + if (crewstats[5]) obj.flags[56] = 1; + } + else if (lastsaved == 5) + { + if (crewstats[2]) obj.flags[37] = 1; + if (crewstats[3]) obj.flags[38] = 1; + if (crewstats[4]) obj.flags[39] = 1; + } + //We're pitch black now, make a decision + companion = 0; + if (crewrescued() == 6) + { + startscript = true; + newscript="startlevel_final"; + state = 0; + } + else if (crewrescued() == 4) + { + companion = 11; + supercrewmate = true; + scmprogress = 0; + + startscript = true; + newscript = "intermission_1"; + obj.flags[19] = 1; + if (lastsaved == 2) obj.flags[32] = 1; + if (lastsaved == 3) obj.flags[35] = 1; + if (lastsaved == 4) obj.flags[34] = 1; + if (lastsaved == 5) obj.flags[33] = 1; + state = 0; + } + else if (crewrescued() == 5) + { + startscript = true; + newscript = "intermission_2"; + obj.flags[20] = 1; + if (lastsaved == 2) obj.flags[32] = 1; + if (lastsaved == 3) obj.flags[35] = 1; + if (lastsaved == 4) obj.flags[34] = 1; + if (lastsaved == 5) obj.flags[33] = 1; + state = 0; + } + else + { + startscript = true; + newscript="regularreturn"; + state = 0; + } + break; + + case 3080: + //returning from an intermission, very like 3070 + if (inintermission) + { + dwgfx.fademode = 2; + companion = 0; + state=3100; + } + else + { + unlocknum(7, map, dwgfx); + dwgfx.fademode = 2; + companion = 0; + state++; + } + break; + case 3081: + if (dwgfx.fademode == 1) state++; + break; + case 3082: + map.finalmode = false; + startscript = true; + newscript="regularreturn"; + state = 0; + break; + + case 3085: + //returning from an intermission, very like 3070 + //return to menu from here + if (inintermission) + { + companion = 0; + supercrewmate = false; + state++; + dwgfx.fademode = 2; + music.fadeout(); + state=3100; + } + else + { + unlocknum(6, map, dwgfx); + dwgfx.fademode = 2; + companion = 0; + supercrewmate = false; + state++; + } + break; + case 3086: + if (dwgfx.fademode == 1) state++; + break; + case 3087: + map.finalmode = false; + startscript = true; + newscript="regularreturn"; + state = 0; + break; + + case 3100: + if(dwgfx.fademode == 1) state++; + break; + case 3101: + dwgfx.flipmode = false; + gamestate = 1; + dwgfx.fademode = 4; + dwgfx.backgrounddrawn = true; + map.tdrawback = true; + createmenu("play"); + music.play(6); + state = 0; + break; + + //startscript = true; newscript="returntohub"; + //state = 0; + + /*case 3025: + if (recording == 1) { + //if recording the input, output it to debug here + trace(recordstring); + help.toclipboard(recordstring); + } + test = true; teststring = recordstring; + dwgfx.createtextbox(" Congratulations! ", 50, 80, 164, 164, 255); + dwgfx.addline(""); + dwgfx.addline("Your play of this level has"); + dwgfx.addline("been copied to the clipboard."); + dwgfx.addline(""); + dwgfx.addline("Please consider pasting and"); + dwgfx.addline("sending it to me! Even if you"); + dwgfx.addline("made a lot of mistakes - knowing"); + dwgfx.addline("exactly where people are having"); + dwgfx.addline("trouble is extremely useful!"); + dwgfx.textboxcenter(); + state = 0; + break;*/ + + case 3500: + music.fadeout(); + state++; + statedelay = 120; + //state = 3511; //testing + break; + case 3501: + //Game complete! + NETWORK_unlockAchievement("vvvvvvgamecomplete"); + unlocknum(5, map, dwgfx); + crewstats[0] = true; + state++; + statedelay = 75; + music.play(7); + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("", -1, 180, 164, 165, 255); + } + else + { + dwgfx.createtextbox("", -1, 12, 164, 165, 255); + } + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3502: + state++; + statedelay = 45+15; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 175-24, 0, 0, 0); + } + else + { + dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 64, 0, 0, 0); + } + savetime = timestring(help); + break; + case 3503: + state++; + statedelay = 45; + + tempstring = help.number(trinkets); + if (dwgfx.flipmode) + { + dwgfx.createtextbox("Trinkets Found:", 48, 155-24, 0,0,0); + dwgfx.createtextbox(tempstring, 180, 155-24, 0, 0, 0); + } + else + { + dwgfx.createtextbox("Trinkets Found:", 48, 84, 0,0,0); + dwgfx.createtextbox(tempstring, 180, 84, 0, 0, 0); + } + break; + case 3504: + state++; + statedelay = 45+15; + + tempstring = savetime; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Game Time:", 64, 143-24, 0,0,0); + dwgfx.createtextbox(tempstring, 180, 143-24, 0, 0, 0); + } + else + { + dwgfx.createtextbox(" Game Time:", 64, 96, 0,0,0); + dwgfx.createtextbox(tempstring, 180, 96, 0, 0, 0); + } + break; + case 3505: + state++; + statedelay = 45; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Total Flips:", 64, 116-24, 0,0,0); + dwgfx.createtextbox(help.String(totalflips), 180, 116-24, 0, 0, 0); + } + else + { + dwgfx.createtextbox(" Total Flips:", 64, 123, 0,0,0); + dwgfx.createtextbox(help.String(totalflips), 180, 123, 0, 0, 0); + } + break; + case 3506: + state++; + statedelay = 45+15; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox("Total Deaths:", 64, 104-24, 0,0,0); + dwgfx.createtextbox(help.String(deathcounts), 180, 104-24, 0, 0, 0); + } + else + { + dwgfx.createtextbox("Total Deaths:", 64, 135, 0,0,0); + dwgfx.createtextbox(help.String(deathcounts), 180, 135, 0, 0, 0); + } + break; + case 3507: + state++; + statedelay = 45+15; + + if (dwgfx.flipmode) + { + tempstring = "Hardest Room (with " + help.String(hardestroomdeaths) + " deaths)"; + dwgfx.createtextbox(tempstring, -1, 81-24, 0,0,0); + dwgfx.createtextbox(hardestroom, -1, 69-24, 0, 0, 0); + } + else + { + tempstring = "Hardest Room (with " + help.String(hardestroomdeaths) + " deaths)"; + dwgfx.createtextbox(tempstring, -1, 158, 0,0,0); + dwgfx.createtextbox(hardestroom, -1, 170, 0, 0, 0); + } + break; + case 3508: + state++; + statedelay = 0; + + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 20, 164, 164, 255); + } + else + { + dwgfx.createtextbox(" Press ACTION to continue ", -1, 196, 164, 164, 255); + } + dwgfx.textboxcenterx(); + break; + case 3509: + if (jumppressed) + { + state++; + statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3510: + //Save stats and stuff here + if (obj.flags[73] == 0) + { + //flip mode complete + NETWORK_unlockAchievement("vvvvvvgamecompleteflip"); + unlock[19] = true; + } + + if (bestgamedeaths == -1) + { + bestgamedeaths = deathcounts; + } + else + { + if (deathcounts < bestgamedeaths) + { + bestgamedeaths = deathcounts; + } + } + + if (bestgamedeaths > -1) { + if (bestgamedeaths <= 500) { + NETWORK_unlockAchievement("vvvvvvcomplete500"); + } + if (bestgamedeaths <= 250) { + NETWORK_unlockAchievement("vvvvvvcomplete250"); + } + if (bestgamedeaths <= 100) { + NETWORK_unlockAchievement("vvvvvvcomplete100"); + } + if (bestgamedeaths <= 50) { + NETWORK_unlockAchievement("vvvvvvcomplete50"); + } + } + + + savestats(map, dwgfx); + if (nodeathmode) + { + NETWORK_unlockAchievement("vvvvvvmaster"); //bloody hell + unlock[20] = true; + state = 3520; + statedelay = 0; + } + else + { + statedelay = 120; + state++; + } + break; + case 3511: + //Activating a teleporter (long version for level complete) + i = obj.getplayer(); + obj.entities[i].colour = 102; + + obj.flags[67] = 1; + + state++; + statedelay = 30; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 3512: + //Activating a teleporter 2 + state++; + statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3513: + //Activating a teleporter 2 + state++; + statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3514: + //Activating a teleporter 2 + state++; + statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3515: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + + i = obj.getplayer(); + obj.entities[i].colour = 0; + obj.entities[i].invis = true; + + //we're done here! + music.playef(10, 10); + statedelay = 60; + break; + case 3516: + dwgfx.fademode = 2; + state++; + break; + case 3517: + if (dwgfx.fademode == 1) + { + state++; + statedelay = 30; + } + break; + case 3518: + dwgfx.fademode = 4; + state = 0; + statedelay = 30; + //music.play(5); + //music.play(10); + + map.finalmode = false; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + map.finalstretch = false; + map.finalx = 100; + map.finaly = 100; + + dwgfx.cutscenebarspos = 320; + + teleport_to_new_area = true; + teleportscript = "gamecomplete"; + break; + + case 3520: + //NO DEATH MODE COMPLETE JESUS + hascontrol = false; + crewstats[0] = true; + + dwgfx.fademode = 2; + state++; + break; + case 3521: + if(dwgfx.fademode == 1) state++; + break; + case 3522: + dwgfx.flipmode = false; + gamestate = 1; + dwgfx.fademode = 4; + dwgfx.backgrounddrawn = true; + map.tdrawback = true; + createmenu("nodeathmodecomplete"); + state = 0; + break; + + case 4000: + //Activating a teleporter (short version) + state++; + statedelay = 10; + flashlight = 5; + screenshake = 10; + music.playef(9, 10); + break; + case 4001: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + //we're done here! + music.playef(10, 10); + break; + case 4002: + //Activating a teleporter 2 + state++; + statedelay = 10; + //testing! + //state = 3006; //Warp Zone + //state = 3020; //Space Station + //state = 3040; //Lab + + i = obj.getplayer(); + obj.entities[i].colour = 0; + obj.entities[i].invis = true; + + i = obj.getteleporter(); + if(i>-1) + { + obj.entities[i].tile = 1; + obj.entities[i].colour = 100; + } + break; + case 4003: + state = 0; + statedelay = 0; + teleport_to_new_area = true; + break; + + case 4010: + //Activating a teleporter (default appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4011: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4012: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + break; + case 4013: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4014: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4015: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 8; + break; + case 4016: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 6; + break; + case 4017: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 3; + break; + case 4018: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 1; + break; + case 4019: + if (intimetrial || nodeathmode || inintermission) + { + } + else + { + savetele(map, obj, music); + } + i = obj.getteleporter(); + activetele = true; + teleblock.x = obj.entities[i].xp - 32; + teleblock.y = obj.entities[i].yp - 32; + teleblock.w = 160; + teleblock.h = 160; + hascontrol = true; + advancetext = false; + state = 0; + break; + + case 4020: + //Activating a teleporter (default appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4021: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4022: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + break; + case 4023: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 12; + break; + case 4024: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 12; + break; + case 4025: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4026: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 8; + break; + case 4027: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 5; + break; + case 4028: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 2; + break; + case 4029: + hascontrol = true; + advancetext = false; + state = 0; + break; + + case 4030: + //Activating a teleporter (default appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4031: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4032: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + obj.entities[i].dir = 0; + + obj.entities[i].ay = -6; + obj.entities[i].ax = -6; + obj.entities[i].vy = -6; + obj.entities[i].vx = -6; + break; + case 4033: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 12; + break; + case 4034: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 12; + break; + case 4035: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 10; + break; + case 4036: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 8; + break; + case 4037: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 5; + break; + case 4038: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp -= 2; + break; + case 4039: + hascontrol = true; + advancetext = false; + state = 0; + break; + + case 4040: + //Activating a teleporter (default appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4041: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4042: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + break; + case 4043: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 12; + obj.entities[i].yp -= 15; + break; + case 4044: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 12; + obj.entities[i].yp -= 10; + break; + case 4045: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 12; + obj.entities[i].yp -= 10; + break; + case 4046: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 8; + obj.entities[i].yp -= 8; + break; + case 4047: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 6; + obj.entities[i].yp -= 8; + break; + case 4048: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 3; + break; + case 4049: + hascontrol = true; + advancetext = false; + state = 0; + break; + + case 4050: + //Activating a teleporter (default appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4051: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4052: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + break; + case 4053: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 4; + obj.entities[i].yp -= 15; + break; + case 4054: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 4; + obj.entities[i].yp -= 10; + break; + case 4055: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 4; + obj.entities[i].yp -= 10; + break; + case 4056: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 4; + obj.entities[i].yp -= 8; + break; + case 4057: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 2; + obj.entities[i].yp -= 8; + break; + case 4058: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 1; + break; + case 4059: + hascontrol = true; + advancetext = false; + state = 0; + break; + + case 4060: + //Activating a teleporter (default appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4061: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4062: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + obj.entities[i].dir = 0; + + obj.entities[i].ay = -6; + obj.entities[i].ax = -6; + obj.entities[i].vy = -6; + obj.entities[i].vx = -6; + break; + case 4063: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 28; + obj.entities[i].yp -= 8; + break; + case 4064: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 28; + obj.entities[i].yp -= 8; + break; + case 4065: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 25; + break; + case 4066: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 25; + break; + case 4067: + state++; + i = obj.getplayer(); + obj.entities[i].xp -= 20; + break; + case 4068: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp -= 16; + break; + case 4069: + hascontrol = true; + advancetext = false; + state = 0; + break; + + + case 4070: + //Activating a teleporter (special for final script, player has colour changed to match rescued crewmate) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4071: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4072: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].invis = false; + obj.entities[i].dir = 1; + obj.entities[i].colour = obj.crewcolour(lastsaved); + + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + break; + case 4073: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4074: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4075: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 8; + break; + case 4076: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 6; + break; + case 4077: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 3; + break; + case 4078: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 1; + break; + case 4079: + state = 0; + startscript = true; + newscript = "finallevel_teleporter"; + break; + + case 4080: + //Activating a teleporter (default appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4081: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4082: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + break; + case 4083: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4084: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4085: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 8; + break; + case 4086: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 6; + break; + case 4087: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 3; + break; + case 4088: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 1; + break; + case 4089: + startscript = true; + newscript = "gamecomplete_ending"; + state = 0; + break; + + case 4090: + //Activating a teleporter (default appear) + state++; + statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 4091: + //Activating a teleporter 2 + state++; + statedelay = 0; + flashlight = 5; + screenshake = 0; + music.playef(10, 10); + break; + case 4092: + //Activating a teleporter 2 + state++; + statedelay = 5; + + i = obj.getplayer(); + j = obj.getteleporter(); + if (j != -1) + { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; + obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + break; + case 4093: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4094: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 4095: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 8; + break; + case 4096: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 6; + break; + case 4097: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 3; + break; + case 4098: + state++; + statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 1; + break; + case 4099: + if (nocutscenes) + { + startscript = true; + newscript = "levelonecompleteskip"; + } + else + { + startscript = true; + newscript = "levelonecomplete_ending"; + } + state = 0; + break; + } + } +} + +void Game::gethardestroom( mapclass& map ) +{ + if (currentroomdeaths > hardestroomdeaths) + { + hardestroomdeaths = currentroomdeaths; + hardestroom = map.roomname; + if (map.roomname == "glitch") + { + if (roomx == 42 && roomy == 51) + { + hardestroom = "Rear Vindow"; + } + else if (roomx == 48 && roomy == 51) + { + hardestroom = "On the Vaterfront"; + } + else if (roomx == 49 && roomy == 51) + { + hardestroom = "The Untouchavles"; + } + } + else if (map.roomname == "change") + { + if (roomx == 45 && roomy == 51) hardestroom =map.specialnames[3]; + if (roomx == 46 && roomy == 51) hardestroom =map.specialnames[4]; + if (roomx == 47 && roomy == 51) hardestroom =map.specialnames[5]; + if (roomx == 50 && roomy == 53) hardestroom =map.specialnames[6]; + if (roomx == 50 && roomy == 54) hardestroom = map.specialnames[7]; + } + } +} + +void Game::deletestats( mapclass& map, Graphics& dwgfx ) +{ + for (int i = 0; i < 25; i++) + { + unlock[i] = false; + unlocknotify[i] = false; + } + for (int i = 0; i < 6; i++) + { + besttimes[i] = -1; + besttrinkets[i] = -1; + bestlives[i] = -1; + bestrank[i] = -1; + } + dwgfx.setflipmode = false; + stat_trinkets = 0; + savestats(map, dwgfx); +} + +void Game::unlocknum( int t, mapclass& map, Graphics& dwgfx ) +{ + unlock[t] = true; + savestats(map, dwgfx); +} + +void Game::loadstats( mapclass& map, Graphics& dwgfx ) +{ + // TODO loadstats + TiXmlDocument doc((saveFilePath+"unlock.vvv").c_str()); + if (!doc.LoadFile()) + { + savestats(map, dwgfx); + printf("No Stats found. Assuming a new player\n"); + } + + TiXmlHandle hDoc(&doc); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + + { + pElem=hDoc.FirstChildElement().Element(); + // should always have a valid root but handle gracefully if it does + if (!pElem) + { + + } + ; + + // save this for later + hRoot=TiXmlHandle(pElem); + } + + // WINDOW DIMS, ADDED AT PATCH 22 + int width = 320; + int height = 240; + + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + + if (pKey == "unlock") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + unlock.clear(); + for(size_t i = 0; i < values.size(); i++) + { + unlock.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "unlocknotify") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + unlocknotify.clear(); + for(size_t i = 0; i < values.size(); i++) + { + unlocknotify.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "besttimes") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + besttimes.clear(); + for(size_t i = 0; i < values.size(); i++) + { + besttimes.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "besttrinkets") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + besttrinkets.clear(); + for(size_t i = 0; i < values.size(); i++) + { + besttrinkets.push_back(atoi(values[i].c_str())); + } + } + } + + + if (pKey == "bestlives") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + bestlives.clear(); + for(size_t i = 0; i < values.size(); i++) + { + bestlives.push_back(atoi(values[i].c_str())); + } + } + } + + + if (pKey == "bestrank") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + bestrank.clear(); + for(size_t i = 0; i < values.size(); i++) + { + bestrank.push_back(atoi(values[i].c_str())); + } + } + } + + + + if (pKey == "bestgamedeaths") + { + bestgamedeaths = atoi(pText); + } + + if (pKey == "stat_trinkets") + { + stat_trinkets = atoi(pText); + } + + if (pKey == "fullscreen") + { + fullscreen = atoi(pText); + } + + if (pKey == "stretch") + { + stretchMode = atoi(pText); + } + + if (pKey == "useLinearFilter") + { + useLinearFilter = atoi(pText); + } + + if (pKey == "window_width") + { + width = atoi(pText); + } + if (pKey == "window_height") + { + height = atoi(pText); + } + + + if (pKey == "noflashingmode") + { + noflashingmode = atoi(pText); + } + + if (pKey == "colourblindmode") + { + colourblindmode = atoi(pText); + } + + if (pKey == "setflipmode") + { + dwgfx.setflipmode = atoi(pText); + } + + if (pKey == "invincibility") + { + map.invincibility = atoi(pText); + } + + if (pKey == "slowdown") + { + slowdown = atoi(pText); + switch(slowdown) + { + case 30: + gameframerate=34; + break; + case 24: + gameframerate=41; + break; + case 18: + gameframerate=55; + break; + case 12: + gameframerate=83; + break; + default: + gameframerate=34; + break; + } + + } + + if (pKey == "swnbestrank") + { + swnbestrank = atoi(pText); + } + + if (pKey == "swnrecord") + { + swnrecord = atoi(pText); + } + + if (pKey == "advanced_mode") + { + advanced_mode = atoi(pText); + } + + if (pKey == "advanced_smoothing") + { + fullScreenEffect_badSignal = atoi(pText); + dwgfx.screenbuffer->badSignalEffect = fullScreenEffect_badSignal; + } + + if (pKey == "usingmmmmmm") + { + if(atoi(pText)>0){ + usingmmmmmm = 1; + }else{ + usingmmmmmm = 0; + } + } + + if (pKey == "flipButton") + { + SDL_GameControllerButton newButton; + if (GetButtonFromString(pText, &newButton)) + { + controllerButton_flip.push_back(newButton); + } + } + + if (pKey == "enterButton") + { + SDL_GameControllerButton newButton; + if (GetButtonFromString(pText, &newButton)) + { + controllerButton_map.push_back(newButton); + } + } + + if (pKey == "escButton") + { + SDL_GameControllerButton newButton; + if (GetButtonFromString(pText, &newButton)) + { + controllerButton_esc.push_back(newButton); + } + } + + if (pKey == "controllerSensitivity") + { + controllerSensitivity = atoi(pText); + } + + } + + if(fullscreen) + { + dwgfx.screenbuffer->toggleFullScreen(); + } + for (int i = 0; i < stretchMode; i += 1) + { + dwgfx.screenbuffer->toggleStretchMode(); + } + if (useLinearFilter) + { + dwgfx.screenbuffer->toggleLinearFilter(); + } + dwgfx.screenbuffer->ResizeScreen(width, height); + + if (controllerButton_flip.size() < 1) + { + controllerButton_flip.push_back(SDL_CONTROLLER_BUTTON_A); + } + if (controllerButton_map.size() < 1) + { + controllerButton_map.push_back(SDL_CONTROLLER_BUTTON_Y); + } + if (controllerButton_esc.size() < 1) + { + controllerButton_esc.push_back(SDL_CONTROLLER_BUTTON_B); + } +} + +void Game::savestats( mapclass& _map, Graphics& _dwgfx ) +{ + TiXmlDocument doc; + TiXmlElement* msg; + TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" ); + doc.LinkEndChild( decl ); + + TiXmlElement * root = new TiXmlElement( "Save" ); + doc.LinkEndChild( root ); + + TiXmlComment * comment = new TiXmlComment(); + comment->SetValue(" Save file " ); + root->LinkEndChild( comment ); + + TiXmlElement * dataNode = new TiXmlElement( "Data" ); + root->LinkEndChild( dataNode ); + + std::string s_unlock; + for(size_t i = 0; i < unlock.size(); i++ ) + { + s_unlock += UtilityClass::String(unlock[i]) + ","; + } + msg = new TiXmlElement( "unlock" ); + msg->LinkEndChild( new TiXmlText( s_unlock.c_str() )); + dataNode->LinkEndChild( msg ); + + std::string s_unlocknotify; + for(size_t i = 0; i < unlocknotify.size(); i++ ) + { + s_unlocknotify += UtilityClass::String(unlocknotify[i]) + ","; + } + msg = new TiXmlElement( "unlocknotify" ); + msg->LinkEndChild( new TiXmlText( s_unlocknotify.c_str() )); + dataNode->LinkEndChild( msg ); + + std::string s_besttimes; + for(size_t i = 0; i < besttrinkets.size(); i++ ) + { + s_besttimes += UtilityClass::String(besttimes[i]) + ","; + } + msg = new TiXmlElement( "besttimes" ); + msg->LinkEndChild( new TiXmlText( s_besttimes.c_str() )); + dataNode->LinkEndChild( msg ); + + std::string s_besttrinkets; + for(size_t i = 0; i < besttrinkets.size(); i++ ) + { + s_besttrinkets += UtilityClass::String(besttrinkets[i]) + ","; + } + msg = new TiXmlElement( "besttrinkets" ); + msg->LinkEndChild( new TiXmlText( s_besttrinkets.c_str() )); + dataNode->LinkEndChild( msg ); + + std::string s_bestlives; + for(size_t i = 0; i < bestlives.size(); i++ ) + { + s_bestlives += UtilityClass::String(bestlives[i]) + ","; + } + msg = new TiXmlElement( "bestlives" ); + msg->LinkEndChild( new TiXmlText( s_bestlives.c_str() )); + dataNode->LinkEndChild( msg ); + + std::string s_bestrank; + for(size_t i = 0; i < bestrank.size(); i++ ) + { + s_bestrank += UtilityClass::String(bestrank[i]) + ","; + } + msg = new TiXmlElement( "bestrank" ); + msg->LinkEndChild( new TiXmlText( s_bestrank.c_str() )); + dataNode->LinkEndChild( msg ); + + //for itoa ops + UtilityClass tu; + msg = new TiXmlElement( "bestgamedeaths" ); + msg->LinkEndChild( new TiXmlText( tu.String(bestgamedeaths).c_str() )); + dataNode->LinkEndChild( msg ); + msg = new TiXmlElement( "stat_trinkets" ); + msg->LinkEndChild( new TiXmlText( tu.String(stat_trinkets).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "fullscreen" ); + msg->LinkEndChild( new TiXmlText( tu.String(fullscreen).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "stretch" ); + msg->LinkEndChild( new TiXmlText( tu.String(stretchMode).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "useLinearFilter" ); + msg->LinkEndChild( new TiXmlText( tu.String(useLinearFilter).c_str())); + dataNode->LinkEndChild( msg ); + + int width, height; + _dwgfx.screenbuffer->GetWindowSize(&width, &height); + msg = new TiXmlElement( "window_width" ); + msg->LinkEndChild( new TiXmlText( tu.String(width).c_str())); + dataNode->LinkEndChild( msg ); + msg = new TiXmlElement( "window_height" ); + msg->LinkEndChild( new TiXmlText( tu.String(height).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "noflashingmode" ); + msg->LinkEndChild( new TiXmlText( tu.String(noflashingmode).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "colourblindmode" ); + msg->LinkEndChild( new TiXmlText( tu.String(colourblindmode).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "setflipmode" ); + msg->LinkEndChild( new TiXmlText( tu.String(_dwgfx.setflipmode).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "invincibility" ); + msg->LinkEndChild( new TiXmlText( tu.String(_map.invincibility).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "slowdown" ); + msg->LinkEndChild( new TiXmlText( tu.String(slowdown).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "swnbestrank" ); + msg->LinkEndChild( new TiXmlText( tu.String(swnbestrank).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "swnrecord" ); + msg->LinkEndChild( new TiXmlText( tu.String(swnrecord).c_str())); + dataNode->LinkEndChild( msg ); + + + msg = new TiXmlElement( "advanced_mode" ); + msg->LinkEndChild( new TiXmlText( tu.String(advanced_mode).c_str())); + dataNode->LinkEndChild( msg ); + + msg = new TiXmlElement( "advanced_smoothing" ); + msg->LinkEndChild( new TiXmlText( tu.String(fullScreenEffect_badSignal).c_str())); + dataNode->LinkEndChild( msg ); + + + msg = new TiXmlElement( "usingmmmmmm" ); + msg->LinkEndChild( new TiXmlText( tu.String(usingmmmmmm).c_str())); + dataNode->LinkEndChild( msg ); + + for (size_t i = 0; i < controllerButton_flip.size(); i += 1) + { + msg = new TiXmlElement("flipButton"); + msg->LinkEndChild(new TiXmlText(tu.String((int) controllerButton_flip[i]).c_str())); + dataNode->LinkEndChild(msg); + } + for (size_t i = 0; i < controllerButton_map.size(); i += 1) + { + msg = new TiXmlElement("enterButton"); + msg->LinkEndChild(new TiXmlText(tu.String((int) controllerButton_map[i]).c_str())); + dataNode->LinkEndChild(msg); + } + for (size_t i = 0; i < controllerButton_esc.size(); i += 1) + { + msg = new TiXmlElement("escButton"); + msg->LinkEndChild(new TiXmlText(tu.String((int) controllerButton_esc[i]).c_str())); + dataNode->LinkEndChild(msg); + } + + msg = new TiXmlElement( "controllerSensitivity" ); + msg->LinkEndChild( new TiXmlText( tu.String(controllerSensitivity).c_str())); + dataNode->LinkEndChild( msg ); + + doc.SaveFile( (saveFilePath+"unlock.vvv").c_str() ); +} + +void Game::customstart( entityclass& obj, musicclass& music ) +{ + jumpheld = true; + + savex = edsavex; + savey = edsavey; + saverx = edsaverx; + savery = edsavery; + + savegc = edsavegc; + savedir = edsavedir; //Worldmap Start + //savex = 6 * 8; savey = 15 * 8; saverx = 46; savery = 54; savegc = 0; savedir = 1; //Final Level Current + savepoint = 0; + gravitycontrol = savegc; + + coins = 0; + trinkets = 0; + + //state = 2; deathseq = -1; lifeseq = 10; //Not dead, in game initilisation state + state = 0; + deathseq = -1; + lifeseq = 0; + + //let's teleport in! + //state = 2500; + //if (!nocutscenes) music.play(5); +} + +void Game::start( entityclass& obj, musicclass& music ) +{ + jumpheld = true; + + savex = 232; + savey = 113; + saverx = 104; + savery = 110; + savegc = 0; + savedir = 1; //Worldmap Start + //savex = 6 * 8; savey = 15 * 8; saverx = 46; savery = 54; savegc = 0; savedir = 1; //Final Level Current + savepoint = 0; + gravitycontrol = savegc; + + coins = 0; + trinkets = 0; + + //state = 2; deathseq = -1; lifeseq = 10; //Not dead, in game initilisation state + state = 0; + deathseq = -1; + lifeseq = 0; + + //let's teleport in! + //state = 2500; + if (!nocutscenes) music.play(5); +} + +void Game::deathsequence( mapclass& map, entityclass& obj, musicclass& music ) +{ + int i; + if (supercrewmate && scmhurt) + { + i = obj.getscm(); + } + else + { + i = obj.getplayer(); + } + obj.entities[i].colour = 1; + + obj.entities[i].invis = false; + if (deathseq == 30) + { + if (nodeathmode) + { + music.fadeout(); + gameoverdelay = 60; + } + deathcounts++; + music.playef(2,10); + obj.entities[i].invis = true; + if (map.finalmode) + { + map.roomdeathsfinal[roomx - 41 + (20 * (roomy - 48))]++; + currentroomdeaths = map.roomdeathsfinal[roomx - 41 + (20 * (roomy - 48))]; + } + else + { + map.roomdeaths[roomx - 100 + (20*(roomy - 100))]++; + currentroomdeaths = map.roomdeaths[roomx - 100 + (20 * (roomy - 100))]; + } + } + if (deathseq == 25) obj.entities[i].invis = true; + if (deathseq == 20) obj.entities[i].invis = true; + if (deathseq == 16) obj.entities[i].invis = true; + if (deathseq == 14) obj.entities[i].invis = true; + if (deathseq == 12) obj.entities[i].invis = true; + if (deathseq < 10) obj.entities[i].invis = true; + if (!nodeathmode) + { + if (deathseq <= 1) obj.entities[i].invis = false; + } + else + { + gameoverdelay--; + } +} + +void Game::startspecial( int t, entityclass& obj, musicclass& music ) +{ + jumpheld = true; + + switch(t) + { + case 0: //Secret Lab + savex = 104; + savey = 169; + saverx = 118; + savery = 106; + savegc = 0; + savedir = 1; + break; + case 1: //Intermission 1 (any) + savex = 80; + savey = 57; + saverx = 41; + savery = 56; + savegc = 0; + savedir = 0; + break; + default: + savex = 232; + savey = 113; + saverx = 104; + savery = 110; + savegc = 0; + savedir = 1; //Worldmap Start + break; + } + + savepoint = 0; + gravitycontrol = savegc; + coins = 0; + trinkets = 0; + state = 0; + deathseq = -1; + lifeseq = 0; +} + +void Game::starttrial( int t, entityclass& obj, musicclass& music ) +{ + jumpheld = true; + + switch(t) + { + case 0: //Space Station 1 + savex = 200; + savey = 161; + saverx = 113; + savery = 105; + savegc = 0; + savedir = 1; + break; + case 1: //Lab + savex = 191; + savey = 33; + saverx = 102; + savery = 116; + savegc = 0; + savedir = 1; + break; + case 2: //Tower + savex = 84; + savey = 193, saverx = 108; + savery = 109; + savegc = 0; + savedir = 1; + break; + case 3: //Space Station 2 + savex = 148; + savey = 38; + saverx = 112; + savery = 114; + savegc = 1; + savedir = 0; + break; + case 4: //Warp + savex = 52; + savey = 73; + saverx = 114; + savery = 101; + savegc = 0; + savedir = 1; + break; + case 5: //Final + savex = 101; + savey = 113; + saverx = 46; + savery = 54; + savegc = 0; + savedir = 1; + break; + default: + savex = 232; + savey = 113; + saverx = 104; + savery = 110; + savegc = 0; + savedir = 1; //Worldmap Start + break; + } + + savepoint = 0; + gravitycontrol = savegc; + + coins = 0; + trinkets = 0; + crewmates = 0; + + //state = 2; deathseq = -1; lifeseq = 10; //Not dead, in game initilisation state + state = 0; + deathseq = -1; + lifeseq = 0; +} + +void Game::loadquick( mapclass& map, entityclass& obj, musicclass& music ) +{ + TiXmlDocument doc((saveFilePath+"qsave.vvv").c_str()); + if (!doc.LoadFile()) return; ; + + TiXmlHandle hDoc(&doc); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + + { + pElem=hDoc.FirstChildElement().Element(); + // should always have a valid root but handle gracefully if it does + if (!pElem) + { + printf("Save Not Found\n"); + } + + // save this for later + hRoot=TiXmlHandle(pElem); + } + + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + if(pText == NULL) + { + pText = ""; + } + + if (pKey == "worldmap") + { + std::string TextString = (pText); + if(TextString.length()>1) + { + std::vector values = split(TextString,','); + map.explored.clear(); + for(size_t i = 0; i < values.size(); i++) + { + map.explored.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "flags") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + obj.flags.clear(); + for(size_t i = 0; i < values.size(); i++) + { + obj.flags.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "crewstats") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + crewstats.clear(); + for(size_t i = 0; i < values.size(); i++) + { + crewstats.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "collect") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + obj.collect.clear(); + for(size_t i = 0; i < values.size(); i++) + { + obj.collect.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "finalmode") + { + map.finalmode = atoi(pText); + } + if (pKey == "finalstretch") + { + map.finalstretch = atoi(pText); + } + + if (pKey == "finalx") + { + map.finalx = atoi(pText); + } + else if (pKey == "finaly") + { + map.finaly = atoi(pText); + } + else if (pKey == "savex") + { + savex = atoi(pText); + } + else if (pKey == "savey") + { + savey = atoi(pText); + } + else if (pKey == "saverx") + { + saverx = atoi(pText); + } + else if (pKey == "savery") + { + savery = atoi(pText); + } + else if (pKey == "savegc") + { + savegc = atoi(pText); + } + else if (pKey == "savedir") + { + savedir= atoi(pText); + } + else if (pKey == "savepoint") + { + savepoint = atoi(pText); + } + else if (pKey == "trinkets") + { + trinkets = atoi(pText); + } + else if (pKey == "companion") + { + companion = atoi(pText); + } + else if (pKey == "lastsaved") + { + lastsaved = atoi(pText); + } + else if (pKey == "teleportscript") + { + teleportscript = pText; + } + else if (pKey == "supercrewmate") + { + supercrewmate = atoi(pText); + } + else if (pKey == "scmprogress") + { + scmprogress = atoi(pText); + } + else if (pKey == "scmmoveme") + { + scmmoveme = atoi(pText); + } + else if (pKey == "frames") + { + frames = atoi(pText); + frames = 0; + } + else if (pKey == "seconds") + { + seconds = atoi(pText); + } + else if (pKey == "minutes") + { + minutes = atoi(pText); + } + else if (pKey == "hours") + { + hours = atoi(pText); + } + else if (pKey == "deathcounts") + { + deathcounts = atoi(pText); + } + else if (pKey == "totalflips") + { + totalflips = atoi(pText); + } + else if (pKey == "hardestroom") + { + hardestroom = atoi(pText); + } + else if (pKey == "hardestroomdeaths") + { + hardestroomdeaths = atoi(pText); + } + else if (pKey == "currentsong") + { + music.play(atoi(pText)); + } + + } + + if (map.finalmode) + { + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + } + if (map.finalstretch) + { + map.finalstretch = true; + map.final_colormode = true; + map.final_mapcol = 0; + map.final_colorframe = 1; + } + + map.showteleporters = true; + if(obj.flags[12]==1) map.showtargets = true; + if (obj.flags[42] == 1) map.showtrinkets = true; + + +} + +void Game::customloadquick(std::string savfile, mapclass& map, entityclass& obj, musicclass& music ) +{ + std::string levelfile = savfile.substr(7); + TiXmlDocument doc((saveFilePath+levelfile+".vvv").c_str()); + if (!doc.LoadFile()) return; ; + + TiXmlHandle hDoc(&doc); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + + { + pElem=hDoc.FirstChildElement().Element(); + // should always have a valid root but handle gracefully if it does + if (!pElem) + { + printf("Save Not Found\n"); + } + + // save this for later + hRoot=TiXmlHandle(pElem); + } + + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + if(pText == NULL) + { + pText = ""; + } + + if (pKey == "worldmap") + { + std::string TextString = (pText); + if(TextString.length()>1) + { + std::vector values = split(TextString,','); + map.explored.clear(); + for(size_t i = 0; i < values.size(); i++) + { + map.explored.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "flags") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + obj.flags.clear(); + for(size_t i = 0; i < values.size(); i++) + { + obj.flags.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "moods") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + for(size_t i = 0; i < 6; i++) + { + obj.customcrewmoods[i]=atoi(values[i].c_str()); + } + } + } + + if (pKey == "crewstats") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + crewstats.clear(); + for(size_t i = 0; i < values.size(); i++) + { + crewstats.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "collect") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + obj.collect.clear(); + for(size_t i = 0; i < values.size(); i++) + { + obj.collect.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "customcollect") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + obj.customcollect.clear(); + for(size_t i = 0; i < values.size(); i++) + { + obj.customcollect.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "finalmode") + { + map.finalmode = atoi(pText); + } + if (pKey == "finalstretch") + { + map.finalstretch = atoi(pText); + } + + if (map.finalmode) + { + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + } + if (map.finalstretch) + { + map.finalstretch = true; + map.final_colormode = true; + map.final_mapcol = 0; + map.final_colorframe = 1; + } + + + if (pKey == "finalx") + { + map.finalx = atoi(pText); + } + else if (pKey == "finaly") + { + map.finaly = atoi(pText); + } + else if (pKey == "savex") + { + savex = atoi(pText); + } + else if (pKey == "savey") + { + savey = atoi(pText); + } + else if (pKey == "saverx") + { + saverx = atoi(pText); + } + else if (pKey == "savery") + { + savery = atoi(pText); + } + else if (pKey == "savegc") + { + savegc = atoi(pText); + } + else if (pKey == "savedir") + { + savedir= atoi(pText); + } + else if (pKey == "savepoint") + { + savepoint = atoi(pText); + } + else if (pKey == "trinkets") + { + trinkets = atoi(pText); + } + else if (pKey == "crewmates") + { + crewmates = atoi(pText); + } + else if (pKey == "companion") + { + companion = atoi(pText); + } + else if (pKey == "lastsaved") + { + lastsaved = atoi(pText); + } + else if (pKey == "teleportscript") + { + teleportscript = pText; + } + else if (pKey == "supercrewmate") + { + supercrewmate = atoi(pText); + } + else if (pKey == "scmprogress") + { + scmprogress = atoi(pText); + } + else if (pKey == "scmmoveme") + { + scmmoveme = atoi(pText); + } + else if (pKey == "frames") + { + frames = atoi(pText); + frames = 0; + } + else if (pKey == "seconds") + { + seconds = atoi(pText); + } + else if (pKey == "minutes") + { + minutes = atoi(pText); + } + else if (pKey == "hours") + { + hours = atoi(pText); + } + else if (pKey == "deathcounts") + { + deathcounts = atoi(pText); + } + else if (pKey == "totalflips") + { + totalflips = atoi(pText); + } + else if (pKey == "hardestroom") + { + hardestroom = atoi(pText); + } + else if (pKey == "hardestroomdeaths") + { + hardestroomdeaths = atoi(pText); + } + else if (pKey == "currentsong") + { + music.play(atoi(pText)); + } + else if (pKey == "showminimap") + { + map.customshowmm = atoi(pText); + } + + } + + map.showteleporters = true; + if(obj.flags[12]==1) map.showtargets = true; + if (obj.flags[42] == 1) map.showtrinkets = true; + +} + +//TODO load summary +void Game::loadsummary( mapclass& map, UtilityClass& help ) +{ + //quickcookie = SharedObject.getLocal("dwvvvvvv_quick"); + //telecookie = SharedObject.getLocal("dwvvvvvv_tele"); + + //if (telecookie.data.savex == undefined) { + // telecookieexists = false; telesummary = ""; + //} else { + // telecookieexists = true; telesummary = telecookie.data.summary; + // tele_gametime = giventimestring(telecookie.data.hours, telecookie.data.minutes, telecookie.data.seconds, help); + // tele_trinkets = telecookie.data.trinkets; + // tele_currentarea = map.currentarea(map.area(telecookie.data.savex, telecookie.data.savey)); + + // summary_crewstats = telecookie.data.crewstats.slice(); + // tele_crewstats = summary_crewstats.slice(); + //} + + //if (quickcookie.data.savex == undefined) { + // quickcookieexists = false; quicksummary = ""; + //} else { + // quickcookieexists = true; quicksummary = quickcookie.data.summary; + // quick_gametime = giventimestring(quickcookie.data.hours, quickcookie.data.minutes, quickcookie.data.seconds, help); + // quick_trinkets = quickcookie.data.trinkets; + // quick_currentarea = map.currentarea(map.area(quickcookie.data.savex, quickcookie.data.savey)); + + // summary_crewstats = quickcookie.data.crewstats.slice(); + // quick_crewstats = summary_crewstats.slice(); + //} + + TiXmlDocument docTele((saveFilePath+"tsave.vvv").c_str()); + if (!docTele.LoadFile()) + { + telecookieexists = false; + telesummary = ""; + } + else + { + telecookieexists = true; + TiXmlHandle hDoc(&docTele); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + + { + pElem=hDoc.FirstChildElement().Element(); + // should always have a valid root but handle gracefully if it does + if (!pElem) + { + printf("Save Not Found\n"); + } + + // save this for later + hRoot=TiXmlHandle(pElem); + } + int l_minute, l_second, l_hours; + l_minute = l_second= l_hours = 0; + int l_saveX = 0; + int l_saveY = 0; + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + + if (pKey == "summary") + { + telesummary = pText; + } + + else if (pKey == "seconds") + { + l_second = atoi(pText); + } + else if (pKey == "minutes") + { + l_minute = atoi(pText); + } + else if (pKey == "hours") + { + l_hours = atoi(pText); + } + else if (pKey == "savery") + { + l_saveY = atoi(pText); + } + else if (pKey == "saverx") + { + l_saveX = atoi(pText); + } + else if (pKey == "trinkets") + { + tele_trinkets = atoi(pText); + } + else if (pKey == "finalmode") + { + map.finalmode = atoi(pText); + } + else if (pKey == "finalstretch") + { + map.finalstretch = atoi(pText); + } + + if (pKey == "crewstats") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + tele_crewstats.clear(); + for(size_t i = 0; i < values.size(); i++) + { + tele_crewstats.push_back(atoi(values[i].c_str())); + } + } + } + + } + tele_gametime = giventimestring(l_hours,l_minute, l_second,help); + tele_currentarea = map.currentarea(map.area(l_saveX, l_saveY)); + } + + TiXmlDocument doc((saveFilePath+"qsave.vvv").c_str()); + if (!doc.LoadFile()) + { + quickcookieexists = false; + quicksummary = ""; + } + else + { + quickcookieexists = true; + TiXmlHandle hDoc(&doc); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + + { + pElem=hDoc.FirstChildElement().Element(); + // should always have a valid root but handle gracefully if it does + if (!pElem) + { + printf("Save Not Found\n"); + } + + // save this for later + hRoot=TiXmlHandle(pElem); + } + int l_minute, l_second, l_hours; + l_minute = l_second= l_hours = 0; + int l_saveX = 0; + int l_saveY = 0; + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + + if (pKey == "summary") + { + quicksummary = pText; + } + + else if (pKey == "seconds") + { + l_second = atoi(pText); + } + else if (pKey == "minutes") + { + l_minute = atoi(pText); + } + else if (pKey == "hours") + { + l_hours = atoi(pText); + } + else if (pKey == "savery") + { + l_saveY = atoi(pText); + } + else if (pKey == "saverx") + { + l_saveX = atoi(pText); + } + else if (pKey == "trinkets") + { + quick_trinkets = atoi(pText); + } + else if (pKey == "finalmode") + { + map.finalmode = atoi(pText); + } + else if (pKey == "finalstretch") + { + map.finalstretch = atoi(pText); + } + + if (pKey == "crewstats") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + quick_crewstats.clear(); + for(size_t i = 0; i < values.size(); i++) + { + quick_crewstats.push_back(atoi(values[i].c_str())); + } + } + } + + } + + quick_gametime = giventimestring(l_hours,l_minute, l_second,help); + quick_currentarea = map.currentarea(map.area(l_saveX, l_saveY)); + } + + + +} + +void Game::initteleportermode( mapclass& map ) +{ + //Set the teleporter variable to the right position! + teleport_to_teleporter = 0; + + for (int i = 0; i < map.numteleporters; i++) + { + if (roomx == map.teleporters[i].x + 100 && roomy == map.teleporters[i].y + 100) + { + teleport_to_teleporter = i; + } + } +} + +void Game::savetele( mapclass& map, entityclass& obj, musicclass& music ) +{ + //TODO make this code a bit cleaner. + + //telecookie = SharedObject.getLocal("dwvvvvvv_tele"); + //Save to the telesave cookie + telecookieexists = true; + + TiXmlDocument doc; + TiXmlElement* msg; + TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" ); + doc.LinkEndChild( decl ); + + TiXmlElement * root = new TiXmlElement( "Save" ); + doc.LinkEndChild( root ); + + TiXmlComment * comment = new TiXmlComment(); + comment->SetValue(" Save file " ); + root->LinkEndChild( comment ); + + TiXmlElement * msgs = new TiXmlElement( "Data" ); + root->LinkEndChild( msgs ); + + + //Flags, map and stats + //savestate[1].explored = map.explored.slice(); + //savestate[1].flags = obj.flags.slice(); + //savestate[1].crewstats = crewstats.slice(); + //savestate[1].collect = obj.collect.slice(); + + //telecookie.data.worldmap = savestate[1].explored.slice(); + //telecookie.data.flags = savestate[1].flags.slice(); + //telecookie.data.crewstats = savestate[1].crewstats.slice(); + //telecookie.data.collect = savestate[1].collect.slice(); + + //telecookie.data.finalmode = map.finalmode; + //telecookie.data.finalstretch = map.finalstretch; + + std::string mapExplored; + for(size_t i = 0; i < map.explored.size(); i++ ) + { + mapExplored += UtilityClass::String(map.explored[i]) + ","; + } + msg = new TiXmlElement( "worldmap" ); + msg->LinkEndChild( new TiXmlText( mapExplored.c_str() )); + msgs->LinkEndChild( msg ); + + std::string flags; + for(size_t i = 0; i < obj.flags.size(); i++ ) + { + flags += UtilityClass::String(obj.flags[i]) + ","; + } + msg = new TiXmlElement( "flags" ); + msg->LinkEndChild( new TiXmlText( flags.c_str() )); + msgs->LinkEndChild( msg ); + + std::string crewstatsString; + for(size_t i = 0; i < crewstats.size(); i++ ) + { + crewstatsString += UtilityClass::String(crewstats[i]) + ","; + } + msg = new TiXmlElement( "crewstats" ); + msg->LinkEndChild( new TiXmlText( crewstatsString.c_str() )); + msgs->LinkEndChild( msg ); + + std::string collect; + for(size_t i = 0; i < obj.collect.size(); i++ ) + { + collect += UtilityClass::String(obj.collect[i]) + ","; + } + msg = new TiXmlElement( "collect" ); + msg->LinkEndChild( new TiXmlText( collect.c_str() )); + msgs->LinkEndChild( msg ); + + //telecookie.data.finalx = map.finalx; + //telecookie.data.finaly = map.finaly; + //Position + //telecookie.data.savex = savex; + //telecookie.data.savey = savey; + + msg = new TiXmlElement( "finalx" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(map.finalx).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "finaly" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(map.finaly).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savex" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savex).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savey" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savey).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "saverx" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(saverx).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savery" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savery).c_str() )); + msgs->LinkEndChild( msg ); + + //telecookie.data.saverx = saverx; + //telecookie.data.savery = savery; + //telecookie.data.savegc = savegc; + //telecookie.data.savedir = savedir; + //telecookie.data.savepoint = savepoint; + //telecookie.data.trinkets = trinkets; + + msg = new TiXmlElement( "savegc" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savegc).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savedir" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savedir).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savepoint" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savepoint).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "trinkets" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(trinkets).c_str() )); + msgs->LinkEndChild( msg ); + + + //if (music.nicechange != -1) { + //telecookie.data.currentsong = music.nicechange; + //}else{ + //telecookie.data.currentsong = music.currentsong; + //} + //telecookie.data.teleportscript = teleportscript; + + //Special stats + //telecookie.data.companion = companion; + //telecookie.data.lastsaved = lastsaved; + //telecookie.data.supercrewmate = supercrewmate; + //telecookie.data.scmprogress = scmprogress; + //telecookie.data.scmmoveme = scmmoveme; + + if(music.nicefade==1) + { + msg = new TiXmlElement( "currentsong" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(music.nicechange).c_str() )); + msgs->LinkEndChild( msg ); + } + else + { + msg = new TiXmlElement( "currentsong" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(music.currentsong).c_str() )); + msgs->LinkEndChild( msg ); + } + + msg = new TiXmlElement( "teleportscript" ); + msg->LinkEndChild( new TiXmlText( teleportscript.c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "companion" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(companion).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "lastsaved" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(lastsaved).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "supercrewmate" ); + msg->LinkEndChild( new TiXmlText( BoolToString(supercrewmate) )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "scmprogress" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(scmprogress).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "scmmoveme" ); + msg->LinkEndChild( new TiXmlText( BoolToString(scmmoveme) )); + msgs->LinkEndChild( msg ); + + + //telecookie.data.frames = frames; telecookie.data.seconds = seconds; + //telecookie.data.minutes = minutes; telecookie.data.hours = hours; + + //telecookie.data.deathcounts = deathcounts; + //telecookie.data.totalflips = totalflips; + //telecookie.data.hardestroom = hardestroom; telecookie.data.hardestroomdeaths = hardestroomdeaths; + + //savearea = map.currentarea(map.area(roomx, roomy)) + //telecookie.data.summary = savearea + ", " + timestring(help); + //telesummary = telecookie.data.summary; + + + msg = new TiXmlElement( "frames" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(frames).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "seconds" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(seconds).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "minutes" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(minutes).c_str()) ); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "hours" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(hours).c_str()) ); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "deathcounts" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(deathcounts).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "totalflips" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(totalflips).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "hardestroom" ); + msg->LinkEndChild( new TiXmlText( hardestroom.c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "hardestroomdeaths" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(hardestroomdeaths).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "finalmode" ); + msg->LinkEndChild( new TiXmlText( BoolToString(map.finalmode))); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "finalstretch" ); + msg->LinkEndChild( new TiXmlText( BoolToString(map.finalstretch) )); + msgs->LinkEndChild( msg ); + + + msg = new TiXmlElement( "summary" ); + UtilityClass tempUtil; + std::string summary = savearea + ", " + timestring(tempUtil); + msg->LinkEndChild( new TiXmlText( summary.c_str() )); + msgs->LinkEndChild( msg ); + + telesummary = summary; + //telecookie.flush(); + //telecookie.close(); + + if(doc.SaveFile( (saveFilePath+"tsave.vvv").c_str() )) + { + printf("Game saved\n"); + } + else + { + printf("Could Not Save game!\n"); + printf("Failed: %s%s\n", saveFilePath.c_str(), "tsave.vvv"); + } +} + + +void Game::savequick( mapclass& map, entityclass& obj, musicclass& music ) +{ + quickcookieexists = true; + + TiXmlDocument doc; + TiXmlElement* msg; + TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" ); + doc.LinkEndChild( decl ); + + TiXmlElement * root = new TiXmlElement( "Save" ); + doc.LinkEndChild( root ); + + TiXmlComment * comment = new TiXmlComment(); + comment->SetValue(" Save file " ); + root->LinkEndChild( comment ); + + TiXmlElement * msgs = new TiXmlElement( "Data" ); + root->LinkEndChild( msgs ); + + + //Flags, map and stats + //savestate[1].explored = map.explored.slice(); + //savestate[1].flags = obj.flags.slice(); + //savestate[1].crewstats = crewstats.slice(); + //savestate[1].collect = obj.collect.slice(); + + //telecookie.data.worldmap = savestate[1].explored.slice(); + //telecookie.data.flags = savestate[1].flags.slice(); + //telecookie.data.crewstats = savestate[1].crewstats.slice(); + //telecookie.data.collect = savestate[1].collect.slice(); + + //telecookie.data.finalmode = map.finalmode; + //telecookie.data.finalstretch = map.finalstretch; + + std::string mapExplored; + for(size_t i = 0; i < map.explored.size(); i++ ) + { + mapExplored += UtilityClass::String(map.explored[i]) + ","; + } + msg = new TiXmlElement( "worldmap" ); + msg->LinkEndChild( new TiXmlText( mapExplored.c_str() )); + msgs->LinkEndChild( msg ); + + std::string flags; + for(size_t i = 0; i < obj.flags.size(); i++ ) + { + flags += UtilityClass::String(obj.flags[i]) + ","; + } + msg = new TiXmlElement( "flags" ); + msg->LinkEndChild( new TiXmlText( flags.c_str() )); + msgs->LinkEndChild( msg ); + + std::string crewstatsString; + for(size_t i = 0; i < crewstats.size(); i++ ) + { + crewstatsString += UtilityClass::String(crewstats[i]) + ","; + } + msg = new TiXmlElement( "crewstats" ); + msg->LinkEndChild( new TiXmlText( crewstatsString.c_str() )); + msgs->LinkEndChild( msg ); + + std::string collect; + for(size_t i = 0; i < obj.collect.size(); i++ ) + { + collect += UtilityClass::String(obj.collect[i]) + ","; + } + msg = new TiXmlElement( "collect" ); + msg->LinkEndChild( new TiXmlText( collect.c_str() )); + msgs->LinkEndChild( msg ); + + //telecookie.data.finalx = map.finalx; + //telecookie.data.finaly = map.finaly; + //Position + //telecookie.data.savex = savex; + //telecookie.data.savey = savey; + + msg = new TiXmlElement( "finalx" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(map.finalx).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "finaly" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(map.finaly).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savex" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savex).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savey" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savey).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "saverx" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(saverx).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savery" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savery).c_str() )); + msgs->LinkEndChild( msg ); + + //telecookie.data.saverx = saverx; + //telecookie.data.savery = savery; + //telecookie.data.savegc = savegc; + //telecookie.data.savedir = savedir; + //telecookie.data.savepoint = savepoint; + //telecookie.data.trinkets = trinkets; + + msg = new TiXmlElement( "savegc" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savegc).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savedir" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savedir).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savepoint" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savepoint).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "trinkets" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(trinkets).c_str() )); + msgs->LinkEndChild( msg ); + + + //if (music.nicechange != -1) { + //telecookie.data.currentsong = music.nicechange; + //}else{ + //telecookie.data.currentsong = music.currentsong; + //} + //telecookie.data.teleportscript = teleportscript; + + //Special stats + //telecookie.data.companion = companion; + //telecookie.data.lastsaved = lastsaved; + //telecookie.data.supercrewmate = supercrewmate; + //telecookie.data.scmprogress = scmprogress; + //telecookie.data.scmmoveme = scmmoveme; + if(music.nicefade==1) + { + msg = new TiXmlElement( "currentsong" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(music.nicechange).c_str() )); + msgs->LinkEndChild( msg ); + } + else + { + msg = new TiXmlElement( "currentsong" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(music.currentsong).c_str() )); + msgs->LinkEndChild( msg ); + } + + msg = new TiXmlElement( "teleportscript" ); + msg->LinkEndChild( new TiXmlText( teleportscript.c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "companion" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(companion).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "lastsaved" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(lastsaved).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "supercrewmate" ); + msg->LinkEndChild( new TiXmlText( BoolToString(supercrewmate) )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "scmprogress" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(scmprogress).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "scmmoveme" ); + msg->LinkEndChild( new TiXmlText( BoolToString(scmmoveme) )); + msgs->LinkEndChild( msg ); + + + //telecookie.data.finalmode = map.finalmode; + //telecookie.data.finalstretch = map.finalstretch; + + msg = new TiXmlElement( "finalmode" ); + msg->LinkEndChild( new TiXmlText( BoolToString(map.finalmode) )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "finalstretch" ); + msg->LinkEndChild( new TiXmlText( BoolToString(map.finalstretch) )); + msgs->LinkEndChild( msg ); + + //telecookie.data.frames = frames; telecookie.data.seconds = seconds; + //telecookie.data.minutes = minutes; telecookie.data.hours = hours; + + //telecookie.data.deathcounts = deathcounts; + //telecookie.data.totalflips = totalflips; + //telecookie.data.hardestroom = hardestroom; telecookie.data.hardestroomdeaths = hardestroomdeaths; + + //savearea = map.currentarea(map.area(roomx, roomy)) + //telecookie.data.summary = savearea + ", " + timestring(help); + //telesummary = telecookie.data.summary; + + + msg = new TiXmlElement( "frames" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(frames).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "seconds" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(seconds).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "minutes" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(minutes).c_str()) ); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "hours" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(hours).c_str()) ); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "deathcounts" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(deathcounts).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "totalflips" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(totalflips).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "hardestroom" ); + msg->LinkEndChild( new TiXmlText( hardestroom.c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "hardestroomdeaths" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(hardestroomdeaths).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "summary" ); + UtilityClass tempUtil; + std::string summary = savearea + ", " + timestring(tempUtil); + msg->LinkEndChild( new TiXmlText( summary.c_str() )); + msgs->LinkEndChild( msg ); + + quicksummary = summary; + //telecookie.flush(); + //telecookie.close(); + + if(doc.SaveFile( (saveFilePath+ "qsave.vvv").c_str() )) + { + printf("Game saved\n"); + } + else + { + printf("Could Not Save game!\n"); + printf("Failed: %s%s\n", saveFilePath.c_str(), "qsave.vvv"); + } + +} + +void Game::customsavequick(std::string savfile, mapclass& map, entityclass& obj, musicclass& music ) +{ + quickcookieexists = true; + + TiXmlDocument doc; + TiXmlElement* msg; + TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" ); + doc.LinkEndChild( decl ); + + TiXmlElement * root = new TiXmlElement( "Save" ); + doc.LinkEndChild( root ); + + TiXmlComment * comment = new TiXmlComment(); + comment->SetValue(" Save file " ); + root->LinkEndChild( comment ); + + TiXmlElement * msgs = new TiXmlElement( "Data" ); + root->LinkEndChild( msgs ); + + + //Flags, map and stats + //savestate[1].explored = map.explored.slice(); + //savestate[1].flags = obj.flags.slice(); + //savestate[1].crewstats = crewstats.slice(); + //savestate[1].collect = obj.collect.slice(); + + //telecookie.data.worldmap = savestate[1].explored.slice(); + //telecookie.data.flags = savestate[1].flags.slice(); + //telecookie.data.crewstats = savestate[1].crewstats.slice(); + //telecookie.data.collect = savestate[1].collect.slice(); + + //telecookie.data.finalmode = map.finalmode; + //telecookie.data.finalstretch = map.finalstretch; + + std::string mapExplored; + for(size_t i = 0; i < map.explored.size(); i++ ) + { + mapExplored += UtilityClass::String(map.explored[i]) + ","; + } + msg = new TiXmlElement( "worldmap" ); + msg->LinkEndChild( new TiXmlText( mapExplored.c_str() )); + msgs->LinkEndChild( msg ); + + std::string flags; + for(size_t i = 0; i < obj.flags.size(); i++ ) + { + flags += UtilityClass::String(obj.flags[i]) + ","; + } + msg = new TiXmlElement( "flags" ); + msg->LinkEndChild( new TiXmlText( flags.c_str() )); + msgs->LinkEndChild( msg ); + + std::string moods; + for(int i = 0; i < 6; i++ ) + { + moods += UtilityClass::String(obj.customcrewmoods[i]) + ","; + } + msg = new TiXmlElement( "moods" ); + msg->LinkEndChild( new TiXmlText( moods.c_str() )); + msgs->LinkEndChild( msg ); + + std::string crewstatsString; + for(size_t i = 0; i < crewstats.size(); i++ ) + { + crewstatsString += UtilityClass::String(crewstats[i]) + ","; + } + msg = new TiXmlElement( "crewstats" ); + msg->LinkEndChild( new TiXmlText( crewstatsString.c_str() )); + msgs->LinkEndChild( msg ); + + std::string collect; + for(size_t i = 0; i < obj.collect.size(); i++ ) + { + collect += UtilityClass::String(obj.collect[i]) + ","; + } + msg = new TiXmlElement( "collect" ); + msg->LinkEndChild( new TiXmlText( collect.c_str() )); + msgs->LinkEndChild( msg ); + + std::string customcollect; + for(size_t i = 0; i < obj.customcollect.size(); i++ ) + { + customcollect += UtilityClass::String(obj.customcollect[i]) + ","; + } + msg = new TiXmlElement( "customcollect" ); + msg->LinkEndChild( new TiXmlText( customcollect.c_str() )); + msgs->LinkEndChild( msg ); + + //telecookie.data.finalx = map.finalx; + //telecookie.data.finaly = map.finaly; + //Position + //telecookie.data.savex = savex; + //telecookie.data.savey = savey; + + msg = new TiXmlElement( "finalx" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(map.finalx).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "finaly" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(map.finaly).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savex" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savex).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savey" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savey).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "saverx" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(saverx).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savery" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savery).c_str() )); + msgs->LinkEndChild( msg ); + + //telecookie.data.saverx = saverx; + //telecookie.data.savery = savery; + //telecookie.data.savegc = savegc; + //telecookie.data.savedir = savedir; + //telecookie.data.savepoint = savepoint; + //telecookie.data.trinkets = trinkets; + + msg = new TiXmlElement( "savegc" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savegc).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savedir" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savedir).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "savepoint" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(savepoint).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "trinkets" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(trinkets).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "crewmates" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(crewmates).c_str() )); + msgs->LinkEndChild( msg ); + + + //if (music.nicechange != -1) { + //telecookie.data.currentsong = music.nicechange; + //}else{ + //telecookie.data.currentsong = music.currentsong; + //} + //telecookie.data.teleportscript = teleportscript; + + //Special stats + //telecookie.data.companion = companion; + //telecookie.data.lastsaved = lastsaved; + //telecookie.data.supercrewmate = supercrewmate; + //telecookie.data.scmprogress = scmprogress; + //telecookie.data.scmmoveme = scmmoveme; + if(music.nicefade==1) + { + msg = new TiXmlElement( "currentsong" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(music.nicechange).c_str() )); + msgs->LinkEndChild( msg ); + } + else + { + msg = new TiXmlElement( "currentsong" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(music.currentsong).c_str() )); + msgs->LinkEndChild( msg ); + } + + msg = new TiXmlElement( "teleportscript" ); + msg->LinkEndChild( new TiXmlText( teleportscript.c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "companion" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(companion).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "lastsaved" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(lastsaved).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "supercrewmate" ); + msg->LinkEndChild( new TiXmlText( BoolToString(supercrewmate) )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "scmprogress" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(scmprogress).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "scmmoveme" ); + msg->LinkEndChild( new TiXmlText( BoolToString(scmmoveme) )); + msgs->LinkEndChild( msg ); + + + //telecookie.data.frames = frames; telecookie.data.seconds = seconds; + //telecookie.data.minutes = minutes; telecookie.data.hours = hours; + + //telecookie.data.deathcounts = deathcounts; + //telecookie.data.totalflips = totalflips; + //telecookie.data.hardestroom = hardestroom; telecookie.data.hardestroomdeaths = hardestroomdeaths; + + //savearea = map.currentarea(map.area(roomx, roomy)) + //telecookie.data.summary = savearea + ", " + timestring(help); + //telesummary = telecookie.data.summary; + + + msg = new TiXmlElement( "frames" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(frames).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "seconds" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(seconds).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "minutes" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(minutes).c_str()) ); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "hours" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(hours).c_str()) ); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "deathcounts" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(deathcounts).c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "totalflips" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(totalflips).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "hardestroom" ); + msg->LinkEndChild( new TiXmlText( hardestroom.c_str() )); + msgs->LinkEndChild( msg ); + msg = new TiXmlElement( "hardestroomdeaths" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(hardestroomdeaths).c_str() )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "showminimap" ); + msg->LinkEndChild( new TiXmlText( BoolToString(map.customshowmm) )); + msgs->LinkEndChild( msg ); + + msg = new TiXmlElement( "summary" ); + UtilityClass tempUtil; + std::string summary = savearea + ", " + timestring(tempUtil); + msg->LinkEndChild( new TiXmlText( summary.c_str() )); + msgs->LinkEndChild( msg ); + + customquicksummary = summary; + //telecookie.flush(); + //telecookie.close(); + + std::string levelfile = savfile.substr(7); + if(doc.SaveFile( (saveFilePath+ levelfile+".vvv").c_str() )) + { + printf("Game saved\n"); + } + else + { + printf("Could Not Save game!\n"); + printf("Failed: %s%s%s", saveFilePath.c_str(), levelfile.c_str(), ".vvv"); + } +} + + +void Game::loadtele( mapclass& map, entityclass& obj, musicclass& music ) +{ + TiXmlDocument doc((saveFilePath+"tsave.vvv").c_str()); + if (!doc.LoadFile()) return; ; + + TiXmlHandle hDoc(&doc); + TiXmlElement* pElem; + TiXmlHandle hRoot(0); + + + { + pElem=hDoc.FirstChildElement().Element(); + // should always have a valid root but handle gracefully if it does + if (!pElem) + { + printf("Save Not Found\n"); + } + + // save this for later + hRoot=TiXmlHandle(pElem); + } + + + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + if(pText == NULL) + { + pText = ""; + } + + if (pKey == "worldmap") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + map.explored.clear(); + for(size_t i = 0; i < values.size(); i++) + { + map.explored.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "flags") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + obj.flags.clear(); + for(size_t i = 0; i < values.size(); i++) + { + obj.flags.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "crewstats") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + crewstats.clear(); + for(size_t i = 0; i < values.size(); i++) + { + crewstats.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "collect") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + obj.collect.clear(); + for(size_t i = 0; i < values.size(); i++) + { + obj.collect.push_back(atoi(values[i].c_str())); + } + } + } + + if (pKey == "finalmode") + { + map.finalmode = atoi(pText); + } + if (pKey == "finalstretch") + { + map.finalstretch = atoi(pText); + } + + if (map.finalmode) + { + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + } + if (map.finalstretch) + { + map.finalstretch = true; + map.final_colormode = true; + map.final_mapcol = 0; + map.final_colorframe = 1; + } + + + if (pKey == "finalx") + { + map.finalx = atoi(pText); + } + else if (pKey == "finaly") + { + map.finaly = atoi(pText); + } + else if (pKey == "savex") + { + savex = atoi(pText); + } + else if (pKey == "savey") + { + savey = atoi(pText); + } + else if (pKey == "saverx") + { + saverx = atoi(pText); + } + else if (pKey == "savery") + { + savery = atoi(pText); + } + else if (pKey == "savegc") + { + savegc = atoi(pText); + } + else if (pKey == "savedir") + { + savedir= atoi(pText); + } + else if (pKey == "savepoint") + { + savepoint = atoi(pText); + } + else if (pKey == "trinkets") + { + trinkets = atoi(pText); + } + else if (pKey == "companion") + { + companion = atoi(pText); + } + else if (pKey == "lastsaved") + { + lastsaved = atoi(pText); + } + else if (pKey == "teleportscript") + { + teleportscript = pText; + } + else if (pKey == "supercrewmate") + { + supercrewmate = atoi(pText); + } + else if (pKey == "scmprogress") + { + scmprogress = atoi(pText); + } + else if (pKey == "scmmoveme") + { + scmmoveme = atoi(pText); + } + else if (pKey == "frames") + { + frames = atoi(pText); + frames = 0; + } + else if (pKey == "seconds") + { + seconds = atoi(pText); + } + else if (pKey == "minutes") + { + minutes = atoi(pText); + } + else if (pKey == "hours") + { + hours = atoi(pText); + } + else if (pKey == "deathcounts") + { + deathcounts = atoi(pText); + } + else if (pKey == "totalflips") + { + totalflips = atoi(pText); + } + else if (pKey == "hardestroom") + { + hardestroom = pText; + } + else if (pKey == "hardestroomdeaths") + { + hardestroomdeaths = atoi(pText); + } + else if (pKey == "currentsong") + { + music.play(atoi(pText)); + } + + } + + map.showteleporters = true; + if(obj.flags[12]==1) map.showtargets = true; + if (obj.flags[42] == 1) map.showtrinkets = true; +} + +std::string Game::unrescued() +{ + //Randomly return the name of an unrescued crewmate + if (fRandom() * 100 > 50) + { + if (!crewstats[5]) return "Victoria"; + if (!crewstats[2]) return "Vitellary"; + if (!crewstats[4]) return "Verdigris"; + if (!crewstats[3]) return "Vermilion"; + } + else + { + if (fRandom() * 100 > 50) + { + if (!crewstats[2]) return "Vitellary"; + if (!crewstats[4]) return "Verdigris"; + if (!crewstats[3]) return "Vermilion"; + if (!crewstats[5]) return "Victoria"; + } + else + { + if (!crewstats[4]) return "Verdigris"; + if (!crewstats[3]) return "Vermilion"; + if (!crewstats[5]) return "Victoria"; + if (!crewstats[2]) return "Vitellary"; + } + } + return "you"; +} + +void Game::gameclock() +{ +/* +test = true; +std::ostringstream os; + os << hours << ":" << minutes << ":" << seconds << ", " << frames; +teststring = os.str(); +*/ + frames++; + if (frames >= 30) + { + frames -= 30; + seconds++; + if (seconds >= 60) + { + seconds -= 60; + minutes++; + if (minutes >= 60) + { + minutes -= 60; + hours++; + } + } + } +} + +std::string Game::giventimestring( int hrs, int min, int sec, UtilityClass& help ) +{ + tempstring = ""; + if (hrs > 0) + { + tempstring += help.String(hrs) + ":"; + } + tempstring += help.twodigits(min) + ":" + help.twodigits(sec); + return tempstring; +} + +std::string Game::timestring( UtilityClass& help ) +{ + tempstring = ""; + if (hours > 0) + { + tempstring += help.String(hours) + ":"; + } + tempstring += help.twodigits(minutes) + ":" + help.twodigits(seconds); + return tempstring; +} + +std::string Game::partimestring( UtilityClass& help ) +{ + //given par time in seconds: + tempstring = ""; + if (timetrialpar >= 60) + { + tempstring = help.twodigits(int((timetrialpar - (timetrialpar % 60)) / 60)) + ":" + help.twodigits(timetrialpar % 60); + } + else + { + tempstring = "00:" + help.twodigits(timetrialpar); + } + return tempstring; +} + +std::string Game::resulttimestring( UtilityClass& help ) +{ + //given result time in seconds: + tempstring = ""; + if (timetrialresulttime > 60) + { + tempstring = help.twodigits(int((timetrialresulttime - (timetrialresulttime % 60)) / 60)) + ":" + + help.twodigits(timetrialresulttime % 60); + } + else + { + tempstring = "00:" + help.twodigits(timetrialresulttime); + } + return tempstring; +} + +std::string Game::timetstring( int t, UtilityClass& help ) +{ + //given par time in seconds: + tempstring = ""; + if (t >= 60) + { + tempstring = help.twodigits(int((t - (t % 60)) / 60)) + ":" + help.twodigits(t % 60); + } + else + { + tempstring = "00:" + help.twodigits(t); + } + return tempstring; +} + +void Game::createmenu( std::string t ) +{ + currentmenuoption = 0; + menuselection = "null"; + currentmenuname = t; + menuxoff = 0; + menuyoff = 0; + menucountdown = 0; + menudest="null"; + + if (t == "mainmenu") + { + #if defined(MAKEANDPLAY) + menuoptions[0] = "player levels"; + menuoptionsactive[0] = true; + menuoptions[1] = "graphic options"; + menuoptionsactive[1] = true; + menuoptions[2] = "game options"; + menuoptionsactive[2] = true; + menuoptions[3] = "quit game"; + menuoptionsactive[3] = true; + nummenuoptions = 4; + menuxoff = -16; + menuyoff = -10; + #elif !defined(MAKEANDPLAY) + menuoptions[0] = "start game"; + menuoptionsactive[0] = true; + menuoptions[1] = "player levels"; + menuoptionsactive[1] = true; + menuoptions[2] = "graphic options"; + menuoptionsactive[2] = true; + menuoptions[3] = "game options"; + menuoptionsactive[3] = true; + menuoptions[4] = "view credits"; + menuoptionsactive[4] = true; + menuoptions[5] = "quit game"; + menuoptionsactive[5] = true; + nummenuoptions = 6; + menuxoff = -16; + menuyoff = -10; + #endif + } + else if (t == "playerworlds") + { + menuoptions[0] = "play a level"; + menuoptionsactive[0] = true; + menuoptions[1] = "level editor"; + menuoptionsactive[1] = true; + //menuoptions[2] = "open level folder"; + //menuoptionsactive[2] = true; + menuoptions[2] = "back to menu"; + menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -30; + menuyoff = -40; + } + else if (t == "quickloadlevel") + { + menuoptions[0] = "continue from save"; + menuoptionsactive[0] = true; + menuoptions[1] = "start from beginning"; + menuoptionsactive[1] = true; + menuoptions[2] = "back to levels"; + menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -40; + menuyoff = -30; + } + else if (t == "youwannaquit") + { + menuoptions[0] = "yes, quit"; + menuoptionsactive[0] = true; + menuoptions[1] = "no, return"; + menuoptionsactive[1] = true; + nummenuoptions = 2; + menuxoff = 0; + menuyoff = -20; + } + else if (t == "errornostart") + { + menuoptions[0] = "ok"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 0; + menuyoff = -20; + } + else if (t == "levellist") + { + if(ed.ListOfMetaData.size()==0) + { + menuoptions[0] = "ok"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 0; + menuyoff = -20; + } + else + { + int tcount=0; + for(int i=0; i<(int) ed.ListOfMetaData.size(); i++) // FIXME: int/size_t! -flibit + { + if(i>=levelpage*8 && i< (levelpage*8)+8) + { + //This is, er, suboptimal. Whatever, life optimisation and all that + int tvar=-1; + for(int j=0; j=0) + { + if(customlevelscore[tvar]==0) + { + menuoptions[tcount] = " " + ed.ListOfMetaData[i].title; + } + else if(customlevelscore[tvar]==1) + { + menuoptions[tcount] = " * " + ed.ListOfMetaData[i].title; + } + else if(customlevelscore[tvar]==3) + { + menuoptions[tcount] = "** " + ed.ListOfMetaData[i].title; + } + } + else + { + menuoptions[tcount] = " " + ed.ListOfMetaData[i].title; + } + menuoptionsactive[tcount] = true; + std::transform(menuoptions[tcount].begin(), menuoptions[tcount].end(), menuoptions[tcount].begin(), ::tolower); + tcount++; + } + } + if((size_t) ((levelpage*8)+8) = 3 && !unlocknotify[9]) temp++; + if (unlock[1] && stat_trinkets >= 6 && !unlocknotify[10]) temp++; + if (unlock[2] && stat_trinkets >= 9 && !unlocknotify[11]) temp++; + if (unlock[3] && stat_trinkets >= 12 && !unlocknotify[12]) temp++; + if (unlock[4] && stat_trinkets >= 15 && !unlocknotify[13]) temp++; + if (unlock[5] && stat_trinkets >= 18 && !unlocknotify[14]) temp++; + if (temp > 0) + { + //you've unlocked a time trial! + if (unlock[0] && stat_trinkets >= 3) + { + unlocknotify[9] = true; + unlock[9] = true; + } + if (unlock[1] && stat_trinkets >= 6) + { + unlocknotify[10] = true; + unlock[10] = true; + } + if (unlock[2] && stat_trinkets >= 9) + { + unlocknotify[11] = true; + unlock[11] = true; + } + if (unlock[3] && stat_trinkets >= 12) + { + unlocknotify[12] = true; + unlock[12] = true; + } + if (unlock[4] && stat_trinkets >= 15) + { + unlocknotify[13] = true; + unlock[13] = true; + } + if (unlock[5] && stat_trinkets >= 18) + { + unlocknotify[14] = true; + unlock[14] = true; + } + + if (temp == 1) + { + createmenu("unlocktimetrial"); + savemystats = true; + } + else if (temp > 1) + { + createmenu("unlocktimetrials"); + savemystats = true; + } + } + else + { + //Alright, we haven't unlocked any time trials. How about no death mode? + temp = 0; + if (bestrank[0] >= 2) temp++; + if (bestrank[1] >= 2) temp++; + if (bestrank[2] >= 2) temp++; + if (bestrank[3] >= 2) temp++; + if (bestrank[4] >= 2) temp++; + if (bestrank[5] >= 2) temp++; + if (temp >= 4 && !unlocknotify[17]) + { + //Unlock No Death Mode + unlocknotify[17] = true; + unlock[17] = true; + createmenu("unlocknodeathmode"); + savemystats = true; + } + else + { + //Alright then! Flip mode? + if (unlock[5] && !unlocknotify[18]) + { + unlock[18] = true; + unlocknotify[18] = true; + createmenu("unlockflipmode"); + savemystats = true; + } + else + { + //What about the intermission levels? + if (unlock[7] && !unlocknotify[16]) + { + unlock[16] = true; + unlocknotify[16] = true; + createmenu("unlockintermission"); + savemystats = true; + } + else + { + //ok, secret lab! no notification, but test: + if (unlock[8]) + { + createmenu("playsecretlab"); + } + else + { + menuoptions[0] = "continue"; + menuoptionsactive[0] = true; + menuoptions[1] = "play modes"; + menuoptionsactive[1] = true; + menuoptions[2] = "new game"; + menuoptionsactive[2] = true; + menuoptions[3] = "return"; + menuoptionsactive[3] = true; + nummenuoptions = 4; + menuxoff = -20; + menuyoff = -40; + } + } + } + } + } + } + else if (t == "unlocktimetrial" || t == "unlocktimetrials") + { + menuoptions[0] = "continue"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; + menuyoff = 70; + } + else if (t == "unlocknodeathmode") + { + menuoptions[0] = "continue"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; + menuyoff = 70; + } + else if (t == "unlockintermission") + { + menuoptions[0] = "continue"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; + menuyoff = 70; + } + else if (t == "unlockflipmode") + { + menuoptions[0] = "continue"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; + menuyoff = 70; + } + else if (t == "playsecretlab") + { + menuoptions[0] = "continue"; + menuoptionsactive[0] = true; + menuoptions[1] = "secret lab"; + menuoptionsactive[1] = true; + menuoptions[2] = "play modes"; + menuoptionsactive[2] = true; + menuoptions[3] = "new game"; + menuoptionsactive[3] = true; + menuoptions[4] = "return"; + menuoptionsactive[4] = true; + nummenuoptions = 5; + menuxoff = -40; + menuyoff = -30; + } + else if (t == "newgamewarning") + { + menuoptions[0] = "start new game"; + menuoptionsactive[0] = true; + menuoptions[1] = "return to menu"; + menuoptionsactive[1] = true; + nummenuoptions = 2; + menuxoff = -30; + menuyoff = 64; + } + else if (t == "playmodes") + { + menuoptions[0] = "time trials"; + menuoptionsactive[0] = true; + menuoptions[1] = "intermissions"; + menuoptionsactive[1] = unlock[16]; + menuoptions[2] = "no death mode"; + menuoptionsactive[2] = unlock[17]; + menuoptions[3] = "flip mode"; + menuoptionsactive[3] = unlock[18]; + menuoptions[4] = "return to play menu"; + menuoptionsactive[4] = true; + nummenuoptions = 5; + menuxoff = -70; + menuyoff = 8; + } + else if (t == "intermissionmenu") + { + menuoptions[0] = "play intermission 1"; + menuoptionsactive[0] = true; + menuoptions[1] = "play intermission 2"; + menuoptionsactive[1] = true; + menuoptions[2] = "return to play menu"; + menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -50; + menuyoff = -35; + } + else if (t == "playint1") + { + menuoptions[0] = "Vitellary"; + menuoptionsactive[0] = true; + menuoptions[1] = "Vermilion"; + menuoptionsactive[1] = true; + menuoptions[2] = "Verdigris"; + menuoptionsactive[2] = true; + menuoptions[3] = "Victoria"; + menuoptionsactive[3] = true; + menuoptions[4] = "return"; + menuoptionsactive[4] = true; + nummenuoptions = 5; + menuxoff = -60; + menuyoff = 10; + } + else if (t == "playint2") + { + menuoptions[0] = "Vitellary"; + menuoptionsactive[0] = true; + menuoptions[1] = "Vermilion"; + menuoptionsactive[1] = true; + menuoptions[2] = "Verdigris"; + menuoptionsactive[2] = true; + menuoptions[3] = "Victoria"; + menuoptionsactive[3] = true; + menuoptions[4] = "return"; + menuoptionsactive[4] = true; + nummenuoptions = 5; + menuxoff = -60; + menuyoff = 10; + } + else if (t == "continue") + { + menuoptions[0] = "continue from teleporter"; + menuoptionsactive[0] = true; + menuoptions[1] = "continue from quicksave"; + menuoptionsactive[1] = true; + menuoptions[2] = "return to play menu"; + menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -60; + menuyoff = 20; + } + else if (t == "startnodeathmode") + { + menuoptions[0] = "disable cutscenes"; + menuoptionsactive[0] = true; + menuoptions[1] = "enable cutscenes"; + menuoptionsactive[1] = true; + menuoptions[2] = "return to play menu"; + menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -60; + menuyoff = 40; + } + else if (t == "gameover") + { + nummenuoptions = 0; + menucountdown = 120; + menudest="gameover2"; + } + else if (t == "gameover2") + { + menuoptions[0] = "return to play menu"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = -25; + menuyoff = 80; + } + else if (t == "unlockmenutrials") + { + if (unlock[9]) + { + menuoptions[0] = "space station 1"; + menuoptionsactive[0] = false; + } + else + { + menuoptions[0] = "space station 1"; + menuoptionsactive[0] = true; + } + if (unlock[10]) + { + menuoptions[1] = "the laboratory"; + menuoptionsactive[1] = false; + } + else + { + menuoptions[1] = "the laboratory"; + menuoptionsactive[1] = true; + } + if (unlock[11]) + { + menuoptions[2] = "the tower"; + menuoptionsactive[2] = false; + } + else + { + menuoptions[2] = "the tower"; + menuoptionsactive[2] = true; + } + if (unlock[12]) + { + menuoptions[3] = "space station 2"; + menuoptionsactive[3] = false; + } + else + { + menuoptions[3] = "space station 2"; + menuoptionsactive[3] = true; + } + if (unlock[13]) + { + menuoptions[4] = "the warp zone"; + menuoptionsactive[4] = false; + } + else + { + menuoptions[4] = "the warp zone"; + menuoptionsactive[4] = true; + } + if (unlock[14]) + { + menuoptions[5] = "the final level"; + menuoptionsactive[5] = false; + } + else + { + menuoptions[5] = "the final level"; + menuoptionsactive[5] = true; + } + + menuoptions[6] = "return to unlock menu"; + menuoptionsactive[6] = true; + nummenuoptions = 7; + menuxoff = -80; + menuyoff = 0; + } + else if (t == "timetrials") + { + if (!unlock[9]) + { + menuoptions[0] = "???"; + menuoptionsactive[0] = false; + } + else + { + menuoptions[0] = "space station 1"; + menuoptionsactive[0] = true; + } + if (!unlock[10]) + { + menuoptions[1] = "???"; + menuoptionsactive[1] = false; + } + else + { + menuoptions[1] = "the laboratory"; + menuoptionsactive[1] = true; + } + if (!unlock[11]) + { + menuoptions[2] = "???"; + menuoptionsactive[2] = false; + } + else + { + menuoptions[2] = "the tower"; + menuoptionsactive[2] = true; + } + if (!unlock[12]) + { + menuoptions[3] = "???"; + menuoptionsactive[3] = false; + } + else + { + menuoptions[3] = "space station 2"; + menuoptionsactive[3] = true; + } + if (!unlock[13]) + { + menuoptions[4] = "???"; + menuoptionsactive[4] = false; + } + else + { + menuoptions[4] = "the warp zone"; + menuoptionsactive[4] = true; + } + if (!unlock[14]) + { + menuoptions[5] = "???"; + menuoptionsactive[5] = false; + } + else + { + menuoptions[5] = "the final level"; + menuoptionsactive[5] = true; + } + + menuoptions[6] = "return to play menu"; + menuoptionsactive[6] = true; + nummenuoptions = 7; + menuxoff = -80; + menuyoff = 0; + } + else if (t == "nodeathmodecomplete") + { + nummenuoptions = 0; + menucountdown = 90; + menudest = "nodeathmodecomplete2"; + } + else if (t == "nodeathmodecomplete2") + { + menuoptions[0] = "return to play menu"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = -25; + menuyoff = 70; + } + else if (t == "timetrialcomplete") + { + nummenuoptions = 0; + menucountdown = 90; + menudest="timetrialcomplete2"; + } + else if (t == "timetrialcomplete2") + { + nummenuoptions = 0; + menucountdown = 60; + menudest="timetrialcomplete3"; + } + else if (t == "timetrialcomplete3") + { + menuoptions[0] = "return to play menu"; + menuoptionsactive[0] = true; + menuoptions[1] = "try again"; + menuoptionsactive[1] = true; + nummenuoptions = 2; + menuxoff = -25; + menuyoff = 70; + } + else if (t == "gamecompletecontinue") + { + menuoptions[0] = "return to play menu"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = -25; + menuyoff = 70; + } +} + +void Game::deletequick() +{ + if( remove( "qsave.vvv" ) != 0 ) + printf("Error deleting file\n"); + + quicksummary = ""; + quickcookieexists = false; +} + +void Game::deletetele() +{ + if( remove( "tsave.vvv" ) != 0 ) + printf("Error deleting file\n"); + + telesummary = ""; + telecookieexists = false; +} + +void Game::swnpenalty() +{ + //set the SWN clock back to the closest 5 second interval + if (swntimer <= 150) + { + swntimer += 8; + if (swntimer > 150) swntimer = 150; + } + else if (swntimer <= 300) + { + swntimer += 8; + if (swntimer > 300) swntimer = 300; + } + else if (swntimer <= 450) + { + swntimer += 8; + if (swntimer > 450) swntimer = 450; + } + else if (swntimer <= 600) + { + swntimer += 8; + if (swntimer > 600) swntimer = 600; + } + else if (swntimer <= 750) + { + swntimer += 8; + if (swntimer > 750) swntimer = 750; + } + else if (swntimer <= 900) + { + swntimer += 8; + if (swntimer > 900) swntimer = 900; + } + else if (swntimer <= 1050) + { + swntimer += 8; + if (swntimer > 1050) swntimer = 1050; + } + else if (swntimer <= 1200) + { + swntimer += 8; + if (swntimer > 1200) swntimer = 1200; + } + else if (swntimer <= 1350) + { + swntimer += 8; + if (swntimer > 1350) swntimer = 1350; + } + else if (swntimer <= 1500) + { + swntimer += 8; + if (swntimer > 1500) swntimer = 1500; + } + else if (swntimer <= 1650) + { + swntimer += 8; + if (swntimer > 1650) swntimer = 1650; + } + else if (swntimer <= 1800) + { + swntimer += 8; + if (swntimer > 1800) swntimer = 1800; + } + else if (swntimer <= 2100) + { + swntimer += 8; + if (swntimer > 2100) swntimer = 2100; + } + else if (swntimer <= 2400) + { + swntimer += 8; + if (swntimer > 2400) swntimer = 2400; + } +} + +int Game::crewrescued() +{ + int temp = 0; + if (crewstats[0]) + temp++; + if (crewstats[1]) + temp++; + if (crewstats[2]) + temp++; + if (crewstats[3]) + temp++; + if (crewstats[4]) + temp++; + if (crewstats[5]) + temp++; + return temp; +} + +void Game::resetgameclock() +{ + frames = 0; + seconds = 0; + minutes = 0; + hours = 0; + timerStartTime = SDL_GetTicks(); +} diff --git a/desktop_version/src/Game.h b/desktop_version/src/Game.h new file mode 100644 index 00000000..71617a03 --- /dev/null +++ b/desktop_version/src/Game.h @@ -0,0 +1,359 @@ +#ifndef GAME_H +#define GAME_H + +#include +#include +#include "SDL.h" +#include "Maths.h" +#include "UtilityClass.h" +#include "GraphicsUtil.h" + + +class entityclass; +class mapclass; +class Graphics; +class musicclass; + +class Game +{ +public: + Game(void); + ~Game(void); + + + void setGlobalSoundVol(const float _vol) + { + m_globalVol = _vol; + } + float getGlobalSoundVol() + { + return m_globalVol; + } + + + int crewrescued(); + + std::string unrescued(); + + void resetgameclock(); + + void customsavequick(std::string savfile, mapclass& map, entityclass& obj, musicclass& music); + void savequick(mapclass& map, entityclass& obj, musicclass& music); + + void gameclock(); + + std::string giventimestring(int hrs, int min, int sec, UtilityClass& help ); + + std::string timestring(UtilityClass& help); + + std::string partimestring(UtilityClass& help); + + std::string resulttimestring(UtilityClass& help); + + std::string timetstring(int t, UtilityClass& help); + + void createmenu(std::string t); + + void lifesequence(entityclass& obj); + + void gethardestroom(mapclass& map); + + void updatestate(Graphics& dwgfx, mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music); + + void unlocknum(int t, mapclass& map, Graphics& dwgfx); + + void loadstats(mapclass& map, Graphics& dwgfx); + + void savestats(mapclass& map, Graphics& dwgfx); + + void deletestats(mapclass& map, Graphics& dwgfx); + + void deletequick(); + + void savetele(mapclass& map, entityclass& obj, musicclass& music); + + void loadtele(mapclass& map, entityclass& obj, musicclass& music); + + void deletetele(); + + void customstart(entityclass& obj, musicclass& music ); + + void start(entityclass& obj, musicclass& music ); + + void startspecial(int t, entityclass& obj, musicclass& music); + + void starttrial(int t, entityclass& obj, musicclass& music); + + void telegotoship() + { + //Special function to move the telesave to the ship teleporter. + //telecookie.data.savex = 13*8; + //telecookie.data.savey = 129; + //telecookie.data.saverx = 102; + //telecookie.data.savery = 111; + //telecookie.data.savegc = 0; + //telecookie.data.savedir = 1; + //telecookie.data.savepoint = 0; + + //telecookie.data.currentsong = 4; + //telecookie.data.companion = 0; + + //telecookie.data.finalmode = false; + //telecookie.data.finalstretch = false; + } + + void swnpenalty(); + + void deathsequence(mapclass& map, entityclass& obj, musicclass& music); + + void customloadquick(std::string savfile, mapclass& map, entityclass& obj, musicclass& music); + void loadquick(mapclass& map, entityclass& obj, musicclass& music); + + void loadsummary(mapclass& map, UtilityClass& help); + + void initteleportermode(mapclass& map); + + std::string saveFilePath; + + + int door_left; + int door_right; + int door_up; + int door_down; + int roomx, roomy, roomchangedir; + int temp, j, k; + + int savex, savey, saverx, savery; + int savegc, savedir; + + //Added for port + int edsavex, edsavey, edsaverx, edsavery; + int edsavegc, edsavedir; + + //State logic stuff + int state, statedelay; + + bool glitchrunkludge; + + int usingmmmmmm; + + int gamestate; + bool hascontrol, jumpheld; + int jumppressed; + int gravitycontrol; + + bool infocus; + bool muted; + int mutebutton; + private: + float m_globalVol; + + public: + + int tapleft, tapright; + + //Menu interaction stuff + bool mapheld; + int menupage; + //public var crewstats:Array = new Array(); + int lastsaved; + int deathcounts; + int timerStartTime; + + int frames, seconds, minutes, hours; + bool gamesaved; + std::string savetime; + std::string savearea; + int savetrinkets; + bool startscript; + std::string newscript; + + int mainmenu; + bool menustart; + + //Teleporting + bool teleport_to_new_area; + int teleport_to_x, teleport_to_y; + std::string teleportscript; + bool useteleporter; + int teleport_to_teleporter; + + //Main Menu Variables + std::vector menuoptions; + std::vector menuoptionsactive; + int nummenuoptions, currentmenuoption ; + std::string menuselection, currentmenuname, previousmenuname; + int menuxoff, menuyoff; + + int menucountdown; + std::string menudest; + + int creditposx, creditposy, creditposdelay; + + + //60 fps mode! + bool sfpsmode; + + //Sine Wave Ninja Minigame + bool swnmode; + int swngame, swnstate, swnstate2, swnstate3, swnstate4, swndelay, swndeaths; + int swntimer, swncolstate, swncoldelay; + int swnrecord, swnbestrank, swnrank, swnmessage; + + //SuperCrewMate Stuff + bool supercrewmate, scmhurt, scmmoveme; + int scmprogress; + + //Accessibility Options + bool colourblindmode; + bool noflashingmode; + int slowdown; + Uint32 gameframerate; + + bool nodeathmode; + int gameoverdelay; + bool nocutscenes; + + //Time Trials + bool intimetrial, timetrialparlost; + int timetrialcountdown, timetrialshinytarget, timetriallevel; + int timetrialpar, timetrialresulttime, timetrialrank; + + int creditposition; + bool insecretlab; + + bool inintermission; + + std::vector crewstats; + + bool alarmon; + int alarmdelay; + bool blackout; + + std::vector tele_crewstats; + + std::vector quick_crewstats; + + std::vector unlock; + std::vector unlocknotify; + std::vector temp_unlock; + std::vector temp_unlocknotify; + int stat_trinkets; + bool fullscreen; + int bestgamedeaths; + + bool stat_screenshakes; + bool stat_backgrounds; + bool stat_flipmode; + bool stat_invincibility; + int stat_slowdown; + + + std::vectorbesttimes; + std::vectorbesttrinkets; + std::vectorbestlives; + std::vector bestrank; + + bool telecookieexists; + bool quickcookieexists; + + std::string tele_gametime; + int tele_trinkets; + std::string tele_currentarea; + std::string quick_gametime; + int quick_trinkets; + std::string quick_currentarea; + + int mx, my; + int screenshake, flashlight; + bool test; + std::string teststring, tempstring; + bool advancetext, pausescript; + + int deathseq, lifeseq; + + int coins, trinkets, crewmates, trinkencollect; + int savepoint, teleport, teleportxpos; + int edteleportent; + bool completestop; + + float inertia; + + int companion; + bool roomchange; + SDL_Rect teleblock; + bool activetele; + int readytotele; + int activity_r, activity_g, activity_b; + std::string activity_lastprompt; + + std::string telesummary, quicksummary, customquicksummary; + + bool backgroundtext; + + int activeactivity, act_fade; + + bool press_left, press_right, press_action, press_map; + + //Some stats: + int totalflips; + std::string hardestroom; + int hardestroomdeaths, currentroomdeaths; + + bool savemystats; + + + bool advanced_mode; + bool fullScreenEffect_badSignal; + bool useLinearFilter; + int stretchMode; + int controllerSensitivity; + + //Screenrecording stuff, for beta/trailer + int recording; + std::string recordstring; + bool combomode; + int combolen; + std::string comboaction; + std::string currentaction; + bool recordinit; + + std::vector playback; + int playbackpos; + int playbacksize; + int playmove; + int playcombo; + bool playbackfinished; + + bool menukludge; + bool quickrestartkludge; + + bool paused; + int globalsound; + + //Custom stuff + std::string customscript[50]; + int customcol; + int levelpage; + int playcustomlevel; + std::string customleveltitle; + std::string customlevelfilename; + + void clearcustomlevelstats(); + void loadcustomlevelstats(); + void savecustomlevelstats(); + void updatecustomlevelstats(std::string clevel, int cscore); + + std::string customlevelstats[200]; //string array containing level filenames + int customlevelscore[200];//0 - not played, 1 - finished, 2 - all trinkets, 3 - finished, all trinkets + int numcustomlevelstats; + bool customlevelstatsloaded; + + + std::vector controllerButton_map; + std::vector controllerButton_flip; + std::vector controllerButton_esc; + +}; + +#endif /* GAME_H */ diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp new file mode 100644 index 00000000..c070b408 --- /dev/null +++ b/desktop_version/src/Graphics.cpp @@ -0,0 +1,3207 @@ +#include "Graphics.h" +#include "Maths.h" +#include "Entity.h" +#include "Map.h" +#include "Screen.h" + +Graphics::Graphics() +{ + flipmode = false; + setRect(tiles_rect, 0,0,8,8); + setRect(sprites_rect, 0,0,32,32); + setRect(bfont_rect, 0,0,8,8); + setRect(bfontmask_rect, 0,0,8,8); + setRect(bg_rect, 0,0,320,240); + setRect(footerrect, 0, 230, 320, 10); + setRect(prect, 0, 0, 4, 4); + setRect(line_rect, 0,0,0,0); + setRect(tele_rect,0,0,96,96); + + + //We initialise a few things + //updatebackground = true; + + + //ct = new ColorTransform(0, 0, 0, 1, 255, 255, 255, 1); //Set to white + + linestate = 0; + + + trinketcolset = false; + + showcutscenebars = false; + cutscenebarspos = 0; + + flipmode = false; + setflipmode = false; + //flipmatrix.scale(1, -1); + //flipmatrix.translate(0, 240); + //flipfontmatrix.scale(1, -1); flipfontmatrix.translate(0, 8); + //flipfontmatrix2.scale(1, -1); flipfontmatrix2.translate(0, 9); + + //Background inits + for (int i = 0; i < 50; i++) + { + SDL_Rect s = {Sint16(fRandom() * 320), Sint16(fRandom() * 240), 2, 2}; + int s2 = 4+(fRandom()*4); + stars.push_back(s); + starsspeed.push_back(s2); + + SDL_Rect bb; + int bvx = 0; + int bvy = 0; + if(fRandom()*100 > 50) + { + bvx = 9 - (fRandom() * 19); + if (bvx > -6 && bvx < 6) bvx = 6; + bvx = bvx * 1.5; + setRect(bb, fRandom() * 320, fRandom() * 240, 32, 12); + } + else + { + bvy = 9 - (fRandom() * 19); + if (bvy > -6 && bvy < 6) bvy = 6; + bvy = bvy * 1.5; + setRect(bb, fRandom() * 320, fRandom() * 240, 12, 32) ; + } + float bint = 0.5 + ((fRandom() * 100) / 200); + backboxes.push_back(bb); + backboxvx.push_back(bvx); + backboxvy.push_back(bvy); + backboxint.push_back(bint); + } + //backboxrect = new Rectangle(); + backoffset = 0; + backgrounddrawn = false; + + warpskip = 0; + warpfcol = 0x000000; + warpbcol = 0x000000; + + spcol = 0; + spcoldel = 0; + rcol = 0; + + crewframe = 0; + crewframedelay = 4; + menuoffset = 0; + resumegamemode = false; + + //Textboxes! + for (int i = 0; i < 30; i++) + { + textboxclass t; + textbox.push_back(t); + } + ntextbox = 0; + + //Fading stuff + for (int i = 0; i < 15; i++) + { + fadebars.push_back(0); + } + fadeamount = 0; + fademode = 0; + + + +} + +Graphics::~Graphics() +{ + +} + +void Graphics::drawspritesetcol(int x, int y, int t, int c, UtilityClass& help) +{ + SDL_Rect rect; + setRect(rect,x,y,sprites_rect.w,sprites_rect.h); + setcol(c, help); + + BlitSurfaceColoured(sprites[t],NULL,backBuffer, &rect, ct); + //.copyPixels(sprites[t], sprites_rect, backbuffer, tpoint); +} + +void Graphics::Makebfont() +{ + for (int j = 0; j < 16; j++) + { + for (int i = 0; i < 16; i++) + { + + SDL_Surface* temp = GetSubSurface(grphx.im_bfont,i*8,j*8,8,8); + bfont.push_back(temp); + + temp = GetSubSurface(grphx.im_bfont,i*8,j*8,8,8); + SDL_Surface* TempFlipped = FlipSurfaceVerticle(temp); + + flipbfont.push_back(TempFlipped); + SDL_FreeSurface(temp); + + } + } + + //Ok, now we work out the lengths (this data string cortesy of a program I wrote!) + for (int i = 0; i < 256; i++) + { + bfontlen.push_back(6); + } + + + for(int k = 0; k < 96; k++) + { + bfontlen[k + 32] = 8;// int(maprow[k]); + } +} + +void Graphics::MakeTileArray() +{ + for(int j = 0; j <30; j++) + { + for(int i = 0; i <40; i++) + { + SDL_Surface* temp = GetSubSurface(grphx.im_tiles,i*8,j*8,8,8); + tiles.push_back(temp); + } + } + for(int j = 0; j <30; j++) + { + for(int i = 0; i <40; i++) + { + SDL_Surface* temp = GetSubSurface(grphx.im_tiles2,i*8,j*8,8,8); + tiles2.push_back(temp); + } + } + + for(int j = 0; j <30; j++) + { + for(int i = 0; i <30; i++) + { + SDL_Surface* temp = GetSubSurface(grphx.im_tiles3,i*8,j*8,8,8); + tiles3.push_back(temp); + } + } + + for(int j = 0; j <60; j++) + { + for(int i = 0; i <12; i++) + { + SDL_Surface* temp = GetSubSurface(grphx.im_entcolours,i*8,j*8,8,8); + entcolours.push_back(temp); + } + } +} + +void Graphics::maketelearray() +{ + for (int i = 0; i < 10; i++) + { + SDL_Surface* temp = GetSubSurface(grphx.im_teleporter,i*96,0,96,96); + tele.push_back(temp); + } +} + +void Graphics::MakeSpriteArray() +{ + for(int j = 0; j <16; j++) + { + for(int i = 0; i <12; i++) + { + SDL_Surface* temp = GetSubSurface(grphx.im_sprites,i*32,j*32,32,32); + sprites.push_back(temp); + temp = GetSubSurface(grphx.im_flipsprites,i*32,j*32,32,32); + flipsprites.push_back(temp); + } + } +} + + +void Graphics::Print( int _x, int _y, std::string _s, int r, int g, int b, bool cen /*= false*/ ) +{ + r = clamp(r,0,255); + g = clamp(g,0,255); + b = clamp(b,0,255); + + ct.colour = getRGB(r, g, b); + + if (cen) + _x = ((160 ) - ((len(_s)) / 2)); + int bfontpos = 0; + int curr; + for (unsigned int i = 0; i < _s.length(); i++) + { + curr = (_s.c_str())[i]; + if (curr > 255 || curr < 0) + { + curr = '?'; + } + point tpoint; + tpoint.x = _x + bfontpos; + tpoint.y = _y; + + SDL_Rect fontRect = bfont_rect; + fontRect.x = tpoint.x ; + fontRect.y = tpoint.y ; + + if (flipmode) + { + BlitSurfaceColoured( flipbfont[curr], NULL, backBuffer, &fontRect , ct); + } + else + { + BlitSurfaceColoured( bfont[curr], NULL, backBuffer, &fontRect , ct); + } + bfontpos+=bfontlen[curr] ; + } +} + + +void Graphics::bigprint( int _x, int _y, std::string _s, int r, int g, int b, bool cen, int sc ) +{ + r = clamp(r,0,255); + g = clamp(g,0,255); + b = clamp(b,0,255); + + ct.colour = getRGB(r, g, b); + + if (cen) + { + _x = std::max(160 - (int((len(_s)/ 2.0)*sc)), 0 ); + } + + int bfontpos = 0; + int curr; + for (unsigned int i = 0; i < _s.length(); i++) + { + curr = (_s.c_str())[i]; + if (curr > 255 || curr < 0) + { + curr = '?'; + } + + /* + point tpoint; + tpoint.x = _x + bfontpos; + tpoint.y = _y; + + SDL_Rect fontRect = bfont_rect; + fontRect.x = tpoint.x ; + fontRect.y = tpoint.y ; + */ + + if (flipmode) + { + SDL_Surface* tempPrint = ScaleSurfaceSlow(flipbfont[curr], bfont[curr]->w *sc,bfont[curr]->h *sc); + SDL_Rect printrect = { Sint16((_x) + bfontpos), Sint16(_y) , Sint16(bfont_rect.w*sc), Sint16(bfont_rect.h * sc)}; + BlitSurfaceColoured(tempPrint, NULL, backBuffer, &printrect, ct); + SDL_FreeSurface(tempPrint); + } + else + { + SDL_Surface* tempPrint = ScaleSurfaceSlow(bfont[curr], bfont[curr]->w *sc,bfont[curr]->h *sc); + SDL_Rect printrect = { static_cast((_x) + bfontpos), static_cast(_y) , static_cast((bfont_rect.w*sc)+1), static_cast((bfont_rect.h * sc)+1)}; + BlitSurfaceColoured(tempPrint, NULL, backBuffer, &printrect, ct); + SDL_FreeSurface(tempPrint); + } + bfontpos+=bfontlen[curr] *sc; + } +} + +int Graphics::len(std::string t) +{ + int bfontpos = 0; + for (unsigned int i = 0; i < t.length(); i++) + { + int cur = (t.c_str())[i]; + bfontpos+= bfontlen[cur] ; + } + return bfontpos; +} + +void Graphics::PrintOff( int _x, int _y, std::string _s, int r, int g, int b, bool cen /*= false*/ ) +{ + r = clamp(r,0,255); + g = clamp(g,0,255); + b = clamp(b,0,255); + + ct.colour = getRGB(r, g, b); + + if (cen) + _x = ((160) - (len(_s) / 2))+_x; + int bfontpos = 0; + int curr; + for (unsigned int i = 0; i < _s.length(); i++) + { + curr = (_s.c_str())[i]; + if (curr > 255 || curr < 0) + { + curr = '?'; + } + point tpoint; + tpoint.x = _x + bfontpos; + tpoint.y = _y; + + SDL_Rect fontRect = bfont_rect; + fontRect.x = tpoint.x ; + fontRect.y = tpoint.y ; + + if (flipmode) + { + //flipbfont[cur].colorTransform(bfont_rect, ct); + BlitSurfaceColoured( bfont[curr], NULL, backBuffer, &fontRect , ct); + } + else + { + //bfont[cur].colorTransform(bfont_rect, ct); + //backBuffer.copyPixels(bfont[cur], bfont_rect, tpoint); + BlitSurfaceColoured( bfont[curr], NULL, backBuffer, &fontRect , ct); + } + bfontpos+=bfontlen[curr] ; + } +} + +void Graphics::bprint( int x, int y, std::string t, int r, int g, int b, bool cen /*= false*/ ) +{ + + //printmask(x, y, t, cen); + //Print(x, y - 1, t, 0, 0, 0, cen); + //if (cen) + //{ + // //TODO find different + // PrintOff(-1, y, t, 0, 0, 0, cen); + // PrintOff(1, y, t, 0, 0, 0, cen); + //} + //else + //{ + // Print(x -1, y, t, 0, 0, 0, cen); + // Print(x , y, t, 0, 0, 0, cen); + //} + //Print(x, y+1, t, 0, 0, 0, cen); + + Print(x, y, t, r, g, b, cen); +} + +void Graphics::RPrint( int _x, int _y, std::string _s, int r, int g, int b, bool cen /*= false*/ ) +{ + r = clamp(r,0,255); + g = clamp(g,0,255); + b = clamp(b,0,255); + ct.colour = getRGB(r, g, b); + + if (cen) + _x = ((308) - (_s.length() / 2)); + int bfontpos = 0; + int curr; + for (unsigned int i = 0; i < _s.length(); i++) + { + curr = (_s.c_str())[i]; + if (curr > 255 || curr < 0) + { + curr = '?'; + } + point tpoint; + tpoint.x = _x + bfontpos; + tpoint.y = _y; + + SDL_Rect fontRect = bfont_rect; + fontRect.x = tpoint.x ; + fontRect.y = tpoint.y ; + + if (flipmode) + { + //flipbfont[cur].colorTransform(bfont_rect, ct); + BlitSurfaceColoured( flipbfont[curr], NULL, backBuffer, &fontRect , ct); + } + else + { + //bfont[cur].colorTransform(bfont_rect, ct); + //backBuffer.copyPixels(bfont[cur], bfont_rect, tpoint); + BlitSurfaceColoured( bfont[curr], NULL, backBuffer, &fontRect , ct); + } + bfontpos+=bfontlen[curr] ; + } +} + +void Graphics::printcrewname( int x, int y, int t ) +{ + //Print the name of crew member t in the right colour + switch(t) + { + case 0: + Print(x, y, "Viridian", 16, 240, 240,false ); + break; + case 1: + Print(x, y, "Violet", 240, 16, 240,false); + break; + case 2: + Print(x, y, "Vitellary", 240, 240, 16,false); + break; + case 3: + Print(x, y, "Vermilion", 240, 16, 16,false); + break; + case 4: + Print(x, y, "Verdigris", 16, 240, 16,false); + break; + case 5: + Print(x, y, "Victoria", 16, 16, 240,false); + break; + } +} + +void Graphics::printcrewnamedark( int x, int y, int t ) +{ + //Print the name of crew member t as above, but in black and white + switch(t) + { + case 0: + Print(x, y, "Viridian", 128,128,128,false); + break; + case 1: + Print(x, y, "Violet", 128,128,128,false); + break; + case 2: + Print(x, y, "Vitellary", 128,128,128,false); + break; + case 3: + Print(x, y, "Vermilion", 128,128,128,false); + break; + case 4: + Print(x, y, "Verdigris", 128,128,128,false); + break; + case 5: + Print(x, y, "Victoria", 128,128,128,false); + break; + } +} + +void Graphics::printcrewnamestatus( int x, int y, int t ) +{ + //Print the status of crew member t in the right colour + switch(t) + { + case 0: + Print(x, y, "(that's you!)", 12, 140, 140,false); + break; + case 1: + Print(x, y, "Rescued!", 140, 12, 140,false); + break; + case 2: + Print(x, y, "Rescued!", 140, 140, 12,false); + break; + case 3: + Print(x, y, "Rescued!", 140, 12, 12,false); + break; + case 4: + Print(x, y, "Rescued!", 12, 140, 12,false); + break; + case 5: + Print(x, y, "Rescued!", 12, 12, 140,false); + break; + } +} + +void Graphics::drawsprite( int x, int y, int t, int r, int g, int b ) +{ + SDL_Rect rect = { Sint16(x), Sint16(y), sprites_rect.w, sprites_rect.h }; + setcolreal(getRGB(r,g,b)); + //sprites[t].colorTransform(sprites_rect, ct); + BlitSurfaceColoured(sprites[t], NULL, backBuffer, &rect, ct); +} + +void Graphics::drawtile( int x, int y, int t, int r, int g, int b ) +{ + SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h }; + BlitSurfaceStandard(tiles[t], NULL, backBuffer, &rect); +} + + +void Graphics::drawtile2( int x, int y, int t, int r, int g, int b ) +{ + SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h }; + BlitSurfaceStandard(tiles2[t], NULL, backBuffer, &rect); +} + + + +void Graphics::drawtile3( int x, int y, int t, int off ) +{ + SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h }; + BlitSurfaceStandard(tiles3[t+(off*30)], NULL, backBuffer, &rect); +} + +void Graphics::drawentcolours( int x, int y, int t) +{ + SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h }; + BlitSurfaceStandard(entcolours[t], NULL, backBuffer, &rect); +} + +void Graphics::drawtowertile( int x, int y, int t ) +{ + SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h }; + BlitSurfaceStandard(tiles2[t], NULL, towerbuffer, &rect); +} + + +void Graphics::drawtowertile3( int x, int y, int t, int off ) +{ + SDL_Rect rect = { Sint16(x), Sint16(y), tiles_rect.w, tiles_rect.h }; + BlitSurfaceStandard(tiles3[t+(off*30)], NULL, towerbuffer, &rect); +} + +void Graphics::drawgui( UtilityClass& help ) +{ + textboxcleanup(); + //Draw all the textboxes to the screen + for (int i = 0; iw / 2); + tpoint.y = yp; + trect.x = tpoint.x ; + trect.y = tpoint.y; + trect.w = images[t]->w; + trect.h= images[t]->h; + BlitSurfaceColoured(images[t], NULL, backBuffer, &trect, ct); + + } + else + { + trect.x = xp; + trect.y = yp; + trect.w = images[t]->w; + trect.h = images[t]->h; + BlitSurfaceColoured(images[t], NULL, backBuffer, &trect, ct); + + } +} + +void Graphics::drawimage( int t, int xp, int yp, bool cent/*=false*/ ) +{ + + SDL_Rect trect; + if (cent) + { + trect.x = 160 - int(images[t]->w / 2); + trect.y = yp; + trect.w = images[t]->w; + trect.h = images[t]->h; + BlitSurfaceStandard(images[t], NULL, backBuffer, &trect); + //backbuffer.copyPixels(images[t], trect, tpoint); + } + else + { + + trect.x = xp; + trect.y = yp; + trect.w = images[t]->w; + trect.h= images[t]->h; + + BlitSurfaceStandard(images[t], NULL, backBuffer, &trect); + } +} + +void Graphics::drawpartimage( int t, int xp, int yp, int wp, int hp) +{ + SDL_Rect trect; + + trect.x = xp; + trect.y = yp; + trect.w = wp; + trect.h= hp; + + SDL_Rect trect2; + + trect2.x = 0; + trect2.y = 0; + trect2.w = wp; + trect2.h= hp; + + BlitSurfaceStandard(images[t], &trect2, backBuffer, &trect); +} + +void Graphics::cutscenebars() +{ + if (showcutscenebars) + { + cutscenebarspos += 25; + cutscenebarspos = std::min(cutscenebarspos, 361); + FillRect(backBuffer, 0, 0, cutscenebarspos, 16, 0x000000); + //backbuffer.fillRect(new Rectangle(0, 0, cutscenebarspos, 16), 0x000000); + FillRect(backBuffer, 360-cutscenebarspos, 224, cutscenebarspos, 16, 0x000000); + //backbuffer.fillRect(new Rectangle(360-cutscenebarspos, 224, cutscenebarspos, 16), 0x000000); + } + else + { + //disappearing + if (cutscenebarspos > 0) + { + cutscenebarspos -= 25; + cutscenebarspos = std::max(cutscenebarspos, 0); + //draw + FillRect(backBuffer, 0, 0, cutscenebarspos, 16, 0x000000); + //backbuffer.fillRect(new Rectangle(0, 0, cutscenebarspos, 16), 0x000000); + FillRect(backBuffer, 360-cutscenebarspos, 224, cutscenebarspos, 16, 0x000000); + //backbuffer.fillRect(new Rectangle(360-cutscenebarspos, 224, cutscenebarspos, 16), 0x000000); + } + } +} + +void Graphics::drawcrewman( int x, int y, int t, bool act, UtilityClass& help, bool noshift /*=false*/ ) +{ + if (!act) + { + if (noshift) + { + if (flipmode) + { + drawspritesetcol(x, y, 14, 19, help); + } + else + { + drawspritesetcol(x, y, 12, 19, help); + } + } + else + { + if (flipmode) + { + drawspritesetcol(x - 8, y, 14, 19, help); + } + else + { + drawspritesetcol(x - 8, y, 12, 19, help); + } + } + } + else + { + if (flipmode) crewframe += 6; + + switch(t) + { + case 0: + drawspritesetcol(x, y, crewframe, 0 , help); + break; + case 1: + drawspritesetcol(x, y, crewframe, 20, help); + break; + case 2: + drawspritesetcol(x, y, crewframe, 14, help); + break; + case 3: + drawspritesetcol(x, y, crewframe, 15, help); + break; + case 4: + drawspritesetcol(x, y, crewframe, 13, help); + break; + case 5: + drawspritesetcol(x, y, crewframe, 16, help); + break; + } + + if (flipmode) crewframe -= 6; + } +} + +void Graphics::drawpixeltextbox( int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo ) +{ + //given these parameters, draw a textbox with a pixel width + + //madrect.x = x; madrect.y = y; madrect.w = w; madrect.h = h; + //backbuffer.fillRect(madrect, RGB(r / 6, g / 6, b / 6)); + FillRect(backBuffer,x,y,w,h, r/6, g/6, b/6 ); + + for (k = 0; k < w2-2; k++) + { + drawcoloredtile(x + 8-xo + (k * 8), y, 41, r, g, b); + drawcoloredtile(x + 8-xo + (k * 8), y + (h) - 8, 46, r, g, b); + } + + for (k = 0; k < h2-2; k++) + { + drawcoloredtile(x, y + 8-yo + (k * 8), 43, r, g, b); + drawcoloredtile(x + (w) - 8, y + 8-yo + (k * 8), 44, r, g, b); + } + + drawcoloredtile(x, y, 40, r, g, b); + drawcoloredtile(x + (w) - 8, y, 42, r, g, b); + drawcoloredtile(x, y + (h) - 8, 45, r, g, b); + drawcoloredtile(x + (w) - 8, y + (h) - 8, 47, r, g, b); +} + +void Graphics::drawcustompixeltextbox( int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo ) +{ + //given these parameters, draw a textbox with a pixel width + + //madrect.x = x; madrect.y = y; madrect.w = w; madrect.h = h; + //backbuffer.fillRect(madrect, RGB(r / 6, g / 6, b / 6)); + FillRect(backBuffer,x,y,w,h, r/6, g/6, b/6 ); + + for (k = 0; k < w2-2; k++) + { + drawcoloredtile(x + 8-xo + (k * 8), y, 41, r, g, b); + drawcoloredtile(x + 8-xo + (k * 8), y + (h) - 8, 46, r, g, b); + } + + + drawcoloredtile(x+ (w) - 16, y, 41, r, g, b); + drawcoloredtile(x+ (w) - 16, y + (h) - 8, 46, r, g, b); + drawcoloredtile(x+ (w) - 24, y, 41, r, g, b); + drawcoloredtile(x+ (w) - 24, y + (h) - 8, 46, r, g, b); + + for (k = 0; k < h2-2; k++) + { + drawcoloredtile(x, y + 8-yo + (k * 8), 43, r, g, b); + drawcoloredtile(x + (w) - 8, y + 8-yo + (k * 8), 44, r, g, b); + } + + drawcoloredtile(x, y + (h) - 16, 43, r, g, b); + drawcoloredtile(x + (w) - 8, y + (h) - 16, 44, r, g, b); + drawcoloredtile(x, y + (h) - 24, 43, r, g, b); + drawcoloredtile(x + (w) - 8, y + (h) - 24, 44, r, g, b); + + drawcoloredtile(x, y, 40, r, g, b); + drawcoloredtile(x + (w) - 8, y, 42, r, g, b); + drawcoloredtile(x, y + (h) - 8, 45, r, g, b); + drawcoloredtile(x + (w) - 8, y + (h) - 8, 47, r, g, b); +} + +void Graphics::drawtextbox( int x, int y, int w, int h, int r, int g, int b ) +{ + //given these parameters, draw a textbox + //madrect.x = x; madrect.y = y; madrect.w = w*8; madrect.h = h*8; + //backbuffer.fillRect(madrect, RGB(r / 6, g / 6, b / 6)); + FillRect(backBuffer,x,y,w*8,h*8, r/6, g/6, b/6 ); + + drawcoloredtile(x, y, 40, r, g, b); + drawcoloredtile(x + (w*8) - 8, y, 42, r, g, b); + drawcoloredtile(x, y + (h*8) - 8, 45, r, g, b); + drawcoloredtile(x + (w*8) - 8, y + (h*8) - 8, 47, r, g, b); + + for (int k = 0; k < w-2; k++) + { + drawcoloredtile(x + 8 + (k * 8), y, 41, r, g, b); + drawcoloredtile(x + 8 + (k * 8), y + (h * 8) - 8, 46, r, g, b); + } + + for (int k = 0; k < h-2; k++) + { + drawcoloredtile(x, y + 8 + (k * 8), 43, r, g, b); + drawcoloredtile(x + (w * 8) - 8, y + 8 + (k * 8), 44, r, g, b); + } +} + +void Graphics::textboxactive() +{ + //Remove all but the most recent textbox + for (int i = 0; i < ntextbox; i++) + { + if (m != i) textbox[i].remove(); + } +} + +void Graphics::textboxremovefast() +{ + //Remove all textboxes + for (int i = 0; i < ntextbox; i++) + { + textbox[i].removefast(); + } +} + +void Graphics::textboxremove() +{ + //Remove all textboxes + for (int i = 0; i < ntextbox; i++) + { + textbox[i].remove(); + } +} + +void Graphics::textboxtimer( int t ) +{ + textbox[m].timer=t; +} + +void Graphics::addline( std::string t ) +{ + textbox[m].addline(t); +} + +void Graphics::textboxadjust() +{ + textbox[m].adjust(); +} + + +void Graphics::createtextbox( std::string t, int xp, int yp, int r/*= 255*/, int g/*= 255*/, int b /*= 255*/ ) +{ + + if(ntextbox == 0) + { + //If there are no active textboxes, Z=0; + m = 0; + ntextbox++; + } + else + { + /*i = 0; m = -1; + while (i < ntextbox) { + if (!textbox[i].active) { m = i; i = ntextbox;} + i++; + } + if (m == -1) {m = ntextbox; ntextbox++;} + */ + m = ntextbox; + ntextbox++; + } + + if(m<20) + { + textbox[m].clear(); + textbox[m].line[0] = t; + textbox[m].xp = xp; + if (xp == -1) textbox[m].xp = 160 - (((t.length() / 2) + 1) * 8); + textbox[m].yp = yp; + textbox[m].initcol(r, g, b); + textbox[m].resize(); + } +} + +void Graphics::drawfade() +{ + if ((fademode == 1)||(fademode == 4)) + { + FillRect(backBuffer, 0, 0, backBuffer->w, backBuffer->h, 0x000000); + //backbuffer.fillRect(backbuffer.rect, 0x000000); + } + else if(fademode==3) + { + for (int i = 0; i < 15; i++) + { + FillRect(backBuffer, fadebars[i], i * 16, fadeamount, 16, 0x000000 ); + //backbuffer.fillRect(new Rectangle(, , , 16), 0x000000); + } + } + else if(fademode==5 ) + { + for (int i = 0; i < 15; i++) + { + FillRect(backBuffer, fadebars[i]-fadeamount, i * 16, 500, 16, 0x000000 ); + //backbuffer.fillRect(new Rectangle(fadebars[i]-fadeamount, i * 16, 500, 16), 0x000000); + } + } + +} + +void Graphics::processfade() +{ + if (fademode > 1) + { + if (fademode == 2) + { + //prepare fade out + for (int i = 0; i < 15; i++) + { + fadebars[i] = -int(fRandom() * 12) * 8; + } + fadeamount = 0; + fademode = 3; + } + else if (fademode == 3) + { + fadeamount += 24; + if (fadeamount > 416) + { + fademode = 1; //faded + } + } + else if (fademode == 4) + { + //prepare fade in + for (int i = 0; i < 15; i++) + { + fadebars[i] = 320 + int(fRandom() * 12) * 8; + } + fadeamount = 416; + fademode = 5; + } + else if (fademode == 5) + { + fadeamount -= 24; + if (fadeamount <= 0) + { + fademode = 0; //normal + } + } + } +} + +void Graphics::drawmenu( Game& game, int cr, int cg, int cb, int division /*= 30*/ ) +{ + for (int i = 0; i < game.nummenuoptions; i++) + { + if (i == game.currentmenuoption) + { + //Draw it highlighted + if (game.menuoptionsactive[i]) + { + tempstring = game.menuoptions[i]; + std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper); + tempstring = std::string("[ ") + tempstring + std::string(" ]"); + Print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); + } + else + { + tempstring = game.menuoptions[i]; + tempstring = "[ " + tempstring + " ]"; + //Draw it in gray + Print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); + } + } + else + { + //Draw it normally + if (game.menuoptionsactive[i]) + { + Print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i], cr, cg, cb); + } + else + { + //Draw it in gray + Print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i], 128, 128, 128); + } + } + } +} + +void Graphics::drawlevelmenu( Game& game, int cr, int cg, int cb, int division /*= 30*/ ) +{ + for (int i = 0; i < game.nummenuoptions; i++) + { + if (i == game.currentmenuoption) + { + if(game.nummenuoptions-i<=2){ + //Draw it highlighted + if (game.menuoptionsactive[i]) + { + tempstring = game.menuoptions[i]; + std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper); + tempstring = std::string("[ ") + tempstring + std::string(" ]"); + Print(110 + (i * division) - 16 +game.menuxoff, 140+8 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); + } + else + { + tempstring = game.menuoptions[i]; + tempstring = "[ " + tempstring + " ]"; + //Draw it in gray + Print(110 + (i * division) - 16 +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); + } + }else{ + //Draw it highlighted + if (game.menuoptionsactive[i]) + { + tempstring = game.menuoptions[i]; + std::transform(tempstring.begin(), tempstring.end(),tempstring.begin(), ::toupper); + tempstring = std::string("[ ") + tempstring + std::string(" ]"); + Print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); + } + else + { + tempstring = game.menuoptions[i]; + tempstring = "[ " + tempstring + " ]"; + //Draw it in gray + Print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); + } + } + } + else + { + if(game.nummenuoptions-i<=2){ + //Draw it normally + if (game.menuoptionsactive[i]) + { + Print(110 + (i * division) +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, game.menuoptions[i], cr, cg, cb); + } + else + { + //Draw it in gray + Print(110 + (i * division) +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, game.menuoptions[i], 128, 128, 128); + } + }else{ + //Draw it normally + if (game.menuoptionsactive[i]) + { + Print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i], cr, cg, cb); + } + else + { + //Draw it in gray + Print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i], 128, 128, 128); + } + } + } + } +} + + +void Graphics::drawcoloredtile( int x, int y, int t, int r, int g, int b ) +{ + setcolreal(getRGB(r,g,b)); + + SDL_Rect rect; + setRect(rect,x,y,tiles_rect.w,tiles_rect.h); + BlitSurfaceColoured(tiles[t],NULL, backBuffer, &rect, ct ); +} + + +bool Graphics::Hitest(SDL_Surface* surface1, point p1, int col, SDL_Surface* surface2, point p2, int col2) +{ + + //find rectangle where they intersect: + + int r1_left = p1.x; + int r1_right = r1_left + surface1->w; + int r2_left = p2.x; + int r2_right = r2_left + surface2->w; + + int r1_bottom = p1.y; + int r1_top = p1.y + surface1->h; + int r2_bottom = p2.y; + int r2_top = p2.y + surface2->h; + + bool intersection = intersectRect(r1_left, r1_right, r1_bottom, r1_top, r2_left, r2_right, r2_bottom, r2_top); + + if(intersection) + { + int r3_left = std::max(r1_left, r2_left); + int r3_top = std::min(r1_top, r2_top); + int r3_right = std::min(r1_right, r2_right); + int r3_bottom= std::max(r1_bottom, r2_bottom); + + //for every pixel inside rectangle + for(int x = r3_left; x < r3_right; x++) + { + for(int y = r3_bottom; y < r3_top; y++) + { + Uint32 pixel1 = ReadPixel(surface1 , x - p1.x, y - p1.y); + Uint32 pixel2 = ReadPixel(surface2 , x - p2.x, y - p2.y); + if ((pixel1 & 0x000000FF) && (pixel2 & 0x000000FF)) + { + return true; + } + } + } + return false; + } + else + { + return false; + } + +} + +void Graphics::drawgravityline( int t, entityclass& obj ) +{ + if (obj.entities[t].life == 0) + { + switch(linestate) + { + case 0: + FillRect(backBuffer,line_rect, getRGB(200-20, 200-20, 200-20)); + break; + case 1: + FillRect(backBuffer,line_rect, getRGB(225-30, 245-30, 245-30)); + break; + case 2: + FillRect(backBuffer,line_rect, getRGB(245-30, 245-30, 225-30)); + break; + case 3: + FillRect(backBuffer,line_rect, getRGB(164-10, 200-20, 200-20)); + break; + case 4: + FillRect(backBuffer,line_rect, getRGB(224-20, 255-30, 196-20)); + break; + case 5: + FillRect(backBuffer,line_rect, getRGB(205-20, 235-30, 196-20)); + break; + case 6: + FillRect(backBuffer,line_rect, getRGB(164-10, 164-10, 164-10)); + break; + case 7: + FillRect(backBuffer,line_rect, getRGB(225-30, 245-30, 205-20)); + break; + case 8: + FillRect(backBuffer,line_rect, getRGB(205-20, 255-30, 225-30)); + break; + case 9: + FillRect(backBuffer,line_rect, getRGB(245-30, 245-30, 245-30)); + break; + } + } + else + { + FillRect(backBuffer,line_rect, getRGB(96, 96, 96)); + } +} + +void Graphics::drawtrophytext( entityclass& obj, UtilityClass& help ) +{ + int temp, temp2, temp3; + + if (obj.trophytext < 15) + { + temp = (196 * obj.trophytext) / 15; + temp2 = (196 * obj.trophytext) / 15; + temp3 = ((255 - help.glow) * obj.trophytext) / 15; + } + else + { + temp = 196; + temp2 = 196; + temp3 = 255 - help.glow; + } + switch(obj.trophytype) + { + case 1: + Print( -1, 6, "SPACE STATION 1 MASTERED", temp, temp2, temp3, true); + Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 2: + Print( -1, 6, "LABORATORY MASTERED", temp, temp2, temp3, true); + Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 3: + Print( -1, 6, "THE TOWER MASTERED", temp, temp2, temp3, true); + Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 4: + Print( -1, 6, "SPACE STATION 2 MASTERED", temp, temp2, temp3, true); + Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 5: + Print( -1, 6, "WARP ZONE MASTERED", temp, temp2, temp3, true); + Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 6: + Print( -1, 6, "FINAL LEVEL MASTERED", temp, temp2, temp3, true); + Print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 7: + Print( -1, 6, "GAME COMPLETE", temp, temp2, temp3, true); + Print( -1, 16, "Complete the game", temp, temp2, temp3, true); + break; + case 8: + Print( -1, 6, "FLIP MODE COMPLETE", temp, temp2, temp3, true); + Print( -1, 16, "Complete the game in flip mode", temp, temp2, temp3, true); + break; + case 9: + Print( -1, 11, "Win with less than 50 deaths", temp, temp2, temp3, true); + break; + case 10: + Print( -1, 11, "Win with less than 100 deaths", temp, temp2, temp3, true); + break; + case 11: + Print( -1, 11, "Win with less than 250 deaths", temp, temp2, temp3, true); + break; + case 12: + Print( -1, 11, "Win with less than 500 deaths", temp, temp2, temp3, true); + break; + case 13: + Print( -1, 11, "Last 5 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 14: + Print( -1, 11, "Last 10 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 15: + Print( -1, 11, "Last 15 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 16: + Print( -1, 11, "Last 20 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 17: + Print( -1, 11, "Last 30 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 18: + Print( -1, 11, "Last 1 minute on the Super Gravitron", temp, temp2, temp3, true); + break; + case 20: + Print( -1, 6, "MASTER OF THE UNIVERSE", temp, temp2, temp3, true); + Print( -1, 16, "Complete the game in no death mode", temp, temp2, temp3, true); + break; + } +} + +void Graphics::drawentities( mapclass& map, entityclass& obj, UtilityClass& help ) +{ + //Update line colours! + if (linedelay <= 0) + { + linestate++; + if (linestate >= 10) linestate = 0; + linedelay = 2; + } + else + { + linedelay--; + } + + point tpoint; + + SDL_Rect drawRect; + + trinketcolset = false; + + for (int i = obj.nentity - 1; i >= 0; i--) + { + if (!obj.entities[i].invis && obj.entities[i].active) + { + if (obj.entities[i].size == 0) + { + // Sprites + if (flipmode) + { + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + // + setcol(obj.entities[i].colour, help); + //flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + //backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + if (map.warpx) + { + //screenwrapping! + if (tpoint.x < 0) + { + tpoint.x += 320; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceStandard(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + } + if (tpoint.x > 300) + { + tpoint.x -= 320; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceStandard(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + } + } + else if (map.warpy) + { + if (tpoint.y < 0) + { + tpoint.y += 230; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceStandard(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + } + if (tpoint.y > 210) + { + tpoint.y -= 230; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceStandard(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + } + } + } + else + { + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + // + setcol(obj.entities[i].colour, help); + //sprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + if (map.warpx) + { + //screenwrapping! + if (tpoint.x < 0) + { + tpoint.x += 320; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + } + if (tpoint.x > 300) + { + tpoint.x -= 320; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + } + } + else if (map.warpy) + { + if (tpoint.y < 0) + { + tpoint.y += 230; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + } + if (tpoint.y > 210) + { + tpoint.y -= 230; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + } + } + } + } + else if (obj.entities[i].size == 1) + { + // Tiles + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + drawRect = tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + } + else if (obj.entities[i].size == 2) + { + // Special: Moving platform, 4 tiles + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + drawRect = tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + if(map.custommode){ + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + }else{ + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + } + } + else if (obj.entities[i].size == 3) // Big chunky pixels! + { + prect.x = obj.entities[i].xp; + prect.y = obj.entities[i].yp; + //A seperate index of colours, for simplicity + if(obj.entities[i].colour==1) + { + //backbuffer.fillRect(prect, RGB(196 - (fRandom() * 64), 10, 10)); + FillRect(backBuffer, prect, (fRandom() * 64), 10, 10); + } + else if (obj.entities[i].colour == 2) + { + //backbuffer.fillRect(prect, RGB(160- help.glow/2 - (fRandom()*20), 200- help.glow/2, 220 - help.glow)); + FillRect(backBuffer,prect, int(160- help.glow/2 - (fRandom()*20)), 200- help.glow/2, 220 - help.glow); + } + } + else if (obj.entities[i].size == 4) // Small pickups + { + drawhuetile(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].tile, obj.entities[i].colour); + } + else if (obj.entities[i].size == 5) //Horizontal Line + { + line_rect.x = obj.entities[i].xp; + line_rect.y = obj.entities[i].yp; + line_rect.w = obj.entities[i].w; + line_rect.h = 1; + drawgravityline(i, obj); + } + else if (obj.entities[i].size == 6) //Vertical Line + { + line_rect.x = obj.entities[i].xp; + line_rect.y = obj.entities[i].yp; + line_rect.w = 1; + line_rect.h = obj.entities[i].h; + drawgravityline(i, obj); + } + else if (obj.entities[i].size == 7) //Teleporter + { + drawtele(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].drawframe, obj.entities[i].colour, help); + } + else if (obj.entities[i].size == 8) // Special: Moving platform, 8 tiles + { + //TODO check this is correct game breaking moving paltform + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + + if(map.custommode){ + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(entcolours[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + }else{ + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(tiles[obj.entities[i].drawframe],NULL, backBuffer, &drawRect); + } + } + else if (obj.entities[i].size == 9) // Really Big Sprite! (2x2) + { + if (flipmode) + { + setcol(obj.entities[i].colour, help); + + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + + tpoint.x = obj.entities[i].xp+32; + tpoint.y = obj.entities[i].yp; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe +1],NULL, backBuffer, &drawRect, ct); + + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp+32; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe+ 12],NULL, backBuffer, &drawRect, ct); + + tpoint.x = obj.entities[i].xp+32; + tpoint.y = obj.entities[i].yp+32; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe+ 13],NULL, backBuffer, &drawRect, ct); + } + else + { + setcol(obj.entities[i].colour, help); + + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + + tpoint.x = obj.entities[i].xp+32; + tpoint.y = obj.entities[i].yp; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe+1],NULL, backBuffer, &drawRect, ct); + + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp+32; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe+12],NULL, backBuffer, &drawRect, ct); + + tpoint.x = obj.entities[i].xp+32; + tpoint.y = obj.entities[i].yp+32; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe + 13],NULL, backBuffer, &drawRect, ct); + } + } + else if (obj.entities[i].size == 10) // 2x1 Sprite + { + if (flipmode) + { + setcol(obj.entities[i].colour, help); + + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + + tpoint.x = obj.entities[i].xp+32; + tpoint.y = obj.entities[i].yp; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe+1],NULL, backBuffer, &drawRect, ct); + } + else + { + setcol(obj.entities[i].colour, help); + + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + + tpoint.x = obj.entities[i].xp+32; + tpoint.y = obj.entities[i].yp; + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe+1],NULL, backBuffer, &drawRect, ct); + } + } + else if (obj.entities[i].size == 11) //The fucking elephant + { + //TODO elephant bug + setcol(obj.entities[i].colour, help); + drawimagecol(3, obj.entities[i].xp, obj.entities[i].yp); + } + else if (obj.entities[i].size == 12) // Regular sprites that don't wrap + { + if (flipmode) + { + //forget this for a minute; + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + // + + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(flipsprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + + //if we're outside the screen, we need to draw indicators + if (obj.entities[i].xp < -20 && obj.entities[i].vx > 0) + { + if (obj.entities[i].xp < -100) + { + tpoint.x = -5 + (int(( -obj.entities[i].xp) / 10)); + } + else + { + tpoint.x = 5; + } + + tpoint.y = tpoint.y+4; + setcol(23, help); + + drawRect = tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(tiles[1167],NULL, backBuffer, &drawRect, ct); + + } + else if (obj.entities[i].xp > 340 && obj.entities[i].vx < 0) + { + if (obj.entities[i].xp > 420) + { + tpoint.x = 320 - (int(( obj.entities[i].xp-320) / 10)); + } + else + { + tpoint.x = 310; + } + + tpoint.y = tpoint.y+4; + setcol(23, help); + // + + drawRect = tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(tiles[1166],NULL, backBuffer, &drawRect, ct); + } + } + else + { + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + // + drawRect = sprites_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(sprites[obj.entities[i].drawframe],NULL, backBuffer, &drawRect, ct); + + + //if we're outside the screen, we need to draw indicators + + if (obj.entities[i].xp < -20 && obj.entities[i].vx > 0) + { + if (obj.entities[i].xp < -100) + { + tpoint.x = -5 + (int(( -obj.entities[i].xp) / 10)); + } + else + { + tpoint.x = 5; + } + + tpoint.y = tpoint.y+4; + setcol(23, help); + + + drawRect = tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(tiles[1167],NULL, backBuffer, &drawRect, ct); + + } + else if (obj.entities[i].xp > 340 && obj.entities[i].vx < 0) + { + if (obj.entities[i].xp > 420) + { + tpoint.x = 320 - (int(( obj.entities[i].xp-320) / 10)); + } + else + { + tpoint.x = 310; + } + + tpoint.y = tpoint.y+4; + setcol(23, help); + // + + drawRect = tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceColoured(tiles[1166],NULL, backBuffer, &drawRect, ct); + } + } + } + else if (obj.entities[i].size == 13) + { + //Special for epilogue: huge hero! + + if (flipmode) { + + + + //scaleMatrix.scale(6, 6); + //bigbuffer.fillRect(bigbuffer.rect, 0x000000); + FillRect(tempBuffer, 0x000000); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + //flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + //bigbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, new Point(0, 0)); + SDL_Rect drawRect = {Sint16(obj.entities[i].xp ), Sint16(obj.entities[i].yp), sprites_rect.x, sprites_rect.y }; + SDL_Surface* TempSurface = ScaleSurface( flipsprites[obj.entities[i].drawframe], 6* sprites_rect.w,6* sprites_rect.w ); + BlitSurfaceColoured(TempSurface, NULL , backBuffer, &drawRect, ct ); + SDL_FreeSurface(TempSurface); + //scaleMatrix.translate(-obj.entities[i].xp, -obj.entities[i].yp); + } + else + { + //TODO checkthis + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + //flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + //bigbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, new Point(0, 0)); + SDL_Rect drawRect = {Sint16(obj.entities[i].xp ), Sint16(obj.entities[i].yp), Sint16(sprites_rect.x * 6), Sint16(sprites_rect.y * 6 ) }; + SDL_Surface* TempSurface = ScaleSurface( flipsprites[obj.entities[i].drawframe], 6 * sprites_rect.w,6* sprites_rect.h ); + BlitSurfaceColoured(TempSurface, NULL , backBuffer, &drawRect, ct ); + SDL_FreeSurface(TempSurface); + } + + + + } + } + } +} + +void Graphics::drawbackground( int t, mapclass& map ) +{ + int temp = 0; + + switch(t) + { + case 1: + //Starfield + FillRect(backBuffer,0x00000); + for (int i = 0; i < 50; i++) + { + stars[i].w = 2; + stars[i].h = 2; + if (starsspeed[i] <= 6) + { + FillRect(backBuffer,stars[i], getRGB(0x22,0x22,0x22)); + //backbuffer.fillRect(stars[i], 0x222222); + } + else + { + FillRect(backBuffer,stars[i], getRGB(0x55,0x55,0x55)); + } + stars[i].x -= Sint16(starsspeed[i]); + if (stars[i].x < -10) + { + stars[i].x += 340; + stars[i].y = int(fRandom() * 240); + stars[i].w = 2; + starsspeed[i] = 4+int(fRandom()*4); + } + } + break; + case 2: + //Lab + switch(rcol) + { + //Akward ordering to match tileset + case 0: + bcol2 = RGBflip(0, 16*backboxint[0], 16*backboxint[0]); + break; //Cyan + case 1: + bcol2 = RGBflip(16*backboxint[0], 0, 0); + break; //Red + case 2: + bcol2 = RGBflip(16*backboxint[0], 0, 16*backboxint[0]); + break; //Purple + case 3: + bcol2 = RGBflip(0, 0, 16*backboxint[0]); + break; //Blue + case 4: + bcol2 = RGBflip(16*backboxint[0], 16*backboxint[0], 0); + break; //Yellow + case 5: + bcol2 = RGBflip(0, 16 * backboxint[0], 0); + break; //Green + case 6: + //crazy case + spcoldel--; + if (spcoldel <= 0) + { + spcoldel = 15; + spcol++; + if (spcol >= 12) spcol = 0; + } + switch(spcol) + { + case 0: + bcol2 = RGBflip(0, 16*backboxint[0], 16*backboxint[0]); + break; //Cyan + case 1: + bcol2 = RGBflip(0, (spcoldel+1)*backboxint[0], 16*backboxint[0]); + break; //Cyan + case 2: + bcol2 = RGBflip(0, 0, 16*backboxint[0]); + break; //Blue + case 3: + bcol2 = RGBflip((16-spcoldel)*backboxint[0], 0, 16*backboxint[0]); + break; //Blue + case 4: + bcol2 = RGBflip(16*backboxint[0], 0, 16*backboxint[0]); + break; //Purple + case 5: + bcol2 = RGBflip(16*backboxint[0], 0, (spcoldel+1)*backboxint[0]); + break; //Purple + case 6: + bcol2 = RGBflip(16*backboxint[0], 0, 0); + break; //Red + case 7: + bcol2 = RGBflip(16*backboxint[0], (16-spcoldel)*backboxint[0], 0); + break; //Red + case 8: + bcol2 = RGBflip(16*backboxint[0], 16*backboxint[0], 0); + break; //Yellow + case 9: + bcol2 = RGBflip((spcoldel+1)*backboxint[0], 16*backboxint[0], 0); + break; //Yellow + case 10: + bcol2 = RGBflip(0, 16 * backboxint[0], 0); + break; //Green + case 11: + bcol2 = RGBflip(0, 16 * backboxint[0], (16-spcoldel)*backboxint[0]); + break; //Green + } + break; + } + FillRect(backBuffer,bcol2); + + for (int i = 0; i < 18; i++) + { + switch(rcol) + { + //Akward ordering to match tileset + case 0: + bcol = RGBflip(16, 128*backboxint[0], 128*backboxint[0]); + break; //Cyan + case 1: + bcol = RGBflip(128*backboxint[0], 16, 16); + break; //Red + case 2: + bcol = RGBflip(128*backboxint[0], 16, 128*backboxint[0]); + break; //Purple + case 3: + bcol = RGBflip(16, 16, 128*backboxint[0]); + break; //Blue + case 4: + bcol = RGBflip(128*backboxint[0], 128*backboxint[0], 16); + break; //Yellow + case 5: + bcol = RGBflip(16, 128 * backboxint[0], 16); + break; //Green + case 6: + //crazy case + switch(spcol) + { + case 0: + bcol = RGBflip(16, 128*backboxint[0], 128*backboxint[0]); + break; //Cyan + case 1: + bcol = RGBflip(16, ((spcoldel+1)*8)*backboxint[0], 128*backboxint[0]); + break; //Cyan + case 2: + bcol = RGBflip(16, 16, 128*backboxint[0]); + break; //Blue + case 3: + bcol = RGBflip((128-(spcoldel*8))*backboxint[0], 16, 128*backboxint[0]); + break; //Blue + case 4: + bcol = RGBflip(128*backboxint[0], 16, 128*backboxint[0]); + break; //Purple + case 5: + bcol = RGBflip(128*backboxint[0], 16, ((spcoldel+1)*8)*backboxint[0]); + break; //Purple + case 6: + bcol = RGBflip(128*backboxint[0], 16, 16); + break; //Red + case 7: + bcol = RGBflip(128*backboxint[0], (128-(spcoldel*8))*backboxint[0], 16); + break; //Red + case 8: + bcol = RGBflip(128*backboxint[0], 128*backboxint[0], 16); + break; //Yellow + case 9: + bcol = RGBflip(((spcoldel+1)*8)*backboxint[0], 128*backboxint[0], 16); + break; //Yellow + case 10: + bcol = RGBflip(16, 128 * backboxint[0], 16); + break; //Green + case 11: + bcol = RGBflip(16, 128 * backboxint[0], (128-(spcoldel*8))*backboxint[0]); + break; //Green + } + break; + } + FillRect(backBuffer, backboxes[i], bcol); + backboxrect.x = backboxes[i].x + 1; + backboxrect.y = backboxes[i].y + 1; + backboxrect.w = backboxes[i].w - 2; + backboxrect.h = backboxes[i].h - 2; + FillRect(backBuffer,backboxrect, bcol2); + + backboxes[i].x += backboxvx[i]; + backboxes[i].y += backboxvy[i]; + if (backboxes[i].x < -40) + { + backboxes[i].x = 320; + backboxes[i].y = fRandom() * 240; + } + if (backboxes[i].x > 320) + { + backboxes[i].x = -32; + backboxes[i].y = fRandom() * 240; + } + if (backboxes[i].y < -40) + { + backboxes[i].y = 240; + backboxes[i].x = fRandom() * 320; + } + if (backboxes[i].y > 260) + { + backboxes[i].y = -32; + backboxes[i].x = fRandom() * 320; + } + } + break; + case 3: //Warp zone (horizontal) + backoffset+=3; + if (backoffset >= 16) backoffset -= 16; + + if (backgrounddrawn) + { + //TODO Scroll? + //towerbuffer.scroll( -3, 0); + ScrollSurface(towerbuffer, -3, 0 ); + for (int j = 0; j < 15; j++) + { + temp = 680 + (rcol * 3); + drawtowertile(317 - backoffset, (j * 16), temp+40); //20*16 = 320 + drawtowertile(317 - backoffset + 8, (j * 16), temp + 41); + drawtowertile(317 - backoffset, (j * 16) + 8, temp + 80); + drawtowertile(317 - backoffset + 8, (j * 16) + 8, temp + 81); + } + } + else + { + //draw the whole thing for the first time! + backoffset = 0; + FillRect(towerbuffer, 0x000000); + for (int j = 0; j < 15; j++) + { + for (int i = 0; i < 21; i++) + { + temp = 680 + (rcol * 3); + drawtowertile((i * 16) - backoffset, (j * 16), temp+40); + drawtowertile((i * 16) - backoffset + 8, (j * 16), temp + 41); + drawtowertile((i * 16) - backoffset, (j * 16) + 8, temp + 80); + drawtowertile((i * 16) - backoffset + 8, (j * 16) + 8, temp + 81); + } + } + backgrounddrawn = true; + } + //TODO this is why map breaks + + //backbuffer.copyPixels(towerbuffer, towerbuffer.rect, tl); + BlitSurfaceStandard(towerbuffer, NULL, backBuffer, NULL); + break; + case 4: //Warp zone (vertical) + backoffset+=3; + if (backoffset >= 16) backoffset -= 16; + + if (backgrounddrawn) + { + //TODO scroll?! + //towerbuffer.scroll(0, -3); + ScrollSurface(towerbuffer,0,-3); + for (int i = 0; i < 21; i++) + { + temp = 760 + (rcol * 3); + drawtowertile((i * 16), 237 - backoffset, temp + 40); //14*17=240 - 3 + drawtowertile((i * 16) + 8, 237 - backoffset, temp + 41); + drawtowertile((i * 16), 237 - backoffset + 8, temp + 80); + drawtowertile((i * 16) + 8, 237 - backoffset + 8, temp + 81); + } + } + else + { + //draw the whole thing for the first time! + backoffset = 0; + FillRect(towerbuffer,0x000000 ); + for (j = 0; j < 15; j++) + { + for (int i = 0; i < 21; i++) + { + temp = 760 + (rcol * 3); + drawtowertile((i * 16), (j * 16)- backoffset, temp+40); + drawtowertile((i * 16)+ 8, (j * 16)- backoffset, temp + 41); + drawtowertile((i * 16), (j * 16)- backoffset + 8, temp + 80); + drawtowertile((i * 16)+ 8, (j * 16)- backoffset + 8, temp + 81); + } + } + backgrounddrawn = true; + } + + SDL_BlitSurface(towerbuffer,NULL, backBuffer,NULL); + break; + case 5: + //Warp zone, central + switch(rcol) + { + //Akward ordering to match tileset + case 0: + warpbcol = RGBflip(0x0A, 0x10, 0x0E); + warpfcol = RGBflip(0x10, 0x22, 0x21); + break; //Cyan + case 1: + warpbcol = RGBflip(0x11, 0x09, 0x0B); + warpfcol = RGBflip(0x22, 0x10, 0x11); + break; //Red + case 2: + warpbcol = RGBflip(0x0F, 0x0A, 0x10); + warpfcol = RGBflip(0x22,0x10,0x22); + break; //Purple + case 3: + warpbcol = RGBflip(0x0A, 0x0B, 0x10); + warpfcol = RGBflip(0x10, 0x10, 0x22); + break; //Blue + case 4: + warpbcol = RGBflip(0x10, 0x0D, 0x0A); + warpfcol = RGBflip(0x22, 0x1E, 0x10); + break; //Yellow + case 5: + warpbcol = RGBflip(0x0D, 0x10, 0x0A); + warpfcol = RGBflip(0x14, 0x22, 0x10); + break; //Green + case 6: + warpbcol = RGBflip(0x0A, 0x0A, 0x0A); + warpfcol = RGBflip(0x12, 0x12, 0x12); + break; //Gray + default: + warpbcol = RGBflip(0xFF, 0xFF, 0xFF); + warpfcol = RGBflip(0xFF, 0xFF, 0xFF); + } + + backoffset += 1; + if (backoffset >= 16) + { + backoffset -= 16; + warpskip = (warpskip + 1) % 2; + } + + for (int i = 10 ; i >= 0; i--) + { + temp = (i << 4) + backoffset; + setwarprect(160 - temp, 120 - temp, temp * 2, temp * 2); + if (i % 2 == warpskip) + { + FillRect(backBuffer, warprect, warpbcol); + } + else + { + FillRect(backBuffer,warprect, warpfcol); + } + } + break; + case 6: + //Final Starfield + FillRect(backBuffer,0x000000); + for (int i = 0; i < 50; i++) + { + if (starsspeed[i] <= 8) + { + FillRect(backBuffer, stars[i], getRGB(0x22, 0x22, 0x22)); + } + else + { + FillRect(backBuffer, stars[i], getRGB(0x55, 0x55, 0x55)); + } + stars[i].y -= starsspeed[i]; + if (stars[i].y < -10) + { + stars[i].y += 260; + stars[i].x = fRandom() * 320; + starsspeed[i] = 5+(fRandom()*5); + } + } + break; + case 7: + //Static, unscrolling section of the tower + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + drawtile3(i * 8, j * 8, map.tower.backat(i, j, 200), 15); + } + } + break; + case 8: + //Static, unscrolling section of the tower + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + drawtile3(i * 8, j * 8, map.tower.backat(i, j, 200), 10); + } + } + break; + case 9: + //Static, unscrolling section of the tower + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + drawtile3(i * 8, j * 8, map.tower.backat(i, j, 600), 0); + } + } + break; + default: + FillRect(backBuffer, 0x000000 ); + //TODO + //backbuffer.copyPixels(backgrounds[t], bg_rect, tl); + BlitSurfaceStandard(backgrounds[t], NULL, backBuffer, &bg_rect); + + break; + } +} + +void Graphics::drawmap( mapclass& map ) +{ + ///TODO forground once; + if (!foregrounddrawn) + { + FillRect(forgroundBuffer, 0xDEADBEEF); + if(map.tileset==0) + { + for (j = 0; j < 29+map.extrarow; j++) + { + for (int i = 0; i < 40; i++) + { + if(map.contents[i + map.vmult[j]]>0) drawforetile(i * 8, j * 8, map.contents[i + map.vmult[j]]); + } + } + } + else if (map.tileset == 1) + { + for (int jt = 0; jt < 29+map.extrarow; jt++) + { + for (int it = 0; it < 40; it++) + { + if(map.contents[it + map.vmult[jt]]>0) drawforetile2(it * 8, jt * 8, map.contents[it + map.vmult[jt]]); + } + } + } + else if (map.tileset == 2) + { + for (j = 0; j < 29+map.extrarow; j++) + { + for (int i = 0; i < 40; i++) + { + if(map.contents[i + map.vmult[j]]>0) drawforetile3(i * 8, j * 8, map.contents[i + map.vmult[j]],map.rcol); + } + } + } + foregrounddrawn = true; + } + OverlaySurfaceKeyed(forgroundBuffer, backBuffer, 0xDEADBEEF); + //SDL_BlitSurface(forgroundBuffer, NULL, backBuffer, NULL); + +} + +void Graphics::drawfinalmap(mapclass & map) +{ + //Update colour cycling for final level + if (map.final_colormode) { + map.final_aniframedelay--; + if(map.final_aniframedelay==0) + { + foregrounddrawn=false; + } + if (map.final_aniframedelay <= 0) { + map.final_aniframedelay = 2; + map.final_aniframe++; + if (map.final_aniframe >= 4) + map.final_aniframe = 0; + } + } + + if (!foregrounddrawn) { + FillRect(forgroundBuffer, 0xDEADBEEF); + if(map.tileset==0){ + for (int j = 0; j < 29+map.extrarow; j++) { + for (int i = 0; i < 40; i++) { + if((map.contents[i + map.vmult[j]])>0) + drawforetile(i * 8, j * 8, map.finalat(i,j)); + } + } + }else if (map.tileset == 1) { + for (int j = 0; j < 29+map.extrarow; j++) { + for (int i = 0; i < 40; i++) { + if((map.contents[i + map.vmult[j]])>0) + drawforetile2(i * 8, j * 8, map.finalat(i,j)); + } + } + } + foregrounddrawn=true; + } + + OverlaySurfaceKeyed(forgroundBuffer, backBuffer, 0xDEADBEEF); +} + +void Graphics::drawtowermap( mapclass& map ) +{ + int temp; + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + temp = map.tower.at(i, j, map.ypos); + if (temp > 0) drawtile3(i * 8, (j * 8) - ((int)map.ypos % 8), temp, map.colstate); + } + } +} + +void Graphics::drawtowermap_nobackground( mapclass& map ) +{ + int temp; + for (j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + temp = map.tower.at(i, j, map.ypos); + if (temp > 0 && temp<28) drawtile3(i * 8, (j * 8) - ((int)map.ypos % 8), temp, map.colstate); + } + } +} + +void Graphics::drawtowerentities( mapclass& map, entityclass& obj, UtilityClass& help ) +{ + //Update line colours! + if (linedelay <= 0) + { + linestate++; + if (linestate >= 10) linestate = 0; + linedelay = 2; + } + else + { + linedelay--; + } + point tpoint; + SDL_Rect trect; + + for (int i = 0; i < obj.nentity; i++) + { + if (!obj.entities[i].invis && obj.entities[i].active) + { + if (obj.entities[i].size == 0) // Sprites + { + trinketcolset = false; + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp-map.ypos; + setcol(obj.entities[i].colour, help); + setRect(trect, tpoint.x, tpoint.y, sprites_rect.w, sprites_rect.h); + BlitSurfaceColoured(sprites[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct); + //screenwrapping! + if (!map.minitowermode) + { + if ( map.ypos >= 500 && map.ypos <= 5000) //The "wrapping" area of the tower + { + if (tpoint.x < 0) + { + tpoint.x += 320; + setRect(trect, tpoint.x, tpoint.y, sprites_rect.w, sprites_rect.h); + BlitSurfaceColoured(sprites[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct); + } + if (tpoint.x > 300) + { + tpoint.x -= 320; + setRect(trect, tpoint.x, tpoint.y, sprites_rect.w, sprites_rect.h); + BlitSurfaceColoured(sprites[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct); + } + } + } + } + else if (obj.entities[i].size == 1) + { + // Tiles + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp-map.ypos; + setRect(trect,tiles_rect.w, tiles_rect.h, tpoint.x, tpoint.y); + BlitSurfaceColoured(tiles[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct); + } + else if (obj.entities[i].size == 2) + { + // Special: Moving platform, 4 tiles + tpoint.x = obj.entities[i].xp; + tpoint.y = obj.entities[i].yp-map.ypos; + setRect(trect,tiles_rect.w, tiles_rect.h, tpoint.x, tpoint.y); + BlitSurfaceColoured(tiles[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct); + tpoint.x += 8; + setRect(trect,sprites_rect.w, sprites_rect.h, tpoint.x, tpoint.y); + BlitSurfaceColoured(tiles[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct); + tpoint.x += 8; + setRect(trect,sprites_rect.w, sprites_rect.h, tpoint.x, tpoint.y); + BlitSurfaceColoured(tiles[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct); + tpoint.x += 8; + setRect(trect,sprites_rect.w, sprites_rect.h, tpoint.x, tpoint.y); + BlitSurfaceColoured(tiles[obj.entities[i].drawframe], NULL, backBuffer, &trect, ct); + + } + else if (obj.entities[i].size == 3) // Big chunky pixels! + { + prect.x = obj.entities[i].xp; + prect.y = obj.entities[i].yp-map.ypos; + //A seperate index of colours, for simplicity + if(obj.entities[i].colour==1) + { + FillRect(backBuffer, prect, getRGB(196 - (fRandom() * 64), 10, 10)); + } + else if (obj.entities[i].colour == 2) + { + FillRect(backBuffer, prect, getRGB(160- help.glow/2 - (fRandom()*20), 200- help.glow/2, 220 - help.glow)); + } + } + else if (obj.entities[i].size == 4) // Small pickups + { + drawhuetile(obj.entities[i].xp, obj.entities[i].yp-map.ypos, obj.entities[i].tile, obj.entities[i].colour); + } + else if (obj.entities[i].size == 5) //Horizontal Line + { + line_rect.x = obj.entities[i].xp; + line_rect.y = obj.entities[i].yp-map.ypos; + line_rect.w = obj.entities[i].w; + line_rect.h = 1; + drawgravityline(i, obj); + } + else if (obj.entities[i].size == 6) //Vertical Line + { + line_rect.x = obj.entities[i].xp; + line_rect.y = obj.entities[i].yp-map.ypos; + line_rect.w = 1; + line_rect.h = obj.entities[i].h; + drawgravityline(i, obj); + } + } + } +} + +void Graphics::drawtowerspikes( mapclass& map ) +{ + for (int i = 0; i < 40; i++) + { + drawtile3(i * 8, -8+map.spikeleveltop, 9, map.colstate); + drawtile3(i * 8, 230-map.spikelevelbottom, 8, map.colstate); + } +} + +void Graphics::drawtowerbackgroundsolo( mapclass& map ) +{ + if (map.bypos < 0) + { + map.bypos += 120 * 8; + } + + int temp = 0; + + if (map.tdrawback) + { + //Draw the whole thing; needed for every colour cycle! + for (int j = 0; j < 31; j++) + { + for (int i = 0; i < 40; i++) + { + temp = map.tower.backat(i, j, map.bypos); + drawtowertile3(i * 8, (j * 8) - (map.bypos % 8), temp, map.colstate); + } + } + SDL_BlitSurface(towerbuffer,NULL, backBuffer,NULL); + map.tdrawback = false; + } + else + { + //just update the bottom + ScrollSurface(towerbuffer,0, -map.bscroll); + for (int i = 0; i < 40; i++) + { + temp = map.tower.backat(i, 0, map.bypos); + drawtowertile3(i * 8, -(map.bypos % 8), temp, map.colstate); + } + + SDL_BlitSurface(towerbuffer, NULL, backBuffer,NULL); + } +} + +void Graphics::drawtowerbackground( mapclass& map ) +{ + //TODO + int temp; + + if (map.bypos < 0) map.bypos += 120 * 8; + + if (map.scrolldir == 1) map.tdrawback = true; + + if (map.tdrawback) + { + //Draw the whole thing; needed for every colour cycle! + for (j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + temp = map.tower.backat(i, j, map.bypos); + drawtowertile3(i * 8, (j * 8) - (map.bypos % 8), temp, map.colstate); + } + } + + //backbuffer.copyPixels(towerbuffer, towerbuffer.rect, tl, null, null, false); + SDL_BlitSurface(towerbuffer,NULL, backBuffer,NULL); + + map.tdrawback = false; + } + else + { + //just update the bottom + //TODO SCOLL + //towerbuffer.scroll(0, -map.bscroll); + ScrollSurface(towerbuffer, 0, -map.bscroll); + for (int i = 0; i < 40; i++) + { + temp = map.tower.backat(i, 0, map.bypos); + drawtowertile3(i * 8, -(map.bypos % 8), temp, map.colstate); + } + + //backbuffer.copyPixels(towerbuffer, towerbuffer.rect, tl, null, null, false); + SDL_BlitSurface(towerbuffer,NULL, backBuffer,NULL); + } +} + +void Graphics::setcol( int t, UtilityClass& help ) +{ + int temp; + + //Setup predefinied colours as per our zany palette + switch(t) + { + //Player Normal + case 0: + ct.colour = getRGB(160- help.glow/2 - (fRandom()*20), 200- help.glow/2, 220 - help.glow); + break; + //Player Hurt + case 1: + ct.colour = getRGB(196 - (fRandom() * 64), 10, 10); + break; + //Enemies and stuff + case 2: + ct.colour = getRGB(225-(help.glow/2), 75, 30); + break; + case 3: //Trinket + if (!trinketcolset) + { + trinketr = 200 - (fRandom() * 64); + trinketg = 200 - (fRandom() * 128); + trinketb = 164 + (fRandom() * 60); + trinketcolset = true; + } + ct.colour = getRGB(trinketr, trinketg, trinketb); + break; + case 4: //Inactive savepoint + temp = (help.glow/2) + (fRandom() * 8); + ct.colour = getRGB(80 + temp, 80 + temp, 80 + temp); + break; + case 5: //Active savepoint + ct.colour = getRGB(164+(fRandom()*64),164+(fRandom()*64), 255-(fRandom()*64)); + break; + case 6: //Enemy : Red + ct.colour = getRGB(250 - help.glow/2, 60- help.glow/2, 60 - help.glow/2); + break; + case 7: //Enemy : Green + ct.colour = getRGB(100 - help.glow/2 - (fRandom()*30), 250 - help.glow/2, 100 - help.glow/2 - (fRandom()*30)); + break; + case 8: //Enemy : Purple + ct.colour = getRGB(250 - help.glow/2, 20, 128 - help.glow/2 + (fRandom()*30)); + break; + case 9: //Enemy : Yellow + ct.colour = getRGB(250 - help.glow/2, 250 - help.glow/2, 20); + break; + case 10: //Warp point (white) + ct.colour = getRGB(255 - (fRandom() * 64), 255 - (fRandom() * 64), 255 - (fRandom() * 64)); + break; + case 11: //Enemy : Cyan + ct.colour = getRGB(20, 250 - help.glow/2, 250 - help.glow/2); + break; + case 12: //Enemy : Blue + ct.colour = getRGB(90- help.glow/2, 90 - help.glow/2, 250 - help.glow/2); + break; + //Crew Members + //green + case 13: + ct.colour = getRGB(120- help.glow/4 - (fRandom()*20), 220 - help.glow/4, 120- help.glow/4); + break; + //Yellow + case 14: + ct.colour = getRGB(220- help.glow/4 - (fRandom()*20), 210 - help.glow/4, 120- help.glow/4); + break; + //pink + case 15: + ct.colour = getRGB(255 - help.glow/8, 70 - help.glow/4, 70 - help.glow / 4); + break; + //Blue + case 16: + ct.colour = getRGB(75, 75, 255- help.glow/4 - (fRandom()*20)); + break; + + + case 17: //Enemy : Orange + ct.colour = getRGB(250 - help.glow/2, 130 - help.glow/2, 20); + break; + case 18: //Enemy : Gray + ct.colour = getRGB(130- help.glow/2, 130 - help.glow/2, 130 - help.glow/2); + break; + case 19: //Enemy : Dark gray + ct.colour = getRGB(60- help.glow/8, 60 - help.glow/8, 60 - help.glow/8); + break; + //Purple + case 20: + ct.colour = getRGB(220 - help.glow / 4 - (fRandom() * 20), 120 - help.glow / 4, 210 - help.glow / 4); + break; + + case 21: //Enemy : Light Gray + ct.colour = getRGB(180- help.glow/2, 180 - help.glow/2, 180 - help.glow/2); + break; + case 22: //Enemy : Indicator Gray + ct.colour = getRGB(230- help.glow/2, 230- help.glow/2, 230- help.glow/2); + break; + case 23: //Enemy : Indicator Gray + ct.colour = getRGB(255- help.glow/2 - (fRandom() * 40) , 255- help.glow/2 - (fRandom() * 40), 255- help.glow/2 - (fRandom() * 40)); + break; + + //Trophies + //cyan + case 30: + ct.colour = RGBf(160, 200, 220); + break; + //Purple + case 31: + ct.colour = RGBf(220, 120, 210); + break; + //Yellow + case 32: + ct.colour = RGBf(220, 210, 120); + break; + //red + case 33: + ct.colour = RGBf(255, 70, 70); + break; + //green + case 34: + ct.colour = RGBf(120, 220, 120); + break; + //Blue + case 35: + ct.colour = RGBf(75, 75, 255); + break; + //Gold + case 36: + ct.colour = getRGB(180, 120, 20); + break; + case 37: //Trinket + if (!trinketcolset) + { + trinketr = 200 - (fRandom() * 64); + trinketg = 200 - (fRandom() * 128); + trinketb = 164 + (fRandom() * 60); + trinketcolset = true; + } + ct.colour = RGBf(trinketr, trinketg, trinketb); + break; + //Silver + case 38: + ct.colour = RGBf(196, 196, 196); + break; + //Bronze + case 39: + ct.colour = RGBf(128, 64, 10); + break; + //Awesome + case 40: //Teleporter in action! + temp = fRandom() * 150; + if(temp<33) + { + ct.colour = RGBf(255 - (fRandom() * 64), 64 + (fRandom() * 64), 64 + (fRandom() * 64)); + } + else if (temp < 66) + { + ct.colour = RGBf(64 + (fRandom() * 64), 255 - (fRandom() * 64), 64 + (fRandom() * 64)); + } + else if (temp < 100) + { + ct.colour = RGBf(64 + (fRandom() * 64), 64 + (fRandom() * 64), 255 - (fRandom() * 64)); + } + else + { + ct.colour = RGBf(164+(fRandom()*64),164+(fRandom()*64), 255-(fRandom()*64)); + } + break; + + case 100: //Inactive Teleporter + temp = (help.glow/2) + (fRandom() * 8); + ct.colour = getRGB(42 + temp, 42 + temp, 42 + temp); + break; + case 101: //Active Teleporter + ct.colour = getRGB(164+(fRandom()*64),164+(fRandom()*64), 255-(fRandom()*64)); + break; + case 102: //Teleporter in action! + temp = fRandom() * 150; + if(temp<33) + { + ct.colour = getRGB(255 - (fRandom() * 64), 64 + (fRandom() * 64), 64 + (fRandom() * 64)); + } + else if (temp < 66) + { + ct.colour = getRGB(64 + (fRandom() * 64), 255 - (fRandom() * 64), 64 + (fRandom() * 64)); + } + else if (temp < 100) + { + ct.colour = getRGB(64 + (fRandom() * 64), 64 + (fRandom() * 64), 255 - (fRandom() * 64)); + } + else + { + ct.colour = getRGB(164+(fRandom()*64),164+(fRandom()*64), 255-(fRandom()*64)); + } + break; + + default: + ct.colour = 0xFFFFFF; + break; + } + //ct.color = endian_swap(ct.color); +} + +void Graphics::menuoffrender() +{ + //TODO + //screenbuffer.lock(); + //screenbuffer.copyPixels(menubuffer, menubuffer.rect, tl, null, null, false); + //screenbuffer->UpdateScreen(menubuffer,NULL); + SDL_Rect offsetRect1; + setRect (offsetRect1, 0, 0, backBuffer->w ,backBuffer->h); + + //put the back buffer in the menubuffer + BlitSurfaceStandard(backBuffer, NULL, menubuffer, NULL); + + + + if(flipmode) + { + // flipmatrix.translate(0, menuoffset); + // screenbuffer.draw(backbuffer, flipmatrix); + // flipmatrix.translate(0, -menuoffset); + SDL_Surface* tempbufferFlipped = FlipSurfaceVerticle(tempBuffer); + //put the stored backbuffer in the backbuffer. + SDL_FillRect(backBuffer, NULL, 0x00000000); + BlitSurfaceStandard(tempbufferFlipped, NULL, backBuffer, NULL); + SDL_FreeSurface(tempbufferFlipped); + SDL_Rect offsetRect; + setRect (offsetRect, 0, menuoffset, backBuffer->w ,backBuffer->h); + SDL_Surface* temp = FlipSurfaceVerticle(menubuffer); + BlitSurfaceStandard(temp,NULL,backBuffer,&offsetRect); + SDL_FreeSurface(temp); + } + else + { + //put the stored backbuffer in the backbuffer. + BlitSurfaceStandard(tempBuffer, NULL, backBuffer, NULL); + + //screenbuffer.copyPixels(backbuffer, backbuffer.rect, new Point(0, menuoffset), null, null, false); + SDL_Rect offsetRect; + setRect (offsetRect, 0, menuoffset, backBuffer->w ,backBuffer->h); + BlitSurfaceStandard(menubuffer,NULL,backBuffer,&offsetRect); + } + + //screenbuffer.unlock(); + SDL_Rect rect; + setRect(rect, 0, 0, backBuffer->w, backBuffer->h); + screenbuffer->UpdateScreen(backBuffer,&rect); + //backbuffer.lock(); + //backbuffer.fillRect(backbuffer.rect, 0x000000); + FillRect(backBuffer, 0x000000); + //backbuffer.unlock(); +} + +void Graphics::drawhuetile( int x, int y, int t, int c ) +{ + point tpoint; + tpoint.x = x; + tpoint.y = y; + switch(c) + { + case 0: + setcolreal(getRGB(250-int(fRandom()*32), 250-int(fRandom()*32), 10)); + break; + case 1: + setcolreal(getRGB(250-int(fRandom()*32), 250-int(fRandom()*32), 10)); + break; + default: + setcolreal(getRGB(250-int(fRandom()*32), 250-int(fRandom()*32), 10)); + break; + } + + + SDL_Rect rect; + setRect(rect,tpoint.x,tpoint.y,tiles_rect.w, tiles_rect.h); + BlitSurfaceColoured(tiles[t],NULL,backBuffer, &rect, ct); +} + +void Graphics::setwarprect( int a, int b, int c, int d ) +{ + warprect.x = a; + warprect.y = b; + warprect.w = c; + warprect.h = d; +} + + void Graphics::textboxcleanup() + { + int i = ntextbox - 1; + while (i >= 0 && !textbox[i].active) + { + ntextbox--; + i--; + } + } + +void Graphics::textboxcenter() +{ + textbox[m].centerx(); + textbox[m].centery(); +} + +void Graphics::textboxcenterx() +{ + textbox[m].centerx(); +} + +int Graphics::textboxwidth() +{ + return textbox[m].w; +} + +void Graphics::textboxmove(int xo, int yo) +{ + textbox[m].xp += xo; + textbox[m].yp += yo; +} + +void Graphics::textboxmoveto(int xo) +{ + textbox[m].xp = xo; +} + +void Graphics::textboxcentery() +{ + textbox[m].centery(); +} + +int Graphics::crewcolour(const int t) +{ + //given crewmate t, return colour in setcol + if (t == 0) return 0; + if (t == 1) return 20; + if (t == 2) return 14; + if (t == 3) return 15; + if (t == 4) return 13; + if (t == 5) return 16; + return 0; +} + +void Graphics::flashlight() +{ + FillRect(backBuffer, 0xBBBBBBBB); +} + +void Graphics::screenshake() +{ + point tpoint; + //screenbuffer.lock(); + if(flipmode) + { + // tpoint.x = int((Math.random() * 7) - 4); tpoint.y = int((Math.random() * 7) - 4); + // flipmatrix.translate(tpoint.x, tpoint.y); + // screenbuffer.draw(backbuffer, flipmatrix); + // flipmatrix.translate(-tpoint.x, -tpoint.y); + + screenbuffer->ClearScreen(0x000); + tpoint.x = (fRandom() * 7) - 4; + tpoint.y = (fRandom() * 7) - 4; + SDL_Rect shakeRect; + setRect(shakeRect,tpoint.x, tpoint.y, backBuffer->w, backBuffer->h); + SDL_Surface* flipBackBuffer = FlipSurfaceVerticle(backBuffer); + screenbuffer->UpdateScreen( flipBackBuffer, &shakeRect); + SDL_FreeSurface(flipBackBuffer); + } + else + { + //FillRect(screenbuffer, 0x000); + //SDL_Rect rect; + //setRect(rect, blackBars/2, 0, screenbuffer->w, screenbuffer->h); + //SDL_BlitSurface(backBuffer, NULL, screenbuffer, &rect); + screenbuffer->ClearScreen(0x000); + tpoint.x = static_cast((fRandom() * 7) - 4); + tpoint.y = static_cast((fRandom() * 7) - 4); + SDL_Rect shakeRect; + setRect(shakeRect,tpoint.x, tpoint.y, backBuffer->w, backBuffer->h); + screenbuffer->UpdateScreen( backBuffer, &shakeRect); + // screenbuffer.copyPixels(backbuffer, backbuffer.rect, tpoint, null, null, false); + } + //screenbuffer.unlock(); + + //backbuffer.lock(); + FillRect(backBuffer, 0x000000 ); + //backbuffer.fillRect(backbuffer.rect, 0x000000); + //backbuffer.unlock(); +} + +void Graphics::render() +{ + if(screenbuffer == NULL) + { + return; + } + if(flipmode) + { + SDL_Rect rect; + setRect(rect, 0, 0, backBuffer->w, backBuffer->h); + //setRect(rect, 0, 0, backBuffer->w, backBuffer->h); + //SDL_BlitSurface(backBuffer, NULL, screenbuffer, &rect); + SDL_Surface* tempsurface = FlipSurfaceVerticle(backBuffer); + if(tempsurface != NULL) + { + screenbuffer->UpdateScreen( tempsurface, &rect); + SDL_FreeSurface(tempsurface); + } + } + else + { + SDL_Rect rect; + setRect(rect, 0, 0, backBuffer->w, backBuffer->h); + //setRect(rect, 0, 0, backBuffer->w, backBuffer->h); + //SDL_BlitSurface(backBuffer, NULL, screenbuffer, &rect); + screenbuffer->UpdateScreen( backBuffer, &rect); + } +} + +void Graphics::bigrprint(int x, int y, std::string& t, int r, int g, int b, bool cen, float sc) +{ + if (r < 0) r = 0; + if (g < 0) g = 0; + if (b < 0) b = 0; + if (r > 255) r = 255; + if (g > 255) g = 255; + if (b > 255) b = 255; + ct.colour = getRGB(r, g, b); + + x = x / (sc); + + x -= (len(t)); + + if (r < -1) r = -1; if (g < 0) g = 0; if (b < 0) b = 0; + if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.colour = getRGB(r, g, b); + + if (cen) + { + x = std::max(160 - (int((len(t)/ 2.0)*sc)), 0 ); + } + else + { + x *= (sc); + } + + int bfontpos = 0; + int cur; + for (size_t i = 0; i < t.length(); i++) + { + cur = (t.c_str())[i]; + if (cur > 255 || cur < 0) + { + cur = '?'; + } + if (flipmode) + { + SDL_Surface* tempPrint = ScaleSurfaceSlow(flipbfont[cur], bfont[cur]->w *sc,bfont[cur]->h *sc); + SDL_Rect printrect = { Sint16(x + bfontpos), Sint16(y) , Sint16(bfont_rect.w*sc), Sint16(bfont_rect.h * sc)}; + BlitSurfaceColoured(tempPrint, NULL, backBuffer, &printrect ,ct); + SDL_FreeSurface(tempPrint); + } + else + { + SDL_Surface* tempPrint = ScaleSurfaceSlow(bfont[cur], bfont[cur]->w *sc,bfont[cur]->h *sc); + SDL_Rect printrect = { Sint16((x) + bfontpos), Sint16(y) , Sint16(bfont_rect.w*sc), Sint16(bfont_rect.h * sc)}; + BlitSurfaceColoured(tempPrint, NULL, backBuffer, &printrect, ct); + SDL_FreeSurface(tempPrint); + } + bfontpos+=bfontlen[cur]* sc; + } +} + +void Graphics::drawtele(int x, int y, int t, int c, UtilityClass& help) +{ + setcolreal(getRGB(16,16,16)); + + SDL_Rect telerect; + setRect(telerect, x , y, tele_rect.w, tele_rect.h ); + BlitSurfaceColoured(tele[0], NULL, backBuffer, &telerect, ct); + + setcol(c, help); + if (t > 9) t = 8; + if (t < 0) t = 0; + + BlitSurfaceColoured(tele[t], NULL, backBuffer, &telerect, ct); +} + +Uint32 Graphics::getRGB(Uint8 r, Uint8 g, Uint8 b) +{ + return SDL_MapRGB(backBuffer->format, b, g, r); +} + +Uint32 Graphics::getBGR(Uint8 r, Uint8 g, Uint8 b) +{ + return SDL_MapRGB(backBuffer->format, r, g, b); +} + +Uint32 Graphics::getRGB(Uint32 _col) +{ + return ( _col); +} + +Uint32 Graphics::RGBflip(Uint8 r, Uint8 g, Uint8 b) +{ + return SDL_MapRGB(backBuffer->format, r, g, b); +} + +Uint32 Graphics::RGBf(int r, int g, int b) +{ + r = (r+128) / 3; + g = (g+128) / 3; + b = (b+128) / 3; + return SDL_MapRGB(backBuffer->format, r, g, b); +} + +void Graphics::setcolreal(Uint32 t) +{ + ct.colour = t; +} + +void Graphics::drawtile(int x, int y, int t) +{ + SDL_Rect drawRect; + setRect(drawRect,x,y, tiles_rect.w, tiles_rect.h ); + BlitSurfaceStandard(tiles[t] ,NULL, backBuffer,&drawRect); +} + +void Graphics::drawforetile(int x, int y, int t) +{ + //frontbuffer.copyPixels(tiles[t], tiles_rect, tpoint); + SDL_Rect rect; + setRect(rect, x,y,tiles_rect.w, tiles_rect.h); + BlitSurfaceStandard(tiles[t],NULL, forgroundBuffer, &rect ); +} + +void Graphics::drawforetile2(int x, int y, int t) +{ + //frontbuffer.copyPixels(tiles2[t], tiles_rect, tpoint); + SDL_Rect rect; + setRect(rect, x,y,tiles_rect.w, tiles_rect.h); + BlitSurfaceStandard(tiles2[t],NULL, forgroundBuffer, &rect ); +} + +void Graphics::drawforetile3(int x, int y, int t, int off) +{ + SDL_Rect rect; + setRect(rect, x,y,tiles_rect.w, tiles_rect.h); + BlitSurfaceStandard(tiles3[t+(off*30)],NULL, forgroundBuffer, &rect ); + //frontbuffer.copyPixels(tiles3[t+(off*30)], tiles_rect, tpoint); +} + +void Graphics::drawrect(int x, int y, int w, int h, int r, int g, int b) +{ + SDL_Rect madrect; + //Draw the retangle indicated by that object + madrect.x = x; + madrect.y = y; + madrect.w = w; + madrect.h = 1; + //backbuffer.fillRect(madrect, RGB(r,g,b)); + FillRect(backBuffer, madrect, getRGB(b,g,r)); + + madrect.w = 1; + madrect.h = h; + FillRect(backBuffer, madrect, getRGB(b,g,r)); + + madrect.x = x + w - 1; + madrect.w = 1; + madrect.h = h; + FillRect(backBuffer, madrect, getRGB(b,g,r)); + madrect.x = x; + madrect.y = y + h - 1; + madrect.w = w; + madrect.h = 1; + FillRect(backBuffer, madrect, getRGB(b,g,r)); +} + +bool Graphics::onscreen(int t) +{ + return (t >= -40 && t <= 280); +} diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h new file mode 100644 index 00000000..45092265 --- /dev/null +++ b/desktop_version/src/Graphics.h @@ -0,0 +1,280 @@ +#ifndef GRAPHICS_H +#define GRAPHICS_H + +#include "GraphicsResources.h" +#include + + + +#include "Maths.h" +#include "Textbox.h" +#include "UtilityClass.h" +#include "Game.h" + + +#include +#include + +#include "GraphicsUtil.h" +#include "Screen.h" + +class map; + +class Graphics +{ +public: + Graphics(); + ~Graphics(); + + GraphicsResources grphx; + + void Makebfont(); + + void drawhuetile(int x, int y, int t, int c); + + void drawgravityline(int t, entityclass& obj); + + void MakeTileArray(); + + void MakeSpriteArray(); + + void maketelearray(); + + void drawcoloredtile(int x, int y, int t, int r, int g, int b); + + void drawmenu(Game& game, int cr, int cg, int cb, int division = 30); + void drawlevelmenu(Game& game, int cr, int cg, int cb, int division = 30); + + void processfade(); + + void drawfade(); + + void setwarprect(int a, int b, int c, int d); + + void createtextbox(std::string t, int xp, int yp, int r= 255, int g= 255, int b = 255); + + void textboxcleanup(); + + void textboxcenter(); + + void textboxcenterx(); + + int textboxwidth(); + + void textboxmove(int xo, int yo); + + void textboxmoveto(int xo); + + void textboxcentery(); + + void textboxadjust(); + + void addline(std::string t); + + void textboxtimer(int t); + + void textboxremove(); + + void textboxremovefast(); + + void textboxactive(); + + void drawtextbox(int x, int y, int w, int h, int r, int g, int b); + + void drawpixeltextbox(int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo); + void drawcustompixeltextbox(int x, int y, int w, int h, int w2, int h2, int r, int g, int b, int xo, int yo); + + void drawcrewman(int x, int y, int t, bool act, UtilityClass& help, bool noshift =false); + + int crewcolour(const int t); + + void cutscenebars(); + + void drawpartimage(int t, int xp, int yp, int wp, int hp); + + void drawimage(int t, int xp, int yp, bool cent=false); + + void drawimagecol(int t, int xp, int yp, int r, int g, int b, bool cent= false); + + void drawgui(UtilityClass& help); + + void drawsprite(int x, int y, int t, int r, int g, int b); + + void printcrewname(int x, int y, int t); + + void printcrewnamestatus(int x, int y, int t); + + void printcrewnamedark(int x, int y, int t); + + void Print(int _x, int _y, std::string _s, int r, int g, int b, bool cen = false); + + void RPrint(int _x, int _y, std::string _s, int r, int g, int b, bool cen = false); + + void PrintOff(int _x, int _y, std::string _s, int r, int g, int b, bool cen = false); + + void bprint(int x, int y, std::string t, int r, int g, int b, bool cen = false); + + int len(std::string t); + void bigprint( int _x, int _y, std::string _s, int r, int g, int b, bool cen = false, int sc = 2 ); + void drawspritesetcol(int x, int y, int t, int c, UtilityClass& help); + + + void flashlight(); + void screenshake(); + + void render(); + + bool Hitest(SDL_Surface* surface1, point p1, int col, SDL_Surface* surface2, point p2, int col2); + + void drawentities(mapclass& map, entityclass& obj, UtilityClass& help); + + void drawtrophytext(entityclass&, UtilityClass& help); + + void bigrprint(int x, int y, std::string& t, int r, int g, int b, bool cen = false, float sc = 2); + + + void drawtele(int x, int y, int t, int c, UtilityClass& help); + + Uint32 getRGB(Uint8 r, Uint8 g, Uint8 b); + + Uint32 getBGR(Uint8 r, Uint8 g, Uint8 b); + + Uint32 getRGB(Uint32 _col); + + Uint32 RGBflip(Uint8 r, Uint8 g, Uint8 b); + + + Uint32 RGBf(int r, int g, int b); + + void setcolreal(Uint32 t); + + void drawbackground(int t, mapclass& map); + void drawtile3( int x, int y, int t, int off ); + void drawentcolours( int x, int y, int t); + void drawtile2( int x, int y, int t, int r, int g, int b ); + void drawtile( int x, int y, int t, int r, int g, int b ); + void drawtowertile( int x, int y, int t ); + void drawtowertile3( int x, int y, int t, int off ); + + void drawtile(int x, int y, int t); + + void drawmap(mapclass& map); + + void drawforetile(int x, int y, int t); + + void drawforetile2(int x, int y, int t); + + void drawforetile3(int x, int y, int t, int off); + + void drawrect(int x, int y, int w, int h, int r, int g, int b); + + void drawtowermap(mapclass& map); + + void drawtowermap_nobackground(mapclass& map); + + void drawtowerspikes(mapclass& map); + + void drawtowerentities(mapclass& map, entityclass& obj, UtilityClass& help); + + bool onscreen(int t); + + void drawtowerbackgroundsolo(mapclass& map); + + + void menuoffrender(); + + void drawtowerbackground(mapclass& map); + + void setcol(int t, UtilityClass& help); + void drawfinalmap(mapclass & map); + + colourTransform ct; + + std::string tempstring; + + int bcol, bcol2, rcol; + + + + int j, k, m; + + std::vector backgrounds; + std::vector images; + + std::vector tele; + std::vector tiles; + std::vector tiles2; + std::vector tiles3; + std::vector entcolours; + std::vector sprites; + std::vector flipsprites; + std::vector bfont; + std::vector bfontmask; + std::vector flipbfont; + std::vector flipbfontmask; + std::vector bfontlen; + + bool flipmode; + bool setflipmode; + point tl; + //buffer objects. //TODO refactor buffer objects + SDL_Surface* backBuffer; + Screen* screenbuffer; + SDL_Surface* menubuffer; + SDL_Surface* towerbuffer; + SDL_Surface* forgroundBuffer; + SDL_Surface* tempBuffer; + + SDL_Rect bfont_rect; + SDL_Rect tiles_rect; + SDL_Rect sprites_rect; + SDL_Rect bfontmask_rect; + SDL_Rect images_rect; + SDL_Rect bg_rect; + SDL_Rect line_rect; + SDL_Rect tele_rect; + + SDL_Rect foot_rect; + SDL_Rect prect; + SDL_Rect footerrect; + + int linestate, linedelay; + int backoffset; + bool backgrounddrawn, foregrounddrawn; + + int menuoffset; + bool resumegamemode; + + SDL_Rect warprect; + + int crewframe; + int crewframedelay; + + int fademode; + int fadeamount; + std::vector fadebars; + + bool trinketcolset; + int trinketr, trinketg, trinketb; + + std::vector textbox; + int ntextbox; + + bool showcutscenebars; + int cutscenebarspos; + + std::vector stars; + std::vector starsspeed; + + int spcol, spcoldel; + std::vector backboxes; + std::vector backboxvx; + std::vector backboxvy; + std::vector backboxint; + SDL_Rect backboxrect; + + int warpskip, warpfcol, warpbcol; + +}; + +#endif /* GRAPHICS_H */ diff --git a/desktop_version/src/GraphicsResources.cpp b/desktop_version/src/GraphicsResources.cpp new file mode 100644 index 00000000..379d1064 --- /dev/null +++ b/desktop_version/src/GraphicsResources.cpp @@ -0,0 +1,113 @@ +#include "GraphicsResources.h" +#include "FileSystemUtils.h" +#include +#include + +// Used to load PNG data +extern "C" +{ + extern unsigned lodepng_decode24( + unsigned char** out, + unsigned* w, + unsigned* h, + const unsigned char* in, + size_t insize + ); + extern unsigned lodepng_decode32( + unsigned char** out, + unsigned* w, + unsigned* h, + const unsigned char* in, + size_t insize + ); +} + +SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool noAlpha = false) +{ + //Temporary storage for the image that's loaded + SDL_Surface* loadedImage = NULL; + //The optimized image that will be used + SDL_Surface* optimizedImage = NULL; + + unsigned char *data; + unsigned int width, height; + + unsigned char *fileIn = NULL; + size_t length = 0; + FILESYSTEM_loadFileToMemory(filename, &fileIn, &length); + if (noAlpha) + { + lodepng_decode24(&data, &width, &height, fileIn, length); + } + else + { + lodepng_decode32(&data, &width, &height, fileIn, length); + } + FILESYSTEM_freeMemory(&fileIn); + + loadedImage = SDL_CreateRGBSurfaceFrom( + data, + width, + height, + noAlpha ? 24 : 32, + width * (noAlpha ? 3 : 4), + 0x000000FF, + 0x0000FF00, + 0x00FF0000, + noAlpha ? 0x00000000 : 0xFF000000 + ); + + if (loadedImage != NULL) + { + optimizedImage = SDL_ConvertSurfaceFormat( + loadedImage, + SDL_PIXELFORMAT_ABGR8888, // FIXME: Format? -flibit + 0 + ); + SDL_FreeSurface( loadedImage ); + free(data); + if (noBlend) + { + SDL_SetSurfaceBlendMode(optimizedImage, SDL_BLENDMODE_BLEND); + } + return optimizedImage; + } + else + { + fprintf(stderr,"Image not found: %s\n", filename); + SDL_assert(0 && "Image not found! See stderr."); + return NULL; + } +} + +GraphicsResources::GraphicsResources(void) +{ + im_tiles = LoadImage("graphics/tiles.png"); + im_tiles2 = LoadImage("graphics/tiles2.png"); + im_tiles3 = LoadImage("graphics/tiles3.png"); + im_entcolours = LoadImage("graphics/entcolours.png"); + im_sprites = LoadImage("graphics/sprites.png"); + im_flipsprites = LoadImage("graphics/flipsprites.png"); + im_bfont = LoadImage("graphics/font.png"); + im_bfontmask = LoadImage("graphics/fontmask.png"); + im_teleporter = LoadImage("graphics/teleporter.png"); + + im_image0 = LoadImage("graphics/levelcomplete.png", false); + im_image1 = LoadImage("graphics/minimap.png", true, true); + im_image2 = LoadImage("graphics/covered.png", true, true); + im_image3 = LoadImage("graphics/elephant.png"); + im_image4 = LoadImage("graphics/gamecomplete.png", false); + im_image5 = LoadImage("graphics/fliplevelcomplete.png", false); + im_image6 = LoadImage("graphics/flipgamecomplete.png", false); + im_image7 = LoadImage("graphics/site.png", false); + im_image8 = LoadImage("graphics/site2.png"); + im_image9 = LoadImage("graphics/site3.png"); + im_image10 = LoadImage("graphics/ending.png"); + im_image11 = LoadImage("graphics/site4.png"); + im_image12 = LoadImage("graphics/minimap.png"); +} + + +GraphicsResources::~GraphicsResources(void) +{ +} diff --git a/desktop_version/src/GraphicsResources.h b/desktop_version/src/GraphicsResources.h new file mode 100644 index 00000000..67060c4c --- /dev/null +++ b/desktop_version/src/GraphicsResources.h @@ -0,0 +1,36 @@ +#ifndef GRAPHICSRESOURCES_H +#define GRAPHICSRESOURCES_H + +#include "SDL.h" + +class GraphicsResources +{ +public: + GraphicsResources(void); + ~GraphicsResources(void); + + SDL_Surface* im_tiles; + SDL_Surface* im_tiles2; + SDL_Surface* im_tiles3; + SDL_Surface* im_entcolours; + SDL_Surface* im_sprites; + SDL_Surface* im_flipsprites; + SDL_Surface* im_bfont; + SDL_Surface* im_bfontmask; + SDL_Surface* im_teleporter; + SDL_Surface* im_image0; + SDL_Surface* im_image1; + SDL_Surface* im_image2; + SDL_Surface* im_image3; + SDL_Surface* im_image4; + SDL_Surface* im_image5; + SDL_Surface* im_image6; + SDL_Surface* im_image7; + SDL_Surface* im_image8; + SDL_Surface* im_image9; + SDL_Surface* im_image10; + SDL_Surface* im_image11; + SDL_Surface* im_image12; +}; + +#endif /* GRAPHICSRESOURCES_H */ diff --git a/desktop_version/src/GraphicsUtil.cpp b/desktop_version/src/GraphicsUtil.cpp new file mode 100644 index 00000000..11845432 --- /dev/null +++ b/desktop_version/src/GraphicsUtil.cpp @@ -0,0 +1,525 @@ +#include "Graphics.h" + + + + +void setRect( SDL_Rect& _r, int x, int y, int w, int h ) +{ + _r.x = x; + _r.y = y; + _r.w = w; + _r.h = h; +} + +unsigned int endian_swap( unsigned int x ) +{ + return (x>>24) | + ((x<<8) & 0x00FF0000) | + ((x>>8) & 0x0000FF00) | + (x<<24); +} + + +template +void endian_swap(T *objp) +{ + unsigned char *memp = reinterpret_cast(objp); + std::reverse(memp, memp + sizeof(T)); +} + + +SDL_Surface* GetSubSurface( SDL_Surface* metaSurface, int x, int y, int width, int height ) +{ + // Create an SDL_Rect with the area of the _surface + SDL_Rect area; + area.x = x; + area.y = y; + area.w = width; + area.h = height; + + // Set the RGBA mask values. + Uint32 r, g, b, a; +#if SDL_BYTEORDER == SDL_BIG_ENDIAN + r = 0xff000000; + g = 0x00ff0000; + b = 0x0000ff00; + a = 0x000000ff; +#else + r = 0x000000ff; + g = 0x0000ff00; + b = 0x00ff0000; + a = 0xff000000; +#endif + + //Convert to the correct display format after nabbing the new _surface or we will slow things down. + SDL_Surface* preSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32, r, g, b, a); + //SDL_Surface* subSurface = SDL_DisplayFormatAlpha(preSurface); + + //SDL_FreeSurface(preSurface); + + // Lastly, apply the area from the meta _surface onto the whole of the sub _surface. + SDL_BlitSurface(metaSurface, &area, preSurface, 0); + + // Return the new Bitmap _surface + return preSurface; +} + +void DrawPixel( SDL_Surface *_surface, int x, int y, Uint32 pixel ) +{ + int bpp = _surface->format->BytesPerPixel; + /* Here p is the address to the pixel we want to set */ + Uint8 *p = (Uint8 *)_surface->pixels + y * _surface->pitch + x * bpp; + + switch(bpp) + { + case 1: + *p = pixel; + break; + + case 2: + *(Uint16 *)p = pixel; + break; + + case 3: + if(SDL_BYTEORDER != SDL_BIG_ENDIAN) + { + p[0] = (pixel >> 16) & 0xff; + p[1] = (pixel >> 8) & 0xff; + p[2] = pixel & 0xff; + } + else + { + p[0] = pixel & 0xff; + p[1] = (pixel >> 8) & 0xff; + p[2] = (pixel >> 16) & 0xff; + } + break; + + case 4: + *(Uint32 *)p = pixel; + break; + } +} + +Uint32 ReadPixel( SDL_Surface *_surface, int x, int y ) +{ + int bpp = _surface->format->BytesPerPixel; + /* Here p is the address to the pixel we want to retrieve */ + Uint8 *p = (Uint8 *)_surface->pixels + y * _surface->pitch + x * bpp; + + switch(bpp) + { + case 1: + return *p; + break; + + case 2: + return *(Uint16 *)p; + break; + + case 3: + if(SDL_BYTEORDER == SDL_BIG_ENDIAN) + return p[0] << 16 | p[1] << 8 | p[2]; + else + return p[0] | p[1] << 8 | p[2] << 16; + break; + + case 4: + return *(Uint32 *)p; + break; + + default: + return 0; /* shouldn't happen, but avoids warnings */ + } +} + +SDL_Surface * ScaleSurface( SDL_Surface *_surface, int Width, int Height, SDL_Surface * Dest ) +{ + if(!_surface || !Width || !Height) + return 0; + + SDL_Surface *_ret; + if(Dest == NULL) + { + _ret = SDL_CreateRGBSurface(_surface->flags, Width, Height, _surface->format->BitsPerPixel, + _surface->format->Rmask, _surface->format->Gmask, _surface->format->Bmask, _surface->format->Amask); + if(_ret == NULL) + { + return NULL; + } + + } + else + { + _ret = Dest; + } + + float _stretch_factor_x = (static_cast(Width) / static_cast(_surface->w)), _stretch_factor_y = (static_cast(Height) / static_cast(_surface->h)); + + + SDL_Rect gigantoPixel; + for(Sint32 y = 0; y < _surface->h; y++) + for(Sint32 x = 0; x < _surface->w; x++) + { + setRect(gigantoPixel, static_cast((float(x)*_stretch_factor_x) -1), static_cast((float(y) *_stretch_factor_y)-1), static_cast(_stretch_factor_x +1.0),static_cast( _stretch_factor_y+1.0)) ; + SDL_FillRect(_ret, &gigantoPixel, ReadPixel(_surface, x, y)); + } + + // DrawPixel(_ret, static_cast(_stretch_factor_x * x) + o_x, + //static_cast(_stretch_factor_y * y) + o_y, ReadPixel(_surface, x, y)); + + return _ret; +} + +SDL_Surface * ScaleSurfaceSlow( SDL_Surface *_surface, int Width, int Height) +{ + if(!_surface || !Width || !Height) + return 0; + + SDL_Surface *_ret; + + _ret = SDL_CreateRGBSurface(_surface->flags, Width, Height, _surface->format->BitsPerPixel, + _surface->format->Rmask, _surface->format->Gmask, _surface->format->Bmask, _surface->format->Amask); + if(_ret == NULL) + { + return NULL; + } + + + + float _stretch_factor_x = (static_cast(Width) / static_cast(_surface->w)), _stretch_factor_y = (static_cast(Height) / static_cast(_surface->h)); + + + for(Sint32 y = 0; y < _surface->h; y++) + for(Sint32 x = 0; x < _surface->w; x++) + for(Sint32 o_y = 0; o_y < _stretch_factor_y; ++o_y) + for(Sint32 o_x = 0; o_x < _stretch_factor_x; ++o_x) + DrawPixel(_ret, static_cast(_stretch_factor_x * x) + o_x, + static_cast(_stretch_factor_y * y) + o_y, ReadPixel(_surface, x, y)); + + // DrawPixel(_ret, static_cast(_stretch_factor_x * x) + o_x, + //static_cast(_stretch_factor_y * y) + o_y, ReadPixel(_surface, x, y)); + + return _ret; +} + +SDL_Surface * FlipSurfaceHorizontal(SDL_Surface* _src) +{ + SDL_Surface * ret = SDL_CreateRGBSurface(_src->flags, _src->w, _src->h, _src->format->BitsPerPixel, + _src->format->Rmask, _src->format->Gmask, _src->format->Bmask, _src->format->Amask); + if(ret == NULL) + { + return NULL; + } + + for(Sint32 y = 0; y < _src->h; y++) + { + for(Sint32 x = 0; x < _src->w; x++) + { + DrawPixel(ret,(_src->w -1) -x,y,ReadPixel(_src, x, y)); + } + + + } + + return ret; +} + +SDL_Surface * FlipSurfaceVerticle(SDL_Surface* _src) +{ + SDL_Surface * ret = SDL_CreateRGBSurface(_src->flags, _src->w, _src->h, _src->format->BitsPerPixel, + _src->format->Rmask, _src->format->Gmask, _src->format->Bmask, _src->format->Amask); + if(ret == NULL) + { + return NULL; + } + + for(Sint32 y = 0; y < _src->h; y++) + { + for(Sint32 x = 0; x < _src->w; x++) + { + DrawPixel(ret, x ,(_src->h-1) - y ,ReadPixel(_src, x, y)); + } + + + } + + return ret; +} + +void BlitSurfaceStandard( SDL_Surface* _src, SDL_Rect* _srcRect, SDL_Surface* _dest, SDL_Rect* _destRect ) +{ + //SDL_Rect tempRect = *_destRect; + //tempRect.w ; + //tempRect.h ; + //tempRect.x *=globalScale; + //tempRect.y *=globalScale; + + + //if(globalScale != 1) + //{ + // SDL_Surface* tempScaled = ScaleSurface(_src, tempRect.w, tempRect.h); + + // SDL_BlitSurface( tempScaled, _srcRect, _dest, &tempRect ); + + // SDL_FreeSurface(tempScaled); + //} + //else + //{ + SDL_BlitSurface( _src, _srcRect, _dest, _destRect ); + //} +} + +void BlitSurfaceColoured( + SDL_Surface* _src, + SDL_Rect* _srcRect, + SDL_Surface* _dest, + SDL_Rect* _destRect, + colourTransform& ct +) { + SDL_Rect *tempRect = _destRect; + + const SDL_PixelFormat& fmt = *(_src->format); + // const SDL_PixelFormat& destfmt = *(_dest->format); + + SDL_Surface* tempsurface = SDL_CreateRGBSurface( + SDL_SWSURFACE, + _src->w, + _src->h, + fmt.BitsPerPixel, + fmt.Rmask, + fmt.Gmask, + fmt.Bmask, + fmt.Amask + ); + + for(int x = 0; x < tempsurface->w; x++) + { + for(int y = 0; y < tempsurface->h; y++) + { + Uint32 pixel = ReadPixel(_src, x, y); + Uint32 Alpha = pixel & fmt.Amask; + Uint32 result = ct.colour & 0x00FFFFFF; + DrawPixel(tempsurface, x, y, result | Alpha); + } + } + + SDL_BlitSurface(tempsurface, _srcRect, _dest, tempRect); + SDL_FreeSurface(tempsurface); +} + + +int scrollamount = 0; +bool isscrolling = 0; +SDL_Surface* ApplyFilter( SDL_Surface* _src ) +{ + SDL_Surface* _ret = SDL_CreateRGBSurface(_src->flags, _src->w, _src->h, 32, + _src->format->Rmask, _src->format->Gmask, _src->format->Bmask, _src->format->Amask); + + if (rand() % 4000 < 8) + { + isscrolling = true; + } + + if(isscrolling == true) + { + scrollamount += 20; + if(scrollamount > 240) + { + scrollamount = 0; + isscrolling = false; + } + } + + int redOffset = rand() % 4; + + for(int x = 0; x < _src->w; x++) + { + for(int y = 0; y < _src->h; y++) + { + int sampley = (y + scrollamount )% 240; + + Uint32 pixel = ReadPixel(_src, x,sampley); + + Uint8 green = (pixel & _src->format->Gmask) >> 8; + Uint8 blue = (pixel & _src->format->Bmask) >> 0; + + Uint32 pixelOffset = ReadPixel(_src, std::min(x+redOffset, 319), sampley) ; + Uint8 red = (pixelOffset & _src->format->Rmask) >> 16 ; + + if(isscrolling && sampley > 220 && ((rand() %10) < 4)) + { + red = std::min(int(red+(fRandom() * 0.6) * 254) , 255); + green = std::min(int(green+(fRandom() * 0.6) * 254) , 255); + blue = std::min(int(blue+(fRandom() * 0.6) * 254) , 255); + } + else + { + red = std::min(int(red+(fRandom() * 0.2) * 254) , 255); + green = std::min(int(green+(fRandom() * 0.2) * 254) , 255); + blue = std::min(int(blue+(fRandom() * 0.2) * 254) , 255); + } + + + if(y % 2 == 0) + { + red = static_cast(red / 1.2f); + green = static_cast(green / 1.2f); + blue = static_cast(blue / 1.2f); + } + + int distX = static_cast((abs (160.0f -x ) / 160.0f) *16); + int distY = static_cast((abs (120.0f -y ) / 120.0f)*32); + + red = std::max(red - ( distX +distY), 0); + green = std::max(green - ( distX +distY), 0); + blue = std::max(blue - ( distX +distY), 0); + + Uint32 finalPixel = ((red<<16) + (green<<8) + (blue<<0)) | (pixel &_src->format->Amask); + DrawPixel(_ret,x,y, finalPixel); + + } + } +return _ret; +} + +void FillRect( SDL_Surface* _surface, const int _x, const int _y, const int _w, const int _h, const int r, int g, int b ) +{ + SDL_Rect rect = {Sint16(_x),Sint16(_y),Sint16(_w),Sint16(_h)}; + Uint32 color; + color = SDL_MapRGB(_surface->format, r, g, b); + SDL_FillRect(_surface, &rect, color); +} + +void FillRect( SDL_Surface* _surface, const int r, int g, int b ) +{ + SDL_Rect rect = {0,0,Uint16(_surface->w) ,Uint16(_surface->h) }; + Uint32 color; + color = SDL_MapRGB(_surface->format, r, g, b); + SDL_FillRect(_surface, &rect, color); +} + +void FillRect( SDL_Surface* _surface, const int color ) +{ + SDL_Rect rect = {0,0,Uint16(_surface->w) ,Uint16(_surface->h) }; + SDL_FillRect(_surface, &rect, color); +} + +void FillRect( SDL_Surface* _surface, const int x, const int y, const int w, const int h, int rgba ) +{ + SDL_Rect rect = {Sint16(x) ,Sint16(y) ,Sint16(w) ,Sint16(h) }; + SDL_FillRect(_surface, &rect, rgba); +} + +void FillRect( SDL_Surface* _surface, SDL_Rect& _rect, const int r, int g, int b ) +{ + Uint32 color; + color = SDL_MapRGB(_surface->format, r, g, b); + SDL_FillRect(_surface, &_rect, color); +} + +void FillRect( SDL_Surface* _surface, SDL_Rect rect, int rgba ) +{ + SDL_FillRect(_surface, &rect, rgba); +} + +bool intersectRect( float left1, float right1, float bottom1, float top1, float left2, float right2, float bottom2, float top2 ) +{ + return !( left2 > right1 || right2 < left1 || top2 < bottom1 || bottom2 > top1); +} + +void OverlaySurfaceKeyed( SDL_Surface* _src, SDL_Surface* _dest, Uint32 _key ) +{ + // const SDL_PixelFormat& fmt = *(_src->format); + for(int x = 0; x < _src->w; x++) + { + for(int y = 0; y < _src->h; y++) + { + Uint32 pixel = ReadPixel(_src, x,y); + //endian_swap(pixel); + if (( pixel != _key)) + { + DrawPixel(_dest,x,y, pixel); + } + } + } +} + +void ScrollSurface( SDL_Surface* _src, int _pX, int _pY ) +{ + SDL_Surface* part1 = NULL; + + SDL_Rect rect1; + SDL_Rect rect2; + //scrolling up; + if(_pY < 0) + { + setRect(rect2, 0, 0, _src->w, _src->h - _pY); + + part1 = GetSubSurface(_src, rect2.x, rect2.y, rect2.w, rect2.h); + + SDL_Rect destrect1; + + SDL_SetSurfaceBlendMode(part1, SDL_BLENDMODE_NONE); + + setRect(destrect1, 0, _pY, _pX, _src->h); + + SDL_BlitSurface (part1, NULL, _src, &destrect1); + } + + else if(_pY > 0) + { + + setRect(rect1, 0, 0, _src->w, _src->h - _pY); + + part1 = GetSubSurface(_src, rect1.x, rect1.y, rect1.w, rect1.h); + + SDL_Rect destrect1; + + SDL_SetSurfaceBlendMode(part1, SDL_BLENDMODE_NONE); + + setRect(destrect1, _pX, _pY, _src->w, _src->h - _pY); + + SDL_BlitSurface (part1, NULL, _src, &destrect1); + + } + + //Right + else if(_pX <= 0) + { + setRect(rect2, 0, 0, _src->w - _pX, _src->h ); + + part1 = GetSubSurface(_src, rect2.x, rect2.y, rect2.w, rect2.h); + + SDL_Rect destrect1; + + SDL_SetSurfaceBlendMode(part1, SDL_BLENDMODE_NONE); + + setRect(destrect1, _pX, 0, _src->w - _pX, _src->h); + + SDL_BlitSurface (part1, NULL, _src, &destrect1); + } + + else if(_pX > 0) + { + + setRect(rect1, _pX, 0, _src->w - _pX, _src->h ); + + part1 = GetSubSurface(_src, rect1.x, rect1.y, rect1.w, rect1.h); + + SDL_Rect destrect1; + + SDL_SetSurfaceBlendMode(part1, SDL_BLENDMODE_NONE); + + setRect(destrect1, 0, 0, _src->w - _pX, _src->h); + + SDL_BlitSurface (part1, NULL, _src, &destrect1); + + } + //Cleanup temp surface + if (part1) + { + SDL_FreeSurface(part1); + } + +} diff --git a/desktop_version/src/GraphicsUtil.h b/desktop_version/src/GraphicsUtil.h new file mode 100644 index 00000000..b76a7747 --- /dev/null +++ b/desktop_version/src/GraphicsUtil.h @@ -0,0 +1,51 @@ +#ifndef GRAPHICSUTIL_H +#define GRAPHICSUTIL_H + +#include "SDL.h" + +struct colourTransform +{ + Uint32 colour; +}; + + +void setRect(SDL_Rect& _r, int x, int y, int w, int h); + +unsigned int endian_swap(unsigned int x); + +SDL_Surface* GetSubSurface( SDL_Surface* metaSurface, int x, int y, int width, int height ); + +void DrawPixel( SDL_Surface *surface, int x, int y, Uint32 pixel ); + +Uint32 ReadPixel( SDL_Surface *surface, int x, int y ); + +SDL_Surface * ScaleSurface( SDL_Surface *Surface, int Width, int Height, SDL_Surface * Dest = NULL ); + +void BlitSurfaceStandard( SDL_Surface* _src, SDL_Rect* _srcRect, SDL_Surface* _dest, SDL_Rect* _destRect ); + +void BlitSurfaceColoured( SDL_Surface* _src, SDL_Rect* _srcRect, SDL_Surface* _dest, SDL_Rect* _destRect, colourTransform& ct ); + +void FillRect( SDL_Surface* surface, const int x, const int y, const int w, const int h, const int r, int g, int b ); + +void FillRect( SDL_Surface* surface, const int r, int g, int b ); + +void FillRect( SDL_Surface* surface, const int color ); + +void FillRect( SDL_Surface* surface, const int x, const int y, const int w, const int h, int rgba ); + +void FillRect( SDL_Surface* surface, SDL_Rect& rect, const int r, int g, int b ); + +void FillRect( SDL_Surface* surface, SDL_Rect rect, int rgba ); + +bool intersectRect(float left1, float right1, float bottom1, float top1, float left2, float right2, float bottom2, float top2); + +void OverlaySurfaceKeyed(SDL_Surface* _src, SDL_Surface* _dest, Uint32 _key); + +void ScrollSurface(SDL_Surface* _src, int pX, int py); + +SDL_Surface * FlipSurfaceHorizontal(SDL_Surface* _src); +SDL_Surface * FlipSurfaceVerticle(SDL_Surface* _src); +SDL_Surface * ScaleSurfaceSlow( SDL_Surface *_surface, int Width, int Height ); +SDL_Surface* ApplyFilter( SDL_Surface* _src ); + +#endif /* GRAPHICSUTIL_H */ diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp new file mode 100644 index 00000000..29fb6d90 --- /dev/null +++ b/desktop_version/src/Input.cpp @@ -0,0 +1,2546 @@ +#include "Input.h" + +#include "MakeAndPlay.h" + +#include "tinyxml.h" + +// Found in titlerender.cpp +void updategraphicsmode(Game& game, Graphics& dwgfx); + +void updatebuttonmappings(Game& game, KeyPoll& key, musicclass& music, int bind) +{ + for ( + SDL_GameControllerButton i = SDL_CONTROLLER_BUTTON_A; + i < SDL_CONTROLLER_BUTTON_DPAD_UP; + i = (SDL_GameControllerButton) (i + 1) + ) { + if (key.isDown(i)) + { + bool dupe = false; + if (bind == 1) + { + for (size_t j = 0; j < game.controllerButton_flip.size(); j += 1) + { + if (i == game.controllerButton_flip[j]) + { + dupe = true; + } + } + if (!dupe) + { + game.controllerButton_flip.push_back(i); + music.playef(11, 10); + } + for (size_t j = 0; j < game.controllerButton_map.size(); j += 1) + { + if (i == game.controllerButton_map[j]) + { + game.controllerButton_map.erase(game.controllerButton_map.begin() + j); + } + } + for (size_t j = 0; j < game.controllerButton_esc.size(); j += 1) + { + if (i == game.controllerButton_esc[j]) + { + game.controllerButton_esc.erase(game.controllerButton_esc.begin() + j); + } + } + } + if (bind == 2) + { + for (size_t j = 0; j < game.controllerButton_map.size(); j += 1) + { + if (i == game.controllerButton_map[j]) + { + dupe = true; + } + } + if (!dupe) + { + game.controllerButton_map.push_back(i); + music.playef(11, 10); + } + for (size_t j = 0; j < game.controllerButton_flip.size(); j += 1) + { + if (i == game.controllerButton_flip[j]) + { + game.controllerButton_flip.erase(game.controllerButton_flip.begin() + j); + } + } + for (size_t j = 0; j < game.controllerButton_esc.size(); j += 1) + { + if (i == game.controllerButton_esc[j]) + { + game.controllerButton_esc.erase(game.controllerButton_esc.begin() + j); + } + } + } + if (bind == 3) + { + for (size_t j = 0; j < game.controllerButton_esc.size(); j += 1) + { + if (i == game.controllerButton_esc[j]) + { + dupe = true; + } + } + if (!dupe) + { + game.controllerButton_esc.push_back(i); + music.playef(11, 10); + } + for (size_t j = 0; j < game.controllerButton_flip.size(); j += 1) + { + if (i == game.controllerButton_flip[j]) + { + game.controllerButton_flip.erase(game.controllerButton_flip.begin() + j); + } + } + for (size_t j = 0; j < game.controllerButton_map.size(); j += 1) + { + if (i == game.controllerButton_map[j]) + { + game.controllerButton_map.erase(game.controllerButton_map.begin() + j); + } + } + } + } + } +} + +void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, UtilityClass& help, musicclass& music) +{ + //game.mx = (mouseX / 4); + //game.my = (mouseY / 4); + + //TODO bit wasteful doing this every poll + key.setSensitivity(game.controllerSensitivity); + + game.press_left = false; + game.press_right = false; + game.press_action = false; + game.press_map = false; + + if (dwgfx.flipmode) + { + //GAMEPAD TODO + if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_a) || key.isDown(KEYBOARD_s) || key.controllerWantsRight(true)) game.press_left = true; + if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_d) || key.isDown(KEYBOARD_w) || key.controllerWantsLeft(true)) game.press_right = true; + } + else + { + if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_a) || key.isDown(KEYBOARD_w) || key.controllerWantsLeft(true)) + { + game.press_left = true; + } + if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_d) || key.isDown(KEYBOARD_s) || key.controllerWantsRight(true)) + { + game.press_right = true; + } + } + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) || key.isDown(game.controllerButton_flip)) game.press_action = true; + //|| key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN)) game.press_action = true; //on menus, up and down don't work as action + if (key.isDown(KEYBOARD_ENTER)) game.press_map = true; + + //In the menu system, all keypresses are single taps rather than holds. Therefore this test has to be done for all presses + if (!game.press_action && !game.press_left && !game.press_right) game.jumpheld = false; + if (!game.press_map) game.mapheld = false; + + if (!game.jumpheld && dwgfx.fademode==0) + { + if (game.press_action || game.press_left || game.press_right || game.press_map) + { + game.jumpheld = true; + } + + /* + if (game.press_left) { + game.mainmenu--; + }else if (game.press_right) { + game.mainmenu++; + } + + if (game.mainmenu < 0) game.mainmenu = 2; + if (game.mainmenu > 2 ) game.mainmenu = 0; + */ + + + /* + if (game.press_action) { + if (!game.menustart) { + game.menustart = true; + music.play(6); + music.playef(18, 10); + game.screenshake = 10; + game.flashlight = 5; + }else{ + if(game.mainmenu==0){ + dwgfx.fademode = 2; + }else if (game.mainmenu == 1) { + if (game.telesummary != "") { + dwgfx.fademode = 2; + } + }else if (game.mainmenu == 2) { + if (game.quicksummary != "") { + dwgfx.fademode = 2; + } + } + } + } + */ + + if (key.isDown(27) && game.currentmenuname != "youwannaquit" && game.menustart) + { + music.playef(11, 10); + game.previousmenuname = game.currentmenuname; + game.createmenu("youwannaquit"); + map.nexttowercolour(); + } + + if(game.menustart) + { + if (game.press_left) + { + game.currentmenuoption--; + } + else if (game.press_right) + { + game.currentmenuoption++; + } + } + + if (game.currentmenuoption < 0) game.currentmenuoption = game.nummenuoptions-1; + if (game.currentmenuoption >= game.nummenuoptions ) game.currentmenuoption = 0; + + if (game.press_action) + { + if (!game.menustart) + { + game.menustart = true; + music.play(6); + music.playef(18, 10); + game.screenshake = 10; + game.flashlight = 5; + map.colstate = 10; + map.nexttowercolour(); + } + else + { + if (game.currentmenuname == "mainmenu") + { + + #if defined(MAKEANDPLAY) + if (game.currentmenuoption == 0) + { + //Bring you to the normal playmenu + music.playef(11, 10); + game.createmenu("playerworlds"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 1) + { + //Options + music.playef(11, 10); + game.createmenu("graphicoptions"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 2) + { + //Options + music.playef(11, 10); + game.createmenu("options"); + + //Add extra menu for mmmmmm mod + if(music.mmmmmm){ + game.menuoptions[3] = "soundtrack"; + game.menuoptionsactive[3] = true; + game.menuoptions[4] = "return"; + game.menuoptionsactive[4] = true; + game.nummenuoptions = 5; + } + map.nexttowercolour(); + } + else if (game.currentmenuoption == 3) + { + //bye! + music.playef(2, 10); + game.mainmenu = 100; + dwgfx.fademode = 2; + } + } + #elif !defined(MAKEANDPLAY) + if (game.currentmenuoption == 0) + { + //Play + if (game.telesummary == "" && game.quicksummary == "") + { + //No saves exist, just start a new game + game.mainmenu = 0; + dwgfx.fademode = 2; + } + else + { + //Bring you to the normal playmenu + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + else if (game.currentmenuoption == 1) + { + //Bring you to the normal playmenu + music.playef(11, 10); + game.createmenu("playerworlds"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 2) + { + //Options + music.playef(11, 10); + game.createmenu("graphicoptions"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 3) + { + //Options + music.playef(11, 10); + game.createmenu("options"); + + //Add extra menu for mmmmmm mod + if(music.mmmmmm){ + game.menuoptions[4] = "soundtrack"; + game.menuoptionsactive[4] = true; + game.menuoptions[5] = "return"; + game.menuoptionsactive[5] = true; + game.nummenuoptions = 6; + } + map.nexttowercolour(); + } + else if (game.currentmenuoption == 4) + { + //Credits + music.playef(11, 10); + game.createmenu("credits"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 5) + { + //bye! + music.playef(2, 10); + game.mainmenu = 100; + dwgfx.fademode = 2; + } + } + #endif + else if(game.currentmenuname=="levellist") + { + if(game.currentmenuoption==game.nummenuoptions-1){ + //go back to menu + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + }else if(game.currentmenuoption==game.nummenuoptions-2){ + //next page + music.playef(11, 10); + if((size_t) ((game.levelpage*8)+8) >= ed.ListOfMetaData.size()){ + game.levelpage=0; + }else{ + game.levelpage++; + } + game.createmenu("levellist"); + game.currentmenuoption=game.nummenuoptions-2; + map.nexttowercolour(); + }else{ + //Ok, launch the level! + //PLAY CUSTOM LEVEL HOOK + music.playef(11, 10); + game.playcustomlevel=(game.levelpage*8)+game.currentmenuoption; + game.customleveltitle=ed.ListOfMetaData[game.playcustomlevel].title; + game.customlevelfilename=ed.ListOfMetaData[game.playcustomlevel].filename; + + std::string name = game.saveFilePath + ed.ListOfMetaData[game.playcustomlevel].filename.substr(7) + ".vvv"; + TiXmlDocument doc(name.c_str()); + if (!doc.LoadFile()){ + game.mainmenu = 22; + dwgfx.fademode = 2; + }else{ + music.playef(11, 10); + game.createmenu("quickloadlevel"); + map.nexttowercolour(); + } + } + } + else if(game.currentmenuname=="quickloadlevel") + { + if(game.currentmenuoption==0){//continue save + game.mainmenu = 23; + dwgfx.fademode = 2; + }else if(game.currentmenuoption==1){ + game.mainmenu = 22; + dwgfx.fademode = 2; + }else if(game.currentmenuoption==2){ + music.playef(11, 10); + game.levelpage=0; + game.createmenu("levellist"); + map.nexttowercolour(); + } + } + else if(game.currentmenuname=="playerworlds") + { + if(game.currentmenuoption==0){ + + music.playef(11, 10); + game.levelpage=0; + ed.getDirectoryData(); + game.loadcustomlevelstats(); //Should only load a file if it's needed + game.createmenu("levellist"); + map.nexttowercolour(); + }else if(game.currentmenuoption==1){ + //LEVEL EDITOR HOOK + music.playef(11, 10); + game.mainmenu = 20; + dwgfx.fademode = 2; + ed.filename=""; + }/*else if(game.currentmenuoption==2){ + music.playef(11, 10); + //"OPENFOLDERHOOK" + //When the player selects the "open level folder" menu option, + //this is where it should run the appropriate code. + //This code should: + // - Minimise the game + // - Open the levels folder for whatever operating system we're on +SDL_assert(0 && "Remove open level dir"); + + }*/else if(game.currentmenuoption==2){ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if(game.currentmenuname=="errornostart"){ + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + else if (game.currentmenuname == "graphicoptions") + { + if (game.currentmenuoption == 0){ + music.playef(11, 10); + dwgfx.screenbuffer->toggleFullScreen(); + music.playef(11, 10); + game.fullscreen = !game.fullscreen; + updategraphicsmode(game, dwgfx); + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 0; + }else if (game.currentmenuoption == 1){ + music.playef(11, 10); + dwgfx.screenbuffer->toggleStretchMode(); + music.playef(11, 10); + game.stretchMode = (game.stretchMode + 1) % 3; + updategraphicsmode(game, dwgfx); + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 1; + }else if (game.currentmenuoption == 2){ + music.playef(11, 10); + dwgfx.screenbuffer->toggleLinearFilter(); + music.playef(11, 10); + game.useLinearFilter = !game.useLinearFilter; + updategraphicsmode(game, dwgfx); + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 2; + }else if (game.currentmenuoption == 3){ + //change smoothing + music.playef(11, 10); + game.fullScreenEffect_badSignal = !game.fullScreenEffect_badSignal; + //Hook the analogue thing in here: ABCDEFG + updategraphicsmode(game, dwgfx); + dwgfx.screenbuffer->badSignalEffect= !dwgfx.screenbuffer->badSignalEffect; + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 3; + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + + /* //Old stuff + if (game.advanced_mode) + { + if (game.currentmenuoption == 0) + { + //toggle fullscreen + dwgfx.screenbuffer->toggleFullScreen(); + music.playef(11, 10); + if (game.fullscreen) + { + game.fullscreen = false; + } + else + { + game.fullscreen = true; + } + updategraphicsmode(game, dwgfx); + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + } + else if (game.currentmenuoption == 1) + { + //enable acceleration: if in fullscreen, go back to window first + music.playef(11, 10); + game.advanced_mode = false; + if (game.fullscreen) + { + game.fullscreen = false; + updategraphicsmode(game, dwgfx); + game.fullscreen = true; + } + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 1; + } + else if (game.currentmenuoption == 2) + { + //change scaling mode + music.playef(11, 10); + game.advanced_scaling = (game.advanced_scaling + 1) % 5; + dwgfx.screenbuffer->ResizeScreen(320 *game.advanced_scaling,240*game.advanced_scaling ); + dwgfx.screenbuffer->SetScale(game.advanced_scaling); + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 2; + } + else if (game.currentmenuoption == 3) + { + //change smoothing + music.playef(11, 10); + game.advanced_smoothing = !game.advanced_smoothing; + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 3; + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else + { + if (game.currentmenuoption == 0) + { + dwgfx.screenbuffer->toggleFullScreen(); + //toggle fullscreen + music.playef(11, 10); + if (game.fullscreen) + { + game.fullscreen = false; + } + else + { + game.fullscreen = true; + } + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + } + else if (game.currentmenuoption == 1) + { + //disable acceleration: if in fullscreen, go back to window first + music.playef(11, 10); + game.advanced_mode = true; + if (game.fullscreen) + { + game.fullscreen = false; + updategraphicsmode(game, dwgfx); + game.fullscreen = true; + } + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 1; + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + */ + } + else if (game.currentmenuname == "youwannaquit") + { + if (game.currentmenuoption == 0) + { + //bye! + music.playef(2, 10); + game.mainmenu = 100; + dwgfx.fademode = 2; + } + else + { + music.playef(11, 10); + game.createmenu(game.previousmenuname); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "setinvincibility") + { + if (game.currentmenuoption == 0) + { + //back + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 2; + map.nexttowercolour(); + } + else + { + map.invincibility = !map.invincibility; + //game.deletequick(); + //game.deletetele(); + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 2; + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "setslowdown1") + { + if (game.currentmenuoption == 0) + { + //back + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + } + else + { + //change game speed + game.deletequick(); + game.deletetele(); + game.createmenu("setslowdown2"); + map.nexttowercolour(); + music.playef(11, 10); + } + } + else if (game.currentmenuname == "setslowdown2") + { + if (game.currentmenuoption == 0) + { + //back + game.gameframerate=34; + game.slowdown = 30; + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + } + else if (game.currentmenuoption == 1) + { + game.gameframerate=41; + game.slowdown = 24; + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + } + else if (game.currentmenuoption == 2) + { + game.gameframerate=55; + game.slowdown = 18; + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + } + else if (game.currentmenuoption == 3) + { + game.gameframerate=83; + game.slowdown = 12; + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "accessibility") + { + if (game.currentmenuoption == 0) + { + //disable animated backgrounds + game.colourblindmode = !game.colourblindmode; + game.savestats(map, dwgfx); + map.tdrawback = true; + music.playef(11, 10); + } + else if (game.currentmenuoption == 1) + { + //disable screeneffects + game.noflashingmode = !game.noflashingmode; + game.savestats(map, dwgfx); + if (!game.noflashingmode) + { + music.playef(18, 10); + game.screenshake = 10; + game.flashlight = 5; + } + } + else if (game.currentmenuoption == 2) + { + //invincibility + if (!map.invincibility) + { + game.createmenu("setinvincibility"); + map.nexttowercolour(); + } + else + { + map.invincibility = !map.invincibility; + } + music.playef(11, 10); + } + else if (game.currentmenuoption == 3) + { + //change game speed + game.createmenu("setslowdown2"); + map.nexttowercolour(); + music.playef(11, 10); + } + else if (game.currentmenuoption == 4) + { + //back + music.playef(11, 10); + game.createmenu("options"); + + //Add extra menu for mmmmmm mod + if(music.mmmmmm){ + #if defined(MAKEANDPLAY) + game.menuoptions[3] = "soundtrack"; + game.menuoptionsactive[3] = true; + game.menuoptions[4] = "return"; + game.menuoptionsactive[4] = true; + game.nummenuoptions = 5; + #elif !defined(MAKEANDPLAY) + game.menuoptions[4] = "soundtrack"; + game.menuoptionsactive[4] = true; + game.menuoptions[5] = "return"; + game.menuoptionsactive[5] = true; + game.nummenuoptions = 6; + #endif + } + + map.nexttowercolour(); + } + else + { + //Can't do yet! play sad sound + music.playef(2, 10); + } + } + else if (game.currentmenuname == "options") + { + + #if defined(MAKEANDPLAY) + if (game.currentmenuoption == 0) + { + //accessibility options + music.playef(11, 10); + game.createmenu("accessibility"); + map.nexttowercolour(); + } + + else if (game.currentmenuoption == 1) + { + //clear data menu + music.playef(11, 10); + game.createmenu("controller"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 2) + { + //clear data menu + music.playef(11, 10); + game.createmenu("cleardatamenu"); + map.nexttowercolour(); + } + + if(music.mmmmmm){ + if (game.currentmenuoption == 3) + { + //**** TOGGLE MMMMMM + if(game.usingmmmmmm > 0){ + game.usingmmmmmm=0; + }else{ + game.usingmmmmmm=1; + } + music.usingmmmmmm = !music.usingmmmmmm; + music.playef(11, 10); + music.play(6); + game.savestats(map, dwgfx); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + if (game.currentmenuoption == 4) + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else{ + if (game.currentmenuoption == 3) + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + + #elif !defined(MAKEANDPLAY) + if (game.currentmenuoption == 0) + { + //accessibility options + music.playef(11, 10); + game.createmenu("accessibility"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 1) + { + //unlock play options + music.playef(11, 10); + game.createmenu("unlockmenu"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 2) + { + //clear data menu + music.playef(11, 10); + game.createmenu("controller"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 3) + { + //clear data menu + music.playef(11, 10); + game.createmenu("cleardatamenu"); + map.nexttowercolour(); + } + + if(music.mmmmmm){ + if (game.currentmenuoption == 4) + { + //**** TOGGLE MMMMMM + if(game.usingmmmmmm > 0){ + game.usingmmmmmm=0; + }else{ + game.usingmmmmmm=1; + } + music.usingmmmmmm = !music.usingmmmmmm; + music.playef(11, 10); + music.play(6); + game.savestats(map, dwgfx); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + if (game.currentmenuoption == 5) + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else{ + if (game.currentmenuoption == 4) + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + #endif + } + else if (game.currentmenuname == "unlockmenutrials") + { + if (game.currentmenuoption == 0) //unlock 1 + { + game.unlock[9] = true; + game.unlocknotify[9] = true; + music.playef(11, 10); + game.savestats(map, dwgfx); + game.createmenu("unlockmenutrials"); + game.currentmenuoption = 0; + } + else if (game.currentmenuoption == 1) //unlock 2 + { + game.unlock[10] = true; + game.unlocknotify[10] = true; + music.playef(11, 10); + game.savestats(map, dwgfx); + game.createmenu("unlockmenutrials"); + game.currentmenuoption = 1; + } + else if (game.currentmenuoption == 2) //unlock 3 + { + game.unlock[11] = true; + game.unlocknotify[11] = true; + music.playef(11, 10); + game.savestats(map, dwgfx); + game.createmenu("unlockmenutrials"); + game.currentmenuoption = 2; + } + else if (game.currentmenuoption == 3) //unlock 4 + { + game.unlock[12] = true; + game.unlocknotify[12] = true; + music.playef(11, 10); + game.savestats(map, dwgfx); + game.createmenu("unlockmenutrials"); + game.currentmenuoption = 3; + } + else if (game.currentmenuoption == 4) //unlock 5 + { + game.unlock[13] = true; + game.unlocknotify[13] = true; + music.playef(11, 10); + game.savestats(map, dwgfx); + game.createmenu("unlockmenutrials"); + game.currentmenuoption = 4; + } + else if (game.currentmenuoption == 5) //unlock 6 + { + game.unlock[14] = true; + game.unlocknotify[14] = true; + music.playef(11, 10); + game.savestats(map, dwgfx); + game.createmenu("unlockmenutrials"); + game.currentmenuoption = 5; + } + else if (game.currentmenuoption == 6) //back + { + //back + music.playef(11, 10); + game.createmenu("unlockmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "unlockmenu") + { + if (game.currentmenuoption == 0) + { + //unlock time trials seperately... + music.playef(11, 10); + game.createmenu("unlockmenutrials"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 1) + { + //unlock intermissions + music.playef(11, 10); + game.unlock[16] = true; + game.unlocknotify[16] = true; + game.unlock[6] = true; + game.unlock[7] = true; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); + game.currentmenuoption = 1; + } + else if (game.currentmenuoption == 2) + { + //unlock no death mode + music.playef(11, 10); + game.unlock[17] = true; + game.unlocknotify[17] = true; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); + game.currentmenuoption = 2; + } + else if (game.currentmenuoption == 3) + { + //unlock flip mode + music.playef(11, 10); + game.unlock[18] = true; + game.unlocknotify[18] = true; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); + game.currentmenuoption = 3; + } + else if (game.currentmenuoption == 4) + { + //unlock jukebox + music.playef(11, 10); + game.stat_trinkets = 20; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); + game.currentmenuoption = 4; + } + else if (game.currentmenuoption == 5) + { + //unlock secret lab + music.playef(11, 10); + game.unlock[8] = true; + game.unlocknotify[8] = true; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); + game.currentmenuoption = 5; + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits2"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits2") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits25"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits25") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits3"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits3") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits4"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits4") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits5"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits5") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits6"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits6") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits7"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits7") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits8"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits8") + { + if (game.currentmenuoption == 0) + { + //next page + music.playef(11, 10); + game.createmenu("credits9"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "credits9") + { + if (game.currentmenuoption == 0) + { + //first page + music.playef(11, 10); + game.createmenu("credits"); + map.nexttowercolour(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + music.niceplay(6); + } + } + else if (game.currentmenuname == "play") + { + if (game.currentmenuoption == 0) + { + //continue + //right, this depends on what saves you've got + if (game.telesummary == "") + { + //You at least have a quicksave, or you couldn't have gotten here + game.mainmenu = 2; + dwgfx.fademode = 2; + } + else if (game.quicksummary == "") + { + //You at least have a telesave, or you couldn't have gotten here + game.mainmenu = 1; + dwgfx.fademode = 2; + } + else + { + //go to a menu! + music.playef(11, 10); + game.loadsummary(map, help); //Prepare save slots to display + game.createmenu("continue"); + map.settowercolour(3); + } + } + else if (game.currentmenuoption == 1) + { + //play modes + music.playef(11, 10); + game.createmenu("playmodes"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 2) + { + //newgame + music.playef(11, 10); + game.createmenu("newgamewarning"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 3) + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "playsecretlab") + { + //as above, except with an extra option... + if (game.currentmenuoption == 0) + { + //continue + //right, this depends on what saves you've got + if (game.telesummary == "") + { + //You at least have a quicksave, or you couldn't have gotten here + game.mainmenu = 2; + dwgfx.fademode = 2; + } + else if (game.quicksummary == "") + { + //You at least have a telesave, or you couldn't have gotten here + game.mainmenu = 1; + dwgfx.fademode = 2; + } + else + { + //go to a menu! + music.playef(11, 10); + game.loadsummary(map, help); //Prepare save slots to display + game.createmenu("continue"); + map.settowercolour(3); + } + } + else if (game.currentmenuoption == 1) + { + if(!map.invincibility){ + game.mainmenu = 11; + dwgfx.fademode = 2; + }else{ + //Can't do yet! play sad sound + music.playef(2, 10); + } + } + else if (game.currentmenuoption == 2) + { + //play modes + music.playef(11, 10); + game.createmenu("playmodes"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 3) + { + //newgame + music.playef(11, 10); + game.createmenu("newgamewarning"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 4) + { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "newgamewarning") + { + if (game.currentmenuoption == 0) + { + //yep + game.mainmenu = 0; + dwgfx.fademode = 2; + game.deletequick(); + game.deletetele(); + } + else + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + + else if (game.currentmenuname == "controller") + { + if (game.currentmenuoption == 0) + { + game.controllerSensitivity++; + music.playef(11, 10); + if(game.controllerSensitivity > 4) + { + game.controllerSensitivity = 0; + } + } + + if (game.currentmenuoption == 4) + { + game.createmenu("options"); + + //Add extra menu for mmmmmm mod + if(music.mmmmmm){ + #if defined(MAKEANDPLAY) + game.menuoptions[3] = "soundtrack"; + game.menuoptionsactive[3] = true; + game.menuoptions[4] = "return"; + game.menuoptionsactive[4] = true; + game.nummenuoptions = 5; + #elif !defined(MAKEANDPLAY) + game.menuoptions[4] = "soundtrack"; + game.menuoptionsactive[4] = true; + game.menuoptions[5] = "return"; + game.menuoptionsactive[5] = true; + game.nummenuoptions = 6; + #endif + } + } + } + else if (game.currentmenuname == "cleardatamenu") + { + if (game.currentmenuoption == 0) + { + //back + music.playef(11, 10); + game.createmenu("options"); + + //Add extra menu for mmmmmm mod + if(music.mmmmmm){ + #if defined(MAKEANDPLAY) + game.menuoptions[3] = "soundtrack"; + game.menuoptionsactive[3] = true; + game.menuoptions[4] = "return"; + game.menuoptionsactive[4] = true; + game.nummenuoptions = 5; + #elif !defined(MAKEANDPLAY) + game.menuoptions[4] = "soundtrack"; + game.menuoptionsactive[4] = true; + game.menuoptions[5] = "return"; + game.menuoptionsactive[5] = true; + game.nummenuoptions = 6; + #endif + } + map.nexttowercolour(); + } + else + { + //yep + music.playef(23, 10); + game.deletequick(); + game.deletetele(); + game.deletestats(map, dwgfx); + game.flashlight = 5; + game.screenshake = 15; + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "playmodes") + { + if (game.currentmenuoption == 0 && game.slowdown == 30 && !map.invincibility) //go to the time trial menu + { + music.playef(11, 10); + game.createmenu("timetrials"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 1 && game.unlock[16]) + { + //intermission mode menu + music.playef(11, 10); + game.createmenu("intermissionmenu"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 2 && game.unlock[17] && game.slowdown == 30 && !map.invincibility) //start a game in no death mode + { + music.playef(11, 10); + game.createmenu("startnodeathmode"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 3 && game.unlock[18]) //enable/disable flip mode + { + music.playef(18, 10); + game.screenshake = 10; + game.flashlight = 5; + dwgfx.setflipmode = !dwgfx.setflipmode; + game.savemystats = true; + } + else if (game.currentmenuoption == 4) + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + else + { + //Can't do yet! play sad sound + music.playef(2, 10); + } + } + else if (game.currentmenuname == "startnodeathmode") + { + if (game.currentmenuoption == 0) //start no death mode, disabling cutscenes + { + game.mainmenu = 10; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 1) + { + game.mainmenu = 9; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 2) + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "continue") + { + if (game.currentmenuoption == 0) + { + game.mainmenu = 1; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 1) + { + game.mainmenu = 2; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 2) + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "intermissionmenu") + { + if (game.currentmenuoption == 0) + { + music.playef(11, 10); + music.play(6); + game.createmenu("playint1"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 1) + { + music.playef(11, 10); + music.play(6); + game.createmenu("playint2"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 2) + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "playint1") + { + if (game.currentmenuoption == 0) + { + game.mainmenu = 12; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 1) + { + game.mainmenu = 13; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 2) + { + game.mainmenu = 14; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 3) + { + game.mainmenu = 15; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 4) + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "playint2") + { + if (game.currentmenuoption == 0) + { + game.mainmenu = 16; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 1) + { + game.mainmenu = 17; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 2) + { + game.mainmenu = 18; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 3) + { + game.mainmenu = 19; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 4) + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "gameover2") + { + //back + music.playef(11, 10); + music.play(6); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + else if (game.currentmenuname == "unlocktimetrials" || game.currentmenuname == "unlocktimetrial") + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + else if (game.currentmenuname == "unlocknodeathmode" || game.currentmenuname == "unlockintermission" + || game.currentmenuname == "unlockflipmode") + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + else if (game.currentmenuname == "timetrials") + { + if (game.currentmenuoption == 0 && game.unlock[9]) //space station 1 + { + game.mainmenu = 3; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 1 && game.unlock[10]) //lab + { + game.mainmenu = 4; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 2 && game.unlock[11]) //tower + { + game.mainmenu = 5; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 3 && game.unlock[12]) //station 2 + { + game.mainmenu = 6; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 4 && game.unlock[13]) //warp + { + game.mainmenu = 7; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 5 && game.unlock[14]) //final + { + game.mainmenu = 8; + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 6) //go to the time trial menu + { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + else + { + //Can't do yet! play sad sound + music.playef(2, 10); + } + } + else if (game.currentmenuname == "timetrialcomplete3") + { + if (game.currentmenuoption == 0) + { + //back + music.playef(11, 10); + music.play(6); + game.createmenu("play"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 1) + { + //duplicate the above based on given time trial level! + if (game.timetriallevel == 0) //space station 1 + { + game.mainmenu = 3; + dwgfx.fademode = 2; + } + else if (game.timetriallevel == 1) //lab + { + game.mainmenu = 4; + dwgfx.fademode = 2; + } + else if (game.timetriallevel == 2) //tower + { + game.mainmenu = 5; + dwgfx.fademode = 2; + } + else if (game.timetriallevel == 3) //station 2 + { + game.mainmenu = 6; + dwgfx.fademode = 2; + } + else if (game.timetriallevel == 4) //warp + { + game.mainmenu = 7; + dwgfx.fademode = 2; + } + else if (game.timetriallevel == 5) //final + { + game.mainmenu = 8; + dwgfx.fademode = 2; + } + } + } + else if (game.currentmenuname == "gamecompletecontinue" || game.currentmenuname == "nodeathmodecomplete2") + { + if (game.currentmenuoption == 0) + { + music.play(6); + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + } + } + if ( game.currentmenuname == "controller" && + game.currentmenuoption > 0 && + game.currentmenuoption < 4 && + key.controllerButtonDown() ) + { + updatebuttonmappings(game, key, music, game.currentmenuoption); + } + + } + + if (dwgfx.fademode == 1) + script.startgamemode(game.mainmenu, key, dwgfx, game, map, obj, help, music); +} + +void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music) +{ + //TODO mouse input + //game.mx = (mouseX / 2); + //game.my = (mouseY / 2); + + if(!script.running) + { + game.press_left = false; + game.press_right = false; + game.press_action = false; + game.press_map = false; + } +/* + if (game.recording == 2 && !game.playbackfinished) + { + //playback! + //record your input and add it to the record string + //Keys are: + //0 - nothing + //1 - left + //2 - right + //3 - left+right + //4 - flip + //5 - left+flip + //6 - right+flip + //7 - left+right+flip + //8 - Map/teleport + if (!game.recordinit) + { + //Init recording + game.recordinit = true; + game.combomode = false; + game.playmove = game.playback[game.playbackpos+1]; + game.playcombo = game.playback[game.playbackpos]; + } + + if (game.playcombo <= 0) + { + //move on to the next action + game.playbackpos += 2; + game.playmove = game.playback[game.playbackpos + 1]; + game.playcombo = game.playback[game.playbackpos]; + if (game.playcombo > 1) game.playcombo--; + } + + if (game.playcombo >= 1) + { + game.playcombo--; + if (game.playmove == 1 || game.playmove == 3 || game.playmove == 5 || game.playmove == 7) + { + game.press_left = true; + } + if (game.playmove == 2 || game.playmove == 3 || game.playmove == 6 || game.playmove == 7) + { + game.press_right = true; + } + if (game.playmove == 4 || game.playmove == 5 || game.playmove == 6 || game.playmove == 7) + { + game.press_action = true; + } + if (game.playmove == 8) + { + game.press_map = true; + //game.playbackfinished = true; + //TODO WTF is trace + //trace("finished!"); + } + } + } + else + { */ + if(!script.running) + { + if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_a) || key.controllerWantsLeft(false)) + { + game.press_left = true; + } + if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_d) || key.controllerWantsRight(false)) + { + game.press_right = true; + } + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) + || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_w) || key.isDown(KEYBOARD_s)|| key.isDown(game.controllerButton_flip)) + { + game.press_action = true; + }; + if (key.isDown(KEYBOARD_ENTER) || key.isDown(SDLK_KP_ENTER) || key.isDown(game.controllerButton_map) ) + { + game.press_map = true; + } + } + //} + + if (game.advancetext) + { + if (game.pausescript) + { + game.press_action = false; + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) + || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_w) || key.isDown(KEYBOARD_s) || key.isDown(game.controllerButton_flip)) game.press_action = true; + } + + if (game.press_action && !game.jumpheld) + { + if (game.pausescript) + { + game.pausescript = false; + game.hascontrol = true; + game.jumpheld = true; + } + else + { + if(!game.glitchrunkludge) game.state++; + game.jumpheld = true; + game.glitchrunkludge=true; + //Bug fix! You should only be able to do this ONCE. + } + } + } + + if (!game.press_map) game.mapheld = false; + + /* + if (key.isDown("1".charCodeAt(0))) { + dwgfx.screen.width = 640; + dwgfx.screen.height = 480; + setstage(640,480); + } + if (key.isDown("2".charCodeAt(0))) { + dwgfx.screen.width = 960; + dwgfx.screen.height = 720; + setstage(960,720); + } + if (key.isDown("3".charCodeAt(0))) { + dwgfx.screen.width = 1280; + dwgfx.screen.height = 960; + setstage(1280,960); + } + */ + /*game.test = true; + game.teststring = String(game.inertia); + if (key.isDown("1".charCodeAt(0))) game.inertia = 0.5; + if (key.isDown("2".charCodeAt(0))) game.inertia = 0.6; + if (key.isDown("3".charCodeAt(0))) game.inertia = 0.7; + if (key.isDown("4".charCodeAt(0))) game.inertia = 0.8; + if (key.isDown("5".charCodeAt(0))) game.inertia = 0.9; + if (key.isDown("6".charCodeAt(0))) game.inertia = 1; + if (key.isDown("7".charCodeAt(0))) game.inertia = 1.1; + if (key.isDown("8".charCodeAt(0))) game.inertia = 1.2; + if (key.isDown("9".charCodeAt(0))) game.inertia = 1.3; + if (key.isDown("0".charCodeAt(0))) game.inertia = 1.4;*/ + + if (game.intimetrial && dwgfx.fademode == 1 && game.quickrestartkludge) + { + //restart the time trial + game.quickrestartkludge = false; + script.startgamemode(game.timetriallevel + 3, key, dwgfx, game, map, obj, help, music); + game.deathseq = -1; + game.completestop = false; + } + + //Returning to editor mode must always be possible + if(map.custommode && !map.custommodeforreal){ + if ((game.press_map || key.isDown(27)) && !game.mapheld){ + game.mapheld = true; + //Return to level editor + if (game.activeactivity > -1 && game.press_map){ + if((int(std::abs(obj.entities[obj.getplayer()].vx))<=1) && (int(obj.entities[obj.getplayer()].vy) == 0) ) + { + script.load(obj.blocks[game.activeactivity].script); + obj.removeblock(game.activeactivity); + } + }else{ + game.gamestate = EDITORMODE; + + dwgfx.textboxremove(); + game.hascontrol = true; + game.advancetext = false; + game.completestop = false; + game.state = 0; + dwgfx.showcutscenebars = false; + + dwgfx.backgrounddrawn=false; + music.fadeout(); + } + } + } + + //Entity type 0 is player controled + for (int ie = 0; ie < obj.nentity; ++ie) + { + if (obj.entities[ie].rule == 0) + { + //game.test = true; + //game.teststring = "player(" + String(int(obj.entities[i])) + "," + String(int(obj.entities[i].yp)) + ")" + // + ", mouse(" + String(int(game.mx)) + "," + String(int(game.my)) + ")"; + if (game.hascontrol && game.deathseq == -1 && game.lifeseq <= 5) + { + /* + if (key.isDown(8)) { + script.load("returntohub"); + } + */ + /* + if (key.isDown(27)) { + game.state = 0; + dwgfx.textboxremove(); + + map.tdrawback = true; + music.haltdasmusik(); + game.gamestate = TITLEMODE; + } + */ + + if (game.press_map && !game.mapheld) + { + game.mapheld = true; + + if (game.activetele && game.readytotele > 20 && !game.intimetrial) + { + if(!dwgfx.flipmode) + { + obj.flags[73] = 1; //Flip mode test + } + if(int(std::abs(obj.entities[ie].vx))<=1 && int(obj.entities[ie].vy)==0) + { + //wait! space station 2 debug thingy + if (game.teleportscript != "") + { + + //trace(game.recordstring); + //We're teleporting! Yey! + game.activetele = false; + game.hascontrol = false; + music.fadeout(); //Uncomment this when it's working! + + int player = obj.getplayer(); + obj.entities[player].colour = 102; + + int teleporter = obj.getteleporter(); + obj.entities[teleporter].tile = 6; + obj.entities[teleporter].colour = 102; + //which teleporter script do we use? it depends on the companion! + game.state = 4000; + game.statedelay = 0; + } + else if (game.companion == 0) + { + //Alright, normal teleporting + game.gamestate = 5; + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + //dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + + //TODO TESTHIS + //dwgfx.screenbuffer->UpdateScreen(dwgfx.menubuffer, NULL); + BlitSurfaceStandard(dwgfx.menubuffer,NULL,dwgfx.backBuffer, NULL); + + dwgfx.resumegamemode = false; + + game.useteleporter = true; + game.initteleportermode(map); + } + else + { + //trace(game.recordstring); + //We're teleporting! Yey! + game.activetele = false; + game.hascontrol = false; + music.fadeout(); //Uncomment this when it's working! + + int player = obj.getplayer(); + obj.entities[player].colour = 102; + int companion = obj.getcompanion(game.companion); + if(companion>-1) obj.entities[companion].colour = 102; + + int teleporter = obj.getteleporter(); + obj.entities[teleporter].tile = 6; + obj.entities[teleporter].colour = 102; + //which teleporter script do we use? it depends on the companion! + game.state = 3000; + game.statedelay = 0; + } + } + } + else if (game.activeactivity > -1) + { + if((int(std::abs(obj.entities[ie].vx))<=1) && (int(obj.entities[ie].vy) == 0) ) + { + script.load(obj.blocks[game.activeactivity].script); + obj.removeblock(game.activeactivity); + } + } + else if (game.swnmode == 1 && game.swngame == 1) + { + //quitting the super gravitron + game.mapheld = true; + //Quit menu, same conditions as in game menu + game.gamestate = MAPMODE; + game.gamesaved = false; + dwgfx.resumegamemode = false; + game.menupage = 20; // The Map Page + //dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + //dwgfx.screenbuffer->UpdateScreen(dwgfx.menubuffer, NULL); + BlitSurfaceStandard(dwgfx.menubuffer,NULL,dwgfx.backBuffer, NULL); + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + } + else if (game.intimetrial && dwgfx.fademode==0) + { + //Quick restart of time trial + script.hardreset(key, dwgfx, game, map, obj, help, music); + if (dwgfx.setflipmode) dwgfx.flipmode = true; + dwgfx.fademode = 2; + game.completestop = true; + music.fadeout(); + game.intimetrial = true; + game.quickrestartkludge = true; + } + else if (dwgfx.fademode==0) + { + //Normal map screen, do transition later + game.gamestate = MAPMODE; + map.cursordelay = 0; + map.cursorstate = 0; + game.gamesaved = false; + dwgfx.resumegamemode = false; + game.menupage = 0; // The Map Page + BlitSurfaceStandard(dwgfx.menubuffer,NULL,dwgfx.backBuffer, NULL); + //dwgfx.screenbuffer->UpdateScreen(dwgfx.menubuffer, NULL); + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + } + } + + if ((key.isDown(27) || key.isDown(game.controllerButton_esc)) && (!map.custommode || map.custommodeforreal)) + { + game.mapheld = true; + //Quit menu, same conditions as in game menu + game.gamestate = MAPMODE; + game.gamesaved = false; + dwgfx.resumegamemode = false; + game.menupage = 10; // The Map Page + + //dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, NULL, NULL, false); + + //dwgfx.screenbuffer->UpdateScreen(dwgfx.menubuffer, NULL); + BlitSurfaceStandard(dwgfx.menubuffer,NULL,dwgfx.backBuffer, NULL); + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + } + + if (key.keymap[SDLK_r] && game.deathseq<=0)// && map.custommode) //Have fun glitchrunners! + { + game.deathseq = 30; + } + + if (game.press_left) + { + game.tapleft++; + } + else + { + if (game.tapleft <= 4 && game.tapleft > 0) + { + if (obj.entities[ie].vx < 0.0f) + { + obj.entities[ie].vx = 0.0f; + } + } + game.tapleft = 0; + } + if (game.press_right) + { + game.tapright++; + } + else + { + if (game.tapright <= 4 && game.tapright > 0) + { + if (obj.entities[ie].vx > 0.0f) + { + obj.entities[ie].vx = 0.0f; + } + } + game.tapright = 0; + } + + + if(game.press_left) + { + //obj.entities[i].vx = -4; + obj.entities[ie].ax = -3; + obj.entities[ie].dir = 0; + } + else if (game.press_right) + { + //obj.entities[i].vx = 4; + obj.entities[ie].ax = 3; + obj.entities[ie].dir = 1; + } + + if (!game.press_action) + { + game.jumppressed = 0; + game.jumpheld = false; + } + + if (game.press_action && !game.jumpheld) + { + game.jumppressed = 5; + game.jumpheld = true; + } + + if (game.jumppressed > 0) + { + game.jumppressed--; + if (obj.entities[ie].onground>0 && game.gravitycontrol == 0) + { + game.gravitycontrol = 1; + obj.entities[ie].vy = -4; + obj.entities[ie].ay = -3; + music.playef(0, 10); + game.jumppressed = 0; + game.totalflips++; + } + if (obj.entities[ie].onroof>0 && game.gravitycontrol == 1) + { + game.gravitycontrol = 0; + obj.entities[ie].vy = 4; + obj.entities[ie].ay = 3; + music.playef(1, 10); + game.jumppressed = 0; + game.totalflips++; + } + } + } + else + { + //Simple detection of keypresses outside player control, will probably scrap this (expand on + //advance text function) + if (!game.press_action) + { + game.jumppressed = 0; + game.jumpheld = false; + } + + if (game.press_action && !game.jumpheld) + { + game.jumppressed = 5; + game.jumpheld = true; + } + } + } + } +} + +void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music) +{ + //TODO Mouse Input! + //game.mx = (mouseX / 2); + //game.my = (mouseY / 2); + + game.press_left = false; + game.press_right = false; + game.press_action = false; + game.press_map = false; + + if(dwgfx.menuoffset==0) + { + if (dwgfx.flipmode) + { + if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_a) || key.isDown(KEYBOARD_s) || key.controllerWantsLeft(false) ) game.press_left = true; + if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_d) || key.isDown(KEYBOARD_w) || key.controllerWantsRight(false)) game.press_right = true; + } + else + { + if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_a) || key.isDown(KEYBOARD_w)|| key.controllerWantsLeft(false)) + { + game.press_left = true; + } + if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_d) || key.isDown(KEYBOARD_s)|| key.controllerWantsRight(false)) + { + game.press_right = true; + } + } + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) || key.isDown(game.controllerButton_flip)) + { + game.press_action = true; + } + if (game.menupage < 9) + { + if (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map) ) game.press_map = true; + if (key.isDown(27)) + { + game.mapheld = true; + game.menupage = 10; + } + } + else + { + if (key.isDown(KEYBOARD_ENTER) || key.isDown(27)|| key.isDown(game.controllerButton_map) ) game.press_map = true; + } + + //In the menu system, all keypresses are single taps rather than holds. Therefore this test has to be done for all presses + if (!game.press_action && !game.press_left && !game.press_right) + { + game.jumpheld = false; + } + if (!game.press_map && !key.isDown(27)) + { + game.mapheld = false; + } + } + else + { + game.mapheld = true; + game.jumpheld = true; + } + + if (!game.mapheld) + { + if(game.press_map && game.menupage < 10) + { + //Normal map screen, do transition later + dwgfx.resumegamemode = true; + } + } + + if (dwgfx.fademode == 1) + { + FillRect(dwgfx.menubuffer, 0x000000); + dwgfx.resumegamemode = true; + obj.removeallblocks(); + game.menukludge = false; + if (game.menupage >= 20) + { + game.state = 96; + game.statedelay = 0; + } + else + { + game.state = 80; + game.statedelay = 0; + } + } + + if (!game.jumpheld) + { + if (game.press_action || game.press_left || game.press_right || game.press_map) + { + game.jumpheld = true; + } + + if (game.press_left) + { + game.menupage--; + } + else if (game.press_right) + { + game.menupage++; + } + + if (game.menupage == 1 && obj.flags[67] == 1 && game.press_action && !game.insecretlab && !map.custommode) + { + //Warp back to the ship + dwgfx.resumegamemode = true; + + game.teleport_to_x = 2; + game.teleport_to_y = 11; + + //trace(game.recordstring); + //We're teleporting! Yey! + game.activetele = false; + game.hascontrol = false; + + int i = obj.getplayer(); + obj.entities[i].colour = 102; + + //which teleporter script do we use? it depends on the companion! + game.state = 4000; + game.statedelay = 0; + } + + if (game.menupage == 3 && !game.gamesaved && game.press_action && !game.intimetrial + && !game.nodeathmode && !game.insecretlab && !game.inintermission) + { + game.flashlight = 5; + game.screenshake = 10; + music.playef(18, 10); + game.gamesaved = true; + + game.savetime = game.timestring(help); + game.savearea = map.currentarea(map.area(game.roomx, game.roomy)); + game.savetrinkets = game.trinkets; + + if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) game.savearea = "The Ship"; + + if(map.custommodeforreal){ + game.customsavequick(ed.ListOfMetaData[game.playcustomlevel].filename, map, obj, music); + }else{ + game.savequick(map, obj, music); + } + } + + if (game.menupage == 10 && game.press_action) + { + //return to game + dwgfx.resumegamemode = true; + } + if (game.menupage == 11 && game.press_action) + { + //quit to menu + if (dwgfx.fademode == 0) + { + //Kill contents of offset render buffer, since we do that for some reason. + //This fixes an apparent frame flicker. + FillRect(dwgfx.tempBuffer, 0x000000); + if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true; + script.hardreset(key, dwgfx, game, map, obj, help, music); + if(dwgfx.setflipmode) dwgfx.flipmode = true; + dwgfx.fademode = 2; + music.fadeout(); + } + } + + if (game.menupage == 20 && game.press_action) + { + //return to game + dwgfx.resumegamemode = true; + } + if (game.menupage == 21 && game.press_action) + { + //quit to menu + if (dwgfx.fademode == 0) + { + game.swnmode = false; + dwgfx.fademode = 2; + music.fadeout(); + } + } + + if (game.menupage < 0) game.menupage = 3; + if (game.menupage > 3 && game.menupage < 9) game.menupage = 0; + + if (game.menupage == 9) game.menupage = 11; + if (game.menupage == 12) game.menupage = 10; + + if (game.menupage == 19) game.menupage = 21; + if (game.menupage == 22) game.menupage = 20; + + } +} + +void teleporterinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music) +{ + //Todo Mouseinput! + //game.mx = (mouseX / 2); + //game.my = (mouseY / 2); + + int tempx, tempy; + + game.press_left = false; + game.press_right = false; + game.press_action = false; + game.press_map = false; + + if(dwgfx.menuoffset==0) + { + if (key.isDown(KEYBOARD_LEFT)|| key.isDown(KEYBOARD_a) || key.controllerWantsLeft(false) ) game.press_left = true; + if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_d)|| key.controllerWantsRight(false) ) game.press_right = true; + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) + || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN)|| key.isDown(KEYBOARD_w)|| key.isDown(KEYBOARD_s) || key.isDown(game.controllerButton_flip)) game.press_action = true; + if (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map)) game.press_map = true; + + //In the menu system, all keypresses are single taps rather than holds. Therefore this test has to be done for all presses + if (!game.press_action && !game.press_left && !game.press_right) game.jumpheld = false; + if (!game.press_map) game.mapheld = false; + } + else + { + game.mapheld = true; + game.jumpheld = true; + } + + if (!game.jumpheld) + { + if (game.press_action || game.press_left || game.press_right || game.press_map) + { + game.jumpheld = true; + } + + if (game.press_left) + { + game.teleport_to_teleporter--; + if (game.teleport_to_teleporter < 0) game.teleport_to_teleporter = map.numteleporters - 1; + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + while (map.explored[tempx + (20 * tempy)] == 0) + { + game.teleport_to_teleporter--; + if (game.teleport_to_teleporter < 0) game.teleport_to_teleporter = map.numteleporters - 1; + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + } + } + else if (game.press_right) + { + game.teleport_to_teleporter++; + if (game.teleport_to_teleporter >= map.numteleporters) game.teleport_to_teleporter = 0; + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + while (map.explored[tempx + (20 * tempy)] == 0) + { + game.teleport_to_teleporter++; + if (game.teleport_to_teleporter >= map.numteleporters) game.teleport_to_teleporter = 0; + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + } + } + + if (game.press_map) + { + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + if (game.roomx == tempx + 100 && game.roomy == tempy + 100) + { + //cancel! + dwgfx.resumegamemode = true; + } + else + { + //teleport + dwgfx.resumegamemode = true; + game.teleport_to_x = tempx; + game.teleport_to_y = tempy; + + //trace(game.recordstring); + //We're teleporting! Yey! + game.activetele = false; + game.hascontrol = false; + + int i = obj.getplayer(); + obj.entities[i].colour = 102; + + i = obj.getteleporter(); + obj.entities[i].tile = 6; + obj.entities[i].colour = 102; + //which teleporter script do we use? it depends on the companion! + game.state = 4000; + game.statedelay = 0; + } + } + } +} + +void gamecompleteinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music) +{ + //game.mx = (mouseX / 2); + //game.my = (mouseY / 2); + + game.press_left = false; + game.press_right = false; + game.press_action = false; + game.press_map = false; + + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) || key.isDown(game.controllerButton_flip)) + { + game.creditposition -= 6; + if (game.creditposition <= -1650) + { + if(dwgfx.fademode==0) + { + dwgfx.fademode = 2; + } + game.creditposition = -1650; + } + else + { + map.bypos += 6; + map.bscroll = +6; + } + game.press_action = true; + } + if (key.isDown(KEYBOARD_ENTER)|| key.isDown(game.controllerButton_map)) game.press_map = true; + //if (key.isDown(27)) { game.mapheld = true; game.menupage = 10; } + + if (!game.mapheld) + { + if(game.press_map) + { + //Return to game + if(dwgfx.fademode==0) + { + dwgfx.fademode = 2; + } + } + } +} + +void gamecompleteinput2(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music) +{ + //TODO Mouse Input! + //game.mx = (mouseX / 2); + //game.my = (mouseY / 2); + + + game.press_left = false; + game.press_right = false; + game.press_action = false; + game.press_map = false; + + + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) || key.isDown(game.controllerButton_flip)) + { + game.creditposx++; + if (game.creditposy >= 30) + { + if(dwgfx.fademode==0) + { + dwgfx.fademode = 2; + music.fadeout(); + } + } + game.press_action = true; + } + if (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map)) game.press_map = true; + //if (key.isDown(27)) { game.mapheld = true; game.menupage = 10; } + + if (!game.mapheld) + { + if(game.press_map) + { + //Return to game + if(dwgfx.fademode==0) + { + dwgfx.fademode = 2; + music.fadeout(); + } + } + } +} diff --git a/desktop_version/src/Input.h b/desktop_version/src/Input.h new file mode 100644 index 00000000..d235d6a6 --- /dev/null +++ b/desktop_version/src/Input.h @@ -0,0 +1,30 @@ +#ifndef INPUT_H +#define INPUT_H + +#include "KeyPoll.h" +#include "Graphics.h" +#include "Game.h" +#include "Entity.h" +#include "UtilityClass.h" +#include "Music.h" +#include "Map.h" + +void titleinput(KeyPoll& key, Graphics& dwgfx, mapclass& map, Game& game, + entityclass& obj, UtilityClass& help, musicclass& music); + +void gameinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + +void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + +void teleporterinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + +void gamecompleteinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + +void gamecompleteinput2(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + +#endif /* INPUT_H */ diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp new file mode 100644 index 00000000..e199df13 --- /dev/null +++ b/desktop_version/src/KeyPoll.cpp @@ -0,0 +1,333 @@ +#include "KeyPoll.h" +#include +#include + +void KeyPoll::setSensitivity(int _value) +{ + switch (_value) + { + case 0: + sensitivity = 28000; + break; + case 1: + sensitivity = 16000; + break; + case 2: + sensitivity = 8000; + break; + case 3: + sensitivity = 4000; + break; + case 4: + sensitivity = 2000; + break; + } + +} + +KeyPoll::KeyPoll() +{ + xVel = 0; + yVel = 0; + setSensitivity(2); + + quitProgram = 0; + textentrymode=true; + keybuffer=""; + leftbutton=0; rightbutton=0; middlebutton=0; + mx=0; my=0; + resetWindow = 0; + toggleFullscreen = false; + pressedbackspace=false; + + useFullscreenSpaces = false; + if (strcmp(SDL_GetPlatform(), "Mac OS X") == 0) + { + useFullscreenSpaces = true; + const char *hint = SDL_GetHint(SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES); + if (hint != NULL) + { + useFullscreenSpaces = (strcmp(hint, "1") == 0); + } + } +} + +void KeyPoll::enabletextentry() +{ + keybuffer=""; + textentrymode = true; + SDL_StartTextInput(); +} + +void KeyPoll::disabletextentry() +{ + textentrymode = false; + SDL_StopTextInput(); +} + +void KeyPoll::Poll() +{ + SDL_Event evt; + while (SDL_PollEvent(&evt)) + { + /* Keyboard Input */ + if (evt.type == SDL_KEYDOWN) + { + keymap[evt.key.keysym.sym] = true; + if (evt.key.keysym.sym == SDLK_BACKSPACE) + { + pressedbackspace = true; + } + else if ( ( evt.key.keysym.sym == SDLK_RETURN || + evt.key.keysym.sym == SDLK_f ) && +#ifdef __APPLE__ /* OSX prefers the command key over the alt keys. -flibit */ + keymap[SDLK_LGUI] ) +#else + ( keymap[SDLK_LALT] || + keymap[SDLK_RALT] ) ) +#endif + { + toggleFullscreen = true; + } + + if (textentrymode) + { + if (evt.key.keysym.sym == SDLK_BACKSPACE) + { + keybuffer = keybuffer.substr(0, keybuffer.length() - 1); + } + else if ( evt.key.keysym.sym == SDLK_v && + keymap[SDLK_LCTRL] ) + { + keybuffer += SDL_GetClipboardText(); + } + } + } + else if (evt.type == SDL_KEYUP) + { + keymap[evt.key.keysym.sym] = false; + if (evt.key.keysym.sym == SDLK_BACKSPACE) + { + pressedbackspace = false; + } + } + else if (evt.type == SDL_TEXTINPUT) + { + keybuffer += evt.text.text; + } + + /* Mouse Input */ + else if (evt.type == SDL_MOUSEMOTION) + { + mx = evt.motion.x; + my = evt.motion.y; + } + else if (evt.type == SDL_MOUSEBUTTONDOWN) + { + if (evt.button.button == SDL_BUTTON_LEFT) + { + mx = evt.button.x; + my = evt.button.y; + leftbutton = 1; + } + else if (evt.button.button == SDL_BUTTON_RIGHT) + { + mx = evt.button.x; + my = evt.button.y; + rightbutton = 1; + } + else if (evt.button.button == SDL_BUTTON_MIDDLE) + { + mx = evt.button.x; + my = evt.button.y; + middlebutton = 1; + } + } + else if (evt.type == SDL_MOUSEBUTTONUP) + { + if (evt.button.button == SDL_BUTTON_LEFT) + { + mx = evt.button.x; + my = evt.button.y; + leftbutton=0; + } + else if (evt.button.button == SDL_BUTTON_RIGHT) + { + mx = evt.button.x; + my = evt.button.y; + rightbutton=0; + } + else if (evt.button.button == SDL_BUTTON_MIDDLE) + { + mx = evt.button.x; + my = evt.button.y; + middlebutton=0; + } + } + + /* Controller Input */ + else if (evt.type == SDL_CONTROLLERBUTTONDOWN) + { + buttonmap[(SDL_GameControllerButton) evt.cbutton.button] = true; + } + else if (evt.type == SDL_CONTROLLERBUTTONUP) + { + buttonmap[(SDL_GameControllerButton) evt.cbutton.button] = false; + } + else if (evt.type == SDL_CONTROLLERAXISMOTION) + { + if (evt.caxis.axis == SDL_CONTROLLER_AXIS_LEFTX) + { + if ( evt.caxis.value > -sensitivity && + evt.caxis.value < sensitivity ) + { + xVel = 0; + } + else + { + xVel = (evt.caxis.value > 0) ? 1 : -1; + } + } + if (evt.caxis.axis == SDL_CONTROLLER_AXIS_LEFTY) + { + if ( evt.caxis.value > -sensitivity && + evt.caxis.value < sensitivity ) + { + yVel = 0; + } + else + { + yVel = (evt.caxis.value > 0) ? 1 : -1; + } + } + } + else if (evt.type == SDL_CONTROLLERDEVICEADDED) + { + SDL_GameController *toOpen = SDL_GameControllerOpen(evt.cdevice.which); + printf( + "Opened SDL_GameController ID #%i, %s\n", + evt.cdevice.which, + SDL_GameControllerName(toOpen) + ); + controllers[SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(toOpen))] = toOpen; + } + else if (evt.type == SDL_CONTROLLERDEVICEREMOVED) + { + SDL_GameController *toClose = controllers[evt.cdevice.which]; + controllers.erase(evt.cdevice.which); + printf("Closing %s\n", SDL_GameControllerName(toClose)); + SDL_GameControllerClose(toClose); + } + + /* Window Events */ + else if (evt.type == SDL_WINDOWEVENT) + { + /* Window Resize */ + if (evt.window.event == SDL_WINDOWEVENT_RESIZED) + { + resetWindow = true; + } + + /* Window Focus */ + else if (evt.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) + { + isActive = true; + if (!useFullscreenSpaces) + { + SDL_Window *window = SDL_GetWindowFromID(evt.window.windowID); + wasFullscreen = SDL_GetWindowFlags(window); + SDL_SetWindowFullscreen(window, 0); + } + SDL_DisableScreenSaver(); + } + else if (evt.window.event == SDL_WINDOWEVENT_FOCUS_LOST) + { + isActive = false; + if (!useFullscreenSpaces) + { + SDL_SetWindowFullscreen( + SDL_GetWindowFromID(evt.window.windowID), + wasFullscreen + ); + } + SDL_EnableScreenSaver(); + } + + /* Mouse Focus */ + else if (evt.window.event == SDL_WINDOWEVENT_ENTER) + { + SDL_DisableScreenSaver(); + } + else if (evt.window.event == SDL_WINDOWEVENT_LEAVE) + { + SDL_EnableScreenSaver(); + } + } + + /* Quit Event */ + else if (evt.type == SDL_QUIT) + { + quitProgram = true; + } + } +} + +bool KeyPoll::isDown(SDL_Keycode key) +{ + return keymap[key]; +} + +bool KeyPoll::isUp(SDL_Keycode key) +{ + return !keymap[key]; +} + +bool KeyPoll::isDown(std::vector buttons) +{ + for (size_t i = 0; i < buttons.size(); i += 1) + { + if (buttonmap[buttons[i]]) + { + return true; + } + } + return false; +} + +bool KeyPoll::isDown(SDL_GameControllerButton button) +{ + return buttonmap[button]; +} + +bool KeyPoll::controllerButtonDown() +{ + for ( + SDL_GameControllerButton button = SDL_CONTROLLER_BUTTON_A; + button < SDL_CONTROLLER_BUTTON_DPAD_UP; + button = (SDL_GameControllerButton) (button + 1) + ) { + if (isDown(button)) + { + return true; + } + } + return false; +} + +bool KeyPoll::controllerWantsLeft(bool includeVert) +{ + return ( buttonmap[SDL_CONTROLLER_BUTTON_DPAD_LEFT] || + xVel < 0 || + ( includeVert && + ( buttonmap[SDL_CONTROLLER_BUTTON_DPAD_UP] || + yVel < 0 ) ) ); +} + +bool KeyPoll::controllerWantsRight(bool includeVert) +{ + return ( buttonmap[SDL_CONTROLLER_BUTTON_DPAD_RIGHT] || + xVel > 0 || + ( includeVert && + ( buttonmap[SDL_CONTROLLER_BUTTON_DPAD_DOWN] || + yVel > 0 ) ) ); +} diff --git a/desktop_version/src/KeyPoll.h b/desktop_version/src/KeyPoll.h new file mode 100644 index 00000000..0d803e96 --- /dev/null +++ b/desktop_version/src/KeyPoll.h @@ -0,0 +1,83 @@ +#ifndef KEYPOLL_H +#define KEYPOLL_H + +#include +#include +#include // FIXME: I should feel very bad for using C++ -flibit + +#include "SDL.h" + +enum Kybrd +{ + KEYBOARD_UP = SDLK_UP, + KEYBOARD_DOWN = SDLK_DOWN, + KEYBOARD_LEFT = SDLK_LEFT, + KEYBOARD_RIGHT = SDLK_RIGHT, + KEYBOARD_ENTER = SDLK_RETURN, + KEYBOARD_SPACE = SDLK_SPACE, + + KEYBOARD_w = SDLK_w, + KEYBOARD_s = SDLK_s, + KEYBOARD_a = SDLK_a, + KEYBOARD_d = SDLK_d, + KEYBOARD_m = SDLK_m, + + KEYBOARD_v = SDLK_v, + KEYBOARD_z = SDLK_z, + + KEYBOARD_BACKSPACE = SDLK_BACKSPACE +}; + +class KeyPoll +{ +public: + std::map keymap; + + bool isActive; + + bool resetWindow; + + bool escapeWasPressedPreviously; + bool quitProgram; + bool toggleFullscreen; + + int sensitivity; + + void setSensitivity(int _value); + + KeyPoll(); + + void enabletextentry(); + + void disabletextentry(); + + void Poll(); + + bool isDown(SDL_Keycode key); + + bool isUp(SDL_Keycode key); + + bool isDown(std::vector buttons); + bool isDown(SDL_GameControllerButton button); + bool controllerButtonDown(); + bool controllerWantsLeft(bool includeVert); + bool controllerWantsRight(bool includeVert); + + int leftbutton, rightbutton, middlebutton; + int mx, my; + + bool textentrymode; + int keyentered, keybufferlen; + bool pressedbackspace; + std::string keybuffer; + +private: + std::map controllers; + std::map buttonmap; + int xVel, yVel; + bool useFullscreenSpaces; + Uint32 wasFullscreen; +}; + + +#endif /* KEYPOLL_H */ diff --git a/desktop_version/src/Labclass.cpp b/desktop_version/src/Labclass.cpp new file mode 100644 index 00000000..df563810 --- /dev/null +++ b/desktop_version/src/Labclass.cpp @@ -0,0 +1,1862 @@ +#include "Labclass.h" + +std::vector labclass::loadlevel(int rx, int ry , Game& game, entityclass& obj) +{ + int t; + + rx=rx-100; + ry=ry-100; + if(ry<5) + { + rx+=50-2; + ry+=54; //lab + } + else + { + rx+=50-2; + ry+=50-16; //lab + } + + t = rx + (ry * 100); + std::vector tmap; + coin = 0; + rcol = 0; + roomname = "Untitled room ["+UtilityClass::String(rx) + "," + UtilityClass::String(ry)+"]"; + + switch(t) + { + + case rn(50,50): + + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,284,444,444,444,444,444,444,444,444,444,285,283,284,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,0,0,0,363,364,365,0,0,0,403,283,405,0,0,0,363,364,365,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,0,0,0,403,283,405,0,0,0,443,444,445,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("444,444,444,444,444,444,285,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("0,0,0,0,0,0,403,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("0,0,0,0,0,0,403,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("0,0,0,0,0,0,403,283,405,0,0,0,403,283,324,364,364,364,364,364,364,364,364,364,325,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("0,0,0,0,0,0,403,283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("0,0,0,0,0,0,403,283,405,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,285,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("364,364,365,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,403,283,324,364,364,364,364,364,364,364,364,364,364,364,365,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,444,444,445,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + + obj.createentity(game, 232, 24, 10, 0, 250500); // (savepoint) + + if(game.intimetrial) + { + obj.createblock(0, 0, 0, 8, 240); + } + + rcol=1; + roomname = "Get Ready To Bounce"; + break; + + case rn(50,51): + + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,400,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,400,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,281,441,442,0,0,0,0,0,0,440,441,441,441,441,282,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,281,442,64,64,0,0,0,0,0,0,64,64,64,64,64,440,282"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,442,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("63,63,63,63,63,63,63,63,63,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("361,361,361,361,361,361,361,361,361,361,361,361,362,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,321,362,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,360,322"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,321,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,322,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + + obj.createentity(game, 112, 180, 11, 192); // (horizontal gravity line) + rcol = 0; + + roomname = "It's Perfectly Safe"; + break; + + case rn(49,51): + + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,72,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,71,71,71,71,71,71,71,71,71,71,71"); + tmap.push_back("292,414,0,0,0,0,0,0,0,60,413,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,307,308,308,308,308,308,308,349,373,373,373,373"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,71,71,71,0,0,0,0,0,71,71,71,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,333,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292"); + + obj.createentity(game, 96, 124, 11, 120); // (horizontal gravity line) + obj.createentity(game, 248, 48, 10, 0, 251490); // (savepoint) + rcol = 4; + + roomname = "Rascasse"; + break; + + case rn(49,52): + + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("286,287,447,447,447,447,447,447,447,447,288,286,286,287,447,447,447,447,447,447,447,447,288,286,286,287,447,448,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("286,408,68,68,68,68,68,68,68,68,406,286,286,408,68,68,68,68,68,68,68,68,406,286,286,408,68,68,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("447,448,0,0,0,0,0,0,0,0,446,447,447,448,0,0,0,0,0,0,0,0,446,447,447,448,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,68,68,68,68,0,0,0,0,0,0,0,0,68,68,68,68,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,67,67,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); + tmap.push_back("367,367,367,367,367,367,367,368,0,0,0,0,0,0,0,0,366,367,367,368,0,0,0,0,0,0,0,0,366,367,367,367,367,367,367,328,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,67,67,67,67,67,67,67,67,406,286,286,408,67,67,67,67,67,67,67,67,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,327,367,367,367,367,367,367,367,367,328,286,286,327,367,367,367,367,367,367,367,367,328,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + + obj.createentity(game, 248, 136, 10, 1, 252490); // (savepoint) + obj.createentity(game, 16, 68, 11, 64); // (horizontal gravity line) + obj.createentity(game, 112, 68, 11, 64); // (horizontal gravity line) + obj.createentity(game, 64, 164, 11, 64); // (horizontal gravity line) + obj.createentity(game, 160, 164, 11, 64); // (horizontal gravity line) + rcol = 2; + + roomname = "Keep Going"; + break; + + case rn(48,52): + + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289"); + tmap.push_back("289,289,289,289,289,411,70,70,70,70,70,70,70,70,70,70,70,70,70,409,289,289,289,411,70,70,70,70,70,70,70,70,70,70,70,70,70,409,289,289"); + tmap.push_back("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); + tmap.push_back("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); + tmap.push_back("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); + tmap.push_back("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); + tmap.push_back("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); + tmap.push_back("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); + tmap.push_back("289,290,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450"); + tmap.push_back("289,411,70,70,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,70,70,70,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,69,69,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,369,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,411,69,69,69,69,69,0,0,0,0,0,69,69,69,69,69,409,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,330,370,370,370,370,371,0,0,0,0,0,369,370,370,370,370,331,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,411,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,411,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,330,370,370,370,370,370,331,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + + obj.createentity(game, 280, 136, 10, 1, 252480); // (savepoint) + obj.createentity(game, 48, 52, 11, 104); // (horizontal gravity line) + obj.createentity(game, 192, 52, 11, 104); // (horizontal gravity line) + obj.createentity(game, 152, 196, 11, 40); // (horizontal gravity line) + rcol=3; + + roomname = "Single-slit Experiment"; + break; + + + case rn(48,53): + + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,296,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,417,74,74,74,74,74,74,74,74,74,74,74,74,74,74"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,455,456,456,456,456,456,456,456,456,456,456,456,456,456,457,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + + obj.createentity(game, 32, 128, 10, 1, 253480); // (savepoint) + obj.createentity(game, 187, 88, 12, 56); // (vertical gravity line) + obj.createentity(game, 107, 88, 12, 56); // (vertical gravity line) + rcol = 5; + + roomname = "Don't Flip Out"; + break; + + case rn(49,53): + + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,284,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("444,444,444,444,444,285,283,283,283,283,283,283,283,283,283,405,66,66,66,66,66,66,66,66,66,403,283,283,283,283,283,283,283,283,283,284,444,444,444,444"); + tmap.push_back("66,66,66,66,66,403,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,405,66,66,66,66"); + tmap.push_back("0,0,0,0,0,443,444,444,444,444,444,444,444,444,444,445,0,0,0,0,0,0,0,0,0,443,444,444,444,444,444,444,444,444,444,445,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("364,364,364,364,364,365,0,0,0,0,0,0,0,0,0,363,364,364,364,364,364,364,364,364,364,365,0,0,0,0,0,0,0,0,0,363,364,364,364,364"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,65,65,65,65,65,65,65,65,65,403,283,283,283,283,283,283,283,283,283,405,65,65,65,65,65,65,65,65,65,403,283,283,283,283"); + tmap.push_back("283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,325,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.createentity(game, 43, 88, 12, 56); // (vertical gravity line) + obj.createentity(game, 123, 88, 12, 56); // (vertical gravity line) + obj.createentity(game, 203, 88, 12, 56); // (vertical gravity line) + obj.createentity(game, 283, 88, 12, 56); // (vertical gravity line) + + obj.createentity(game, 156, 128, 20, 1); // (terminal) + obj.createblock(5, 156-8, 128, 20, 16, 19); + rcol = 1; + + roomname = "Shuffled Hallway"; + break; + + case rn(50,53): + + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,70,70,70,70,70,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("70,70,70,70,70,70,70,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,69,69,69,69,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,330,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,69,69,69,69,69,69,69,69"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,330,370,370,370,370,370,370,370,370"); + + obj.createentity(game, 96, 192, 10, 1, 253500); // (savepoint) + obj.createentity(game, 163, 32, 12, 168); // (vertical gravity line) + rcol = 3; + + roomname = "Double-slit Experiment"; + break; + + case rn(51,53): + + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,287,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + + obj.createentity(game, 264, 104, 10, 1, 253510); // (savepoint) + obj.createentity(game, 131, 120, 12, 96); // (vertical gravity line) + obj.createentity(game, 187, 16, 12, 96); // (vertical gravity line) + obj.createentity(game, 40, 112, 10, 0, 253511); // (savepoint) + rcol = 2; + roomname = "They Call Him Flipper"; + break; + + case rn(52,53): + + tmap.push_back("453,453,453,453,453,453,294,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("72,72,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,293,453,453,453,294,292,293,453,453,453,294,292,293,453,453,453,294,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,414,72,72,72,412,292,414,72,72,72,412,292,414,72,72,72,412,292,292,292,292,292,292,292,292"); + tmap.push_back("373,374,0,0,0,0,412,414,0,0,0,0,0,0,452,454,0,0,0,452,453,454,0,0,0,452,453,454,0,0,0,452,453,453,453,453,453,453,294,292"); + tmap.push_back("292,414,0,0,0,0,412,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); + tmap.push_back("292,414,0,0,0,0,412,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); + tmap.push_back("292,414,0,0,0,0,412,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); + tmap.push_back("292,414,0,0,0,0,412,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,71,0,0,0,412,292"); + tmap.push_back("292,414,0,0,0,0,452,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,307,309,0,0,0,412,292"); + tmap.push_back("292,414,0,0,0,0,72,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,72,0,0,0,412,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); + tmap.push_back("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); + tmap.push_back("292,333,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,0,372,373,373,373,374,0,0,0,0,0,372,373,373,373,373,373,373,373,373,334,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,414,71,71,71,71,71,412,292,292,292,414,71,71,71,71,71,412,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,333,373,373,373,373,373,334,292,292,292,333,373,373,373,373,373,334,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + + obj.createentity(game, 24, 184, 10, 1, 253520); // (savepoint) + obj.createentity(game, 64, 164, 11, 200); // (horizontal gravity line) + rcol = 4; + roomname = "Three's a Crowd"; + break; + + case rn(52,52): + + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286,286,286,286,286"); + tmap.push_back("68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("367,367,367,367,367,367,367,351,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,312,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,366,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + + obj.createentity(game, 195, 24, 12, 80); // (vertical gravity line) + obj.createentity(game, 195, 128, 12, 80); // (vertical gravity line) + obj.createentity(game, 80, 120, 10, 0, 252520); // (savepoint) + obj.createentity(game, 80, 96, 10, 1, 252521); // (savepoint) + rcol = 2; + roomname = "Hitting the Apex"; + break; + + case rn(51,52): + + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,280,281,441,441,441,441,441,441,441,441,441,441"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,281,442,64,64,64,64,64,64,64,64,64,64"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,281,441,441,441,441,442,51,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,281,442,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,440,282,280,281,442,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,440,344,442,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,464,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,360,361,361,361,361,361,361,361"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("280,321,362,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,360,322,280,280,280,280,280,280,280"); + tmap.push_back("280,280,321,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,322,280,280,280,280,280,280,280,280"); + + obj.createentity(game, 24, 188, 11, 224); // (horizontal gravity line) + obj.createentity(game, 280, 96, 10, 1, 252510); // (savepoint) + + obj.createentity(game, 204, 32, 20, 0); // (terminal) + obj.createblock(5, 204-8, 32, 20, 16, 20); + rcol=0; + + roomname = "Square Root"; + break; + + + case rn(51,51): + + tmap.push_back("292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,293,454,72,72,72,72,72,72,72,72,72,72,72,72,72,72,452,294,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,452,319,454,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,467,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,387,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,372,347,374,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,333,374,71,71,71,71,71,71,71,71,71,71,71,71,71,71,372,334,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,333,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292"); + tmap.push_back("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + + obj.createentity(game, 24, 44, 11, 112); // (horizontal gravity line) + obj.createentity(game, 176, 180, 11, 112); // (horizontal gravity line) + rcol = 4; + roomname = "Thorny Exchange"; + break; + + case rn(51,50): + + tmap.push_back("283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); + tmap.push_back("283,283,284,445,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,405,53,0,0,0,0,0,363,364,364,364,364,365,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,364"); + tmap.push_back("283,283,405,53,0,0,0,0,54,403,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,443,444,444,444,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,363,365,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,324,365,65,65,65,65,65,65,65,65,65,65,65,65,65,65,363,325,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + tmap.push_back("283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + + obj.createentity(game, 32, 28, 11, 296); // (horizontal gravity line) + obj.createentity(game, 32, 196, 11, 112); // (horizontal gravity line) + obj.createentity(game, 128, 100, 11, 160); // (horizontal gravity line) + obj.createentity(game, 88, 112, 10, 0, 250510); // (savepoint) + roomname = "Brought to you by the letter G"; + rcol = 1; + break; + + case rn(52,50): + + tmap.push_back("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447"); + tmap.push_back("68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("367,367,367,367,367,367,367,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 28, 11, 336); // (horizontal gravity line) + obj.createentity(game, 32, 72, 10, 1, 250520); // (savepoint) + rcol=2; + + roomname = "Free Your Mind"; + break; + + case rn(52,51): + + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("280,280,280,280,280,280,280,280,321,362,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63"); + tmap.push_back("280,280,280,280,280,280,280,280,280,321,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + + obj.createentity(game, 80, 180, 11, 248); // (horizontal gravity line) + rcol=0; + roomname = "I Changed My Mind, Thelma..."; + break; + + case rn(53,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,372,334,292,333,374,71,71,71,71,71,71,71,71,71,71"); + tmap.push_back("373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292,333,373,373,373,373,373,373,373,373,373,373"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + + obj.createentity(game, -8, 180, 11, 208); // (horizontal gravity line) + obj.createentity(game, 240, 180, 11, 88); // (horizontal gravity line) + rcol=4; + + roomname = "Indirect Jump Vector"; + break; + + case rn(53,50): + + tmap.push_back("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); + tmap.push_back("74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,396,73,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,375,356,377,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 28, 11, 336); // (horizontal gravity line) + rcol=5; + + roomname = "In a Single Bound"; + break; + + case rn(54,50): + + tmap.push_back("444,444,444,444,444,444,444,444,444,285,283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,284,444,444,444,444,444,444,444,444,444"); + tmap.push_back("66,66,66,66,66,66,66,66,66,443,285,283,284,445,66,66,66,66,66,66,66,66,66,66,66,66,443,285,283,284,445,66,66,66,66,66,66,66,66,66"); + tmap.push_back("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,54,443,359,445,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,66,473,66,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,65,393,65,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,54,363,353,365,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 28, 11, 80); // (horizontal gravity line) + obj.createentity(game, 112, 28, 11, 96); // (horizontal gravity line) + obj.createentity(game, 248, 28, 11, 80); // (horizontal gravity line) + rcol=1; + + roomname = "Barani, Barani"; + break; + + + case rn(54,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,446,399,448,55,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,68,470,68,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,67,390,67,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,366,350,368,55,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); + tmap.push_back("67,67,67,67,67,67,67,67,67,366,328,286,327,368,67,67,67,67,67,67,67,67,67,67,67,67,366,328,286,327,368,67,67,67,67,67,67,67,67,67"); + tmap.push_back("367,367,367,367,367,367,367,367,367,328,286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,327,367,367,367,367,367,367,367,367,367"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + + obj.createentity(game, -8, 180, 11, 80); // (horizontal gravity line) + obj.createentity(game, 112, 180, 11, 96); // (horizontal gravity line) + obj.createentity(game, 248, 180, 11, 80); // (horizontal gravity line) + rcol=2; + + roomname = "Safety Dance"; + break; + + case rn(55,50): + + tmap.push_back("450,450,450,450,291,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("70,70,70,70,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,449,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,69,0,0,0,0,0,0,69,369,331,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,369,371,0,0,0,0,0,0,369,331,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + + obj.createentity(game, -8, 28, 11, 40); // (horizontal gravity line) + + rcol=3; + roomname = "Heady Heights"; + break; + + case rn(55,49): + + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,296,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,62,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,62,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("456,457,0,0,0,0,0,0,0,0,0,62,455,456,456,456,456,456,456,456,456,456,456,456,456,297,296,456,456,456,456,456,456,456,456,456,456,456,297,295"); + tmap.push_back("0,0,0,0,375,376,377,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("0,0,0,0,415,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("0,0,0,0,415,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("0,0,0,0,415,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("376,376,376,376,337,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,455,457,61,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,377,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,296,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,457,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + tmap.push_back("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + + + obj.createentity(game, 160, 176, 10, 0, 249550); // (savepoint) + obj.createentity(game, 224, 68, 11, 72); // (horizontal gravity line) + + + //obj.createentity(game, 224, 192, 10, 0, 249550); // (savepoint) + + if(!game.intimetrial) obj.createentity(game, (12 * 8)-4, (6 * 8) + 4, 14); //Teleporter! + rcol = 5; + + roomname = "Entanglement Generator"; + break; + + + case rn(55,51): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,360,322,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,322,280,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,400,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,400,280,280,280"); + + obj.createentity(game, -8, 180, 11, 224); // (horizontal gravity line) + + rcol = 0; + roomname = "Exausted?"; + break; + + + case rn(55,52): + + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,333,373,373,373,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + + obj.createentity(game, 32, 64, 9, 10); // (shiny trinket) + obj.createentity(game, 120, 72, 10, 1, 252550); // (savepoint) + rcol = 4; + + roomname = "The Tantalizing Trinket"; + break; + + case rn(55,53): + + tmap.push_back("283,283,283,283,283,283,283,283,283,284,444,444,444,444,444,444,444,445,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,284,445,66,66,66,66,66,66,66,66,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,363,364,364,325,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,443,444,444,444,444,285,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,65,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,393,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,433,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,433,53,0,0,0,0,0,0,0,54,403,283,439,314,314,314,314,315,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,433,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,473,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,66,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,363,364,364,364,364,325,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,443,444,444,285,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,324,365,65,65,65,65,65,65,65,65,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,365,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + + obj.createentity(game, 272, 144, 10, 1, 253550); // (savepoint) + obj.createentity(game, 152, 116, 11, 56); // (horizontal gravity line) + obj.createentity(game, 139, 16, 12, 72); // (vertical gravity line) + obj.createentity(game, 139, 144, 12, 72); // (vertical gravity line) + rcol=1; + + roomname = "The Bernoulli Principle"; + break; + + case rn(55,54): + + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,297,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,415,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,455,457,0,0,0,0,0,0,0,0,0,455,456,457,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + + obj.createentity(game, 216, 144, 10, 1, 254550); // (savepoint) + obj.createentity(game, -8, 60, 11, 136); // (horizontal gravity line) + obj.createentity(game, -8, 172, 11, 136); // (horizontal gravity line) + rcol = 5; + + roomname = "Standing Wave"; + break; + + case rn(54,54): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,288,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,446,447,447,447,447,447,447,447,447,447,447"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,68,68,68,68,68,68,68,68,68,68"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,67,67,67,67,67,67,67,67,67,67"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,366,367,367,367,367,367,367,367,367,367,367"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + + obj.createentity(game, -8, 60, 11, 336); // (horizontal gravity line) + obj.createentity(game, -8, 172, 11, 336); // (horizontal gravity line) + rcol=2; + + obj.fatal_top(); + roomname = "Topsy Turvyism"; + break; + + case rn(53,54): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,371,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,371,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,451,0,0,0,0,0,0,449,450,450,450,450,450,291,289,289,411,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,70,70,70,70,70,0,0,0,0,0,0,70,70,70,70,70,70,449,450,450,451,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,369,370,370,371,69,69,69,69,69,69,0,0,0,0,0,0,69,69,69,69,69,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,409,289,289,330,370,370,370,370,370,371,0,0,0,0,0,0,369,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,449,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,449,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 60, 11, 120); // (horizontal gravity line) + obj.createentity(game, -8, 172, 11, 40); // (horizontal gravity line) + obj.createentity(game, 264, 72, 10, 0, 254530); // (savepoint) + obj.createentity(game, 40, 144, 10, 1, 254531); // (savepoint) + obj.createentity(game, 160, 60, 11, 48); // (horizontal gravity line) + obj.createentity(game, 288, 60, 11, 40); // (horizontal gravity line) + obj.createentity(game, 112, 172, 11, 48); // (horizontal gravity line) + obj.createentity(game, 208, 172, 11, 120); // (horizontal gravity line) + rcol=3; + + obj.fatal_top(); + roomname = "Spike Strip Deployed"; + break; + + case rn(52,54): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 60, 11, 336); // (horizontal gravity line) + obj.createentity(game, -8, 172, 11, 336); // (horizontal gravity line) + obj.createentity(game, 72, 64, 1, 0, 8, 72, 64, 248, 168); // Enemy, bounded + obj.createentity(game, 232, 64, 1, 0, 8, 72, 64, 248, 168); // Enemy, bounded + obj.createentity(game, 152, 152, 1, 1, 8, 72, 64, 248, 168); // Enemy, bounded + + obj.fatal_top(); + roomname = "Vibrating String Problem"; + rcol = 5; + break; + + case rn(51,54): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,365,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,365,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 176, 60, 11, 152); // (horizontal gravity line) + obj.createentity(game, 176, 172, 11, 152); // (horizontal gravity line) + obj.createentity(game, -8, 84, 11, 160); // (horizontal gravity line) + obj.createentity(game, -8, 148, 11, 160); // (horizontal gravity line) + obj.createentity(game, 160-4, 120, 10, 1, 254510); // (savepoint) + rcol=1; + + obj.fatal_top(); + roomname = "Merge"; + break; + + case rn(50,54): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, -8, 84, 11, 336); // (horizontal gravity line) + obj.createentity(game, -8, 148, 11, 336); // (horizontal gravity line) + obj.createentity(game, 88, 96, 1, 3, 3); // Enemy + obj.createentity(game, 40, 120, 1, 3, 3); // Enemy + obj.createentity(game, 136, 120, 1, 3, 3); // Enemy + rcol = 0; + + obj.fatal_top(); + + roomname = "Kids His Age Bounce"; + break; + + case rn(49,54): + + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,287,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,310,352,368,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,56,390,55,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,390,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,310,392,448,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,470,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,390,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 264, 84, 11, 64); // (horizontal gravity line) + obj.createentity(game, 240+4, 96, 10, 0, 254490); // (savepoint) + obj.createentity(game, 48, 28, 11, 192); // (horizontal gravity line) + obj.createentity(game, 120, 148, 11, 208); // (horizontal gravity line) + rcol=2; + + roomname = "I'm Sorry"; + break; + + + case rn(49,55): + + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,468,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,428,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,60,467,59,0,0,0,0,0,0,60,467,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,373,373,373,373,373,373"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,333,374,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,372,334,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,333,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + + obj.createentity(game, 48, 156, 11, 200); // (horizontal gravity line) + obj.createentity(game, 216, 56, 10, 0, 255490); // (savepoint) + rcol=4; + + roomname = "Please Forgive Me!"; + break; + + case rn(50,55): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("364,364,364,364,364,364,364,364,364,354,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,355,364,364"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,443,444,444"); + tmap.push_back("444,444,444,444,444,444,444,444,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("364,364,364,364,364,364,364,364,364,365,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,405,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,363,364,364"); + tmap.push_back("283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.createentity(game, 131, 48, 12, 152); // (vertical gravity line) + obj.createentity(game, 179, 48, 12, 152); // (vertical gravity line) + obj.createentity(game, 227, 48, 12, 152); // (vertical gravity line) + obj.createentity(game, 275, 48, 12, 152); // (vertical gravity line) + rcol=1; + + roomname = "Playing Foosball"; + break; + + case rn(51,55): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("376,376,376,376,376,357,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,358,376,376,376,376"); + tmap.push_back("456,456,456,456,456,457,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,455,456,456,456,456"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,416,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,416,61,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,416,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,62,416,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("376,376,376,376,376,377,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,375,376,376,376,376"); + tmap.push_back("295,295,295,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + + obj.createentity(game, 91, 168, 12, 32); // (vertical gravity line) + obj.createentity(game, 139, 80, 12, 120); // (vertical gravity line) + obj.createentity(game, 235, 104, 12, 96); // (vertical gravity line) + obj.createentity(game, 187, 144, 12, 56); // (vertical gravity line) + obj.createentity(game, 43, 48, 12, 152); // (vertical gravity line) + obj.createentity(game, 91, 48, 12, 112); // (vertical gravity line) + obj.createentity(game, 139, 48, 12, 24); // (vertical gravity line) + obj.createentity(game, 187, 48, 12, 88); // (vertical gravity line) + obj.createentity(game, 235, 48, 12, 48); // (vertical gravity line) + obj.createentity(game, 283, 48, 12, 152); // (vertical gravity line) + obj.createentity(game, 8, 48, 10, 0, 255510); // (savepoint) + rcol=5; + + roomname = "A Difficult Chord"; + break; + + case rn(52,55): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("361,361,345,305,305,305,305,346,361,345,305,305,305,305,305,346,361,345,305,305,305,305,305,346,361,345,305,305,305,305,305,346,361,361,361,361,361,361,361,361"); + tmap.push_back("441,441,442,64,64,64,64,440,344,442,64,64,64,64,64,440,344,442,64,64,64,64,64,440,344,442,64,64,64,64,64,440,282,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,464,0,0,0,0,0,0,52,424,51,0,0,0,0,0,64,464,64,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,384,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,384,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,52,424,51,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); + tmap.push_back("361,361,361,361,361,361,361,361,479,362,63,63,63,63,63,360,466,51,0,0,0,0,0,52,465,362,63,63,63,63,63,360,322,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,321,361,361,361,361,361,322,402,51,0,0,0,0,0,52,400,321,361,361,361,361,361,322,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + + obj.createentity(game, 16, 184, 10, 1, 255520); // (savepoint) + obj.createentity(game, 131, 88, 12, 96); // (vertical gravity line) + obj.createentity(game, 208, 180, 11, 40); // (horizontal gravity line) + obj.createentity(game, 67, 56, 12, 80); // (vertical gravity line) + obj.createentity(game, 195, 56, 12, 80); // (vertical gravity line) + rcol = 0; + + roomname = "The Living Dead End"; + break; + + case rn(52,56): + + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + rcol=3; + + roomname = "AAAAAA"; + break; + + case rn(52,57): + + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,287,447,447,447,288,286,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,286,287,447,447,447,288,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,68,68,68,406,286,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,286,408,68,68,68,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,446,288,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,287,448,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,68,406,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,408,68,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,446,447,447,447,447,448,55,0,0,0,0,0,56,446,447,447,447,447,448,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,68,68,68,68,68,68,0,0,0,0,0,0,0,68,68,68,68,68,68,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,366,367,367,367,368,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,366,367,328,286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,366,367,367,328,286,286,286,286,286,286,286,327,367,367,368,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,446,447,288,286,286,286,286,286,286,286,286,286,287,447,448,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,68,68,446,447,288,286,286,286,286,286,287,447,448,68,68,0,0,0,0,0,0,406,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,327,368,0,0,0,0,0,0,0,68,68,446,447,288,286,287,447,448,68,68,0,0,0,0,0,0,0,366,328,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,68,68,446,447,448,68,68,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,327,368,0,0,0,0,0,0,0,0,0,0,68,68,68,0,0,0,0,0,0,0,0,0,0,366,328,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,327,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,328,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,328,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,366,367,328,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,368,0,0,0,0,0,366,367,328,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + rcol = 2; + + roomname = "Diode"; + break; + + + case rn(50,52): + + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("281,441,441,441,441,282,281,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,282,280,280"); + tmap.push_back("402,0,0,0,0,400,402,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,440,282,280"); + tmap.push_back("402,0,0,0,0,400,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("402,0,0,0,0,400,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("402,0,0,0,0,440,442,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("321,361,361,361,361,361,361,361,361,362,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,360,361,361,361,345,306,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,384,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,402,0,0,63,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,402,0,0,384,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,402,0,0,424,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,402,0,0,424,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,402,0,0,424,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,402,63,63,424,63,63,63,63,63,63,63,63,63,63,424,63,63,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,321,361,361,479,361,361,361,361,361,361,361,361,361,361,479,361,361,322,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,281,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,385,306,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); + tmap.push_back("280,280,280,280,280,280,280,280,402,0,0,0,0,0,360,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,322,280"); + tmap.push_back("280,280,280,280,280,280,280,280,402,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,402,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + + obj.createentity(game, 267, 24, 12, 184); // (vertical gravity line) + obj.createentity(game, 16, 24, 9, 9); // (shiny trinket) + obj.createentity(game, 187, 24, 12, 64); // (vertical gravity line) + obj.createentity(game, 104, 124, 11, 80); // (horizontal gravity line) + obj.createentity(game, 48, 72, 10, 1, 252500); // (savepoint) + obj.createentity(game, 224, 72, 10, 1, 252501); // (savepoint) + obj.createentity(game, 99, 24, 12, 80); // (vertical gravity line) + rcol=0; + + roomname = "Young Man, It's Worth the Challenge"; + break; + + case rn(53,55): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("367,367,367,367,367,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,360,361,362,372,373,374,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,402,412,292,414,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("447,447,447,447,288,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,402,412,292,414,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("364,364,364,365,406,286,408,0,0,0,0,0,0,0,0,0,0,360,361,362,0,0,0,0,400,280,402,452,453,454,0,0,0,0,366,367,367,368,0,0"); + tmap.push_back("283,283,283,405,406,286,408,0,0,0,0,0,0,0,0,0,0,400,280,402,0,0,0,0,400,280,321,361,361,362,0,0,0,0,406,286,286,408,0,0"); + tmap.push_back("283,283,283,405,406,286,408,0,0,0,0,0,0,0,0,0,0,400,280,402,0,0,0,0,440,441,441,282,280,402,0,0,0,0,406,286,286,408,0,0"); + tmap.push_back("283,283,283,405,406,286,408,0,0,0,0,369,370,371,360,361,361,322,280,402,0,0,0,0,0,0,0,400,280,402,0,0,0,0,406,286,286,408,0,0"); + tmap.push_back("283,283,283,405,406,286,408,0,0,0,0,409,289,411,400,280,280,280,280,402,0,0,0,0,0,0,0,400,280,402,0,0,0,0,406,286,286,408,0,0"); + tmap.push_back("283,283,283,405,446,447,448,0,0,0,0,409,289,411,440,441,441,441,441,442,0,0,0,0,0,0,0,440,441,442,0,0,0,0,406,286,286,408,0,0"); + tmap.push_back("283,283,283,324,364,364,365,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0"); + tmap.push_back("283,283,283,283,283,283,405,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0"); + tmap.push_back("283,283,283,283,283,283,405,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,363,364,364,364,364,365,0,0,0,0,406,287,447,448,0,0"); + tmap.push_back("283,283,283,283,283,283,405,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,443,444,285,283,283,405,0,0,0,0,406,408,375,377,0,0"); + tmap.push_back("444,444,444,444,444,444,445,0,0,0,0,409,289,411,0,0,0,369,370,370,370,370,370,370,370,371,403,284,444,445,0,0,0,0,406,408,415,417,0,0"); + tmap.push_back("373,373,373,373,373,373,374,0,0,0,0,409,289,411,0,0,0,409,289,290,450,450,450,450,450,451,403,405,0,0,0,0,0,0,406,408,415,417,0,0"); + tmap.push_back("292,292,292,292,292,292,414,375,376,376,377,409,289,411,0,0,0,409,289,411,363,364,364,364,364,364,325,405,0,0,0,0,0,0,406,408,415,417,0,0"); + tmap.push_back("292,292,292,293,453,453,454,415,295,295,417,409,289,411,0,0,0,449,450,451,443,444,444,444,444,444,444,445,0,0,0,0,0,0,446,448,415,336,376,376"); + tmap.push_back("292,292,292,414,360,361,362,415,295,295,417,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,337,295,295,295"); + tmap.push_back("292,292,292,414,400,280,402,415,295,295,417,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295"); + tmap.push_back("292,292,292,414,400,280,402,455,456,456,457,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295"); + tmap.push_back("292,292,292,414,400,280,321,361,361,361,362,409,289,330,370,370,370,370,370,370,370,370,370,370,371,375,376,376,376,376,376,337,295,295,295,295,295,295,295,295"); + tmap.push_back("292,292,292,414,400,280,280,280,280,280,402,409,289,289,289,289,289,289,289,290,450,450,450,450,451,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("292,292,292,414,400,280,280,280,280,280,402,409,289,289,289,289,289,289,289,411,375,376,376,376,376,337,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("292,292,292,414,400,280,280,280,280,280,402,409,289,289,289,289,289,289,289,411,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + + rcol = 6; + + roomname = "Anomaly"; + break; + + case rn(54,55): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,417,412,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,417,412,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,296,456,457,412,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,417,372,373,334,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,296,456,457,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,417,372,373,334,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,296,456,457,412,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,417,372,373,334,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,296,456,457,412,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,372,373,334,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,455,457,412,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,334,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,334,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,334,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,360,361,361,361,361,362,0,0,0,0,0,366,368,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,402,0,0,0,0,0,406,408,452,453,453,453,294,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("370,370,370,371,366,367,367,368,363,364,365,440,282,280,280,281,442,363,364,365,366,367,328,408,369,370,370,371,452,453,294,292,292,292,292,292,292,292,292,292"); + tmap.push_back("289,289,289,411,406,286,286,408,403,283,324,365,440,282,281,442,363,325,283,405,406,286,286,408,409,289,289,330,370,371,452,453,294,292,292,292,292,292,292,292"); + tmap.push_back("289,289,289,411,446,288,286,408,443,285,283,324,365,440,442,363,325,283,284,445,406,286,287,448,409,289,289,289,289,330,370,371,452,453,294,292,292,292,292,292"); + tmap.push_back("289,289,289,330,371,446,288,327,368,443,285,283,324,364,364,325,283,284,445,366,328,287,448,369,331,289,289,289,289,289,289,330,370,371,452,453,294,292,292,292"); + tmap.push_back("289,289,289,289,330,371,406,286,327,368,443,444,285,283,283,284,444,445,366,328,286,408,369,331,289,289,289,289,289,289,289,289,289,330,370,371,452,453,294,292"); + tmap.push_back("289,289,289,289,289,411,446,288,286,327,367,368,443,444,444,445,366,367,328,286,287,448,409,289,289,289,289,289,289,289,289,289,289,289,289,330,370,371,452,453"); + tmap.push_back("289,289,289,289,289,330,371,446,447,288,286,327,367,367,367,367,328,286,287,447,448,369,331,289,289,289,289,289,289,289,289,289,289,289,289,289,289,330,370,370"); + tmap.push_back("289,289,289,289,289,289,330,370,371,406,286,286,286,286,286,286,286,286,408,369,370,331,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + + obj.createentity(game, 104, 128, 9, 11); // (shiny trinket) + rcol = 6; + + roomname = "Purest Unobtainium"; + break; + + + case rn(52,58): + + tmap.push_back("295,295,295,295,295,417,0,415,295,295,295,295,295,295,295,295,295,417,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,295,295,295,295,295,295,295,417,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,295,295,295,295,295,295,295,417,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,296,456,456,456,456,456,456,457,0,0,0,0,0,455,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,375,376,376,376,376,377,0,0,0,0,0,375,376,376,376,376,376,376,376,376,376,377,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,295,295,295,417,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,296,456,456,457,0,0,0,0,0,455,456,456,456,456,456,456,456,297,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,375,377,0,0,0,0,0,375,376,376,376,376,376,377,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,455,456,456,456,456,297,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,0,0,0,0,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,375,376,376,377,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,455,456,297,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,0,0,415,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,396,0,415,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,476,0,415,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,0,0,415,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,375,376,337,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("456,456,456,456,456,457,0,455,456,456,457,0,455,456,457,0,455,457,0,0,0,0,0,455,456,456,457,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,337,417,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,455,456,456,456,456,456,457,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,417,0,415,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,376,376,376,337,295,417,0,415,295,295,295,295"); + tmap.push_back("376,376,376,376,376,377,0,375,376,376,377,0,375,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295,295,295,295,295,295,417,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,457,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,295,417,0,415,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295"); + + obj.createentity(game, 112, 184, 10, 1, 258520); // (savepoint) + rcol = 5; + + roomname = "I Smell Ozone"; + break; + + case rn(51,58): + + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + rcol=0; + + if(!game.intimetrial) + { + if(game.companion==0 && obj.flags[9]==0 && !game.crewstats[5]) //also need to check if he's rescued in a previous game + { + obj.createentity(game, 32, 177, 18, 16, 1, 17, 1); + obj.createblock(1, 24*8, 0, 32, 240, 33); + } + } + + roomname = "Why So Blue?"; + + break; + + case rn(50,58): + + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,290,450,450,450,450,450,450,450,450,450,291,289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,369,331,289,289,289,330,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,449,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,369,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,330,370,370,370,331,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,290,450,450,450,291,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,449,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,369,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,449,291,289,289,289,290,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,330,370,370,370,370,370,370,370,370,370,331,289,289,289,330,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + rcol=3; + + + obj.createentity(game, (10 * 8)-4, (8 * 8) + 4, 14); //Teleporter! + + if(game.intimetrial) + { + obj.createblock(1, 280, 0, 32, 240, 82); + } + + roomname = "Philadelphia Experiment"; + break; + + + + default: + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + roomname = "Outer Space"; + + game.test = true; + game.teststring = "ERROR: Map not found in Lab Area"; + break; + } + + return tmap; +} diff --git a/desktop_version/src/Labclass.h b/desktop_version/src/Labclass.h new file mode 100644 index 00000000..faeaf1a5 --- /dev/null +++ b/desktop_version/src/Labclass.h @@ -0,0 +1,18 @@ +#ifndef LABCLASS_H +#define LABCLASS_H + +#include "Game.h" +#include "Entity.h" + +#include +#include + +class labclass +{ +public: + std::vector loadlevel(int rx, int ry , Game& game, entityclass& obj); + + std::string roomname; + int coin, rcol; +}; +#endif /* LABCLASS_H */ diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp new file mode 100644 index 00000000..5a339fbc --- /dev/null +++ b/desktop_version/src/Logic.cpp @@ -0,0 +1,1547 @@ +#include "Logic.h" +#include "Network.h" + +extern int temp; + +void titlelogic( Graphics& dwgfx, Game& game, entityclass& obj, UtilityClass& help, musicclass& music, mapclass& map) +{ + //Misc + //map.updatetowerglow(); + help.updateglow(); + + map.bypos -= 2; + map.bscroll = -2; + //if (map.ypos <= 0) { map.ypos = 0; map.bypos = 0; map.bscroll = 0; } + //if (map.ypos >= 5368) { map.ypos = 5368; map.bypos = map.ypos / 2; } //700-29 * 8 = 5368 + + if (game.menucountdown > 0) + { + game.menucountdown--; + if (game.menucountdown == 0) + { + if (game.menudest == "mainmenu") + { + music.play(6); + } + else if (game.menudest == "gameover2") + { + music.playef(11, 10); + } + else if (game.menudest == "timetrialcomplete3") + { + music.playef(3, 10); + } + game.createmenu(game.menudest); + } + } +} + +void maplogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help) +{ + //Misc + help.updateglow(); +} + + +void gamecompletelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help) +{ + //Misc + map.updatetowerglow(); + help.updateglow(); + dwgfx.crewframe = 0; + + map.tdrawback = true; + + game.creditposition--; + if (game.creditposition <= -1650) + { + game.creditposition = -1650; + map.bscroll = 0; + } + else + { + map.bypos += 1; + map.bscroll = +1; + } + + if (dwgfx.fademode == 1) + { + //Fix some graphical things + dwgfx.showcutscenebars = false; + dwgfx.cutscenebarspos = 0; + //Return to game + game.gamestate = 7; + dwgfx.fademode = 4; + } +} + +void gamecompletelogic2(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help) +{ + //Misc + map.updatetowerglow(); + help.updateglow(); + + game.creditposdelay--; + if (game.creditposdelay <= 0) + { + game.creditposdelay = 1; + game.creditposx++; + if (game.creditposx > 40) + { + game.creditposy++; + game.creditposx = 0; + if (game.creditposy > 30) game.creditposy = 30; + } + } + /* + game.creditposition--; + if (game.creditposition <= -1650) { + game.creditposition = -1650; + map.bscroll = 0; + }else { + map.bypos += 1; map.bscroll = +1; + } + */ + + if (dwgfx.fademode == 1) + { + //Fix some graphical things + dwgfx.showcutscenebars = false; + dwgfx.cutscenebarspos = 0; + //Fix the save thingy + game.deletequick(); + int tmp=music.currentsong; + music.currentsong=4; + game.savetele(map,obj,music); + music.currentsong=tmp; + game.telegotoship(); + //Return to game + map.colstate = 10; + game.gamestate = 1; + dwgfx.fademode = 4; + music.playef(18, 10); + game.createmenu("gamecompletecontinue"); + map.nexttowercolour(); + } +} + + +void towerlogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help) +{ + //Logic for the tower level + map.updatetowerglow(); + help.updateglow(); + + if(!game.completestop) + { + if (map.cameramode == 0) + { + //do nothing! + //a trigger will set this off in the game + map.cameramode = 1; + map.bscroll = 0; + } + else if (map.cameramode == 1) + { + //move normally + if(map.scrolldir==0) + { + map.ypos -= 2; + map.bypos -= 1; + map.bscroll = -1; + } + else + { + map.ypos += 2; + map.bypos += 1; + map.bscroll = 1; + } + } + else if (map.cameramode == 2) + { + //do nothing, but cycle colours (for taking damage) + map.bscroll = 0; + } + else if (map.cameramode == 4) + { + int i = obj.getplayer(); + map.cameraseek = map.ypos - (obj.entities[i].yp - 120); + + map.cameraseek = map.cameraseek / 10; + map.cameraseekframe = 10; + + map.cameramode = 5; + + map.bscroll = map.cameraseek/2; + } + else if (map.cameramode == 5) + { + //actually do it + if (map.spikeleveltop > 0) map.spikeleveltop-=2; + if (map.spikelevelbottom > 0) map.spikelevelbottom-=2; + if (map.cameraseekframe > 0) + { + int i = obj.getplayer(); + map.ypos -= map.cameraseek; + if (map.cameraseek > 0) + { + if (map.ypos < obj.entities[i].yp - 120) + { + map.ypos = obj.entities[i].yp - 120; + } + } + else + { + if (map.ypos > obj.entities[i].yp - 120) + { + map.ypos = obj.entities[i].yp - 120; + } + } + map.cameraseekframe--; + map.bypos = map.ypos / 2; + } + else + { + int i = obj.getplayer(); + map.ypos = obj.entities[i].yp - 120; + map.bypos = map.ypos / 2; + map.cameramode = 0; + map.colsuperstate = 0; + } + } + } + else + { + map.bscroll = 0; + } + + if (map.ypos <= 0) + { + map.ypos = 0; + map.bypos = 0; + map.bscroll = 0; + } + if (map.minitowermode) + { + if (map.ypos >= 568) + { + map.ypos = 568; + map.bypos = map.ypos / 2; + map.bscroll = 0; + } //100-29 * 8 = 568 + } + else + { + if (map.ypos >= 5368) + { + map.ypos = 5368; //700-29 * 8 = 5368 + map.bypos = map.ypos / 2.0; + } + } + + if (game.lifeseq > 0) + { + if (map.cameramode == 2) + { + map.cameraseekframe = 20; + map.cameramode = 4; + map.resumedelay = 4; + } + + if (map.cameraseekframe <= 0) + { + if (map.resumedelay <= 0) + { + game.lifesequence(obj); + if (game.lifeseq == 0) map.cameramode = 1; + } + else + { + map.resumedelay--; + } + } + } + + if (game.deathseq != -1) + { + map.colsuperstate = 1; //cause the palette to go spastic! + map.cameramode = 2; + game.deathsequence(map, obj, music); + game.deathseq--; + if (game.deathseq <= 0) + { + if (game.nodeathmode) + { + game.deathseq = 1; + game.gethardestroom(map); + //start depressing sequence here... + if (game.gameoverdelay <= -10 && dwgfx.fademode==0) dwgfx.fademode = 2; + if (dwgfx.fademode == 1) script.resetgametomenu(dwgfx, game, map, obj, help, music); + } + else + { + if (game.currentroomdeaths > game.hardestroomdeaths) + { + game.hardestroomdeaths = game.currentroomdeaths; + game.hardestroom = map.roomname; + } + + game.gravitycontrol = game.savegc; + dwgfx.textboxremove(); + map.resetplayer(dwgfx, game, obj, music); + } + } + } + else + { + //State machine for game logic + game.updatestate(dwgfx, map, obj, help, music); + + + //Time trial stuff + if (game.intimetrial) + { + if (game.timetrialcountdown > 0) + { + game.hascontrol = true; + game.timetrialcountdown--; + if (game.timetrialcountdown > 30) + { + game.hascontrol = false; + } + if(game.timetrialcountdown == 120) music.playef(21, 10); + if(game.timetrialcountdown == 90) music.playef(21, 10); + if(game.timetrialcountdown == 60) music.playef(21, 10); + if (game.timetrialcountdown == 30) + { + switch(game.timetriallevel) + { + case 0: + music.play(1); + break; + case 1: + music.play(3); + break; + case 2: + music.play(2); + break; + case 3: + music.play(1); + break; + case 4: + music.play(12); + break; + case 5: + music.play(15); + break; + } + music.playef(22, 10); + } + } + + //Have we lost the par? + if (!game.timetrialparlost) + { + if ((game.minutes * 60) + game.seconds > game.timetrialpar) + { + game.timetrialparlost = true; + int i = obj.getplayer(); + if (i > -1) + { + obj.entities[i].tile = 144; + } + music.playef(2, 10); + } + } + } + //Update entities + + if(!game.completestop) + { + for (int i = obj.nentity - 1; i >= 0; i--) + { + //Remove old platform + //if (obj.entities[i].isplatform) obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp); + + obj.updateentities(i, help, game, music); // Behavioral logic + obj.updateentitylogic(i, game); // Basic Physics + obj.entitymapcollision(i, map); // Collisions with walls + + //Create new platform + //if (obj.entities[i].isplatform) obj.movingplatformfix(i, map); + } + + obj.entitycollisioncheck(dwgfx, game, map, music); // Check ent v ent collisions, update states + //special for tower: is the player touching any spike blocks? + int player = obj.getplayer(); + if(obj.checktowerspikes(player, map) && dwgfx.fademode==0) + { + game.deathseq = 30; + } + + //Right so! Screenwraping for tower: + if (map.minitowermode) + { + if (map.scrolldir == 1) + { + //This is minitower 1! + player = obj.getplayer(); + if (game.door_left > -2 && obj.entities[player].xp < -14) + { + obj.entities[player].xp += 320; + map.gotoroom(48, 52, dwgfx, game, obj, music); + } + if (game.door_right > -2 && obj.entities[player].xp >= 308) + { + obj.entities[player].xp -= 320; + obj.entities[player].yp -= (71*8); + map.gotoroom(game.roomx + 1, game.roomy+1, dwgfx, game, obj, music); + } + } + else + { + //This is minitower 2! + player = obj.getplayer(); + if (game.door_left > -2 && obj.entities[player].xp < -14) + { + if (obj.entities[player].yp > 300) + { + obj.entities[player].xp += 320; + obj.entities[player].yp -= (71 * 8); + map.gotoroom(50, 54, dwgfx, game, obj, music); + } + else + { + obj.entities[player].xp += 320; + map.gotoroom(50, 53, dwgfx, game, obj, music); + } + } + if (game.door_right > -2 && obj.entities[player].xp >= 308) + { + obj.entities[player].xp -= 320; + map.gotoroom(52, 53, dwgfx, game, obj, music); + } + } + } + else + { + //Always wrap except for the very top and very bottom of the tower + if(map.ypos>=500 && map.ypos <=5000) + { + for (int i = 0; i < obj.nentity; i++) + { + if (obj.entities[i].xp <= -10) + { + obj.entities[i].xp += 320; + } + else + { + if (obj.entities[i].xp > 310) + { + obj.entities[i].xp -= 320; + } + } + } + } + else + { + //Do not wrap! Instead, go to the correct room + player = obj.getplayer(); + if (game.door_left > -2 && obj.entities[player].xp < -14) + { + obj.entities[player].xp += 320; + obj.entities[player].yp -= (671 * 8); + map.gotoroom(108, 109, dwgfx, game, obj, music); + } + if (game.door_right > -2 && obj.entities[player].xp >= 308) + { + obj.entities[player].xp -= 320; + map.gotoroom(110, 104, dwgfx, game, obj, music); + } + } + } + + if(game.lifeseq==0) + { + int player = obj.getplayer(); + if(!map.invincibility) + { + if (obj.entities[player].yp-map.ypos <= 0) + { + game.deathseq = 30; + } + else if (obj.entities[player].yp-map.ypos >= 208) + { + game.deathseq = 30; + } + } + else + { + if (obj.entities[player].yp-map.ypos <= 0) + { + map.ypos-=10; + map.bypos = map.ypos / 2; + map.bscroll = 0; + } + else if (obj.entities[player].yp-map.ypos >= 208) + { + map.ypos+=2; + map.bypos = map.ypos / 2; + map.bscroll = 0; + } + } + + if (obj.entities[player].yp - map.ypos <= 40) + { + map.spikeleveltop++; + if (map.spikeleveltop >= 8) map.spikeleveltop = 8; + } + else + { + if (map.spikeleveltop > 0) map.spikeleveltop--; + } + + if (obj.entities[player].yp - map.ypos >= 164) + { + map.spikelevelbottom++; + if (map.spikelevelbottom >= 8) map.spikelevelbottom = 8; + } + else + { + if (map.spikelevelbottom > 0) map.spikelevelbottom--; + } + + } + + + } + //now! let's clean up removed entities + obj.cleanup(); + + //Looping around, room change conditions! + } + + if (game.teleport_to_new_area) script.teleport(dwgfx, game, map, obj, help, music); +} + +void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help) +{ + //Misc + help.updateglow(); + + if (game.alarmon) + { + game.alarmdelay--; + if (game.alarmdelay <= 0) + { + music.playef(19); + game.alarmdelay = 20; + } + } + + if (obj.nearelephant) + { + obj.upset++; + if (obj.upset == 300) + { + obj.upsetmode = true; + //change player to sad + int i = obj.getplayer(); + obj.entities[i].tile = 144; + music.playef(2, 10); + } + if (obj.upset > 301) obj.upset = 301; + } + else if (obj.upsetmode) + { + obj.upset--; + if (obj.upset <= 0) + { + obj.upset = 0; + obj.upsetmode = false; + //change player to happy + int i = obj.getplayer(); + obj.entities[i].tile = 0; + } + } + else + { + obj.upset = 0; + } + + game.lifesequence(obj); + + + if (game.deathseq != -1) + { + for (int i = 0; i < obj.nentity; i++) + { + if (game.roomx == 111 && game.roomy == 107) + { + if (obj.entities[i].type == 1) + { + if (obj.entities[i].xp < 152) + { + obj.entities[i].xp = 152; + obj.entities[i].newxp = 152; + } + } + } + if (obj.entities[i].type == 2 && obj.entities[i].state == 3) + { + //Ok! super magical exception for the room with the intention death for the shiny trinket + //fix this when the maps are finalised + if (game.roomx != 111 && game.roomy != 107) + { + obj.entities[i].state = 4; + } + else + { + obj.entities[i].state = 4; + map.settile(18, 9, 59); + } + } + else if (obj.entities[i].type == 2 && obj.entities[i].state == 2) + { + //ok, unfortunate case where the disappearing platform hasn't fully disappeared. Accept a little + //graphical uglyness to avoid breaking the room! + while (obj.entities[i].state == 2) obj.updateentities(i, help, game, music); + obj.entities[i].state = 4; + } + else if (map.finalstretch && obj.entities[i].type == 2) + { + //TODO: }else if (map.finallevel && map.finalstretch && obj.entities[i].type == 2) { + //for the final level. probably something 99% of players won't see. + while (obj.entities[i].state == 2) obj.updateentities(i, help, game, music); + obj.entities[i].state = 4; + } + else if (obj.entities[i].type == 23 && game.swnmode && game.deathseq<15) + { + //if playing SWN, get the enemies offscreen. + obj.entities[i].xp += obj.entities[i].vx*5; + obj.entities[i].yp += obj.entities[i].vy*5; + } + } + if (game.swnmode) + { + //if playing SWN game a, push the clock back to the nearest 10 second interval + if (game.swngame == 0) + { + game.swnpenalty(); + } + else if (game.swngame == 1) + { + game.swnstate = 0; + game.swnstate2 = 0; + game.swnstate3 = 0; + game.swnstate4 = 0; + game.swndelay = 0; + if (game.swntimer >= game.swnrecord) + { + if (game.swnmessage == 0) music.playef(25, 10); + game.swnmessage = 1; + game.swnrecord = game.swntimer; + } + } + } + + game.deathsequence(map, obj, music); + game.deathseq--; + if (game.deathseq <= 0) + { + if (game.nodeathmode) + { + game.deathseq = 1; + game.gethardestroom(map); + //start depressing sequence here... + if (game.gameoverdelay <= -10 && dwgfx.fademode==0) dwgfx.fademode = 2; + if (dwgfx.fademode == 1) script.resetgametomenu(dwgfx, game, map, obj, help, music); + } + else + { + if (game.swnmode) + { + //if playing SWN game b, reset the clock + if (game.swngame == 1) + { + game.swntimer = 0; + game.swnmessage = 0; + game.swnrank = 0; + } + } + + game.gethardestroom(map); + game.activetele = false; + game.hascontrol = true; + + + game.gravitycontrol = game.savegc; + dwgfx.textboxremove(); + map.resetplayer(dwgfx, game, obj, music); + } + } + } + else + { + //Update colour thingy + if (map.finalmode) + { + if (map.final_colormode) + { + if (map.final_colorframe > 0) + { + map.final_colorframedelay--; + if (map.final_colorframedelay <= 0) + { + if (map.final_colorframe == 1) + { + map.final_colorframedelay = 40; + temp = 1+int(fRandom() * 6); + if (temp == map.final_mapcol) temp = (temp + 1) % 6; + if (temp == 0) temp = 6; + map.changefinalcol(temp, obj,game); + } + else if (map.final_colorframe == 2) + { + map.final_colorframedelay = 15; + temp = 1+int(fRandom() * 6); + if (temp == map.final_mapcol) temp = (temp + 1) % 6; + if (temp == 0) temp = 6; + map.changefinalcol(temp, obj,game); + } + } + } + } + } + //State machine for game logic + game.updatestate(dwgfx, map, obj, help, music); + if (game.startscript) + { + script.load(game.newscript); + game.startscript = false; + } + + //Intermission 1 Logic + //Player can't walk off a screen with SCM on it until they've left + if (game.supercrewmate) + { + if (game.roomx == 41 + game.scmprogress) //he's in the same room + { + int i = obj.getplayer(); + if (obj.entities[i].ax > 0 && obj.entities[i].xp > 280) + { + obj.entities[i].ax = 0; + obj.entities[i].dir = 0; + } + } + } + + //SWN Minigame Logic + if (game.swnmode) //which game? + { + if(game.swngame==0) //intermission, survive 60 seconds game + { + game.swntimer -= 1; + if (game.swntimer <= 0) + { + music.niceplay(8); + game.swngame = 5; + } + else + { + obj.generateswnwave(game, help, 0); + } + } + else if(game.swngame==1) //super gravitron game + { + game.swntimer += 1; + if (game.swntimer > game.swnrecord) game.swnrecord = game.swntimer; + + if (game.swntimer >= 150 && game.swnrank == 0) + { + game.swnrank = 1; + if (game.swnbestrank < 1) + { + NETWORK_unlockAchievement("vvvvvvsupgrav5"); + game.swnbestrank = 1; + game.swnmessage = 2+30; + music.playef(26, 10); + } + } + else if (game.swntimer >= 300 && game.swnrank == 1) + { + game.swnrank = 2; + if (game.swnbestrank < 2) + { + NETWORK_unlockAchievement("vvvvvvsupgrav10"); + game.swnbestrank = 2; + game.swnmessage = 2+30; + music.playef(26, 10); + } + } + else if (game.swntimer >= 450 && game.swnrank == 2) + { + game.swnrank = 3; + if (game.swnbestrank < 3) + { + NETWORK_unlockAchievement("vvvvvvsupgrav15"); + game.swnbestrank = 3; + game.swnmessage = 2+30; + music.playef(26, 10); + } + } + else if (game.swntimer >= 600 && game.swnrank == 3) + { + game.swnrank = 4; + if (game.swnbestrank < 4) + { + NETWORK_unlockAchievement("vvvvvvsupgrav20"); + game.swnbestrank = 4; + game.swnmessage = 2+30; + music.playef(26, 10); + } + } + else if (game.swntimer >= 900 && game.swnrank == 4) + { + game.swnrank = 5; + if (game.swnbestrank < 5) + { + NETWORK_unlockAchievement("vvvvvvsupgrav30"); + game.swnbestrank = 5; + game.swnmessage = 2+30; + music.playef(26, 10); + } + } + else if (game.swntimer >= 1800 && game.swnrank == 5) + { + game.swnrank = 6; + if (game.swnbestrank < 6) + { + NETWORK_unlockAchievement("vvvvvvsupgrav60"); + game.swnbestrank = 6; + game.swnmessage = 2+30; + music.playef(26, 10); + } + } + + obj.generateswnwave(game, help, 1); + + game.swncoldelay--; + if(game.swncoldelay<=0) + { + game.swncolstate = (game.swncolstate+1)%6; + game.swncoldelay = 30; + dwgfx.rcol = game.swncolstate; + obj.swnenemiescol(game.swncolstate); + } + } + else if (game.swngame == 2) //introduce game a + { + game.swndelay--; + if (game.swndelay <= 0) + { + game.swngame = 0; + game.swndelay = 0; + game.swntimer = (60 * 30) - 1; + //game.swntimer = 15; + } + } + else if (game.swngame == 3) //extend line + { + obj.entities[obj.getlineat(84 - 32)].w += 24; + if (obj.entities[obj.getlineat(84 - 32)].w > 332) + { + obj.entities[obj.getlineat(84 - 32)].w = 332; + game.swngame = 2; + } + } + else if (game.swngame == 4) //create top line + { + game.swngame = 3; + obj.createentity(game, -8, 84 - 32, 11, 8); // (horizontal gravity line) + music.niceplay(2); + game.swndeaths = game.deathcounts; + } + else if (game.swngame == 5) //remove line + { + obj.entities[obj.getlineat(148 + 32)].xp += 24; + if (obj.entities[obj.getlineat(148 + 32)].xp > 320) + { + obj.entities[obj.getlineat(148 + 32)].active = false; + game.swnmode = false; + game.swngame = 6; + } + } + else if (game.swngame == 6) //Init the super gravitron + { + game.swngame = 7; + music.niceplay(3); + } + else if (game.swngame == 7) //introduce game b + { + game.swndelay--; + if (game.swndelay <= 0) + { + game.swngame = 1; + game.swndelay = 0; + game.swntimer = 0; + game.swncolstate = 3; + game.swncoldelay = 30; + } + } + } + + //Time trial stuff + if (game.intimetrial) + { + + if (game.timetrialcountdown > 0) + { + game.timetrialparlost = false; + game.hascontrol = true; + game.timetrialcountdown--; + if (game.timetrialcountdown > 30) + { + game.hascontrol = false; + } + if(game.timetrialcountdown == 120) music.playef(21, 10); + if(game.timetrialcountdown == 90) music.playef(21, 10); + if(game.timetrialcountdown == 60) music.playef(21, 10); + if (game.timetrialcountdown == 30) + { + switch(game.timetriallevel) + { + case 0: + music.play(1); + break; + case 1: + music.play(3); + break; + case 2: + music.play(2); + break; + case 3: + music.play(1); + break; + case 4: + music.play(12); + break; + case 5: + music.play(15); + break; + } + music.playef(22, 10); + } + } + + //Have we lost the par? + if (!game.timetrialparlost) + { + if ((game.minutes * 60) + game.seconds > game.timetrialpar) + { + game.timetrialparlost = true; + int i = obj.getplayer(); + if (i > -1) + { + obj.entities[i].tile = 144; + } + music.playef(2, 10); + } + } + } + + //Update entities + //Ok, moving platform fuckers + if(!game.completestop) + { + if(obj.vertplatforms) + { + for (int i = obj.nentity - 1; i >= 0; i--) + { + if (obj.entities[i].isplatform) + { + if(abs(obj.entities[i].vx) < 0.000001f) + { + obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp); + + obj.updateentities(i, help, game, music); // Behavioral logic + obj.updateentitylogic(i, game); // Basic Physics + obj.entitymapcollision(i, map); // Collisions with walls + + obj.createblock(0, obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); + if (game.supercrewmate) + { + obj.movingplatformfix(i, map); + obj.scmmovingplatformfix(i, map); + } + else + { + obj.movingplatformfix(i, map); + } + } + } + } + } + + if(obj.horplatforms) + { + for (int ie = obj.nentity - 1; ie >= 0; ie--) + { + if (obj.entities[ie].isplatform) + { + if(abs(obj.entities[ie].vy) < 0.000001f) + { + obj.removeblockat(obj.entities[ie].xp, obj.entities[ie].yp); + + obj.updateentities(ie, help, game, music); // Behavioral logic + obj.updateentitylogic(ie, game); // Basic Physics + obj.entitymapcollision(ie, map); // Collisions with walls + + obj.hormovingplatformfix(ie, map); + } + } + } + //is the player standing on a moving platform? + int i = obj.getplayer(); + float j = obj.entitycollideplatformfloor(map, i); + if (j > -1000) + { + obj.entities[i].newxp = obj.entities[i].xp + j; + obj.entitymapcollision(i, map); + } + else + { + j = obj.entitycollideplatformroof(map, i); + if (j > -1000) + { + obj.entities[i].newxp = obj.entities[i].xp + j; + obj.entitymapcollision(i, map); + } + } + } + + for (int ie = obj.nentity - 1; ie >= 0; ie--) + { + if (!obj.entities[ie].isplatform) + { + obj.updateentities(ie, help, game, music); // Behavioral logic + obj.updateentitylogic(ie, game); // Basic Physics + obj.entitymapcollision(ie, map); // Collisions with walls + } + } + + obj.entitycollisioncheck(dwgfx, game, map, music); // Check ent v ent collisions, update states + } + + //now! let's clean up removed entities + obj.cleanup(); + + //Using warplines? + if (obj.customwarpmode) { + //Rewritten system for mobile update: basically, the new logic is to + //check if the player is leaving the map, and if so do a special check against + //warp lines for collision + obj.customwarpmodehon = false; + obj.customwarpmodevon = false; + + int i = obj.getplayer(); + if ((game.door_down > -2 && obj.entities[i].yp >= 226-16) || (game.door_up > -2 && obj.entities[i].yp < -2+16) || (game.door_left > -2 && obj.entities[i].xp < -14+16) || (game.door_right > -2 && obj.entities[i].xp >= 308-16)){ + //Player is leaving room + obj.customwarplinecheck(i); + } + + if(obj.customwarpmodehon){ map.warpy=true; + }else{ map.warpy=false; } + if(obj.customwarpmodevon){ map.warpx=true; + }else{ map.warpx=false; } + } + + //Finally: Are we changing room? + if (map.warpx && map.warpy) + { + for (int i = 0; i < obj.nentity; i++) + { + if(obj.entities[i].type<50){ //Don't warp warp lines + if (obj.entities[i].size < 12) //Don't wrap SWN enemies + { + if (obj.entities[i].xp <= -10) + { + obj.entities[i].xp += 320; + } + else + { + if (obj.entities[i].xp > 310) + { + obj.entities[i].xp -= 320; + } + } + } + } + } + + for (int i = 0; i < obj.nentity; i++) + { + + if(obj.entities[i].type<50){ //Don't warp warp lines + if (obj.entities[i].size < 12) //Don't wrap SWN enemies + { + if (obj.entities[i].yp <= -12) + { + obj.entities[i].yp += 232; + } + else + { + if (obj.entities[i].yp > 226) + { + obj.entities[i].yp -= 232; + } + } + } + } + } + } + else if (map.warpx) + { + for (int i = 0; i < obj.nentity; i++) + { + if(obj.entities[i].type<50){ //Don't warp warp lines + if (obj.entities[i].size < 12) //Don't wrap SWN enemies + { + if (game.roomx == 118 && game.roomy == 102 && obj.entities[i].rule==1 && !map.custommode) + { + //ascii snakes + if (obj.entities[i].xp <= -80) + { + obj.entities[i].xp += 400; + } + else + { + if (obj.entities[i].xp > 320) + { + obj.entities[i].xp -= 400; + } + } + } + else + { + if (obj.entities[i].xp <= -10) + { + obj.entities[i].xp += 320; + } + else + { + if (obj.entities[i].xp > 310) + { + obj.entities[i].xp -= 320; + } + } + } + } + } + } + + int player = obj.getplayer(); + if (game.door_down > -2 && obj.entities[player].yp >= 238) + { + obj.entities[player].yp -= 240; + map.gotoroom(game.roomx, game.roomy + 1, dwgfx, game, obj, music); + } + if (game.door_up > -2 && obj.entities[player].yp < -2) + { + obj.entities[player].yp += 240; + map.gotoroom(game.roomx, game.roomy - 1, dwgfx, game, obj, music); + } + } + else if (map.warpy) + { + for (int i = 0; i < obj.nentity; i++) + { + if(obj.entities[i].type<50){ //Don't warp warp lines + if (obj.entities[i].yp <= -12) + { + obj.entities[i].yp += 232; + } + else + { + if (obj.entities[i].yp > 226) + { + obj.entities[i].yp -= 232; + } + } + } + } + + for (int i = 0; i < obj.nentity; i++) + { + + if(obj.entities[i].type<50){ //Don't warp warp lines + if(obj.entities[i].rule!=0) + { + if (obj.entities[i].xp <= -30) + { + obj.entities[i].xp += 350; + } + else + { + if (obj.entities[i].xp > 320) + { + obj.entities[i].xp -= 350; + } + } + } + } + } + + int player = obj.getplayer(); + if (game.door_left > -2 && obj.entities[player].xp < -14) + { + obj.entities[player].xp += 320; + map.gotoroom(game.roomx - 1, game.roomy, dwgfx, game, obj, music); + } + if (game.door_right > -2 && obj.entities[player].xp >= 308) + { + obj.entities[player].xp -= 320; + map.gotoroom(game.roomx + 1, game.roomy, dwgfx, game, obj, music); + } + } + else + { + //Normal! Just change room + int player = obj.getplayer(); + if (game.door_down > -2 && obj.entities[player].yp >= 238) + { + obj.entities[player].yp -= 240; + map.gotoroom(game.roomx, game.roomy + 1, dwgfx, game, obj, music); + } + if (game.door_up > -2 && obj.entities[player].yp < -2) + { + obj.entities[player].yp += 240; + map.gotoroom(game.roomx, game.roomy - 1, dwgfx, game, obj, music); + } + if (game.door_left > -2 && obj.entities[player].xp < -14) + { + obj.entities[player].xp += 320; + map.gotoroom(game.roomx - 1, game.roomy, dwgfx, game, obj, music); + } + if (game.door_right > -2 && obj.entities[player].xp >= 308) + { + obj.entities[player].xp -= 320; + map.gotoroom(game.roomx + 1, game.roomy, dwgfx, game, obj, music); + } + } + + //Warp tokens + if (map.custommode){ + if (game.teleport) + { + int edi=obj.entities[game.edteleportent].behave; + int edj=obj.entities[game.edteleportent].para; + int edi2, edj2; + edi2 = (edi-(edi%40))/40; + edj2 = (edj-(edj%30))/30; + + map.warpto(100+edi2, 100+edj2, obj.getplayer(), edi%40, (edj%30)+2, dwgfx, game, obj, music); + game.teleport = false; + + if (game.teleport == false) + { + game.flashlight = 6; + game.screenshake = 25; + } + } + }else{ + if (game.teleport) + { + if (game.roomx == 117 && game.roomy == 102) + { + int i = obj.getplayer(); + obj.entities[i].yp = 225; + map.gotoroom(119, 100, dwgfx, game, obj, music); + game.teleport = false; + } + else if (game.roomx == 119 && game.roomy == 100) + { + int i = obj.getplayer(); + obj.entities[i].yp = 225; + map.gotoroom(119, 103, dwgfx, game, obj, music); + game.teleport = false; + } + else if (game.roomx == 119 && game.roomy == 103) + { + int i = obj.getplayer(); + obj.entities[i].xp = 0; + map.gotoroom(116, 103, dwgfx, game, obj, music); + game.teleport = false; + } + else if (game.roomx == 116 && game.roomy == 103) + { + int i = obj.getplayer(); + obj.entities[i].yp = 225; + map.gotoroom(116, 100, dwgfx, game, obj, music); + game.teleport = false; + } + else if (game.roomx == 116 && game.roomy == 100) + { + int i = obj.getplayer(); + obj.entities[i].xp = 0; + map.gotoroom(114, 102, dwgfx, game, obj, music); + game.teleport = false; + } + else if (game.roomx == 114 && game.roomy == 102) + { + int i = obj.getplayer(); + obj.entities[i].yp = 225; + map.gotoroom(113, 100, dwgfx, game, obj, music); + game.teleport = false; + } + else if (game.roomx == 116 && game.roomy == 104) + { + //pre warp zone here + map.warpto(107, 101, obj.getplayer(), 14, 16, dwgfx, game, obj, music); + } + else if (game.roomx == 107 && game.roomy == 101) + { + map.warpto(105, 119, obj.getplayer(), 5, 26, dwgfx, game, obj, music); + } + else if (game.roomx == 105 && game.roomy == 118) + { + map.warpto(101, 111, obj.getplayer(), 34, 6, dwgfx, game, obj, music); + } + else if (game.roomx == 101 && game.roomy == 111) + { + //There are lots of warp tokens in this room, so we have to distinguish! + switch(game.teleportxpos) + { + case 1: + map.warpto(108, 108, obj.getplayer(), 4, 27, dwgfx, game, obj, music); + break; + case 2: + map.warpto(101, 111, obj.getplayer(), 12, 27, dwgfx, game, obj, music); + break; + case 3: + map.warpto(119, 111, obj.getplayer(), 31, 7, dwgfx, game, obj, music); + break; + case 4: + map.warpto(114, 117, obj.getplayer(), 19, 16, dwgfx, game, obj, music); + break; + } + } + else if (game.roomx == 108 && game.roomy == 106) + { + map.warpto(119, 111, obj.getplayer(), 4, 27, dwgfx, game, obj, music); + } + else if (game.roomx == 100 && game.roomy == 111) + { + map.warpto(101, 111, obj.getplayer(), 24, 6, dwgfx, game, obj, music); + } + else if (game.roomx == 119 && game.roomy == 107) + { + //Secret lab, to super gravitron + map.warpto(119, 108, obj.getplayer(), 19, 10, dwgfx, game, obj, music); + } + if (game.teleport == false) + { + game.flashlight = 6; + game.screenshake = 25; + } + } + } + } + int j; + if (game.roomchange) + { + //We've changed room? Let's bring our companion along! + game.roomchange = false; + if (game.companion > 0) + { + int i = obj.getplayer(); + //ok, we'll presume our companion has been destroyed in the room change. So: + switch(game.companion) + { + case 6: + obj.createentity(game, obj.entities[i].xp, 121.0f, 15.0f,1); //Y=121, the floor in that particular place! + j = obj.getcompanion(6); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + break; + case 7: + if (game.roomy <= 105) //don't jump after him! + { + if (game.roomx == 110) + { + obj.createentity(game, 320, 86, 16, 1); //Y=86, the ROOF in that particular place! + } + else + { + obj.createentity(game, obj.entities[i].xp, 86.0f, 16.0f, 1); //Y=86, the ROOF in that particular place! + } + j = obj.getcompanion(7); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + break; + case 8: + if (game.roomy >= 104) //don't jump after him! + { + if (game.roomx == 102) + { + obj.createentity(game, 310, 177, 17, 1); + j = obj.getcompanion(8); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + else + { + obj.createentity(game, obj.entities[i].xp, 177.0f, 17.0f, 1); + j = obj.getcompanion(8); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + } + break; + case 9: + if (!map.towermode) //don't go back into the tower! + { + if (game.roomx == 110 && obj.entities[i].xp<20) + { + obj.createentity(game, 100, 185, 18, 15, 0, 1); + } + else + { + obj.createentity(game, obj.entities[i].xp, 185.0f, 18.0f, 15, 0, 1); + } + j = obj.getcompanion(9); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + break; + case 10: + //intermission 2, choose colour based on lastsaved + if (game.roomy == 51) + { + if (obj.flags[59] == 0) + { + obj.createentity(game, 225.0f, 169.0f, 18, dwgfx.crewcolour(game.lastsaved), 0, 10); + j = obj.getcompanion(10); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + } + else if (game.roomy >= 52) + { + if (obj.flags[59] == 1) + { + obj.createentity(game, 160.0f, 177.0f, 18, dwgfx.crewcolour(game.lastsaved), 0, 18, 1); + j = obj.getcompanion(10); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + else + { + obj.flags[59] = 1; + obj.createentity(game, obj.entities[i].xp, -20.0f, 18.0f, dwgfx.crewcolour(game.lastsaved), 0, 10, 0); + j = obj.getcompanion(10); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + } + break; + case 11: + //Intermission 1: We're using the SuperCrewMate instead! + //obj.createentity(game, obj.entities[i].xp, obj.entities[i].yp, 24, dwgfx.crewcolour(game.lastsaved)); + if(game.roomx-41==game.scmprogress) + { + switch(game.scmprogress) + { + case 0: + obj.createentity(game, 76, 161, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 1: + obj.createentity(game, 10, 169, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 2: + obj.createentity(game, 10, 177, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 3: + if (game.scmmoveme) + { + obj.createentity(game, obj.entities[obj.getplayer()].xp, 185, 24, dwgfx.crewcolour(game.lastsaved), 2); + game.scmmoveme = false; + } + else + { + obj.createentity(game, 10, 177, 24, dwgfx.crewcolour(game.lastsaved), 2); + } + break; + case 4: + obj.createentity(game, 10, 185, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 5: + obj.createentity(game, 10, 185, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 6: + obj.createentity(game, 10, 185, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 7: + obj.createentity(game, 10, 41, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 8: + obj.createentity(game, 10, 169, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 9: + obj.createentity(game, 10, 169, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 10: + obj.createentity(game, 10, 129, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 11: + obj.createentity(game, 10, 129, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 12: + obj.createentity(game, 10, 65, 24, dwgfx.crewcolour(game.lastsaved), 2); + break; + case 13: + obj.createentity(game, 10, 177, 24, dwgfx.crewcolour(game.lastsaved)); + break; + } + } + + if (game.scmmoveme) + { + obj.entities[obj.getscm()].xp = obj.entities[obj.getplayer()].xp; + game.scmmoveme = false; + } + break; + } + } + } + + game.activeactivity = obj.checkactivity(); + + if (game.activetele) + { + int i = obj.getplayer(); + obj.settemprect(i); + if (help.intersects(game.teleblock, obj.temprect)) + { + game.readytotele += 25; + if (game.readytotele >= 255) game.readytotele = 255; + } + else + { + game.readytotele -= 50; + if (game.readytotele < 0) game.readytotele = 0; + } + } + else + { + if (game.readytotele > 0) + { + game.readytotele -= 50; + if (game.readytotele < 0) game.readytotele = 0; + } + } + + if (game.teleport_to_new_area) + script.teleport(dwgfx, game, map, obj, help, music); +} diff --git a/desktop_version/src/Logic.h b/desktop_version/src/Logic.h new file mode 100644 index 00000000..e7eb5436 --- /dev/null +++ b/desktop_version/src/Logic.h @@ -0,0 +1,23 @@ +#ifndef LOGIC_H +#define LOGIC_H + +#include "Graphics.h" +#include "Game.h" +#include "Entity.h" +#include "UtilityClass.h" +#include "Music.h" +#include "Map.h" + +void titlelogic(Graphics& dwgfx, Game& game, entityclass& obj, UtilityClass& help, musicclass& music, mapclass& map); + +void maplogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help); + +void gamecompletelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help); + +void gamecompletelogic2(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help); + +void towerlogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help); + +void gamelogic(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help); + +#endif /* LOGIC_H */ diff --git a/desktop_version/src/MakeAndPlay.h b/desktop_version/src/MakeAndPlay.h new file mode 100644 index 00000000..84e5c7dd --- /dev/null +++ b/desktop_version/src/MakeAndPlay.h @@ -0,0 +1,10 @@ +#ifndef MAKEANDPLAY_H +#define MAKEANDPLAY_H + +/* This is a cheap way to deal with the MAKEANDPLAY def when recompiling. + * It's heaps faster than rebuilding everything, so here we are. + * -flibit + */ +// #define MAKEANDPLAY + +#endif /* MAKEANDPLAY_H */ diff --git a/desktop_version/src/Map.cpp b/desktop_version/src/Map.cpp new file mode 100644 index 00000000..9a20234d --- /dev/null +++ b/desktop_version/src/Map.cpp @@ -0,0 +1,1997 @@ +#include "Map.h" + +#include "MakeAndPlay.h" + +extern editorclass ed; + +mapclass::mapclass() +{ + //Start here! + r = 196; + g = 196; + b = 196; + colstate = 0; + colstatedelay = 0; + colsuperstate = 0; + spikeleveltop = 0; + spikelevelbottom = 0; + warpx = false; + warpy = false; + extrarow = 0; + + showteleporters = false; + showtargets = false; + showtrinkets = false; + + finalmode = false; + finalstretch = false; + finalx = 50; + finaly = 50; + + cursorstate = 0; + cursordelay = 0; + + final_colormode = false; + final_colorframe = 0; + final_colorframedelay = 0; + final_mapcol = 0; + final_aniframe = 0; + final_aniframedelay = 0; + + custommode=false; + custommodeforreal=false; + customtrinkets=0; + customx=0; customy=0; + customwidth=20; customheight=20; + custommmxoff=0; custommmyoff=0; custommmxsize=0; custommmysize=0; + customzoom=0; + customshowmm=true; + + rcol = 0; + + //This needs to be in map instead! + invincibility = false; + + //We init the lookup table: + for (int i = 0; i < 30; i++) + { + vmult.push_back(int(i * 40)); + teleporters.push_back(point()); + shinytrinkets.push_back(point()); + } + //We create a blank map + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + contents.push_back(0); + } + } + + for (int j = 0; j < 20; j++) + { + for (int i = 0; i < 20; i++) + { + areamap.push_back(0); + roomdeaths.push_back(0); + roomdeathsfinal.push_back(0); + explored.push_back(0); + } + } + + tileset = 0; + initmapdata(); + + for (int i = 0; i < 8; i++) + { + specialnames.push_back(std::string()); + } + resetnames(); + + //roomtext + + for (int i = 0; i < 100; i++) + { + roomtextx[i]=0; + roomtexty[i]=0; + roomtext.push_back(std::string()); + } + roomtexton = false; + roomtextnumlines = 0; + + //Areamap starts at 100,100 and extends 20x20 + std::vector tmap; + tmap.push_back("1,2,2,2,2,2,2,2,0,3,0,0,0,4,4,4,4,4,4,4"); + tmap.push_back("1,2,2,2,2,2,2,0,0,3,0,0,0,0,4,4,4,4,4,4"); + tmap.push_back("0,1,0,0,2,0,0,0,0,3,0,0,0,0,4,4,4,4,4,4"); + tmap.push_back("0,0,0,0,2,0,0,0,0,3,0,0,5,5,5,5,4,4,4,4"); + tmap.push_back("0,0,2,2,2,0,0,0,0,3,11,11,5,5,5,5,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,5,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,5,5,5,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,0,0,0,5,5,5,5,5,5,0"); + tmap.push_back("0,0,0,0,0,0,0,0,11,3,0,0,0,5,5,5,5,5,5,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,0,0,0,5,5,5,5,5,5,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,5,5,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,0,5,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,0,5,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,3,0,5,5,0,0,0,0,0,5,0"); + tmap.push_back("0,0,0,0,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,2,2,2,2,2,2,0,3,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,2,2,2,2,2,2,2,0,3,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("2,2,2,2,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("2,2,2,2,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0"); + fillareamap(tmap); +} + +int mapclass::RGB(int red,int green,int blue) +{ + return (blue | (green << 8) | (red << 16)); +} + +int mapclass::intpol(int a, int b, float c) +{ + return static_cast(a + ((b - a) * c)); +} + +void mapclass::setteleporter(int t, int x, int y) +{ + teleporters[t].x = x; + teleporters[t].y = y; +} + +void mapclass::settrinket(int t, int x, int y) +{ + shinytrinkets[t].x = x; + shinytrinkets[t].y = y; +} + +void mapclass::resetmap() +{ + //clear the explored area of the map + for (int j = 0; j < 20; j++) + { + for (int i = 0; i < 20; i++) + { + explored[i + (j * 20)] = 0; + } + } +} + +void mapclass::resetnames() +{ + //Reset all the special names + specialnames[0] = "Rear Window"; + specialnames[1] = "On the Waterfront"; + specialnames[2] = "The Untouchables"; + specialnames[3] = "Television Newsveel"; + specialnames[4] = "Vwitched"; + specialnames[5] = "Gvnsmoke"; + specialnames[6] = "Please enjoy these repeats"; + specialnames[7] = "Try Jiggling the Antenna"; + + glitchmode = 0; + glitchdelay = 0; +} + +void mapclass::transformname(int t) +{ + //transform special names into new ones, one step at a time + + /* + if (specialnames[3] == "") { specialnames[3] = ; + }else if (specialnames[3] == "") { specialnames[3] = ; + } + */ + + glitchdelay--; + if(glitchdelay<=0) + { + switch(t) + { + case 3: + //Television Newsveel -> The 9 O'Clock News + if (specialnames[3] == "Television Newsveel") + { + specialnames[3] = "Television Newsvel"; + } + else if (specialnames[3] == "Television Newsvel") + { + specialnames[3] = "TelevisvonvNewsvel"; + } + else if (specialnames[3] == "TelevisvonvNewsvel") + { + specialnames[3] = "TvlvvvsvonvNevsvel"; + } + else if (specialnames[3] == "TvlvvvsvonvNevsvel") + { + specialnames[3] = "vvvvvvsvovvNe svel"; + } + else if (specialnames[3] == "vvvvvvsvovvNe svel") + { + specialnames[3] = "vhv vvv'vvovv vevl"; + } + else if (specialnames[3] == "vhv vvv'vvovv vevl") + { + specialnames[3] = "vhv V v'Cvovv vewv"; + } + else if (specialnames[3] == "vhv V v'Cvovv vewv") + { + specialnames[3] = "vhe 9 v'Cvovv vewv"; + } + else if (specialnames[3] == "vhe 9 v'Cvovv vewv") + { + specialnames[3] = "vhe 9 v'Cvovv Newv"; + } + else if (specialnames[3] == "vhe 9 v'Cvovv Newv") + { + specialnames[3] = "The 9 O'Cvovk Newv"; + } + else if (specialnames[3] == "The 9 O'Cvovk Newv") + { + specialnames[3] = "The 9 O'Clock News"; + } + break; + case 4: + //Vwitched -> Dial M for Murder + if (specialnames[4] == "Vwitched") + { + specialnames[4] = "Vwitvhed"; + } + else if (specialnames[4] == "Vwitvhed") + { + specialnames[4] = "vVwivcvedv"; + } + else if (specialnames[4] == "vVwivcvedv") + { + specialnames[4] = "vvvwMvcvMdvv"; + } + else if (specialnames[4] == "vvvwMvcvMdvv") + { + specialnames[4] = "DvvvwMvfvvMdvvv"; + } + else if (specialnames[4] == "DvvvwMvfvvMdvvv") + { + specialnames[4] = "Dvav Mvfvr Mdvvvv"; + } + else if (specialnames[4] == "Dvav Mvfvr Mdvvvv") + { + specialnames[4] = "Diav M for Mdrver"; + } + else if (specialnames[4] == "Diav M for Mdrver") + { + specialnames[4] = "Dial M for Murder"; + } + break; + case 5: + //Gvnsmoke -> Gunsmoke 1966 + if (specialnames[5] == "Gvnsmoke") + { + specialnames[5] = "Gvnsmove"; + } + else if (specialnames[5] == "Gvnsmove") + { + specialnames[5] = "Gvnvmovevv"; + } + else if (specialnames[5] == "Gvnvmovevv") + { + specialnames[5] = "Gunvmove1vv6"; + } + else if (specialnames[5] == "Gunvmove1vv6") + { + specialnames[5] = "Vunsmoke 19v6"; + } + else if (specialnames[5] == "Vunsmoke 19v6") + { + specialnames[5] = "Gunsmoke 1966"; + } + break; + case 6: + //Please enjoy these repeats -> In the Margins + if (specialnames[6] == "Please enjoy these repeats") + { + specialnames[6] = "Please envoy theve repeats"; + } + else if (specialnames[6] == "Please envoy theve repeats") + { + specialnames[6] = "Plse envoy tse rvpvas"; + } + else if (specialnames[6] == "Plase envoy these rvpeas") + { + specialnames[6] = "Plse envoy tse rvpvas"; + } + else if (specialnames[6] == "Plse envoy tse rvpvas") + { + specialnames[6] = "Vl envoy te rvevs"; + } + else if (specialnames[6] == "Vl envoy te rvevs") + { + specialnames[6] = "Vv evo tv vevs"; + } + else if (specialnames[6] == "Vv evo tv vevs") + { + specialnames[6] = "Iv vhv Mvrvivs"; + } + else if (specialnames[6] == "Iv vhv Mvrvivs") + { + specialnames[6] = "In the Margins"; + } + break; + case 7: + //Try Jiggling the Antenna -> Heaven's Gate + if (specialnames[7] == "Try Jiggling the Antenna") + { + specialnames[7] = "Try Viggling the Antenna"; + } + else if (specialnames[7] == "Try Viggling the Antenna") + { + specialnames[7] = "TryJivglvng theAvtevna"; + } + else if (specialnames[7] == "TryJivglvng theAvtevna") + { + specialnames[7] = "Tvvivglvng thAvtvvv"; + } + else if (specialnames[7] == "Tvvivglvng thAvtvvv") + { + specialnames[7] = "Vvvgglvnv tvnvva"; + } + else if (specialnames[7] == "Vvvgglvnv tvnvva") + { + specialnames[7] = "Vvavvnvs vvtv"; + } + else if (specialnames[7] == "Vvavvnvs vvtv") + { + specialnames[7] = "Veavvn's Gvte"; + } + else if (specialnames[7] == "Veavvn's Gvte") + { + specialnames[7] = "Heaven's Gate"; + } + break; + + } + glitchdelay = 5; + } + else + { + glitchdelay--; + } +} + +std::string mapclass::getglitchname(int x, int y) +{ + //Returns the name in the final area. + if (roomname == "glitch") + { + //8 Cases! + //First, the three "glitches" + glitchdelay--; + if (glitchdelay <= -5) + { + glitchmode = (glitchmode + 1) % 2; + glitchdelay = 0; + if (glitchmode == 0) glitchdelay = 20 +int(fRandom() * 10); + } + + if (x == 42 && y == 51) + { + if (glitchmode == 0) + { + return specialnames[0]; + } + else return "Rear Vindow"; + } + else if (x == 48 && y == 51) + { + if (glitchmode == 0) + { + return specialnames[1]; + } + else return "On the Vaterfront"; + } + else if (x == 49 && y == 51) + { + if (glitchmode == 0) + { + return specialnames[2]; + } + else return "The Untouchavles"; + } + } + else if (roomname == "change") + { + if (finalstretch) + { + if (x == 45 && y == 51) transformname(3); + if (x == 46 && y == 51) transformname(4); + if (x == 47 && y == 51) transformname(5); + if (x == 50 && y == 53) transformname(6); + if (x == 50 && y == 54) transformname(7); + } + + if (x == 45 && y == 51) return specialnames[3]; + if (x == 46 && y == 51) return specialnames[4]; + if (x == 47 && y == 51) return specialnames[5]; + if (x == 50 && y == 53) return specialnames[6]; + if (x == 50 && y == 54) return specialnames[7]; + return roomname; + } + else + { + return roomname; + } + return roomname; +} + +void mapclass::initmapdata() +{ + //Set up static map information like teleporters and shiny trinkets. + numteleporters = 17; + setteleporter(0, 0, 0); + setteleporter(1, 0, 16); + setteleporter(2, 2, 4); + setteleporter(3, 2, 11); + setteleporter(4, 7, 9); + setteleporter(5, 7, 15); + setteleporter(6, 8, 11); + setteleporter(7, 10, 5); + setteleporter(8, 11, 4); + setteleporter(9, 13, 2); + setteleporter(10, 13, 8); + setteleporter(11, 14, 19); + setteleporter(12, 15, 0); + setteleporter(13, 17, 12); + setteleporter(14, 17, 17); + setteleporter(15, 18, 1); + setteleporter(16, 18, 7); + + numshinytrinkets = 18; + settrinket(0, 14, 4); + settrinket(1, 13, 6); + settrinket(2, 11, 12); + settrinket(3, 15, 12); + settrinket(4, 14, 11); + settrinket(5, 18, 14); + settrinket(6, 11, 7); + settrinket(7, 9, 2); + settrinket(8, 9, 16); + settrinket(9, 2, 18); + settrinket(10, 7, 18); + settrinket(11, 6, 1); + settrinket(12, 17, 3); + settrinket(13, 10, 19); + settrinket(14, 5, 15); + settrinket(15, 1, 10); + settrinket(16, 3, 2); + settrinket(17, 10, 8); +} + +int mapclass::finalat(int x, int y) +{ + //return the tile index of the final stretch tiles offset by the colour difference + if (contents[x + vmult[y]] == 740) + { + //Special case: animated tiles + if (final_mapcol == 1) + { + // return contents[x + vmult[y]] - (final_mapcol * 3) + (int(fRandom()*12)*40); + // Windows hits fRandom() == 1 frequently! For fuck sake! -flibit + return 737 + (std::min(int(fRandom() * 12), 11) * 40); + } + else + { + return contents[x + vmult[y]] - (final_mapcol * 3) + (final_aniframe * 40); + } + } + else if (contents[x + vmult[y]] >= 80) + { + return contents[x + vmult[y]] - (final_mapcol * 3); + } + else + { + return contents[x + vmult[y]]; + } + return 0; +} + +int mapclass::maptiletoenemycol(int t) +{ + //returns the colour index for enemies that matches the map colour t + switch(t) + { + case 0: + return 11; + break; + case 1: + return 6; + break; + case 2: + return 8; + break; + case 3: + return 12; + break; + case 4: + return 9; + break; + case 5: + return 7; + break; + case 6: + return 18; + break; + } + return 11; +} + +void mapclass::changefinalcol(int t, entityclass& obj, Game& game) +{ + //change the map to colour t - for the game's final stretch. + //First up, the tiles. This is just a setting: + final_mapcol = t; + temp = 6 - t; + //Next, entities + for (int i = 0; i < obj.nentity; i++) + { + if (obj.entities[i].type == 1) //something with a movement behavior + { + if (obj.entities[i].animate == 10 || obj.entities[i].animate == 11) //treadmill + { + if(temp<3) + { + obj.entities[i].tile = 907 + (temp * 80); + } + else + { + obj.entities[i].tile = 911 + ((temp-3) * 80); + } + if(obj.entities[i].animate == 10) obj.entities[i].tile += 40; + } + else if (obj.entities[i].isplatform) + { + obj.entities[i].tile = 915+(temp*40); + } + else //just an enemy + { + obj.entities[i].colour = maptiletoenemycol(temp); + } + } + else if (obj.entities[i].type == 2) //disappearing platforms + { + obj.entities[i].tile = 915+(temp*40); + } + } +} + +void mapclass::setcol(const int r1, const int g1, const int b1 , const int r2, const int g2, const int b2, const int c) +{ + r = intpol(r1, r2, c / 5); + g = intpol(g1, g2, c / 5); + b = intpol(b1, b2, c / 5); +} + +void mapclass::updatetowerglow() +{ + if (colstatedelay <= 0 || colsuperstate > 0) + { + if (colsuperstate > 0) colstate--; + colstate++; + if (colstate >= 30) colstate = 0; + check = colstate % 5; //current state of phase + cmode = (colstate - check) / 5; // current colour transition + + switch(cmode) + { + case 0: + setcol(255, 93, 107, 255, 255, 93, check); + break; + case 1: + setcol(255, 255, 93, 159, 255, 93, check); + break; + case 2: + setcol(159, 255, 93, 93, 245, 255, check); + break; + case 3: + setcol(93, 245, 255, 177, 93, 255, check); + break; + case 4: + setcol(177, 93, 255, 255, 93, 255, check); + break; + case 5: + setcol(255, 93, 255, 255, 93, 107, check); + break; + } + + if (check == 0) + { + colstatedelay = 45; + } + else + { + colstatedelay = 0; + } + if (colsuperstate > 0) colstatedelay = 0; + + tdrawback = true; + towercol = RGB(r*0.04f, g*0.04f, b*0.04f); + } + else + { + colstatedelay--; + } +} + +void mapclass::nexttowercolour() +{ + colstate+=5; + if (colstate >= 30) colstate = 0; + check = colstate % 5; //current state of phase + cmode = (colstate - check) / 5; // current colour transition + + switch(cmode) + { + case 0: + setcol(255, 93, 107, 255, 255, 93, check); + break; + case 1: + setcol(255, 255, 93, 159, 255, 93, check); + break; + case 2: + setcol(159, 255, 93, 93, 245, 255, check); + break; + case 3: + setcol(93, 245, 255, 177, 93, 255, check); + break; + case 4: + setcol(177, 93, 255, 255, 93, 255, check); + break; + case 5: + setcol(255, 93, 255, 255, 93, 107, check); + break; + } + + tdrawback = true; + towercol = RGB(r*0.04, g*0.04, b*0.04); +} + +void mapclass::settowercolour(int t) +{ + colstate=t*5; + if (colstate >= 30) colstate = 0; + check = colstate % 5; //current state of phase + cmode = (colstate - check) / 5; // current colour transition + + switch(cmode) + { + case 0: + setcol(255, 93, 107, 255, 255, 93, check); + break; + case 1: + setcol(255, 255, 93, 159, 255, 93, check); + break; + case 2: + setcol(159, 255, 93, 93, 245, 255, check); + break; + case 3: + setcol(93, 245, 255, 177, 93, 255, check); + break; + case 4: + setcol(177, 93, 255, 255, 93, 255, check); + break; + case 5: + setcol(255, 93, 255, 255, 93, 107, check); + break; + } + + tdrawback = true; + towercol = RGB(r*0.04, g*0.04, b*0.04); +} + +bool mapclass::spikecollide(int x, int y) +{ + if (invincibility) return false; + if (tower.at(x,y,0)>= 6 && tower.at(x,y,0) <= 11) return true; + return false; +} + +bool mapclass::collide(int x, int y) +{ + if (towermode) + { + if (tower.at(x, y, 0) >= 12 && tower.at(x, y, 0) <= 27) return true; + } + else if (tileset == 2) + { + if (y == -1) return collide(x, y + 1); + if (y == 29+extrarow) return collide(x, y - 1); + if (x == -1) return collide(x + 1, y); + if (x == 40) return collide(x - 1, y); + if (x < 0 || y < 0 || x >= 40 || y >= 29 + extrarow) return false; + if (contents[x + vmult[y]] >= 12 && contents[x + vmult[y]] <= 27) return true; + if (invincibility) + { + if (contents[x + vmult[y]] >= 6 && contents[x + vmult[y]] <= 11) return true; + } + } + else + { + if (y == -1) return collide(x, y + 1); + if (y == 29+extrarow) return collide(x, y - 1); + if (x == -1) return collide(x + 1, y); + if (x == 40) return collide(x - 1, y); + if (x < 0 || y < 0 || x >= 40 || y >= 29+extrarow) return false; + if (contents[x + vmult[y]] == 1) return true; + if (tileset==0 && contents[x + vmult[y]] == 59) return true; + if (contents[x + vmult[y]]>= 80 && contents[x + vmult[y]] < 680) return true; + if (contents[x + vmult[y]] == 740 && tileset==1) return true; + if (invincibility) + { + if (contents[x + vmult[y]]>= 6 && contents[x + vmult[y]] <= 9) return true; + if (contents[x + vmult[y]]>= 49 && contents[x + vmult[y]] <= 50) return true; + if (tileset == 1) + { + if (contents[x + vmult[y]]>= 49 && contents[x + vmult[y]] < 80) return true; + } + } + } + return false; +} + +void mapclass::fillareamap(std::vector& tmap) +{ + + for (j = 0; j < 20; j++) + { + std::vector maprow = split(tmap[j], ','); + for (int i = 0; i < 20; i++) + { + areamap[i + (j * 20)] = atoi(maprow[i].c_str()); + } + } +} + +void mapclass::settile(int xp, int yp, int t) +{ + if (xp >= 0 && xp < 40 && yp >= 0 && yp < 29+extrarow) + { + contents[xp + vmult[yp]] = t; + } +} + +void mapclass::fillcontent(std::vector& tmap) +{ + + for (j = 0; j < 29+extrarow; j++) + { + std::vector maprow = split(tmap[j], ','); + + for(int i = 0; i < 40; i++) + { + contents[i + vmult[j]] = atoi(maprow[i].c_str()); + } + } +} + + +int mapclass::area(int _rx, int _ry) +{ + //THIS IS THE BUG + if (finalmode) + { + return 6; + } + else + { + int lookup = (_rx - 100) + ((_ry - 100) * 20); + //lookup = std::max(0,lookup); + if(_rx-100>=0 && _rx-100<20 && _ry-100>=0 && _ry-100<20){ + return areamap[lookup]; + } + else + { + return 6; + } + } +} + +void mapclass::exploretower() +{ + for (int i = 0; i < 20; i++) + { + explored[9 + (i * 20)] = 1; + } +} + +void mapclass::hideship() +{ + //remove the ship from the explored areas + explored[2 + (10 * 20)] = 0; + explored[3 + (10 * 20)] = 0; + explored[4 + (10 * 20)] = 0; + explored[2 + (11 * 20)] = 0; + explored[3 + (11 * 20)] = 0; + explored[4 + (11 * 20)] = 0; +} + +void mapclass::showship() +{ + //remove the ship from the explored areas + explored[2 + (10 * 20)] = 1; + explored[3 + (10 * 20)] = 1; + explored[4 + (10 * 20)] = 1; + explored[2 + (11 * 20)] = 1; + explored[3 + (11 * 20)] = 1; + explored[4 + (11 * 20)] = 1; +} + +void mapclass::resetplayer(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music) +{ + if (game.roomx != game.saverx || game.roomy != game.savery) + { + gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + } + + game.deathseq = -1; + int i = obj.getplayer(); + if(i>-1) + { + obj.entities[i].vx = 0; + obj.entities[i].vy = 0; + obj.entities[i].ax = 0; + obj.entities[i].ay = 0; + obj.entities[i].xp = game.savex; + obj.entities[i].yp = game.savey; + obj.entities[i].dir = game.savedir; + obj.entities[i].colour = 0; + game.lifeseq = 10; + obj.entities[i].invis = true; + } + + game.scmhurt = false; //Just in case the supercrewmate is fucking this up! + if (game.supercrewmate) + { + if (game.roomx == game.scmprogress + 41) + { + game.scmprogress = game.roomx - 41; + } + else + { + game.scmprogress = game.roomx - 40; + } + if (game.scmprogress != 0) + { + game.scmmoveme = true; + } + else + { + game.scmmoveme = false; + } + } +} + +void mapclass::warpto(int rx, int ry , int t, int tx, int ty, Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music) +{ + gotoroom(rx, ry, dwgfx, game, obj, music); + game.teleport = false; + obj.entities[t].xp = tx * 8; + obj.entities[t].yp = (ty * 8) - obj.entities[t].h; + game.gravitycontrol = 0; +} + +void mapclass::gotoroom(int rx, int ry, Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music) +{ + //First, destroy the current room + obj.removeallblocks(); + game.activetele = false; + game.readytotele = 0; + + //Ok, let's save the position of all lines on the screen + obj.nlinecrosskludge = 0; + for (int i = 0; i < obj.nentity; i++) + { + if (obj.entities[i].type == 9 && obj.entities[i].active) + { + //It's a horizontal line + if (obj.entities[i].xp <= 0 || (obj.entities[i].xp + obj.entities[i].w) >= 312) + { + //it's on a screen edge + obj.copylinecross(i); + } + } + } + + for (int i = 0; i < obj.nentity; i++) + { + //Of course the player's always gonna be object zero, this is just in case + if (obj.entities[i].rule != 0) obj.entities[i].active = false; + } + obj.cleanup(); + + game.door_up = rx + ((ry - 1) * 100); + game.door_down = rx + ((ry + 1) * 100); + game.door_right = rx + 1 + (ry * 100); + game.door_left = rx -1 + (ry * 100); + + if (rx < game.roomx) + { + game.roomchangedir = 0; + } + else + { + game.roomchangedir = 1; + } + + if (finalmode) + { + //Ok, what way are we moving? + /*if (rx - finalx >= 1) finalx++; + if (rx - finalx <= -1) finalx--; + if (ry - finaly >= 1) finaly++; + if (ry - finaly <= -1) finaly--;*/ + finalx = rx; + finaly = ry; + game.roomx = finalx; + game.roomy = finaly; + game.roomchange = true; + rx = finalx; + ry = finaly; + + if (game.roomy < 10) + { + game.roomy = 11; + finaly = 11; + } + + if(game.roomx>=41 && game.roomy>=48 && game.roomx<61 && game.roomy<68 ) + { + game.currentroomdeaths = roomdeathsfinal[game.roomx - 41 + (20 * (game.roomy - 48))]; + } + else + { + game.currentroomdeaths = 0; + } + + //Final level for time trial + if (game.intimetrial) + { + if (game.roomx == 46 && game.roomy == 54) music.niceplay(15); //Final level remix + } + } + else if (custommode) + { + game.roomx = rx; + game.roomy = ry; + game.roomchange = true; + if (game.roomx < 100) game.roomx = 100 + ed.mapwidth-1; + if (game.roomy < 100) game.roomy = 100 + ed.mapheight-1; + if (game.roomx > 100 + ed.mapwidth-1) game.roomx = 100; + if (game.roomy > 100 + ed.mapheight-1) game.roomy = 100; + } + else + { + game.roomx = rx; + game.roomy = ry; + game.roomchange = true; + if (game.roomx < 100) game.roomx = 119; + if (game.roomy < 100) game.roomy = 119; + if (game.roomx > 119) game.roomx = 100; + if (game.roomy > 119) game.roomy = 100; + + game.currentroomdeaths = roomdeaths[game.roomx - 100 + (20 * (game.roomy - 100))]; + + //Alright, change music depending on where we are: + //Tower + if (game.roomx == 107 && game.roomy == 106) music.niceplay(4); + if (game.roomx == 107 && game.roomy == 107) music.niceplay(4); + if (game.roomx == 107 && game.roomy == 108) music.niceplay(4); + if (game.roomx == 107 && game.roomy == 109) music.niceplay(4); + if (game.roomx == 108 && game.roomy == 109) + { + if (dwgfx.setflipmode) + { + music.niceplay(9); + } + else + { + music.niceplay(2); + } + } + if (game.roomx == 109) + { + if (dwgfx.setflipmode) + { + music.niceplay(9); + } + else + { + music.niceplay(2); + } + } + //Warp Zone + if (game.roomx == 112 && game.roomy == 101) music.niceplay(4); + if (game.roomx == 113 && game.roomy == 101) music.niceplay(4); + if (game.roomx == 113 && game.roomy == 102) music.niceplay(4); + if (game.roomx == 114 && game.roomy == 101) music.niceplay(12); + if (game.roomx == 115 && game.roomy == 101) music.niceplay(12); + if (game.roomx == 115 && game.roomy == 102) music.niceplay(12); + //Lab + if (game.roomx == 101 && game.roomy == 115) music.niceplay(4); + if (game.roomx == 100 && game.roomy == 115) music.niceplay(4); + if (game.roomx == 101 && game.roomy == 116) music.niceplay(4); + if (game.roomx == 100 && game.roomy == 116) music.niceplay(4); + if (game.roomx == 102 && game.roomy == 116) music.niceplay(3); + if (game.roomx == 102 && game.roomy == 117) music.niceplay(3); + if (game.roomx == 101 && game.roomy == 117) music.niceplay(3); + //Space Station + if (game.intimetrial) + { + if (game.roomx == 111 && game.roomy == 112) music.niceplay(1); + if (game.roomx == 111 && game.roomy == 113) music.niceplay(1); + if (game.roomx == 112 && game.roomy == 114) music.niceplay(1); + if (game.roomx == 112 && game.roomy == 115) music.niceplay(1); + } + else + { + if (game.roomx == 111 && game.roomy == 112) music.niceplay(1); + if (game.roomx == 111 && game.roomy == 113) music.niceplay(1); + if (game.roomx == 112 && game.roomy == 114) music.niceplay(4); + if (game.roomx == 112 && game.roomy == 115) music.niceplay(4); + } + //Leaving the Ship + if (game.roomx == 104 && game.roomy == 112) music.niceplay(4); + } + temp = rx + (ry * 100); + loadlevel(game.roomx, game.roomy, dwgfx, game, obj, music); + + + dwgfx.backgrounddrawn = false; //Used for background caching speedup + dwgfx.foregrounddrawn = false; //Used for background caching speedup + + //a very special case: if entering the communication room, room 13,4 before tag 5 is set, set the game state to a background + //textbox thingy. if tag five is not set when changing room, reset the game state. (tag 5 is set when you get back to the ship) + if(!game.intimetrial && !custommode) + { + if (obj.flags[5] == 0 && !finalmode) + { + game.state = 0; + if (game.roomx == 113 && game.roomy == 104) + { + game.state = 50; + } + } + } + + //Ok, kludge to fix lines in crossing rooms - if we're intersecting a gravity line right now, let's + //set it to an inactive state. + + //Alright! So, let's look at our lines from the previous rooms, and determine if any of them are actually + //continuations! + + temp = obj.getplayer(); + if(temp>-1) + { + obj.entities[temp].oldxp = obj.entities[temp].xp; + obj.entities[temp].oldyp = obj.entities[temp].yp; + } + + for (int i = 0; i < obj.nentity; i++) + { + if (obj.entities[i].type == 9 && obj.entities[i].active) + { + //It's a horizontal line + if (obj.entities[i].xp <= 0 || obj.entities[i].xp + obj.entities[i].w >= 312) + { + //it's on a screen edge + for (j = 0; j < obj.nlinecrosskludge; j++) + { + if (obj.entities[i].yp == obj.linecrosskludge[j].yp) + { + //y's match, how about x's? + //we're moving left: + if (game.roomchangedir == 0) + { + if (obj.entities[i].xp + obj.entities[i].w >= 312 && obj.linecrosskludge[j].xp <= 0) + { + obj.revertlinecross(i, j); + } + } + else + { + if (obj.entities[i].xp <= 0 && obj.linecrosskludge[j].xp + obj.linecrosskludge[j].w >= 312) + { + obj.revertlinecross(i, j); + } + } + } + } + } + } + } +} + +std::string mapclass::currentarea(int t) +{ + switch(t) + { + case 0: + return "Dimension VVVVVV"; + break; + case 1: + return "Dimension VVVVVV"; + break; + case 2: + return "Laboratory"; + break; + case 3: + return "The Tower"; + break; + case 4: + return "Warpzone"; + break; + case 5: + return "Space Station"; + break; + case 6: + return "Outside Dimension VVVVVV"; + break; + case 7: + return "Outside Dimension VVVVVV"; + break; + case 8: + return "Outside Dimension VVVVVV"; + break; + case 9: + return "Outside Dimension VVVVVV"; + break; + case 10: + return "Outside Dimension VVVVVV"; + break; + case 11: + return "The Tower"; + break; + } + return "???"; +} + +void mapclass::loadlevel(int rx, int ry, Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music) +{ + int t; + //t = rx + (ry * 100); + //roomname = "[UNTITLED] (" + String(rx)+","+String(ry)+")"; + if (!finalmode) + { + explored[rx - 100 + ((ry - 100) * 20)] = 1; + if (rx == 109 && !custommode) + { + exploretower(); + } + } + + + roomtexton = false; + roomtextnumlines = 0; + + obj.platformtile = 0; + obj.customplatformtile=0; + obj.vertplatforms = false; + obj.horplatforms = false; + roomname = ""; + background = 1; + warpx = false; + warpy = false; + + towermode = false; + ypos = 0; + extrarow = 0; + + //Custom stuff for warplines + obj.customwarpmode=false; + obj.customwarpmodevon=false; + obj.customwarpmodehon=false; + + std::vector tmap; + + if (finalmode) + { + t = 6; + //check if we're in the towers + if (rx == 49 && ry == 52) + { + //entered tower 1 + t = 7; + } + else if (rx == 49 && ry == 53) + { + //re entered tower 1 + t = 8; + } + else if (rx == 51 && ry == 54) + { + //entered tower 2 + t = 9; + } + else if (rx == 51 && ry == 53) + { + //re entered tower 2 + t = 10; + } + } + else if (custommode) + { + t= 12; + } + else + { + t = area(rx, ry); + + if (t == 3) + { + //correct position for tower + if (ry == 109) + { + //entered from ground floor + int player = obj.getplayer(); + obj.entities[player].yp += (671 * 8); + + ypos = (700-29) * 8; + bypos = ypos / 2; + cameramode = 0; + colstate = 0; + colsuperstate = 0; + } + else if (ry == 104) + { + //you've entered from the top floor + ypos = 0; + bypos = 0; + cameramode = 0; + colstate = 0; + colsuperstate = 0; + } + } + + if (t < 2) //on the world map, want to test if we're in the secret lab + { + if (rx >= 116) + { + if (ry >= 105) + { + if (ry <= 107) + { + if (rx == 119 && ry == 105) + { + //Ah, this is just a normal area + } + else + { + //in the secret lab! Crazy background! + background = 2; + if (rx == 116 && ry == 105) dwgfx.rcol = 1; + if (rx == 117 && ry == 105) dwgfx.rcol = 5; + if (rx == 118 && ry == 105) dwgfx.rcol = 4; + if (rx == 117 && ry == 106) dwgfx.rcol = 2; + if (rx == 118 && ry == 106) dwgfx.rcol = 0; + if (rx == 119 && ry == 106) dwgfx.rcol = 3; + if (rx == 119 && ry == 107) dwgfx.rcol = 1; + } + } + } + } + } + } + + if (rx == 119 && ry == 108) + { + background = 5; + dwgfx.rcol = 3; + warpx = true; + warpy = true; + } + + switch(t) + { + case 0: + #if !defined(MAKEANDPLAY) + case 1: //World Map + tileset = 1; + extrarow = 1; + tmap = otherlevel.loadlevel(rx, ry, game, obj); + fillcontent(tmap); + roomname = otherlevel.roomname; + tileset = otherlevel.roomtileset; + //do the appear/remove roomname here + + if (otherlevel.roomtexton) + { + roomtexton = true; + roomtextx[0] = otherlevel.roomtextx; + roomtexty[0] = otherlevel.roomtexty; + roomtextnumlines = otherlevel.roomtextnumlines; + for (int i = 0; i < roomtextnumlines; i++) + { + roomtext[i] = otherlevel.roomtext[i]; + } + } + break; + case 2: //The Lab + tmap = lablevel.loadlevel(rx, ry, game, obj); + fillcontent(tmap); + roomname = lablevel.roomname; + tileset = 1; + background = 2; + dwgfx.rcol = lablevel.rcol; + break; + case 3: //The Tower + tdrawback = true; + minitowermode = false; + tower.minitowermode = false; + bscroll = 0; + scrolldir = 0; + + roomname = "The Tower"; + tileset = 1; + background = 3; + towermode = true; + //bypos = 0; ypos = 0; cameramode = 0; + + //All the entities for here are just loaded here; it's essentially one room after all + + + obj.createentity(game, 48, 5456, 10, 1, 505007); // (savepoint) + obj.createentity(game, 224, 4528, 10, 1, 505017); // (savepoint) + obj.createentity(game, 232, 4168, 10, 0, 505027); // (savepoint) + obj.createentity(game, 280, 3816, 10, 1, 505037); // (savepoint) + obj.createentity(game, 152, 3552, 10, 1, 505047); // (savepoint) + obj.createentity(game, 216, 3280, 10, 0, 505057); // (savepoint) + obj.createentity(game, 216, 4808, 10, 1, 505067); // (savepoint) + obj.createentity(game, 72, 3096, 10, 0, 505077); // (savepoint) + obj.createentity(game, 176, 2600, 10, 0, 505087); // (savepoint) + obj.createentity(game, 216, 2392, 10, 0, 505097); // (savepoint) + obj.createentity(game, 152, 1184, 10, 1, 505107); // (savepoint) + obj.createentity(game, 152, 912, 10, 1, 505117); // (savepoint) + obj.createentity(game, 152, 536, 10, 1, 505127); // (savepoint) + obj.createentity(game, 120, 5136, 10, 0, 505137); // (savepoint) + obj.createentity(game, 144, 1824, 10, 0, 505147); // (savepoint) + obj.createentity(game, 72, 2904, 10, 0, 505157); // (savepoint) + obj.createentity(game, 224, 1648, 10, 1, 505167); // (savepoint) + obj.createentity(game, 112, 5280, 10, 1, 50517); // (savepoint) + + obj.createentity(game, 24, 4216, 9, 7); // (shiny trinket) + obj.createentity(game, 280, 3216, 9, 8); // (shiny trinket) + break; + case 4: //The Warpzone + tmap = warplevel.loadlevel(rx, ry, game, obj); + fillcontent(tmap); + roomname = warplevel.roomname; + tileset = 1; + background = 3; + dwgfx.rcol = warplevel.rcol; + dwgfx.backgrounddrawn = false; + + warpx = warplevel.warpx; + warpy = warplevel.warpy; + background = 5; + if (warpy) background = 4; + if (warpx) background = 3; + if (warpx && warpy) background = 5; + break; + case 5: //Space station + tmap = spacestation2.loadlevel(rx, ry, game, obj); + fillcontent(tmap); + roomname = spacestation2.roomname; + tileset = 0; + break; + case 6: //final level + tmap = finallevel.loadlevel(finalx, finaly, game, obj); + fillcontent(tmap); + roomname = finallevel.roomname; + tileset = 1; + background = 3; + dwgfx.rcol = finallevel.rcol; + dwgfx.backgrounddrawn = false; + + if (finalstretch) + { + background = 6; + } + else + { + warpx = finallevel.warpx; + warpy = finallevel.warpy; + background = 5; + if (warpy) background = 4; + if (warpx) background = 3; + if (warpx && warpy) background = 5; + } + + dwgfx.rcol = 6; + changefinalcol(final_mapcol, obj, game); + break; + case 7: //Final Level, Tower 1 + tdrawback = true; + minitowermode = true; + tower.minitowermode = true; + bscroll = 0; + scrolldir = 1; + + roomname = "Panic Room"; + tileset = 1; + background = 3; + towermode = true; + + tower.loadminitower1(); + + ypos = 0; + bypos = 0; + cameramode = 0; + colstate = 0; + colsuperstate = 0; + break; + case 8: //Final Level, Tower 1 (reentered from below) + { + tdrawback = true; + minitowermode = true; + tower.minitowermode = true; + bscroll = 0; + scrolldir = 1; + + roomname = "Panic Room"; + tileset = 1; + background = 3; + towermode = true; + + tower.loadminitower1(); + + int i = obj.getplayer(); + obj.entities[i].yp += (71 * 8); + game.roomy--; + finaly--; + + ypos = (100-29) * 8; + bypos = ypos/2; + cameramode = 0; + colstate = 0; + colsuperstate = 0;} + break; + case 9: //Final Level, Tower 2 + { + tdrawback = true; + minitowermode = true; + tower.minitowermode = true; + bscroll = 0; + scrolldir = 0; + final_colorframe = 2; + + roomname = "The Final Challenge"; + tileset = 1; + background = 3; + towermode = true; + + tower.loadminitower2(); + + obj.createentity(game, 56, 556, 11, 136); // (horizontal gravity line) + obj.createentity(game, 184, 592, 10, 0, 50500); // (savepoint) + obj.createentity(game, 184, 644, 11, 88); // (horizontal gravity line) + obj.createentity(game, 56, 460, 11, 136); // (horizontal gravity line) + obj.createentity(game, 216, 440, 10, 0, 50501); // (savepoint) + obj.createentity(game, 104, 508, 11, 168); // (horizontal gravity line) + obj.createentity(game, 219, 264, 12, 56); // (vertical gravity line) + obj.createentity(game, 120, 332, 11, 96); // (horizontal gravity line) + obj.createentity(game, 219, 344, 12, 56); // (vertical gravity line) + obj.createentity(game, 224, 332, 11, 48); // (horizontal gravity line) + obj.createentity(game, 56, 212, 11, 144); // (horizontal gravity line) + obj.createentity(game, 32, 20, 11, 96); // (horizontal gravity line) + obj.createentity(game, 72, 156, 11, 200); // (horizontal gravity line) + + int i = obj.getplayer(); + obj.entities[i].yp += (71 * 8); + game.roomy--; + finaly--; + + ypos = (100-29) * 8; + bypos = ypos/2; + cameramode = 0; + colstate = 0; + colsuperstate = 0; + } + break; + case 10: //Final Level, Tower 2 + { + + tdrawback = true; + minitowermode = true; + tower.minitowermode = true; + bscroll = 0; + scrolldir = 0; + final_colorframe = 2; + + roomname = "The Final Challenge"; + tileset = 1; + background = 3; + towermode = true; + + tower.loadminitower2(); + + obj.createentity(game, 56, 556, 11, 136); // (horizontal gravity line) + obj.createentity(game, 184, 592, 10, 0, 50500); // (savepoint) + obj.createentity(game, 184, 644, 11, 88); // (horizontal gravity line) + obj.createentity(game, 56, 460, 11, 136); // (horizontal gravity line) + obj.createentity(game, 216, 440, 10, 0, 50501); // (savepoint) + obj.createentity(game, 104, 508, 11, 168); // (horizontal gravity line) + obj.createentity(game, 219, 264, 12, 56); // (vertical gravity line) + obj.createentity(game, 120, 332, 11, 96); // (horizontal gravity line) + obj.createentity(game, 219, 344, 12, 56); // (vertical gravity line) + obj.createentity(game, 224, 332, 11, 48); // (horizontal gravity line) + obj.createentity(game, 56, 212, 11, 144); // (horizontal gravity line) + obj.createentity(game, 32, 20, 11, 96); // (horizontal gravity line) + obj.createentity(game, 72, 156, 11, 200); // (horizontal gravity line) + + ypos = 0; + bypos = 0; + cameramode = 0; + colstate = 0; + colsuperstate = 0; + } + break; + case 11: //Tower Hallways //Content is held in final level routine + { + tmap = finallevel.loadlevel(rx, ry, game, obj); + fillcontent(tmap); + roomname = finallevel.roomname; + tileset = 2; + if (rx == 108) + { + background = 7; + rcol = 15; + } + if (rx == 110) + { + background = 8; + rcol = 10; + } + if (rx == 111) + { + background = 9; + rcol = 0; + } + } + break; + #endif + case 12: //Custom level + int curlevel=(rx-100)+((ry-100)*ed.maxwidth); + game.customcol=ed.getlevelcol(curlevel)+1; + obj.customplatformtile=game.customcol*12; + switch(ed.level[curlevel].tileset){ + case 0: //Space Station + tileset = 0; + background = 1; + break; + case 1: //Outside + tileset = 1; + background = 1; + break; + case 2: //Lab + tileset = 1; + background = 2; + dwgfx.rcol = ed.level[curlevel].tilecol; + break; + case 3: //Warp Zone/intermission + tileset = 1; + background = 6; + break; + case 4://Ship + tileset = 1; + background = 1; + break; + default: + tileset = 1; + background = 1; + break; + } + + //If screen warping, then override all that: + dwgfx.backgrounddrawn = false; + if(ed.level[curlevel].warpdir>0){ + if(ed.level[curlevel].warpdir==1){ + warpx=true; + background=3; + dwgfx.rcol = ed.getwarpbackground(rx-100,ry-100); + }else if(ed.level[curlevel].warpdir==2){ + warpy=true; + background=4; + dwgfx.rcol = ed.getwarpbackground(rx-100,ry-100); + }else if(ed.level[curlevel].warpdir==3){ + warpx=true; warpy=true; + background = 5; + dwgfx.rcol = ed.getwarpbackground(rx-100,ry-100); + } + } + + roomname=""; + if(ed.level[curlevel].roomname!=""){ + roomname=ed.level[curlevel].roomname; + } + extrarow = 1; + ed.loadlevel(rx, ry); + + + roomtexton = false; + roomtextnumlines=0; + + for (int edj = 0; edj < 30; edj++){ + for(int edi = 0; edi < 40; edi++){ + contents[edi + vmult[edj]] = ed.swapmap[edi + vmult[edj]]; + } + } + + //Entities have to be created HERE, akwardly + int tempcheckpoints=0; + int tempscriptbox=0; + for(int edi=0; edi=5 && edentity[edi].p1<=8){ //Threadmill + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8),(edentity[edi].y*8)- ((ry-100)*30*8), 2, + edentity[edi].p1+3, 4); + } + break; + case 3: //Disappearing platforms + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8),(edentity[edi].y*8)- ((ry-100)*30*8), 3); + break; + case 9: + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8),(edentity[edi].y*8)- ((ry-100)*30*8), 9, ed.findtrinket(edi)); + break; + case 10: //Checkpoints + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8),(edentity[edi].y*8)- ((ry-100)*30*8), 10, + edentity[edi].p1,((rx+(ry*100))*20)+tempcheckpoints); + tempcheckpoints++; + break; + case 11: //Gravity Lines + if(edentity[edi].p1==0){ //Horizontal + obj.createentity(game, (edentity[edi].p2*8),(edentity[edi].y*8)- ((ry-100)*30*8)+4, 11, edentity[edi].p3); + }else{ //Vertical + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8)+3,(edentity[edi].p2*8), 12, edentity[edi].p3); + } + break; + case 13: //Warp Tokens + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8),(edentity[edi].y*8)- ((ry-100)*30*8), 13, edentity[edi].p1, edentity[edi].p2); + break; + case 15: //Collectable crewmate + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8)-4,(edentity[edi].y*8)- ((ry-100)*30*8)+1, 55, ed.findcrewmate(edi), edentity[edi].p1, edentity[edi].p2); + break; + case 17: //Roomtext! + roomtexton = true; + roomtextx[roomtextnumlines] = edentity[edi].x - ((rx-100)*40); + roomtexty[roomtextnumlines] = edentity[edi].y - ((ry-100)*30); + roomtext[roomtextnumlines] = edentity[edi].scriptname; + roomtextnumlines++; + break; + case 18: //Terminals + obj.customscript=edentity[edi].scriptname; + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8),(edentity[edi].y*8)- ((ry-100)*30*8)+8, 20, 1); + obj.createblock(5, (edentity[edi].x*8)- ((rx-100)*40*8)-8, (edentity[edi].y*8)- ((ry-100)*30*8)+8, 20, 16, 35); + break; + case 19: //Script Box + game.customscript[tempscriptbox]=edentity[edi].scriptname; + obj.createblock(1, (edentity[edi].x*8)- ((rx-100)*40*8), (edentity[edi].y*8)- ((ry-100)*30*8), + edentity[edi].p1*8, edentity[edi].p2*8, 300+tempscriptbox); + tempscriptbox++; + break; + case 50: //Warp Lines + obj.customwarpmode=true; + if(edentity[edi].p1==0){ // + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8)+4,(edentity[edi].p2*8), 51, edentity[edi].p3); + }else if(edentity[edi].p1==1){ //Horizontal, right + obj.createentity(game, (edentity[edi].x*8)- ((rx-100)*40*8)+4,(edentity[edi].p2*8), 52, edentity[edi].p3); + }else if(edentity[edi].p1==2){ //Vertical, top + obj.createentity(game, (edentity[edi].p2*8),(edentity[edi].y*8)- ((ry-100)*30*8)+7, 53, edentity[edi].p3); + }else if(edentity[edi].p1==3){ + obj.createentity(game, (edentity[edi].p2*8),(edentity[edi].y*8)- ((ry-100)*30*8), 54, edentity[edi].p3); + } + break; + } + } + } + + customtrinkets=ed.numtrinkets; + customcrewmates=ed.numcrewmates; + + //do the appear/remove roomname here + /* + + if (otherlevel.roomtexton) + { + roomtexton = true; + roomtextx[0] = otherlevel.roomtextx; + roomtexty[0] = otherlevel.roomtexty; + roomtextnumlines = otherlevel.roomtextnumlines; + for (int i = 0; i < roomtextnumlines; i++) + { + roomtext[i] = otherlevel.roomtext[i]; + } + }*/ + break; + } + //The room's loaded: now we fill out damage blocks based on the tiles. + if (towermode) + { + for (int j = 0; j < 700; j++) + { + for (int i = 0; i < 40; i++) + { + //Damage blocks + //if (tower.contents[i + tower.vmult[j]] >=6 && tower.contents[i + tower.vmult[j]] <= 11) obj.createblock(2, (i * 8) + 1, j * 8, 6, 8); + } + } + } + else + { + for (int j = 0; j < 29 + extrarow; j++) + { + for (int i = 0; i < 40; i++) + { + //Damage blocks + if(tileset==0) + { + if (contents[i + vmult[j]] == 6 || contents[i + vmult[j]] == 8) + { + //sticking up + obj.createblock(2, (i * 8), (j * 8)+4, 8, 4); + } + if (contents[i + vmult[j]] == 7 || contents[i + vmult[j]] == 9) + { + //Sticking down + obj.createblock(2, (i * 8), (j * 8), 8, 4); + } + if (contents[i + vmult[j]] == 49 || contents[i + vmult[j]] == 50) + { + //left or right + obj.createblock(2, (i * 8), (j * 8)+3, 8, 2); + } + } + else if(tileset==1) + { + //if (contents[i + vmult[j]] >= 6 && contents[i + vmult[j]] <= 9) obj.createblock(2, (i * 8), (j * 8)+1, 8, 6); + //if (contents[i + vmult[j]] >= 49 && contents[i + vmult[j]] <= 79) obj.createblock(2, (i * 8) + 1, (j * 8) + 1, 6, 6); + if ((contents[i + vmult[j]] >= 63 && contents[i + vmult[j]] <= 74) || + (contents[i + vmult[j]] >= 6 && contents[i + vmult[j]] <= 9)) + { + //sticking up) { + if (contents[i + vmult[j]] < 10) contents[i + vmult[j]]++; + //sticking up + if(contents[i + vmult[j]]%2==0) + { + obj.createblock(2, (i * 8), (j * 8), 8, 4); + } + else + { + //Sticking down + obj.createblock(2, (i * 8), (j * 8) + 4, 8, 4); + } + if (contents[i + vmult[j]] < 11) contents[i + vmult[j]]--; + } + if (contents[i + vmult[j]] >= 49 && contents[i + vmult[j]] <= 62) + { + //left or right + obj.createblock(2, (i * 8), (j * 8)+3, 8, 2); + } + } + else if(tileset==2) + { + if (contents[i + vmult[j]] == 6 || contents[i + vmult[j]] == 8) + { + //sticking up + obj.createblock(2, (i * 8), (j * 8)+4, 8, 4); + } + if (contents[i + vmult[j]] == 7 || contents[i + vmult[j]] == 9) + { + //Sticking down + obj.createblock(2, (i * 8), (j * 8), 8, 4); + } + } + //Breakable blocks + if (contents[i + vmult[j]] == 10) + { + contents[i + vmult[j]] = 0; + obj.createentity(game, i * 8, j * 8, 4); + } + //Directional blocks + if (contents[i + vmult[j]] >= 14 && contents[i + vmult[j]] <= 17) + { + obj.createblock(3, i * 8, j * 8, 8, 8, contents[i + vmult[j]]-14); + } + } + } + + for (int i = 0; i < obj.nentity; i++) + { + if (obj.entities[i].active) + { + if (obj.entities[i].type == 1 && obj.entities[i].behave >= 8 && obj.entities[i].behave < 10) + { + //put a block underneath + temp = obj.entities[i].xp / 8.0f; + temp2 = obj.entities[i].yp / 8.0f; + settile(temp, temp2, 1); + settile(temp+1, temp2, 1); + settile(temp+2, temp2, 1); + settile(temp+3, temp2, 1); + if (obj.entities[i].w == 64) + { + settile(temp+4, temp2, 1); + settile(temp+5, temp2, 1); + settile(temp+6, temp2, 1); + settile(temp+7, temp2, 1); + } + } + } + } + } + + //Special scripting: Create objects and triggers based on what crewmembers are rescued. + if (!finalmode) + { + //First up: the extra bits: + //Vermilion's quest: + if (rx == 100 && ry == 105) //On path to verdigris + { + if (game.crewstats[3] && !game.crewstats[4]) + { + obj.createentity(game, 87, 105, 18, 15, 0, 18); + obj.createblock(5, 87-32, 0, 32+32+32, 240, 3); + } + } + else if (rx == 107 && ry == 100) //victoria + { + if (game.crewstats[3] && !game.crewstats[5]) + { + obj.createentity(game, 140, 137, 18, 15, 0, 18); + obj.createblock(5, 140-32, 0, 32+32+32, 240, 3); + } + } + else if (rx == 114 && ry == 109) + { + if (game.crewstats[3] && !game.crewstats[2]) + { + obj.createentity(game, 235, 81, 18, 15, 0, 18); + obj.createblock(5, 235-32, 0, 32+32+32, 240, 3); + } + } + + //Verdigris fixing the ship + if (rx == 101 && ry == 109) + { + if (game.crewstats[4]) + { + if(game.crewrescued()>4 && game.crewrescued()!=6) + { + obj.createentity(game, 175, 121, 18, 13, 0, 18); + obj.createblock(5, 175-32, 0, 32+32+32, 240, 4); + } + } + } + else if (rx == 103 && ry == 109) + { + if (game.crewstats[4]) + { + if(game.crewrescued()<=4 && game.crewrescued()!=6) + { + obj.createentity(game, 53, 161, 18, 13, 1, 18); + obj.createblock(5, 53-32, 0, 32+32+32, 240, 4); + } + } + } + + if (rx == 104 && ry == 111) + { + //Red + //First: is he rescued? + if (game.crewstats[3]) + { + //If so, red will always be at his post + obj.createentity(game, 107, 121, 18, 15, 0, 18); + //What script do we use? + obj.createblock(5, 107-32, 0, 32+32+32, 240, 3); + } + } + else if (rx == 103 && ry == 111) + { + //Yellow + //First: is he rescued? + if (game.crewstats[2]) + { + obj.createentity(game, 198, 105, 18, 14, 0, 18); + //What script do we use? + obj.createblock(5, 198-32, 0, 32+32+32, 240, 2); + } + } + else if (rx == 103 && ry == 110) + { + //Green + //First: is he rescued? + if (game.crewstats[4]) + { + obj.createentity(game, 242, 177, 18, 13, 0, 18); + //What script do we use? + obj.createblock(5, 242-32, 177-20, 32+32+32, 40, 4); + } + } + else if (rx == 104 && ry == 110) + { + //Purple + //First: is she rescued? + if (game.crewstats[1]) + { + obj.createentity(game, 140, 177, 18, 20, 0, 18); + //What script do we use? + obj.createblock(5, 140-32, 0, 32+32+32, 240, 1); + } + } + else if (rx == 102 && ry == 110) + { + //Blue + //First: is she rescued? + if (game.crewstats[5]) + { + //A slight varation - she's upside down + obj.createentity(game, 249, 62, 18, 16, 0, 18); + j = obj.getcrewman(5); + obj.entities[j].rule = 7; + obj.entities[j].tile +=6; + //What script do we use? + obj.createblock(5, 249-32, 0, 32+32+32, 240, 5); + } + } + } + + //Make sure our crewmates are facing the player if appliciable + for (int i = 0; i < obj.nentity; i++) + { + if (obj.entities[i].rule == 6 || obj.entities[i].rule == 7) + { + if (obj.entities[i].state == 18) + { + //face the player + j = obj.getplayer(); + if (obj.entities[j].xp > obj.entities[i].xp + 5) + { + obj.entities[i].dir = 1; + } + else if (obj.entities[j].xp < obj.entities[i].xp - 5) + { + obj.entities[i].dir = 0; + } + } + } + } +} diff --git a/desktop_version/src/Map.h b/desktop_version/src/Map.h new file mode 100644 index 00000000..604b296d --- /dev/null +++ b/desktop_version/src/Map.h @@ -0,0 +1,182 @@ +#ifndef MAPGAME_H +#define MAPGAME_H + +#include "Tower.h" +#include "WarpClass.h" +#include "Finalclass.h" +#include "Labclass.h" +#include "Spacestation2.h" +#include "Otherlevel.h" +#include "Entity.h" +#include "Graphics.h" +#include +#include "Music.h" +#include "editor.h" + +extern editorclass ed; + +class mapclass +{ +public: + mapclass(); + + int RGB(int red,int green,int blue); + + int intpol(int a, int b, float c); + + void setteleporter(int t, int x, int y); + + void settrinket(int t, int x, int y); + + void resetmap(); + + void resetnames(); + + void transformname(int t); + + std::string getglitchname(int x, int y); + + void initmapdata(); + + int finalat(int x, int y); + + int maptiletoenemycol(int t); + + void changefinalcol(int t, entityclass& obj, Game& game); + + void setcol(const int r1, const int g1, const int b1 , const int r2, const int g2, const int b2, const int c); + + void updatetowerglow(); + + void nexttowercolour(); + + void settowercolour(int t); + + bool spikecollide(int x, int y); + + bool collide(int x, int y); + + void fillareamap(std::vector& tmap); + + void settile(int xp, int yp, int t); + + void fillcontent(std::vector& tmap); + + + int area(int _rx, int _ry); + + void exploretower(); + + void hideship(); + + void showship(); + + void resetplayer(Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music); + + void warpto(int rx, int ry , int t, int tx, int ty, Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music); + + void gotoroom(int rx, int ry, Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music); + + std::string currentarea(int t); + + void loadlevel(int rx, int ry, Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music); + + + std::vector roomdeaths; + std::vector roomdeathsfinal; + std::vector areamap; + std::vector contents; + std::vector explored; + std::vector vmult; + std::vector tmap; + + int temp; + int temp2; + int j; + int background; + int rcol; + int tileset; + bool warpx; + bool warpy; + + + std::string roomname; + + //Special tower stuff + bool towermode; + float ypos; + int bypos; + int cameramode; + int cameraseek, cameraseekframe; + int resumedelay; + bool minitowermode; + int scrolldir; + + //This is the old colour cycle + int r, g,b; + int check, cmode; + int towercol; + int colstate, colstatedelay; + int colsuperstate; + int spikeleveltop, spikelevelbottom; + bool tdrawback; + int bscroll; + //final level navigation + int finalx; + int finaly; + bool finalmode; + bool finalstretch; + + //Variables for playing custom levels + bool custommode; + bool custommodeforreal; + int customx, customy; + int customwidth, customheight; + int customtrinkets; + int customcrewmates; + int custommmxoff, custommmyoff, custommmxsize, custommmysize; + int customzoom; + bool customshowmm; + + std::vector specialnames; + int glitchmode; + int glitchdelay; + std::string glitchname; + + //final level colour cycling stuff + bool final_colormode; + int final_mapcol; + int final_aniframe; + int final_aniframedelay; + int final_colorframe, final_colorframedelay; + + //Teleporters and Trinkets on the map + std::vector teleporters; + std::vector shinytrinkets; + + int numteleporters, numshinytrinkets; + bool showteleporters, showtargets, showtrinkets; + + //Roomtext + int roomtextx[100], roomtexty[100]; + bool roomtexton; + std::vector roomtext; + int roomtextnumlines; + + //Levels + otherlevelclass otherlevel; + spacestation2class spacestation2; + labclass lablevel; + finalclass finallevel; + warpclass warplevel; + towerclass tower; + int extrarow; + + //Accessibility options + bool invincibility; + + //Map cursor + int cursorstate, cursordelay; +}; + +#endif /* MAPGAME_H */ diff --git a/desktop_version/src/Maths.h b/desktop_version/src/Maths.h new file mode 100644 index 00000000..44396273 --- /dev/null +++ b/desktop_version/src/Maths.h @@ -0,0 +1,28 @@ +#ifndef MATHGAME_H +#define MATHGAME_H + +#include +#include + +//// This header holds Maths functions that emulate the functionality of flash's + + +//random +//Returns 0..1 +float inline fRandom() +{ + return ( float(rand()) / float(RAND_MAX)) ; +} + +inline int clamp(int x, int a, int b) +{ + return x < a ? a : (x > b ? b : x); +} + +struct point +{ + int x; + int y; +}; + +#endif /* MATHGAME_H */ diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp new file mode 100644 index 00000000..7065c9dd --- /dev/null +++ b/desktop_version/src/Music.cpp @@ -0,0 +1,454 @@ +#include +#include +#include "Music.h" +#include "BinaryBlob.h" + +musicclass::musicclass() +{ + soundTracks.push_back(SoundTrack( "sounds/jump.wav" )); + soundTracks.push_back(SoundTrack( "sounds/jump2.wav" )); + soundTracks.push_back(SoundTrack( "sounds/hurt.wav" )); + soundTracks.push_back(SoundTrack( "sounds/souleyeminijingle.wav" )); + soundTracks.push_back(SoundTrack( "sounds/coin.wav" )); + soundTracks.push_back(SoundTrack( "sounds/save.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crumble.wav" )); + soundTracks.push_back(SoundTrack( "sounds/vanish.wav" )); + soundTracks.push_back(SoundTrack( "sounds/blip.wav" )); + soundTracks.push_back(SoundTrack( "sounds/preteleport.wav" )); + soundTracks.push_back(SoundTrack( "sounds/teleport.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crew1.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crew2.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crew3.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crew4.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crew5.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crew6.wav" )); + soundTracks.push_back(SoundTrack( "sounds/terminal.wav" )); + soundTracks.push_back(SoundTrack( "sounds/gamesaved.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crashing.wav" )); + soundTracks.push_back(SoundTrack( "sounds/blip2.wav" )); + soundTracks.push_back(SoundTrack( "sounds/countdown.wav" )); + soundTracks.push_back(SoundTrack( "sounds/go.wav" )); + soundTracks.push_back(SoundTrack( "sounds/crash.wav" )); + soundTracks.push_back(SoundTrack( "sounds/combine.wav" )); + soundTracks.push_back(SoundTrack( "sounds/newrecord.wav" )); + soundTracks.push_back(SoundTrack( "sounds/trophy.wav" )); + soundTracks.push_back(SoundTrack( "sounds/rescue.wav" )); + +#ifdef VVV_COMPILEMUSIC + binaryBlob musicWriteBlob; + musicWriteBlob.AddFileToBinaryBlob("data/music/0levelcomplete.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/1pushingonwards.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/2positiveforce.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/3potentialforanything.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/4passionforexploring.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/5intermission.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/6presentingvvvvvv.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/7gamecomplete.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/8predestinedfate.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/9positiveforcereversed.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/10popularpotpourri.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/11pipedream.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/12pressurecooker.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/13pacedenergy.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/14piercingthesky.ogg"); + musicWriteBlob.AddFileToBinaryBlob("data/music/predestinedfatefinallevel.ogg"); + + musicWriteBlob.writeBinaryBlob("data/BinaryMusic.vvv"); +#endif + + binaryBlob musicReadBlob; + if (!musicReadBlob.unPackBinary("mmmmmm.vvv")) + { + mmmmmm = false; + usingmmmmmm=false; + bool ohCrap = musicReadBlob.unPackBinary("vvvvvvmusic.vvv"); + SDL_assert(ohCrap && "Music not found!"); + } + else + { + mmmmmm = true; + usingmmmmmm = true; + int index = musicReadBlob.getIndex("data/music/0levelcomplete.ogg"); + SDL_RWops *rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/1pushingonwards.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/2positiveforce.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/3potentialforanything.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/4passionforexploring.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/5intermission.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/6presentingvvvvvv.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/7gamecomplete.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/8predestinedfate.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/9positiveforcereversed.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/10popularpotpourri.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/11pipedream.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/12pressurecooker.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/13pacedenergy.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/14piercingthesky.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/predestinedfatefinallevel.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + bool ohCrap = musicReadBlob.unPackBinary("vvvvvvmusic.vvv"); + SDL_assert(ohCrap && "Music not found!"); + } + + int index = musicReadBlob.getIndex("data/music/0levelcomplete.ogg"); + SDL_RWops *rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/1pushingonwards.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/2positiveforce.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/3potentialforanything.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/4passionforexploring.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/5intermission.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/6presentingvvvvvv.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/7gamecomplete.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/8predestinedfate.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/9positiveforcereversed.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/10popularpotpourri.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/11pipedream.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/12pressurecooker.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/13pacedenergy.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/14piercingthesky.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + index = musicReadBlob.getIndex("data/music/predestinedfatefinallevel.ogg"); + rw = SDL_RWFromMem(musicReadBlob.getAddress(index), musicReadBlob.getSize(index)); + musicTracks.push_back(MusicTrack( rw )); + + safeToProcessMusic= false; + m_doFadeInVol = false; + musicVolume = 128; + FadeVolAmountPerFrame = 0; + + custompd = false; + // currentsong = -1; + // nicefade = 0; +} + +void musicclass::play(int t) +{ + t = (t % 16); + + if(mmmmmm) + { + if(!usingmmmmmm) + { + t += 16; + } + } + safeToProcessMusic = true; + Mix_VolumeMusic(128); + if (currentsong !=t) + { + if (currentsong != -1) + { + // Stop the old song first + // musicchannel.stop(); + if (currentsong != 0) + { + // musicchannel.removeEventListener(Event.SOUND_COMPLETE, loopmusic); + } + } + if (t != -1) + { + // musicfade = 0; + currentsong = t; + if (currentsong == 0 || currentsong == 7) + { + // Level Complete theme, no fade in or repeat + // musicchannel = musicchan[currentsong].play(0); + // musicchannel.soundTransform = new SoundTransform(1.0); + if(Mix_FadeInMusic(musicTracks[t].m_music, 0, 0)==-1) + { + printf("Mix_PlayMusic: %s\n", Mix_GetError()); + } + } + else + { + // musicfadein = 90; + // musicchannel = musicchan[currentsong].play(0); + // musicchannel.soundTransform = new SoundTransform(0); + // musicchannel.addEventListener(Event.SOUND_COMPLETE, loopmusic); + if(Mix_FadeInMusic(musicTracks[t].m_music, -1, 3000)==-1) + { + printf("Mix_FadeInMusic: %s\n", Mix_GetError()); + } + } + } + else + { + currentsong = -1; + } + } +} + +void musicclass::loopmusic() +{ + //musicchannel.removeEventListener(Event.SOUND_COMPLETE, loopmusic); + //if(currentsong>-1){ + // musicchannel = musicchan[currentsong].play(); + // musicchannel.addEventListener(Event.SOUND_COMPLETE, loopmusic); + //} +} + +void musicclass::stopmusic() +{ + // musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); + // musicchannel.stop(); + Mix_HaltMusic(); + currentsong = -1; +} + +void musicclass::haltdasmusik() +{ + // musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); + // musicchannel.stop(); + // resumesong = currentsong; + Mix_HaltMusic(); + currentsong = -1; +} + +void musicclass::silencedasmusik() +{ + //if(currentsong>-1){ + // musicchannel.soundTransform = new SoundTransform(0); + //} + Mix_VolumeMusic(0) ; + musicVolume = 0; +} + +void musicclass::fadeMusicVolumeIn(int ms) +{ + m_doFadeInVol = true; + FadeVolAmountPerFrame = MIX_MAX_VOLUME / (ms / 33); +} + +void musicclass::fadeout() +{ + //if(currentsong>-1){ + // if (musicfade == 0) { + // musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); + // musicfade = 61; + // } + //} + + Mix_FadeOutMusic(2000); + currentsong = -1; +} + +void musicclass::processmusicfade() +{ + //musicfade--; + //if (musicfade > 0) { + // musicchannel.soundTransform = new SoundTransform(musicfade / 60); + //}else { + // musicchannel.stop(); + // currentsong = -1; + //} +} + +void musicclass::processmusicfadein() +{ + musicVolume += FadeVolAmountPerFrame; + Mix_VolumeMusic(musicVolume); + if (musicVolume >= MIX_MAX_VOLUME) + { + m_doFadeInVol = false; + } +} + +void musicclass::processmusic() +{ + if(!safeToProcessMusic) + { + return; + } + + //if (musicfade > 0) processmusicfade(); + //if (musicfadein > 0) processmusicfadein(); + + if (nicefade == 1 && Mix_PlayingMusic() == 0) + { + play(nicechange); + nicechange = -1; nicefade = 0; + } + + if(m_doFadeInVol) + { + processmusicfadein(); + } + + //musicstopother--; + //if (musicstopother == 1) { + // musicstopother = 0; + // if (currentmusicchan == 0) musicchannel2.stop(); + // if (currentmusicchan == 1) musicchannel.stop(); + //} + //if (musicstopother < 0) musicstopother = 0; + + //musicchancur--; + //if (musicchancur <= 0 && currentsong > -1 && musicchanlen > 0) { + // musicchancur = musicchanlen; + // if (currentmusicchan == 0) { + // musicchannel2 = musicchan[currentsong].play(); + // musicstopother = 3; + // currentmusicchan = 1; + // }else { + // musicchannel = musicchan[currentsong].play(); + // musicstopother = 3; + // currentmusicchan = 0; + // } + //} +} + + +void musicclass::niceplay(int t) +{ + // important: do nothing if the correct song is playing! + if(currentsong!=t) + { + if(currentsong!=-1) fadeout(); + nicefade = 1; + nicechange = t; + } +} + +void musicclass::changemusicarea(int x, int y) +{ + switch(musicroom(x, y)) + { + case musicroom(11, 4): + niceplay(2); + break; + + case musicroom(2, 4): + case musicroom(7, 15): + niceplay(3); + break; + + case musicroom(18, 1): + case musicroom(15, 0): + niceplay(12); + break; + + case musicroom(0, 0): + case musicroom(0, 16): + case musicroom(2, 11): + case musicroom(7, 9): + case musicroom(8, 11): + case musicroom(13, 2): + case musicroom(17, 12): + case musicroom(14, 19): + case musicroom(17, 17): + niceplay(4); + break; + + default: + niceplay(1); + break; + } +} + +void musicclass::initefchannels() +{ + // for (var i:int = 0; i < 16; i++) efchannel.push(new SoundChannel); +} + +void musicclass::playef(int t, int offset) +{ + // efchannel[currentefchan] = efchan[t].play(offset); + // currentefchan++; + // if (currentefchan > 15) currentefchan -= 16; + int channel; + + channel = Mix_PlayChannel(-1, soundTracks[t].sound, 0); + if(channel == -1) + { + fprintf(stderr, "Unable to play WAV file: %s\n", Mix_GetError()); + } +} diff --git a/desktop_version/src/Music.h b/desktop_version/src/Music.h new file mode 100644 index 00000000..7e2a67f1 --- /dev/null +++ b/desktop_version/src/Music.h @@ -0,0 +1,65 @@ +#ifndef MUSIC_H +#define MUSIC_H + +#include "SoundSystem.h" + +#include + +#define musicroom(rx, ry) ((rx) + ((ry) * 20)) + +class musicclass +{ +public: + musicclass(); + + void play(int t); + void loopmusic(); + void stopmusic(); + void haltdasmusik(); + void silencedasmusik(); + void fadeMusicVolumeIn(int ms); + void fadeout(); + void processmusicfade(); + void processmusicfadein(); + void processmusic(); + void niceplay(int t); + + void changemusicarea(int x, int y); + + // public var musicchan:Array = new Array(); + // public var musicchannel:SoundChannel, musicchannel2:SoundChannel; + // public var currentmusicchan:int, musicchanlen:int, musicchancur:int, musicstopother:int, resumesong:int; + // public var currentsong:int, musicfade:int, musicfadein:int; + int currentsong, musicfade, musicfadein; + int resumesong; + + //public var nicefade:int, nicechange:int; + + // Play a sound effect! There are 16 channels, which iterate + void initefchannels(); + + void playef(int t, int offset = 0); + + std::vector soundTracks; + std::vector musicTracks; + SoundSystem soundSystem; + bool safeToProcessMusic; + + int nicechange; + int nicefade; + + bool m_doFadeInVol; + int FadeVolAmountPerFrame; + int musicVolume; + + float volume; + + bool custompd; + + // MMMMMM mod settings + bool mmmmmm; + bool usingmmmmmm; +}; + + +#endif /* MUSIC_H */ diff --git a/desktop_version/src/Network.h b/desktop_version/src/Network.h new file mode 100644 index 00000000..93771e1b --- /dev/null +++ b/desktop_version/src/Network.h @@ -0,0 +1,28 @@ +#ifndef VNETWORK_H +#define VNETWORK_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +int NETWORK_init(); + +void NETWORK_shutdown(); + +void NETWORK_update(); + +void NETWORK_unlockAchievement(const char *name); + +int32_t NETWORK_getAchievementProgress(const char *name); + +void NETWORK_setAchievementProgress(const char *name, int32_t stat); + +/* TODO: Steam Workshop? */ + +#ifdef __cplusplus +} +#endif + +#endif /* VNETWORK_H */ diff --git a/desktop_version/src/Otherlevel.cpp b/desktop_version/src/Otherlevel.cpp new file mode 100644 index 00000000..9188f6bc --- /dev/null +++ b/desktop_version/src/Otherlevel.cpp @@ -0,0 +1,8099 @@ +#include "Otherlevel.h" + +otherlevelclass::otherlevelclass() +{ + for (i = 0; i < 50; i++) + { + roomtext.push_back(std::string()); + } +} + +void otherlevelclass::addline(std::string t) +{ + roomtext[roomtextnumlines] = t; + roomtextnumlines++; +} + +std::vector otherlevelclass::loadlevel(int rx, int ry , Game& game, entityclass& obj) +{ + int t; + roomtileset = 1; + + rx -= 100; + ry -= 100; + t = rx + (ry * 100); + std::vector tmap; + roomname = ""; + + roomtextnumlines = 0; + roomtextx = 0; + roomtexty = 0; + roomtexton = false; + + switch(t) + { + case rn(0,0): + + tmap.push_back("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,240,241,241,241,241,241,241,241,241,241,241,241,241,241,242,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,240,241,241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,160,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,121,161,161,161,161,122,80,202,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,202,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,200,80,80,80,80,80,80,80,80,202,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,241,241,241,241,241,241,241,241,242,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,160,162,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,240,242,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,202,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,688,687,687,687,688,687,687,687,687,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,240,241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,160,161,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,160,161,161,161,161,161,161,161,161,161,161,161,161,161,162,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,160,161,162,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("161,161,161,162,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,160,161,161,162,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("80,80,80,202,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,240,241,241,242,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("241,241,241,242,240,241,241,242,240,241,241,241,241,241,241,241,241,241,241,241,241,241,242,240,241,242,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + + obj.createentity(game, 72, 32, 14); //Teleporter! + obj.createentity(game, 216, 144, 20, 1); + + obj.createblock(5, 216-4, 144, 20, 16, 8); + break; + + case rn(0,1): + + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + break; + + case rn(0,2): + + tmap.push_back("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,692,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + break; + + case rn(0,3): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,642,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,481,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641"); + tmap.push_back("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(0,4): + + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,496,657,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(0,5): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,6,6,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("6,6,6,6,6,6,6,6,6,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(0,6): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,560,561,561,561,561,562,0,0,0,0,600,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,602,681,681,681,681,640,641"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,640,641,641,641,641,642,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); + break; + + case rn(0,7): + + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,663,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,663,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(0,8): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,699,699,699,699,699,699,699,699,699,699,699"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + break; + + case rn(0,9): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); + tmap.push_back("641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,521,562,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,521,562,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,602,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,602,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,640,641,641,482,480,602,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,600,480,602,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,642,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); + tmap.push_back("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + + obj.createentity(game, 152, 144, 10, 1, 9000); // (savepoint) + break; + + case rn(0,10): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,484,644,644,644,644,645,7,7,7,7,7,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,605,7,7,7,7,7,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644"); + tmap.push_back("644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,7,7,7"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483,483,484,644,645,7,7,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,7,7,7,7,7,603,483,483,483,483,483,483,605,7,7,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,645,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,603,605,6,6,6,6,6,6,6,6,6,603,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,603,524,564,564,564,564,564,564,564,564,564,525,605,6,6,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564"); + tmap.push_back("6,6,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483,524,564,565,6,6,6,6,6,6,6,6,6,6,6,6,603,483,483"); + tmap.push_back("564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + + obj.createentity(game, 224, 96, 10, 0, 10000); // (savepoint) + break; + + case rn(0,11): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,602,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,680,0,560,561,561,562,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,602,0,680,0,0,0,0,0,0,0,0,680,0,600,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,560,561,561,522,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,560,561,561,522,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,600,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,481,641,641,642,0,0,0,0,0,0,0,680,0,560,561,561,522,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,602,0,680,0,0,0,0,0,0,0,0,680,0,600,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("641,641,641,642,0,680,0,0,0,0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,680,0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,680,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,680,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,680,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,640,641,641,641,641,641,641"); + tmap.push_back("0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + + obj.createentity(game, 56, 32, 13); //Warp Token + + break; + + case rn(0,12): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,692,0,0,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,692,0,0,0,0,0,692,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,692,0,0,0,0,0,692,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("573,573,573,574,0,0,0,692,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,533,573,574,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,533,574,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,533,574,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,533,574,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653"); + tmap.push_back("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,493,653,653,654,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,614,0,0,0,652,653,494,492,492,493,653,653,654,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,614,0,0,0,692,0,652,653,653,654,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,614,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,614,693,693,693,694,693,693,693,693,693,693,694,693,693,693,693,693,693,693,694,693,693,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,614,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,493,653,654,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,493,653,653,653,653,654,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("653,654,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(0,13): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,525,483,524,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(0,14): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); + break; + + case rn(0,15): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,660,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,499,659,660,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,499,660,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,620,699,699,699,699,699,700,699,699,699,699,699,699,699,699,699,699,699,699,700,699,699,699,699,699,699,699,699,699,699,699,699"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(0,16): + + tmap.push_back("480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,481,642,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,481,642,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,481,642,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,481,642,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,560,561,561,561,561"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,560,561,561,561,561,522,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,640,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); + tmap.push_back("480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); + tmap.push_back("480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); + tmap.push_back("480,480,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + + obj.createentity(game, 120, 40, 14); //Teleporter! + break; + + case rn(0,17): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("570,570,570,570,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(1,2): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); + tmap.push_back("495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,496,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,496,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,496,657,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,536,576,576,577,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,617,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,536,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + break; + + case rn(1,3): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,490,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,490,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(1,4): + + tmap.push_back("0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + + obj.createentity(game, 144, 136, 10, 1, 4010); // (savepoint) + break; + + case rn(1,5): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,641,641"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + + obj.createentity(game, 88, 104, 10, 1, 106010); // (savepoint) + break; + + case rn(1,6): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,490,650,651,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,611,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,611,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489"); + tmap.push_back("489,489,489,611,0,0,0,0,0,569,570,570,570,570,570,570,570,571,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,649,650,650,491,489,489,489"); + tmap.push_back("489,489,489,611,0,0,0,569,570,531,489,489,489,489,489,489,489,530,570,571,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,649,650,650,650"); + tmap.push_back("489,489,489,611,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); + tmap.push_back("650,650,650,651,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); + tmap.push_back("0,0,0,0,0,0,0,649,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,689,0,0,0,0,0,689,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,569,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,649,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(1,8): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(1,9): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,485,483,483,484,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,643,644,644,645,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,684,685,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,196,197,197,197,197,198,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,563,565,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,563,564,525,605,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,525,483,483,605,236,116,116,116,116,157,197,198,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,157,197,198,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,276,277,118,116,116,116,116,116,116,157,197,197,197,197,197,197,197,197,197"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + + obj.createentity(game, 152, 64, 10, 0, 9010); // (savepoint) + break; + + case rn(1,10): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("7,7,7,7,7,7,7,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,652,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,572,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,572,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + + obj.createentity(game, 208, 120, 9, 15); // (shiny trinket) + break; + + case rn(1,11): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,494,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,614,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492"); + tmap.push_back("492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,653,653,653,653,653,653,494,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,533,573,573,573,573,573,574,0,0,0,0,612,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492"); + tmap.push_back("653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("573,573,573,573,573,573,573,573,534,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + + obj.createentity(game, 40, 192, 13); //Warp Token + obj.createentity(game, 168, 136, 13); //Warp Token + obj.createentity(game, 224, 136, 13); //Warp Token + + + + obj.createentity(game, 96, 80, 13); //Warp Token + + break; + + case rn(1,12): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,230,110,110,110,110,110,110"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,270,271,271,271,271,271,271"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,649,650,650,650,650,650,491,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(1,13): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,562,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,522,480,521,562,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,481,642,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,642,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + + obj.createentity(game, 112, 152, 10, 1, 13010); // (savepoint) + break; + + case rn(1,14): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + break; + + case rn(1,15): + + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("693,693,693,693,693,693,693,693,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + break; + + case rn(1,16): + + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,496,656,656,656,656,656,656,656,656,656,656,656"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,375,376,376,376,376,376,376,376,376,376,376"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,415,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,537,495,617,415,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,617,455,456,456,456,456,456,456,456,456,456,456"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,575,576,576,537,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,695,0,0,0,575,576,576,576,576,537,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,575,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,575,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,375,376,376,376,376,376"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,657,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,657,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,415,295,295,295,295,295"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,415,295,295,295,295,295"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,415,295,295,295,295,295"); + + obj.createentity(game, 280, 120, 10, 1, 16010); // (savepoint) + break; + + case rn(2,2): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + + obj.createentity(game, 56, 32, 10, 1, 2020); // (savepoint) + break; + + case rn(2,3): + + tmap.push_back("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(2,5): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,643,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644,644,644"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,484,644,644,644,644,645,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,524,564,564,565,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,563,564,565,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,643,644,645,0,0,0,0,0,563,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(2,6): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,487,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 40, 88, 10, 1, 6020); // (savepoint) + break; + + case rn(2,8): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + break; + + case rn(2,9): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,562,0,0,0,680,0,0,0,0,0,0,0,0"); + tmap.push_back("681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,193,194,195,0,0,0,193,194,195,0,0,0,193,194,195,0,0,0,193,194,194"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,235,0,0,0,233,113,235,0,0,0,233,113,154,194,194,194,155,113,113"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,235,0,0,0,233,113,154,194,194,194,155,113,113,113,113,113,113,113,113"); + tmap.push_back("194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,155,113,154,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + break; + + case rn(2, 10): + if(obj.altstates==0) + { + + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,114,274,274,274,274,274"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,235,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,235,753,753,753,753,753"); + tmap.push_back("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,0,0,0,273,274,274,274,275,753,753,753,753,753"); + tmap.push_back("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + + obj.createentity(game, 40, 32, 22, 0); // (shiny trinket) + obj.createentity(game, 64, 32, 22, 1); // (shiny trinket) + obj.createentity(game, 88, 32, 22, 2); // (shiny trinket) + obj.createentity(game, 40, 80, 22, 3); // (shiny trinket) + obj.createentity(game, 64, 80, 22, 4); // (shiny trinket) + obj.createentity(game, 88, 80, 22, 5); // (shiny trinket) + obj.createentity(game, 112, 80, 22, 6); // (shiny trinket) + obj.createentity(game, 40, 128, 22, 7); // (shiny trinket) + obj.createentity(game, 64, 128, 22, 8); // (shiny trinket) + obj.createentity(game, 88, 128, 22, 9); // (shiny trinket) + obj.createentity(game, 112, 128, 22, 10); // (shiny trinket) + obj.createentity(game, 136, 128, 22, 11); // (shiny trinket) + obj.createentity(game, 40, 176, 22, 12); // (shiny trinket) + obj.createentity(game, 64, 176, 22, 13); // (shiny trinket) + obj.createentity(game, 88, 176, 22, 14); // (shiny trinket) + obj.createentity(game, 112, 176, 22, 15); // (shiny trinket) + obj.createentity(game, 136, 176, 22, 16); // (shiny trinket) + obj.createentity(game, 112, 32, 22, 17); // (shiny trinket) + obj.createentity(game, 136, 80, 22, 18); // (shiny trinket) + obj.createentity(game, 136, 32, 22, 19); // (shiny trinket) + + if(!game.nocutscenes && obj.flags[70]==0) + { + obj.createblock(1, 304, 0, 16, 240, 48); + } + } + else + { + + tmap.push_back("113,113,113,113,113,113,113,114,274,274,274,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,114,274,275,0,0,0,0,0,0,0,0,0,0,273,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,114,274,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,273,274,274,274,115,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,114,274,274,274,274,274"); + tmap.push_back("113,113,114,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,273,274,115,113,235,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,235,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,273,274,275,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push_back("113,113,113,154,194,194,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,193,194,194,194,194,194,194,194,194,194,194,194,194"); + tmap.push_back("113,113,113,113,113,113,154,194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,0,193,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,194,194,194,194,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + + obj.createentity(game, 90, 52, 26, 0); // (super warp) + } + + break; + + case rn(2,11): + + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,105,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,746,744,745,905,746,744,745,905,746,744,745,905,746,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,786,744,785,825,786,744,785,825,786,744,785,825,786,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,905,905,905,905,905,905,905,905,905,905,905,905,746,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,825,825,825,825,825,825,825,825,825,825,825,825,786,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,746,744,745,905,746,744,745,905,746,744,745,905,746,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,786,744,785,825,786,744,785,825,786,744,785,825,786,744"); + tmap.push_back("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); + tmap.push_back("104,104,104,104,145,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,186,744,744,744,744"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,744,744,744,744"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,744,744,744,744"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,145,185,185,185,185"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + + obj.createentity(game, 64, 64, 14); //Teleporter! + break; + + case rn(2,12): + + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("265,265,265,265,106,105,265,265,265,265,265,265,265,106,104,105,265,265,265,265,265,265,265,106,105,265,265,265,265,265,265,265,106,104,105,265,265,265,265,265"); + tmap.push_back("567,567,567,568,224,226,566,567,567,567,567,567,568,224,105,266,566,567,567,567,567,567,568,224,226,566,567,567,567,567,567,568,264,106,226,566,567,567,567,567"); + tmap.push_back("486,486,608,184,146,266,606,486,486,486,487,647,648,224,226,566,528,486,486,486,487,647,648,224,226,606,486,486,486,486,486,527,568,224,226,606,486,486,486,486"); + tmap.push_back("486,486,608,264,266,566,528,486,486,486,608,184,185,146,266,606,486,486,486,487,648,184,185,146,266,606,486,486,486,486,487,647,648,224,226,606,486,486,486,486"); + tmap.push_back("486,486,527,567,567,528,486,486,486,486,608,264,265,266,566,528,486,486,486,608,184,146,105,266,566,528,486,486,486,486,608,184,185,146,266,606,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,608,264,265,266,566,528,486,486,486,486,486,608,264,265,266,566,528,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,648,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("486,487,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("647,648,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,568,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("0,0,0,566,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,648,0,0,0,0,0,566,567,568,0,0,0,0"); + tmap.push_back("0,0,0,646,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,648,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(2,13): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,615,495,617,696,696,696,696,696,696,696,696,696,696,696,697,696,696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,696,696,697,696,696,696,696,615,495,617,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,697,696,696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + break; + + case rn(2,14): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(2,15): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,571,6,6,6,6,6,6"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + + obj.createentity(game, 240, 96, 10, 0, 15020); // (savepoint) + break; + + case rn(3,2): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,499,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,500,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,499,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,500"); + tmap.push_back("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); + tmap.push_back("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); + tmap.push_back("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); + tmap.push_back("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); + tmap.push_back("498,539,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,540"); + tmap.push_back("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,499,660,0,0,0,0,658,500,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,539,580,0,0,0,0,578,540,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,539,579,579,579,579,540,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,499,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,500"); + tmap.push_back("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); + tmap.push_back("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); + tmap.push_back("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); + tmap.push_back("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); + tmap.push_back("498,539,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,540"); + tmap.push_back("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,539,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + + obj.createentity(game, 152, 96, 9, 16); // (shiny trinket) + break; + + case rn(3,3): + + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,662,662,662,662,662,663,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,662,662,662,662,662,662,663,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,502,663,0,0,0,0,0,0,0,0,0,581,582,582,582,582,582,582,582,582,582,582,582,582,582,543,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,502,662,662,662,662,662,663,702,702,702,702,702,702,702,702,702,581,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("662,662,662,662,662,662,663,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + + obj.createentity(game, 24, 192, 10, 1, 3030); // (savepoint) + break; + + case rn(3,5): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,640,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641"); + tmap.push_back("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,681,682,681,681,681,681,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,560,561,561,561,561,561,562,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,640,641,641,641,641,641,642,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(3,6): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,693,693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(3,7): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,690,690,690,691,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(3,8): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(3,9): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,183,0,0,181,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,182,143,142,182,182,143,142,182,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,261,262,103,102,262,262,103,102,262,263,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,182,143,223,0,0,221,142,182,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,261,262,103,223,0,0,221,102,262,263,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,143,142,182,182,143,142,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + + obj.createentity(game, 248, 168, 10, 1, 9030); // (savepoint) + break; + + case rn(3,10): + + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262"); + tmap.push_back("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,742,902,902,902,902,743,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,782,822,822,822,822,783,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,261,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,263,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,742,902,902,902,902,902,902,743,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,742,902,902,902,902,902,902,902,902,902,743,741,741,863,0,0,0,0,0,0,861,741,741,742,902,902,902,902,902,902,902,902,902,743,741,741,741"); + tmap.push_back("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); + tmap.push_back("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); + tmap.push_back("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); + tmap.push_back("741,741,741,782,822,822,822,822,822,822,822,822,822,783,741,741,863,0,0,0,0,0,0,861,741,741,782,822,822,822,822,822,822,822,822,822,783,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,782,822,822,822,822,822,822,783,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); + tmap.push_back("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); + tmap.push_back("182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,741,741,741,741,741,741,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + tmap.push_back("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + + obj.createentity(game, 88, 80, 21, 1); //Terminal // UU Brothers + obj.createblock(5, 88 - 4, 80, 20, 16, 25); + + if(game.stat_trinkets>=5) + { + obj.createentity(game, 128, 80, 21, 1); //Terminal + obj.createblock(5, 128 - 4, 80, 20, 16, 26); + } + + if(game.stat_trinkets>=8) + { + obj.createentity(game, 176, 80, 21, 1); //Terminal + obj.createblock(5, 176 - 4, 80, 20, 16, 27); + } + + if(game.stat_trinkets>=10) + { + obj.createentity(game, 216, 80, 21, 1); //Terminal + obj.createblock(5, 216 - 4, 80, 20, 16, 28); + } + + if(game.stat_trinkets>=12) + { + obj.createentity(game, 88, 128, 21, 0); //Terminal + obj.createblock(5, 88 - 4, 128, 20, 16, 29); + } + + if(game.stat_trinkets>=14) + { + obj.createentity(game, 128, 128, 21, 0); //Terminal + obj.createblock(5, 128 - 4, 128, 20, 16, 33); + } + + if(game.stat_trinkets>=16) + { + obj.createentity(game, 176, 128, 21, 0); //Terminal + obj.createblock(5, 176 - 4, 128, 20, 16, 30); + } + + if(game.stat_trinkets>=18) + { + obj.createentity(game, 216, 128, 21, 0); //Terminal + obj.createblock(5, 216 - 4, 128, 20, 16, 32); + } + + //Special cases + if(game.stat_trinkets>=20) + { + obj.createentity(game, 40, 40, 21, 0); //Terminal + obj.createblock(5, 40 - 4, 40, 20, 16, 31); + } + + if(game.stat_trinkets>=20) + { + obj.createentity(game, 264, 40, 21, 0); //Terminal + obj.createblock(5, 264 - 4, 40, 20, 16, 34); + } + + obj.createentity(game, 152, 40, 21, 0); //Terminal (jukebox instructions) + obj.createblock(5, 152 - 4, 40, 20, 16, 24); + break; + + case rn(3,11): + + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,748,908,908,749,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,788,828,828,789,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,747,747,747,747,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("268,268,268,268,268,268,268,268,268,268,268,109,107,107,107,107,229,747,748,908,908,749,747,227,107,107,107,107,108,268,268,268,268,268,268,268,268,268,268,268"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,788,828,828,789,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,747,267,268,268,268,268,269,747,747,747,747,747,747,267,268,268,268,268,269,747,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,748,908,908,749,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,747,747,747,747,748,908,908,749,869,0,0,867,748,908,908,749,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,748,908,908,749,869,0,0,867,869,0,0,867,869,0,0,867,748,908,908,749,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,869,0,0,867,869,0,0,867,788,828,828,789,869,0,0,867,869,0,0,867,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,869,0,0,867,788,828,828,789,747,747,747,747,788,828,828,789,869,0,0,867,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,788,828,828,789,747,747,747,747,747,747,747,747,747,747,747,747,788,828,828,789,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,189,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,267,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,269,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,748,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,749,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,869,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,867,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,869,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,867,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,788,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,789,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); + tmap.push_back("188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + break; + + case rn(3,12): + + tmap.push_back("107,107,107,107,107,107,107,107,108,268,268,109,108,268,268,109,108,268,268,109,108,268,268,268,109,108,268,268,268,268,109,107,108,268,268,268,109,107,107,107"); + tmap.push_back("268,268,268,268,268,268,268,268,269,572,574,227,229,572,574,267,269,572,574,267,269,572,573,574,227,229,572,573,573,574,267,268,269,572,573,574,267,268,268,268"); + tmap.push_back("573,573,573,573,573,573,573,573,573,534,614,227,229,612,533,573,573,534,533,573,573,534,492,614,227,229,612,492,492,533,573,573,573,534,492,614,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,614,227,229,612,492,492,492,492,492,492,492,493,653,654,227,229,612,492,492,492,492,492,492,492,492,614,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,614,227,229,612,492,492,492,492,492,492,492,614,187,188,149,269,612,492,492,492,492,492,492,492,493,654,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,614,267,269,612,492,492,492,492,492,492,492,614,267,268,269,572,534,492,492,492,492,492,493,653,654,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,533,573,573,534,492,492,492,492,492,492,492,533,573,573,573,534,492,492,492,492,492,493,654,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,654,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,654,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0"); + tmap.push_back("0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573"); + tmap.push_back("0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,652,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,692,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653"); + tmap.push_back("0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 128, 160, 10, 1, 113030); // (savepoint) + break; + + + case rn(3,13): + + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,563,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 192, 96, 10, 0, 114030); // (savepoint) + break; + + case rn(3,14): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,580,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(3,15): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,645,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,563,564"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,603,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,563,564,525,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,563,525,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,605,683,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,605,683,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,643,485,483,483,483,483,483,484,645,683,0,0,0,0,0,563,525,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,603,483,483,483,483,483,605,0,683,0,0,0,0,0,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,643,485,483,483,483,483,605,0,683,0,0,0,0,563,525,483,483,483,483,483"); + tmap.push_back("6,6,6,6,6,6,6,6,6,563,564,564,565,0,0,0,0,683,0,0,0,643,644,644,644,644,645,0,683,0,0,0,0,603,483,483,483,483,483,483"); + tmap.push_back("564,564,564,564,564,564,564,564,564,525,483,483,524,565,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,563,525,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,524,565,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,565,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,563,564,564,564,525,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(4,5): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,499,659,659,659,660,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,658,659,659,659,659,500,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,499,659,660,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,658,500,498,498,498,498"); + tmap.push_back("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,658,659,659,659,659"); + tmap.push_back("659,659,659,659,659,660,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,578,579,579,579,579,580,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,580,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,578,579,540,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,539,579,579,580,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,499,660,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,578,579,579,540,498,498,498,498,498,620,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,618,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,658,500,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,499,659,660,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,658,500,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,499,660,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,618,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,620,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,658,659,500,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,620,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,658,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,660,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(4,7): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,572,573,574,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,612,492,614,0,0,0,0,0,0,693,694,693,693,693,693,693,693,693,694,693,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,652,653,654,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,692,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,692,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0,0,0,693,693,694,693,693,693,693,693,693,693,694,693,693,694,693,693,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,692,0,0,0,0,0,0"); + tmap.push_back("693,693,693,693,693,694,693,693,693,693,693,693,693,693,694,693,693,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,692,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0"); + tmap.push_back("0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,614,693,693,693,693,693,694,693,693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(4,9): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,190,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,270,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,190,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,270,272,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,192,0,0,0,190,191,191,191,191,191,191,192,0,0,190,191,191,191,191,191,191,191,191,191,191"); + tmap.push_back("110,110,110,110,110,110,110,111,271,271,271,112,110,110,110,232,0,0,0,230,110,110,110,110,110,110,232,0,0,230,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,232,0,0,0,230,110,110,110,110,110,110,151,191,191,152,110,111,271,271,271,112,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,151,191,191,191,152,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,151,191,191,191,152,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,151,191,191,191,152,110,110,110,110"); + break; + + case rn(4,10): + + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("271,271,271,271,271,271,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("750,750,750,750,750,750,750,750,270,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("750,750,750,750,750,750,750,750,750,750,750,270,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("750,751,911,911,911,911,911,911,752,750,750,750,750,750,270,271,271,271,271,271,271,271,271,271,271,271,271,271,112,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,270,271,271,271,271,112,110,110,110,110,110,110"); + tmap.push_back("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,750,750,750,750,751,911,911,752,750,750,750,750,872,0,0,0,270,271,112,110,110,110,110"); + tmap.push_back("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,751,911,911,752,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,791,831,831,831,831,831,831,792,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,750,750,750,750,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,190,191,191,191,191,191,191,152,110,110,110,110"); + tmap.push_back("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,190,152,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,190,152,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,270,271,271,271,271,271,271,271,271,112,110,110,110,110"); + tmap.push_back("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); + tmap.push_back("191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,152,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + + obj.createentity(game, 256, 120, 20, 1); //Terminal Ship computer + obj.createblock(5, 256 - 4, 120, 20, 16, 22); + + obj.createentity(game, 256, 184, 20, 1); //Terminal + obj.createentity(game, 232, 184, 20, 1); //Terminal + obj.createentity(game, 208, 184, 20, 1); //Terminal + obj.createblock(5, 208 + 4, 184, 56, 16, 23); + break; + + case rn(4,11): + + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,118,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,757,917,917,917,917,758,756,756,757,917,917,917,917,758,756,756,757,917,917,917,917,758,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,797,837,837,837,837,798,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,756,756,756,756,756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,756,756,756,756,756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,196,197,197,197,197,198,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,797,837,837,837,837,798,756,756,236,116,116,116,116,238,756,756,797,837,837,837,837,798,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,238,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,238,917,917,758,756,756,756,756,757,917,917,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("197,197,197,197,197,197,197,197,197,197,197,197,158,116,116,116,116,238,0,0,876,756,756,756,756,878,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,916,917,917,917,917,918,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); + break; + + case rn(4,12): + + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); + tmap.push_back("277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,118,116,238,0,0,0,0,0,0,0,0,0,0,236,116,117,277,277,277,277,277,277,277,277,277"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,276,277,278,0,0,0,0,0,0,0,0,0,0,276,277,278,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,563,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,563,564,564,564,525,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("564,564,564,564,564,525,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,484,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("644,644,644,644,644,644,644,645,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(4,13): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,571,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,651,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,689,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,689,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,689,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,690,690,690,691,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,691,690,690,691,690,690,690,690,690,690"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,689,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,571,0,689,0,0,689,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,530,570,570,571,0,689,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,530,570,570,571,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,530,570,570,570,570,570"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); + + obj.createentity(game, 248, 112, 10, 1, 114040); // (savepoint) + break; + + case rn(4,14): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,652,653,653,653,653,653,653,653"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,533,573,574,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,533,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,533,573,574,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,574,0,692,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("573,573,573,573,573,574,0,0,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,574,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,614,0,0,0,0,0,692,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,574,0,0,0,0"); + tmap.push_back("492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,652,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573"); + tmap.push_back("492,492,492,492,492,533,574,0,0,0,0,692,0,0,0,0,692,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,533,574,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,533,573,574,0,692,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,574,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + + obj.createentity(game, 104, 176, 10, 1, 115040); // (savepoint) + break; + + case rn(4,15): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,602,0,0,0,0,0,560,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,680,640,641,482,480,480,480,481,641,642,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,680,0,0,640,641,641,641,642,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("561,561,561,561,562,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,0,0,560,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,521,561,562,0,0,680,0,0,0,680,0,0,0,680,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,521,562,0,680,0,0,0,680,0,0,0,680,0,0,0,560,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,521,561,562,0,0,0,680,0,0,0,680,0,560,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + + obj.createentity(game, 16, 40, 10, 1, 15040); // (savepoint) + break; + + case rn(5,2): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,645,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,3): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,612,492,614,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,572,573,573,574,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,693,694,693,693,693,694,693,693,694,693,612,492,492,614,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,652,653,653,654,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,572,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,652,653,654,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,612,492,614,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 272, 128, 10, 0, 3050); // (savepoint) + break; + + case rn(5,4): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,490,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,5): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,646,647,488,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,606,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,646,488,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,646,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,6): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,7): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(5,8): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,9): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,184,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,264,266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,184,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,224,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,264,265,266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("185,185,185,185,185,185,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,145,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,10): + + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,11): + + tmap.push_back("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,154,194,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,12): + + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(5,13): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693"); + tmap.push_back("0,0,0,0,0,0,612,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,652,653,653,653,654,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("693,693,693,693,693,693,693,693,694,693,693,693,693,693,693,693,693,693,693,693,694,693,693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,574,0,0,0,0"); + tmap.push_back("573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + + obj.createentity(game, 184, 176, 10, 1, 13050); // (savepoint) + break; + + case rn(5,14): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,657,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,657,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,695,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + break; + + + case rn(5,15): + + tmap.push_back("486,486,486,486,486,486,486,487,647,647,647,647,488,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,487,647,647,648,0,0,0,0,606,486,486,487,647,648,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486"); + tmap.push_back("486,487,647,647,648,686,0,0,0,0,0,0,606,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("486,608,0,0,0,686,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,566,528,487,647,647,647,647"); + tmap.push_back("486,608,0,0,0,686,0,0,0,0,0,0,606,486,608,687,687,687,687,687,566,567,567,567,567,567,568,687,687,606,486,608,0,606,486,608,0,0,686,0"); + tmap.push_back("486,608,0,0,0,686,0,0,0,0,0,0,646,488,608,0,0,0,0,0,606,486,486,486,487,647,648,0,0,646,647,648,0,606,486,608,0,0,566,567"); + tmap.push_back("486,608,0,0,0,686,0,0,0,566,568,0,0,646,648,0,0,0,0,566,528,486,486,486,608,0,0,0,0,0,686,0,0,606,486,608,0,0,606,486"); + tmap.push_back("486,608,0,0,0,566,568,0,0,606,527,568,0,0,686,0,0,0,0,646,647,647,488,486,527,568,0,0,0,0,686,0,0,606,486,608,0,0,646,647"); + tmap.push_back("486,608,687,687,687,606,527,567,567,528,486,608,0,0,686,0,0,0,0,0,0,0,646,647,488,527,568,0,0,0,686,0,0,606,486,608,0,0,0,0"); + tmap.push_back("486,608,0,0,0,646,488,486,486,486,487,648,0,0,686,0,0,0,0,0,0,0,686,0,606,487,648,0,0,0,686,0,566,528,486,608,0,0,0,0"); + tmap.push_back("486,608,0,0,0,0,646,488,486,486,608,0,0,0,686,0,0,0,0,0,0,0,686,0,646,648,0,0,0,0,686,0,606,486,487,648,0,0,0,0"); + tmap.push_back("486,608,0,0,0,0,0,646,647,647,648,0,566,567,567,567,568,0,0,0,566,567,568,0,0,0,0,0,0,566,567,567,528,486,608,0,0,0,0,0"); + tmap.push_back("486,608,0,0,0,0,0,686,0,0,0,566,528,486,486,486,608,0,0,566,528,486,608,687,687,687,687,687,687,606,486,487,647,647,648,0,0,0,0,0"); + tmap.push_back("486,608,0,0,0,0,0,686,0,0,566,528,486,486,487,647,648,0,0,606,486,487,648,0,0,0,0,0,0,606,486,608,0,0,686,0,0,0,0,0"); + tmap.push_back("486,608,0,0,0,0,0,686,0,0,606,486,486,487,648,0,0,0,0,646,647,648,0,0,0,0,0,0,566,528,486,608,0,0,686,0,0,0,0,0"); + tmap.push_back("486,608,0,0,0,0,0,686,0,0,646,488,486,608,0,0,0,0,0,0,686,0,0,0,0,566,567,567,528,487,647,648,0,0,686,0,0,0,0,0"); + tmap.push_back("486,608,0,0,0,566,567,568,0,0,0,646,488,608,0,0,0,0,0,0,686,0,0,0,0,606,486,487,647,648,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("486,527,567,568,0,606,486,608,0,0,0,0,606,527,568,0,0,0,0,566,568,0,0,0,0,646,488,608,0,0,0,0,0,0,566,567,568,0,0,0"); + tmap.push_back("486,486,486,608,0,646,647,648,0,0,0,0,606,486,608,0,0,566,567,528,608,0,0,0,0,0,646,648,0,0,0,0,0,0,606,486,608,0,0,0"); + tmap.push_back("486,486,486,527,568,0,0,686,0,0,0,0,606,487,648,687,687,606,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,606,487,648,0,0,0"); + tmap.push_back("486,486,486,486,608,0,0,686,0,0,0,0,606,608,0,0,0,606,486,486,608,0,0,0,0,0,0,566,567,567,568,0,0,566,528,608,0,0,0,0"); + tmap.push_back("486,486,486,486,608,0,0,566,567,568,0,0,606,608,0,0,0,606,486,486,527,567,567,568,687,687,687,606,486,486,608,0,0,606,486,608,0,0,0,0"); + tmap.push_back("486,486,486,486,608,0,566,528,486,608,0,0,606,608,0,0,0,606,486,486,486,486,486,608,0,0,0,646,647,647,648,0,0,646,647,648,0,0,0,0"); + tmap.push_back("486,486,486,486,608,0,606,486,487,648,0,0,646,648,0,0,0,606,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0"); + tmap.push_back("486,486,486,486,608,0,606,486,608,0,0,0,0,686,0,0,566,528,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0"); + tmap.push_back("486,486,486,486,527,567,528,486,608,0,0,0,0,686,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,608,0,0,0,0,686,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,527,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,527,567,568,0,0,686,0,0,606,486,486,486,486,486,486,486,527,568,0,0,0,0,0,566,567,528,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,528,486,486,486,486,486,486,486,486,527,567,567,567,567,567,528,486,486,486,486,486,486,486,486"); + + obj.createentity(game, 72, 16, 9, 14); // (shiny trinket) + break; + + case rn(5,18): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); + tmap.push_back("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); + tmap.push_back("489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,611,690,690,690,690,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + + obj.createentity(game, 224, 160, 13); //Warp Token + + break; + + case rn(5,19): + + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,693,693,693,693,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,533,573,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,693,693,693,693,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,652,653,653,494,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,533,573,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,614,693,693,693,693,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,652,653,653,494,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + break; + + case rn(6,2): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,602,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,600,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,640,641,641,482,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,600,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,641,482,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("641,641,641,641,642,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,640,641,641,641,641"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 152, 152, 10, 0, 103060); // (savepoint) + break; + + case rn(6,4): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,565,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,565,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,524,564,565,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,524,564,565,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,524,564,565,0,0,683,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + + obj.createentity(game, 128, 120, 10, 1, 4060); // (savepoint) + break; + + case rn(6,5): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(6,6): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,687,687,688,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,648,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(6,7): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,569,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,609,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,569,531,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,609,489,489,489,489,530,571,0,0,0,0,0,0,569,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("570,570,570,570,570,570,531,489,489,489,489,489,530,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + + obj.createentity(game, 64, 88, 10, 1, 7060); // (savepoint) + break; + + case rn(6,8): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + break; + + case rn(6,9): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(6,10): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("699,699,699,699,699,699,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + + obj.createentity(game, 152, 128, 10, 0, 10060); // (savepoint) + break; + + case rn(6,11): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,696,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,615,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,655,656,657,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,696,696,697,696,696,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(6,12): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,649,491,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(6,13): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,688,687,687,687,687,687,687,687,687,687,687,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(6,14): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,481,641,641,641,642,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,481,641,641,641,641,642,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("641,641,641,641,642,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + break; + + + case rn(6,15): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,490,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,650,491,489,611,0,0,0,0,0,609,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); + tmap.push_back("0,689,0,0,0,0,609,489,611,0,0,0,0,0,649,650,651,0,0,0,0,0,689,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); + tmap.push_back("570,570,571,690,690,690,609,489,611,0,0,0,0,0,0,689,0,0,0,0,569,570,570,571,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); + tmap.push_back("489,489,611,0,0,0,649,650,651,0,0,0,0,0,569,570,570,570,571,690,609,489,489,611,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); + tmap.push_back("650,650,651,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,611,0,649,650,650,651,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,609,489,489,490,650,650,650,651,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,569,570,570"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,649,650,650,651,0,0,689,0,0,0,0,0,0,0,0,569,531,489,611,0,0,0,0,0,0,569,531,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,569,570,571,0,0,0,0,0,0,0,609,489,490,651,0,0,0,0,0,0,609,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,609,489,611,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,569,531,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,649,491,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489"); + tmap.push_back("0,0,0,0,0,569,570,571,0,0,0,0,609,489,611,0,0,609,489,489,611,0,0,0,0,0,0,0,569,570,571,0,0,569,531,489,489,489,489,489"); + tmap.push_back("0,0,0,0,569,531,489,530,571,0,0,0,649,650,651,0,0,609,489,490,651,0,0,0,0,0,0,0,609,489,611,0,0,609,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,569,570,570,570,531,490,651,0,0,609,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,609,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,569,570,571,690,690,649,650,650,491,489,611,0,0,0,649,650,491,489,489,489,489"); + tmap.push_back("0,0,0,0,649,650,491,489,611,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,609,490,651,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,609,489,611,0,0,0,0,569,570,570,571,0,0,609,489,611,0,0,0,0,569,531,611,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,609,489,530,570,571,0,0,609,489,489,530,570,570,531,489,611,0,0,0,0,609,489,611,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,609,489,489,489,611,690,690,649,650,491,489,490,650,650,650,651,0,0,0,0,609,489,611,0,0,0,0,569,570,531,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,609,489,490,650,651,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,609,489,530,571,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,569,570,531,489,611,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,609,489,489,611,690,690,690,609,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,611,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,609,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,491,489,611,0,0,0,649,650,491,489,489,489,489"); + tmap.push_back("570,570,570,570,531,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,611,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,530,570,570,570,570,570,570,571,0,0,0,0,0,0,609,489,530,570,570,570,570,531,489,530,570,570,570,570,570,531,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + + if(!game.intimetrial) + { + obj.createentity(game, 96, 48, 20, 1);//Terminal + obj.createblock(5, 96 - 4, 48, 20, 16, 12); + } + + obj.createentity(game, 128, 216, 10, 1, 116061); // (savepoint) + break; + + case rn(6,18): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); + tmap.push_back("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,563,564,564,565,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); + break; + + case rn(6,19): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,687,687,687,687,606,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,646,647,647,648,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); + tmap.push_back("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); + tmap.push_back("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(7,1): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + + obj.createentity(game, 192, 104, 13); //Warp Token + + break; + + case rn(7,2): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("653,653,653,653,653,653,653,653,653,653,494,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,493,653,653,653,653,653"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,612,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,493,654,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,612,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,614,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,493,654,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,652,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,493,654,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,493,654,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 88, 136, 10, 0, 103070); // (savepoint) + break; + + case rn(7,3): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,496,656,656,656,656,497,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,496,657,0,0,0,0,655,497,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,496,657,0,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,0,575,577,0,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,575,537,536,577,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,615,495,495,617,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,655,497,496,657,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,0,655,657,0,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,575,537,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,575,537,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,536,576,576,576,576,537,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(7,4): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,568,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,568,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("567,567,567,567,567,567,567,567,567,567,568,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + + obj.createentity(game, 208, 128, 10, 1, 4070); // (savepoint) + break; + + case rn(7,5): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,680,0,640,641,482,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,640,641,482,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,680,0,0,0,0,680,600,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,680,640,482,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,680,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,560,561,562,0,0,0,680,0,640,482,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,602,0,0,0,680,0,0,600,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,521,562,0,0,680,0,0,640,482,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,602,0,0,680,0,0,0,600,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,521,562,0,680,0,0,0,640,641,482,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,602,0,680,0,0,0,680,0,640,641,641"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,521,561,562,0,0,0,680,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,602,0,0,0,680,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,600,480,480,480,480,480,602,0,0,0,680,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,521,561,562,0,680,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,600,480,480,480,480,480,480,480,521,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + break; + + case rn(7,6): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,654,0,692,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,654,0,0,692,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + break; + + case rn(7,7): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(7,8): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); + break; + + case rn(7,9): + + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,685,684,684,685,684,684,685,684,684,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564"); + tmap.push_back("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + + obj.createentity(game, 64, 112, 14); //Teleporter! + break; + + case rn(7,10): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495"); + tmap.push_back("0,0,695,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,695,0,0,0,615,495,495,495"); + tmap.push_back("0,0,695,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,695,0,0,0,615,495,495,495"); + tmap.push_back("0,0,695,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,695,0,0,0,615,495,495,495"); + tmap.push_back("0,0,695,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,695,0,0,0,615,495,495,495"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,575,576,576,576,576,576,577,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,615,495,495,495,495,495,617,696,696,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,497,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,656,497,495,617,0,0,575,576,577,0,0,615,495,617,0,0,615,495,495,495,495,495,617,696,696,615,495,495,495"); + tmap.push_back("0,0,695,0,0,0,0,0,695,0,0,0,615,495,617,696,696,615,495,617,696,696,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("0,0,695,0,0,0,0,0,695,0,0,0,615,495,617,0,0,615,495,617,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("0,0,695,0,0,0,0,0,695,0,0,0,615,495,617,0,0,615,495,617,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("0,0,695,0,0,0,0,0,695,0,0,0,615,495,617,0,0,615,495,617,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("576,576,576,576,576,576,576,576,576,577,0,0,615,495,617,0,0,615,495,617,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,696,696,615,495,617,696,696,615,495,617,696,696,615,495,617,696,696,615,495,495,495,495,495,617,696,696,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,655,656,657,0,0,615,495,617,0,0,655,656,657,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,0,695,0,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,0,695,0,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,0,695,0,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,0,695,0,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,537,495,536,576,576,576,576,576,576,576,537,495,495,495,495,495,617,696,696,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,615,495,495,495"); + break; + + case rn(7,11): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,648,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,566,567,567,567,567,567,567,567,567,528,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486,486,486,486,486,487,647,647,647,647"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,487,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(7,14): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,605,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + + obj.createentity(game, 48, 192, 10, 1, 14070); // (savepoint) + break; + + case rn(8,0): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,6,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,6,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + break; + + case rn(8,1): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(8,2): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,487,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + break; + + case rn(8,3): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,684,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + break; + + case rn(8,4): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,543,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,582,582,543,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,582,582,583,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,0,0,0,0,0,581,582,582,582,582,582,543,501,501,501,542,582,583,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); + tmap.push_back("0,0,0,0,581,582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,581,543,501,501,501,501,501,501,501,501,501"); + tmap.push_back("582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,542,583,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,581,543,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); + break; + + case rn(8,5): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,497,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,496,656,657,0,0,0,695,0,0,0,0,0,655,497,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,655,497,495,495,536,577,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,496,657,0,0,0,0,0,695,0,0,0,0,0,0,0,655,497,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,575,576,576,577,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,575,537,495,495,536,577,0,0,0,0,0,0,655,497,495,495,617,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,696,696,696,655,497,495,495,495,536,577,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,615,495,495,495,495,536,577,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,655,497,495,495,495,495,617,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,655,656,497,495,495,617,696,696,696,696,696,696,615,495,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495"); + tmap.push_back("495,495,495,495,536,576,577,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,615,495,495,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,655,497,495,495,495,536,577,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,536,577,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,615,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,655,497,495,495,617,696,696,696,696,696,615,495,495,495,495,536,577,0,0,0,0,655,497,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,536,577,0,0,0,0,0,615,495,495,617,0,0,0,0,0,615,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,617,0,0,0,0,0,655,497,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,615,495,495,495,495,617,696,696,696,696,696,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,496,656,657,0,0,0,0,0,615,495,495,536,577,0,0,0,0,0,655,497,495,495,496,657,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("656,656,656,656,656,656,657,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,655,656,656,657,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,575,537,495,495,495,495"); + tmap.push_back("0,0,0,695,0,0,0,0,0,0,0,0,0,575,537,495,495,495,536,577,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("0,0,0,695,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("0,0,0,695,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,536,577,0,0,0,0,0,0,695,0,0,0,0,575,576,537,495,495,495,495,495"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + + obj.createentity(game, 80, 40, 10, 1, 5080); // (savepoint) + break; + + case rn(8,6): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,490,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,490,650,651,0,0,0,0,689,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,569,570,570,571,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,690,690,690,690,609,489,489,611,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,530,571,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,530,571,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + + obj.createentity(game, 96, 72, 13); //Warp Token + + break; + + case rn(8,7): + + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,614,693,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,652,653,653,653,653,654,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); + break; + + case rn(8,8): + + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483"); + tmap.push_back("483,483,483,484,644,644,645,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,643,644,644,644,485,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,563,564,564,564,564,565,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,605,684,684,684,684,603,483,483"); + tmap.push_back("483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,605,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,524,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,563,564,564,564,564,564,564,564,525,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483"); + tmap.push_back("483,483,484,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(8,10): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,493,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,494,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + break; + + case rn(8,11): + + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,643,644,644,644,644,644,644,485,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,524,564,564,564,564,564,564,565,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,484,644,644,644,645,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,525,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + + obj.createentity(game, 176, 40, 14); //Teleporter! + obj.createentity(game, 120, 128, 20, 1); // (terminal) + + obj.createblock(5, 120-4, 128, 20, 16, 7); + break; + + case rn(8,12): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + break; + + case rn(8,13): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,560,561,561,561,562,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480"); + tmap.push_back("0,0,0,0,0,0,0,600,480,480,481,642,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,560,561,561,561,562,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,0,560,522,480,480,602,681,681,681,681,681,600,480,480,480,480,602,681,681,681,681,681,600,480,480,480,602,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,0,600,480,480,481,642,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,560,522,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,560,561,522,480,480,480,602,681,681,681,681,681,681,600,480,480"); + tmap.push_back("0,0,0,0,560,522,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,600,480,480"); + tmap.push_back("0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,560,561,522,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); + break; + + case rn(8,14): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,492,492,492,493,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,493,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + + obj.createentity(game, 40, 152, 10, 1, 14080); // (savepoint) + break; + + case rn(8,15): + + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + break; + + case rn(8,16): + + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,609,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,690,690,690,609,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,649,650,491,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,7,7,649,650,650,651,7,7,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + tmap.push_back("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + + obj.createentity(game, 152, 80, 10, 1, 16080); // (savepoint) + break; + + case rn(8,17): + + tmap.push_back("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,499,659,659,500,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,499,659,660,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,618,498,498,499,659,660,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,499,659,660,0,0,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,660,0,0,0,0,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); + break; + + case rn(8,18): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,606,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,528,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); + break; + + case rn(8,19): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(10,0): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(10,1): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(10,2): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(10,3): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(10,8): + + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,296,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,296,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,375,376,376,376,376,376,337,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,417,698,698,698,698,375,376,377,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,455,456,456,456,456,456,456,456,456,457,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,296,456,456,456,456,456,456,456,456,456,456,456,457,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + + obj.createentity(game, 80, 40, 9, 17); // (shiny trinket) + roomtileset = 0; // (Use space station tileset) + break; + + case rn(10,9): + + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,443,444,444,444,444,444,444,444,444,444,444,444"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.nearelephant = false; + roomtileset = 0; // (Use space station tileset) + break; + + case rn(10,10): + + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,444,444,444,444,444,444,444,444,444,444,444,444"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,0,0,0,0,815,695,695,695,695,695,695,695"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,815,695,695,695,695,695,695,695"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,317,477,478,0,0,0,0,815,695,695,695,695,695,695,695"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,815,695,695,695,695,695,695,695"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,317,477,478,0,0,0,0,0,0,815,695,695,695,695,695,695,695"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,0,815,363,364,364,364,364,364,364"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,0,815,403,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,363,364,325,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,363,364,325,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(10,11): + + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,198,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,198,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,197,197,198,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,197,198,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,572,573,573,534,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(10,12): + + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,517,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,518,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,590,591,591,591,591,591,591,591,591,591,591,591,592,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,670,671,671,671,671,671,671,671,671,671,512,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,676,677,677,678,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,557,597,597,597,597,597,597,597,597,598,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,517,677,677,677,677,677,677,677,677,678,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,551,591,591,591,591,591,591,591,591,591,591,552,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,590,591,591,591,591,591,591,591,591,591,552,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); + + obj.createentity(game, 184, 176, 10, 1, 12100); // (savepoint) + roomtileset = 0; // (Use space station tileset) + break; + + case rn(10,13): + + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,514,675,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,554,595,0,0,264,106,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,514,675,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,554,595,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,264,106,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("513,513,635,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(10,14): + + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,443,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,0,0,0,0,403,283,284,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,284,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("316,316,438,0,0,0,0,0,0,443,444,445,0,0,0,0,403,283,405,0,0,0,0,403,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); + tmap.push_back("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,357,398,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,357,398,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(10,15): + + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,536,577,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(10,16): + + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + + obj.createentity(game, 216, 72, 10, 1, 16100); // (savepoint) + break; + + case rn(10,17): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); + tmap.push_back("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + break; + + case rn(10,18): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(10,19): + + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,0,0,701,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,502,662,663,0,701,0,0,0,0,0,701,0,0,0,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,502,662,663,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,502,662,663,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,661,662,662,503,501,501,501,501,501,501"); + tmap.push_back("501,501,501,502,663,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,661,662,662,662,662,662,662"); + tmap.push_back("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); + tmap.push_back("501,501,501,623,702,702,702,702,703,702,702,702,703,702,702,702,702,702,703,702,702,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); + tmap.push_back("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); + tmap.push_back("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); + tmap.push_back("501,501,501,623,702,702,702,702,703,702,702,702,703,702,702,702,702,702,703,702,702,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); + tmap.push_back("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); + tmap.push_back("501,501,501,542,583,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,581,582,582,582,582,582,582"); + tmap.push_back("501,501,501,501,542,582,583,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,581,582,582,543,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,542,582,583,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,581,582,582,543,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,542,582,583,0,701,0,0,0,0,0,701,0,0,0,0,0,581,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,542,582,583,0,0,0,0,0,701,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,542,582,583,0,0,0,701,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,542,582,582,582,583,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + tmap.push_back("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + + obj.createentity(game, 40, 112, 9, 13); // (shiny trinket) + break; + + case rn(11,0): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(11,1): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(11,2): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,577,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,577,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,657,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + break; + + case rn(11,3): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,569,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(11,8): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + + obj.createentity(game, (8 * 8), (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy + obj.nearelephant = true; + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(11,9): + + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,432,0,0,0,0,390,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391"); + tmap.push_back("471,471,472,0,0,0,0,470,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391"); + tmap.push_back("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + + + obj.createentity(game, 8 * 8, -248 + (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy + obj.nearelephant = true; + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(11,10): + + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253,253,94,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,172,173,173,173,173,173,173,174,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92,92,92,92,214,683,683,683,252,253,253,253,253,253,253,253,253,253,253"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,173,173"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(11,16): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,571,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,531,489,489,611,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,569,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0"); + tmap.push_back("570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(11,17): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641"); + tmap.push_back("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); + tmap.push_back("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); + tmap.push_back("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); + tmap.push_back("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); + tmap.push_back("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); + tmap.push_back("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); + tmap.push_back("561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,680,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,562,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + break; + + case rn(11,18): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(11,19): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(12,0): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,490,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,166,167,167,167,168,609,489,489,489,489,489,489,489,489,489,490,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,166,167,168,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,206,86,208,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,246,247,248,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,611,246,247,247,247,248,609,489,489,489,489,489,489,489,489,489,530,570,570,570,531,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650"); + tmap.push_back("489,489,530,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,166,167,167,167,168,166,167,167,167,167,167,167"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,86,86,86,86,86"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,87,247,247,247,247"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); + tmap.push_back("650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); + tmap.push_back("570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,611,246,247,247,247,248,206,86,208,207,207,207,207"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,571,206,86,208,207,207,207,207"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,208,207,207,207,207"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,127,167,167,167,167"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,490,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,86,86,86"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,166,167,168,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,246,247,247,247,247,247,247"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,206,86,208,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,246,247,248,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,530,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(12,1): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); + tmap.push_back("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); + tmap.push_back("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); + tmap.push_back("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); + tmap.push_back("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); + tmap.push_back("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); + tmap.push_back("579,579,579,579,579,579,579,579,579,580,0,0,0,0,0,698,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(12,2): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(12,8): + + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,373,374,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + + + obj.createentity(game, -328 + (8 * 8), (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy + obj.nearelephant = true; + + obj.createentity(game, 240, 72, 10, 1, 8120); // (savepoint) + roomtileset = 0; // (Use space station tileset) + break; + + case rn(12,9): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,137,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,689,689,689,215,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,689,689,689,215,95,95,95"); + + + obj.createentity(game, -328 + (8 * 8), -248 + (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy + obj.nearelephant = true; + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(12,10): + + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); + tmap.push_back("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,266,704,704,704,224,104,104,104"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); + tmap.push_back("185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,146,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + + obj.nearelephant = false; + roomtileset = 0; // (Use space station tileset) + break; + + case rn(12,16): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(12,17): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("570,570,570,570,570,570,570,570,570,571,0,0,0,0,0,689,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); + tmap.push_back("489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(12,18): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); + tmap.push_back("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + break; + + case rn(12,19): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,649,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,0,0,689,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); + tmap.push_back("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(13,1): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,136,176,176,176,176,176,176,176,176,176,176,176"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,255,256,256,256,256,256,256,256,256,256,256,256,256,256"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,175,176,176,176,176,176,176,176,176"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,96,256,256,256,256,256,256"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("576,576,576,576,576,576,576,576,576,577,175,176,176,176,177,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,696,696,696,696,696,696,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,255,256,256,256,257,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,255,256,256,256,257,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,536,576,576,576,576,577,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,615,495,495,495,617,696,696,696,696,696,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); + break; + + case rn(13,2): + + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,600,480,480,480,602,681,681,681,681,681,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,481,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,681,681,681,681,681,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,130,170,170,170,170,170,170"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,249,250,250,250,250,250,250,250,250"); + tmap.push_back("480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + + obj.createentity(game, 48, 96, 14); //Teleporter! + break; + + case rn(13,14): + + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,90,250,250,250,250,250,250,250,250,250,250,250,250,250,91,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,90,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,211,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,131,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,211,0,775,776,776,776,776,776,776,776,776,776,776,776,776,776,776,777,0,0,0,209,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,249,250,250,250,250,250,250"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,169,170,170,170,170,170,170,171,695,695,817,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("89,89,89,89,89,89,89,89,90,250,250,250,251,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("89,89,89,89,89,89,89,89,211,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("89,89,89,89,89,89,89,89,211,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("250,250,250,250,250,250,250,250,251,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,396,397,397,397,397,397,397,397,397,397,397,397,398,856,856,856,856,856,856,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,476,477,477,477,477,477,477,477,477,477,477,477,478,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 280, 32, 20, 1); //terminal + obj.createblock(5, 280-4, 32, 20, 16, 9); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(13,15): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,583,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,623,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,661,662,663,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,583,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,623,702,702,702,703,702,702,702,702,702,702,702,702,702,703,702,702,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,661,662,663,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,581,582,583,0,0,581,582,583,0,0,0,701,0,0,0,0,701,0,0,0,581,582,583,0,0,581,582,583,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,621,501,623,702,702,621,501,623,702,702,702,703,702,702,702,702,703,702,702,702,621,501,623,702,702,621,501,623,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,661,662,663,0,0,661,662,663,0,0,0,701,0,0,0,0,701,0,0,0,661,662,663,0,0,661,662,663,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,581,582,583,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,702,702,703,702,702,702,702,702,702,702,702,702,703,702,702,702,621,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,661,662,663,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,581,582,583,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,621,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,661,662,663,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(13,16): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,575,576,576,537,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,575,576,576,537,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,695,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,655,656,656,497,495,495,495,495,496,656,656,656,656,497,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,655,656,656,656,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + + obj.createentity(game, 80, 104, 10, 1, 16130); // (savepoint) + break; + + case rn(13,17): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); + tmap.push_back("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + + obj.createentity(game, 240, 128, 10, 1, 17130); // (savepoint) + break; + + case rn(13,18): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(13,19): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483"); + tmap.push_back("644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,164,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,244,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(14,14): + + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,293,453,453,453,294,292,292,292,292,292,292,292,292,293,453,453,453,294,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,414,9,9,9,412,292,292,292,292,292,292,292,292,414,9,9,9,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,414,782,782,782,412,292,292,292,292,292,292,292,292,414,782,782,782,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("453,453,453,453,453,453,453,453,453,453,453,454,701,701,701,452,453,453,453,453,453,453,453,453,454,701,701,701,452,453,453,453,453,453,453,453,453,453,453,453"); + tmap.push_back("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); + tmap.push_back("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); + tmap.push_back("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); + tmap.push_back("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); + tmap.push_back("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); + tmap.push_back("373,373,373,373,373,373,374,701,701,701,372,373,373,373,373,373,373,374,701,701,701,701,372,373,373,373,373,373,373,374,701,701,701,372,373,373,373,373,373,373"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,412,292,292,292,292,292,292,414,701,701,701,701,412,292,292,292,292,292,292,414,701,701,701,412,292,292,292,292,292,292"); + tmap.push_back("453,453,453,453,453,294,414,862,862,862,412,292,292,292,292,292,292,414,862,862,862,862,412,292,292,292,292,292,292,414,862,862,862,412,293,453,453,453,453,453"); + tmap.push_back("0,0,0,0,0,412,414,0,0,0,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,0,0,0,412,414,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,412,414,0,0,0,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,0,0,0,412,414,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,412,414,8,8,8,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,8,8,8,412,414,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,412,333,373,373,373,334,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,333,373,373,373,334,414,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,452,453,453,453,453,453,453,453,453,453,294,292,414,8,8,8,8,412,292,293,453,453,453,453,453,453,453,453,453,454,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,333,373,373,373,373,334,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,452,453,453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(14,16): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("573,573,573,573,573,573,573,573,573,573,573,573,574,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + break; + + case rn(14,17): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,698,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("659,659,659,659,659,659,659,659,659,659,659,659,659,660,699,700,699,699,699,699,699,699,699,699,700,699,658,500,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("579,579,579,579,579,579,579,579,579,579,579,579,579,580,699,700,699,699,699,699,699,699,699,699,700,699,578,540,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,698,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(14,18): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,499,659,659,660,0,698,0,0,0,658,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,499,659,659,660,0,0,0,0,698,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,658,659,659,659,659,659,659,659,659"); + tmap.push_back("498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); + tmap.push_back("498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); + tmap.push_back("498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,578,579,579,579,579"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(14,19): + + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495"); + tmap.push_back("495,495,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,536,577,0,0,0,0,0,0,0,0,655,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,536,576,576,577,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + + obj.createentity(game, 176, 72, 14); //Teleporter! + obj.createentity(game, 88, 160, 20, 1);//terminal + + obj.createblock(5, 88-4, 160, 20, 16, 11); + break; + + case rn(15,14): + + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,705,865,865,706,704,705,865,865,706,704,705,865,865,706,704,704,704"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); + tmap.push_back("185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,186,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); + tmap.push_back("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); + tmap.push_back("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,106,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,745,785,785,746,704,745,785,785,746,704,745,785,785,746,704,704,704"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,145,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,264,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(15,16): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(15,17): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(15,18): + + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("567,567,567,568,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,527,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 88, 96, 10, 0, 18150); // (savepoint) + break; + + case rn(15,19): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + break; + + case rn(16,4): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,484,644,644,644,485,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,605,163,164,165,643,644,644,644,644,644,644,644,644,645,163,164,165,603,483,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); + tmap.push_back("483,605,203,83,205,163,164,164,164,164,164,164,164,164,165,203,83,205,603,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,605,243,244,245,243,244,244,244,244,244,244,244,244,245,243,244,245,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,524,565,163,165,0,0,0,0,0,0,0,0,0,0,163,165,563,525,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,243,245,643,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,163,165,563,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,484,645,243,245,0,0,0,0,0,0,0,0,0,0,243,245,643,485,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,605,163,164,165,163,164,164,164,164,164,164,164,164,165,163,164,165,603,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,605,203,83,205,243,244,244,244,244,244,244,244,244,245,203,83,205,603,483,483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,605,243,244,245,563,564,564,564,564,564,564,564,564,565,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,524,564,564,564,525,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + + obj.createentity(game, 72, 120, 13); //Warp Token + + break; + + case rn(16,14): + + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("689,690,850,850,691,689,690,850,850,691,689,690,850,850,691,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107"); + tmap.push_back("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,268,268,268,268,268,268,268"); + tmap.push_back("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); + tmap.push_back("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); + tmap.push_back("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); + tmap.push_back("689,730,770,770,731,689,730,770,770,731,689,730,770,770,731,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); + tmap.push_back("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,187,188,189,689,811,0,0,0"); + tmap.push_back("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,227,107,229,689,811,0,0,0"); + tmap.push_back("188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,149,107,229,850,851,0,0,0"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,0"); + tmap.push_back("268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,269,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + roomtileset = 0; // (Use space station tileset) + obj.createentity(game, 176, 152, 10, 1, 14160); // (savepoint) + break; + + case rn(16,17): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(16,19): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(17,4): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,499,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,499,659,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("579,579,579,579,579,579,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,580,6,6,6,6,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,580,6,6,6,6,6"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(17,12): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,760,761,761,761,761,761,761,761,761,761,761,761,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,577,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + + obj.createentity(game, 40, 40, 14); //Teleporter! + obj.createentity(game, 192, 120, 20, 1);//terminal + + obj.createblock(5, 192-4, 120, 20, 16, 10); + roomtileset = 0; // (Use space station tileset) + break; + + case rn(17,13): + + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(17,14): + + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,169,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(17,15): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,837,837,837,837,837,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + roomtileset = 0; // (Use space station tileset) + break; + + case rn(17,16): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(17,17): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,571,0,0,0,0,0,0,0,0,569,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,490,650,650,650,651,0,0,0,0,0,0,0,0,649,650,650,650,491,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,530,570,570,570,571,0,0,0,0,0,0,0,0,569,570,570,570,531,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 112, 72, 14); //Teleporter! + break; + + case rn(17,18): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(17,19): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,567,567,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("567,567,567,567,567,567,567,567,567,568,687,687,687,687,687,687,687,687,606,486,486,608,687,687,687,687,687,687,687,687,566,567,567,567,567,567,567,567,567,567"); + tmap.push_back("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,646,647,647,648,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + tmap.push_back("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + + obj.createentity(game, 152, 152, 10, 0, 19170); // (savepoint) + break; + + case rn(18,4): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,7,7,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,615,495,495,495,496,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,615,495,495,495,617,7,7,7,615,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,496,656,656,656,497,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,615,495,495,495,617,7,7,7,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + break; + + case rn(18,15): + + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,514,674,674,674,515,513,513,513,513,513,513,513,513,513,513"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,635,369,370,371,633,513,513,513,513,513,513,513,513,513,513"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,635,409,289,411,633,513,514,674,674,515,513,513,513,513,513"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,450,450,450,451,633,513,513,635,449,450,451,633,513,635,369,371,633,513,513,513,513,513"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,593,594,594,594,555,513,513,554,594,594,594,555,513,635,449,451,633,513,513,513,513,513"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,450,450,451,633,513,513,513,513,513,513,513,513,513,513,513,513,554,594,594,555,513,513,513,513,513"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,593,594,594,555,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); + tmap.push_back("450,450,450,450,450,450,450,450,450,450,450,450,450,450,451,633,513,513,514,674,674,515,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,635,369,371,633,513,514,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,635,449,451,633,513,635,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,554,594,594,555,513,635,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,673,674,674,674,674,674,674,674,675,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,593,594,594,594,594,594,594,595,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,673,674,674,674,674,674,674,675,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,593,594,595,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,633,513,635,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,673,674,675,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + roomtileset = 0; // (Use space station tileset) + obj.createentity(game, 104, 152, 10, 1, 15180); // (savepoint) + break; + + case rn(18,17): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,522,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,522,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,482,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,482,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(18,19): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,525,483,483,483,483,483"); + tmap.push_back("564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(19,4): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,605,7,7,7,7,7,603,483,483,483,483,483,483,605,7,7,7,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("644,644,644,644,644,644,644,645,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,684,684,685,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,685,684,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,563,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,643,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 192, 176, 10, 1, 105190); // (savepoint) + break; + + case rn(19,5): + + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,575,577,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,575,577,0,0,0,0,0,0,0,0,575,577,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,6,6,6,615,617,6,6,6,6,6,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,575,576,576,537,536,576,576,576,576,577,6,6,615,617,6,6,6,6,6,6,0,0,615,617,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,617,0,0,615,495,495,495,495,495,495,495,495,536,576,576,537,536,576,576,576,576,576,577,6,6,615,617,6,6,6,6,6,6,6"); + tmap.push_back("656,656,656,656,656,656,657,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,537,536,576,576,576,576,576,576,576"); + tmap.push_back("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + + obj.createentity(game, 40, 192, 10, 1, 106190); // (savepoint) + break; + + + case rn(19,9): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,497,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,496,656,656,656,656"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,617,7,7,7,7,7,7,7,615,495,617,7,7,7,7,7,7,7,7,7,7,7,7,615,495,617,0,0,0,0"); + tmap.push_back("495,495,495,496,656,656,656,656,656,656,657,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,575,576,576,577,0,0,0,0,0,0,6,6,6,6,6,6,6,615,495,617,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,617,6,6,6,6,6,6,575,576,576,576,576,576,576,537,495,536,576,576,576,576,576,576,576,576,576,576"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,536,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + break; + + case rn(19,10): + + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,500,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,7,7,618,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,7,7,0,0,618,498,498,498,498,498,498"); + tmap.push_back("498,498,620,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,7,7,7,0,0,0,0,618,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,620,7,7,7,0,0,0,0,0,0,0,658,659,659,659,659,659,659"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,499,659,659,500,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,658,500,498,498,498,499,659,660,7,7,618,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,658,659,659,659,660,0,0,0,0,618,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,658,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,539,579,579,579,580,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,539,580,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,539,579,579,579,579,580,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,580,0,0,0,0,0,0,0,0,0,578,580,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,580,6,6,6,6,6,6,618,620,6,6,6,6,6,6,6,6,6,6,6,6,6"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,540,539,579,579,579,579,579,579,579,579,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + + obj.createentity(game, 72, 168, 10, 1, 111190); // (savepoint) + break; + + case rn(19,11): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656"); + tmap.push_back("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,615,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,655,656,656,497,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,615,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,575,576,576,576,577,0,0,0,0,695,0,0,0,0,655,656,656,497,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,617,0,0,0,0,695,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,696,696,696,696,615,495,495,495,536,576,576,577,0,695,0,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,617,0,695,0,0,0,0,0,0,0,0,695,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,536,576,576,577,0,0,0,0,0,0,0,695,0,655,656,656,497,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,695,0,0,0,0,655,656,656,497,495,495,495,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,695,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); + tmap.push_back("495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,695,0,0,0,0,0,0,0,655,656,656,497,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,695,0,0,0,0,0,0,0,0,695,0,615,495,495,495"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,0,0,0,695,0,655,656,656,656"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,695,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,695,0,0,0,0,0"); + tmap.push_back("495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,695,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,695,0,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576"); + tmap.push_back("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,536,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + break; + + case rn(19,12): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,578,579,579,579,579,579,579,579"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,578,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659"); + tmap.push_back("498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + break; + + case rn(19,13): + + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,522,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); + break; + + case rn(19,14): + + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,689,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,690,691,690,690,691,690,690,690,690,690,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,569,570,571,0,0,0,0,0,0,0,649,650,651,0,689,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,690,691,690,609,489,611,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,649,650,651,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,569,571,0,0,0,0,0,609,489,611,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,690,691,690,609,611,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,689,0,649,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + + obj.createentity(game, 80, 144, 10, 1, 14190); // (savepoint) + break; + + case rn(19,15): + + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492"); + tmap.push_back("492,492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); + tmap.push_back("492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); + tmap.push_back("492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,534,492,492,492"); + tmap.push_back("653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,653,494,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,494,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,534,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,494,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,494,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,534,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + break; + + case rn(19,16): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,684,684,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,683,0,0,0,0,0,0,0,0,563,564,564,564,564,525,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,684,685,684,684,685,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,563,564,565,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,563,564,564,564,564,525,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); + break; + + case rn(19,17): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + + obj.createentity(game, 168, 88, 10, 1, 17190); // (savepoint) + break; + + case rn(19,18): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + break; + + case rn(19,19): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,521,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + tmap.push_back("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + break; + + ///Secret lab! + + case rn(17, 6): + //Phase 1 + if(obj.altstates==1) + { + + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,287,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,367,367,367,328,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,287,448,0,0,0,406,286,286,287,448,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,287,448,0,0,0,0,406,286,287,448,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,446,447,447,447,288,286,286,408,0,0,0,0,0,406,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,287,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,287,448,0,0,0,0,366,328,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,366,328,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,327,368,0,0,0,406,286,286,286,327,368,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,286,408,0,0,0,406,286,286,286,286,408,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,286,408,0,0,0,0"); + tmap.push_back("286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,327,367,367,367,328,286,286,286,286,327,367,367,367,367"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + } + else if(obj.altstates==2) + { + //Phase 2 + + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,287,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,288,287,447,448,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,448,0,0,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,287,448,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,287,448,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,287,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,286,408,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,327,368,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,408,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,408,0,0,0,0"); + tmap.push_back("286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,286,327,367,367,367,367"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + } + else + { + //Phase 3 + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,287,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,288,287,447,448,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,448,0,0,0,0,0,446,447,288,286,408,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,447,448,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,287,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + } + break; + + case rn(18,6): + + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,442,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,440,441,441,441,441,441,441,441,441,441,441,441"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + tmap.push_back("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + break; + + case rn(18,5): + + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,0,0,0,372,373,373,373,373,373,373,334,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,452,453,453,453,453,453,453,453,453,453,294,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("453,453,453,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,293,453,453,453,453,453"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,414,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,414,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,414,0,0,0,0,0"); + tmap.push_back("373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,414,0,0,0,0,0,0,0,412,292,292,292,292,292,333,373,373,373,373,373"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + + obj.createentity(game, 256, 88, 21, 1); //Terminal + obj.createentity(game, 128, 88, 21, 1); //Terminal + obj.createentity(game, 104, 88, 21, 1); //Terminal + obj.createentity(game, 80, 88, 21, 1); //Terminal + obj.createentity(game, 128, 128, 21, 0); //Terminal + obj.createentity(game, 128, 192, 21, 1); //Terminal + obj.createentity(game, 104, 192, 21, 1); //Terminal + obj.createentity(game, 80, 192, 21, 1); //Terminal + + if(game.insecretlab) + { + //vitellary + obj.createentity(game, 231, 81, 18, 14, 0, 18); + obj.createblock(5, 231- 32, 0, 32 + 32 + 32, 240, 2); + + //violet + obj.createentity(game,83, 126, 18, 20, 0, 18); + obj.entities[obj.getcrewman(1)].rule = 7; + obj.entities[obj.getcrewman(1)].tile +=6; + obj.createblock(5, 83 - 32, 0, 32 + 32 + 32, 240, 1); + } + break; + + case rn(17,5): + + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("376,376,376,376,377,0,0,0,0,0,0,375,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,375,376,376,377,0,0,0,0,375,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,415,295,295,417,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,455,456,456,457,0,0,0,0,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + + obj.createentity(game, 96, 48, 25, 0, 1); //Terminal + obj.createentity(game, 128, 48, 25, 0, 2); //Terminal + obj.createentity(game, 160, 48, 25, 0, 3); //Terminal + obj.createentity(game, 192, 48, 25, 0, 4); //Terminal + obj.createentity(game, 224, 48, 25, 0, 5); //Terminal + obj.createentity(game, 256, 48, 25, 0, 6); //Terminal + + obj.createentity(game, 96, 88, 25, 1, 13); //Terminal + obj.createentity(game, 128, 88, 25, 1, 14); //Terminal + obj.createentity(game, 160, 88, 25, 1, 15); //Terminal + obj.createentity(game, 192, 88, 25, 1, 16); //Terminal + obj.createentity(game, 224, 88, 25, 1, 17); //Terminal + obj.createentity(game, 256, 88, 25, 1, 18); //Terminal + + obj.createentity(game, 96, 128-3, 25, 0, 7); //Terminal + obj.createentity(game, 96, 168, 25, 1, 8); //Terminal + + obj.createentity(game, 160, 128, 25, 0, 12); //Terminal + obj.createentity(game, 192, 128, 25, 0, 11); //Terminal + obj.createentity(game, 224, 128, 25, 0, 10); //Terminal + obj.createentity(game, 256, 128, 25, 0, 9); //Terminal + break; + + case rn(16,5): + + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,364,364"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,363,364,364,364,364,364,364,364,364,364,364,365,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,405,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,283,283,324,364,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,325,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.createentity(game, 152, 168, 25, 0, 20); //Terminal + obj.createentity(game, 152, 168, 25, 0, 19); //Terminal + break; + + case rn(19,6): + + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,411,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("450,450,450,451,0,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); + + obj.createentity(game, 216, 176, 21, 1); //Terminal + obj.createentity(game, 192, 176, 21, 1); //Terminal + obj.createentity(game, 168, 176, 21, 1); //Terminal + obj.createentity(game, 144, 176, 21, 1); //Terminal + obj.createentity(game, 88, 96, 21, 1); //Terminal + obj.createentity(game, 112, 96, 21, 1); //Terminal + obj.createentity(game, 136, 96, 21, 1); //Terminal + obj.createentity(game, 160, 96, 21, 1); //Terminal + + //vertigris: + obj.createentity(game, 100, 169, 18, 13, 0, 18); + obj.createblock(5, 100 - 16, 0, 32 + 32, 240, 4); + + //victoria: + obj.createentity(game, 193, 89, 18, 16, 0, 18); + obj.createblock(5, 193-16, 0, 32+32, 240, 5); + break; + + + case rn(19,7): + + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,363,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,445,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); + tmap.push_back("283,324,364,364,364,364,364,365,0,0,0,0,363,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,324,364,364,364,364,325,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.createentity(game, 72, 192, 13); // (shiny trinket) + obj.createentity(game, 112, 144, 20, 1); // (terminal) + obj.createblock(5, 112 - 4, 144, 20, 16, 21); + + //vermilion + obj.createentity(game, 186, 137, 18, 15, 0, 18); + obj.createblock(5, 186 - 32, 0, 32 + 32 + 32, 240, 3); + + //naughty corner! + obj.createblock(1, 30, 0, 20, 50, 15); + obj.createblock(1, 90, 0, 20, 50, 16); + break; + + + case rn(19, 8): + //The SUPER GRAVITRON + + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.createentity(game, -8, 84-32, 11, 328+8); // (horizontal gravity line) + obj.createentity(game, -8, 148 + 32, 11, 328+8); // (horizontal gravity line) + obj.createblock(1, -10, 84 - 16, 340, 32, 9); //start the game + break; + + default: + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + //obj.fatal_bottom(); + break; + } + + return tmap; +} diff --git a/desktop_version/src/Otherlevel.h b/desktop_version/src/Otherlevel.h new file mode 100644 index 00000000..f1083e1e --- /dev/null +++ b/desktop_version/src/Otherlevel.h @@ -0,0 +1,38 @@ +#ifndef OTHERLEVEL_H +#define OTHERLEVEL_H + +#include "Game.h" +#include "Entity.h" + +#include +#include + +class otherlevelclass +{ +public: + enum + { + BLOCK = 0, + TRIGGER, + DAMAGE, + DIRECTIONAL, + SAFE, + ACTIVITY + }; + + otherlevelclass(); + void addline(std::string t); + std::vector loadlevel(int rx, int ry , Game& game, entityclass& obj); + + std::string roomname; + + int roomtileset; + int i; + + // roomtext thing in other level + bool roomtexton; + int roomtextx, roomtexty, roomtextnumlines; + std::vector roomtext; +}; + +#endif /* OTHERLEVEL_H */ diff --git a/desktop_version/src/Screen.cpp b/desktop_version/src/Screen.cpp new file mode 100644 index 00000000..b4a4979e --- /dev/null +++ b/desktop_version/src/Screen.cpp @@ -0,0 +1,212 @@ +#include "Screen.h" + +#include "FileSystemUtils.h" +#include "GraphicsUtil.h" + +#include + +// Used to create the window icon +extern "C" +{ + extern unsigned lodepng_decode24( + unsigned char** out, + unsigned* w, + unsigned* h, + const unsigned char* in, + size_t insize + ); +} + +Screen::Screen() +{ + m_window = NULL; + m_renderer = NULL; + m_screenTexture = NULL; + m_screen = NULL; + isWindowed = true; + stretchMode = 0; + isFiltered = false; + filterSubrect.x = 1; + filterSubrect.y = 1; + filterSubrect.w = 318; + filterSubrect.h = 238; + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest"); + + // Uncomment this next line when you need to debug -flibit + // SDL_SetHintWithPriority(SDL_HINT_RENDER_DRIVER, "software", SDL_HINT_OVERRIDE); + SDL_CreateWindowAndRenderer( + 640, + 480, + SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE, + &m_window, + &m_renderer + ); + SDL_SetWindowTitle(m_window, "VVVVVV"); + + unsigned char *fileIn = NULL; + size_t length = 0; + unsigned char *data; + unsigned int width, height; + FILESYSTEM_loadFileToMemory("VVVVVV.png", &fileIn, &length); + lodepng_decode24(&data, &width, &height, fileIn, length); + FILESYSTEM_freeMemory(&fileIn); + SDL_Surface *icon = SDL_CreateRGBSurfaceFrom( + data, + width, + height, + 24, + width * 3, + 0x000000FF, + 0x0000FF00, + 0x00FF0000, + 0x00000000 + ); + SDL_SetWindowIcon(m_window, icon); + SDL_FreeSurface(icon); + free(data); + + // FIXME: This surface should be the actual backbuffer! -flibit + m_screen = SDL_CreateRGBSurface( + 0, + 320, + 240, + 32, + 0x00FF0000, + 0x0000FF00, + 0x000000FF, + 0xFF000000 + ); + m_screenTexture = SDL_CreateTexture( + m_renderer, + SDL_PIXELFORMAT_ARGB8888, + SDL_TEXTUREACCESS_STREAMING, + 320, + 240 + ); + + badSignalEffect = false; + + glScreen = true; +} + +void Screen::ResizeScreen(int x , int y) +{ + static int resX = 320; + static int resY = 240; + if (x != -1 && y != -1) + { + // This is a user resize! + resX = x; + resY = y; + } + + if(!isWindowed) + { + SDL_SetWindowFullscreen(m_window, SDL_WINDOW_FULLSCREEN_DESKTOP); + } + else + { + SDL_SetWindowFullscreen(m_window, 0); + if (x != -1 && y != -1) + { + SDL_SetWindowSize(m_window, resX, resY); + SDL_SetWindowPosition(m_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + } + } + if (stretchMode == 1) + { + int winX, winY; + SDL_GetWindowSize(m_window, &winX, &winY); + SDL_RenderSetLogicalSize(m_renderer, winX, winY); + SDL_RenderSetIntegerScale(m_renderer, SDL_FALSE); + } + else + { + SDL_RenderSetLogicalSize(m_renderer, 320, 240); + SDL_RenderSetIntegerScale(m_renderer, (SDL_bool) (stretchMode == 2)); + } + SDL_ShowWindow(m_window); +} + +void Screen::GetWindowSize(int* x, int* y) +{ + SDL_GetWindowSize(m_window, x, y); +} + +void Screen::UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect ) +{ + if((buffer == NULL) && (m_screen == NULL) ) + { + return; + } + + if(badSignalEffect) + { + buffer = ApplyFilter(buffer); + } + + + FillRect(m_screen, 0x000); + BlitSurfaceStandard(buffer,NULL,m_screen,rect); + + if(badSignalEffect) + { + SDL_FreeSurface(buffer); + } + +} + +const SDL_PixelFormat* Screen::GetFormat() +{ + return m_screen->format; +} + +void Screen::FlipScreen() +{ + SDL_UpdateTexture( + m_screenTexture, + NULL, + m_screen->pixels, + m_screen->pitch + ); + SDL_RenderCopy( + m_renderer, + m_screenTexture, + isFiltered ? &filterSubrect : NULL, + NULL + ); + SDL_RenderPresent(m_renderer); + SDL_RenderClear(m_renderer); + SDL_FillRect(m_screen, NULL, 0x00000000); +} + +void Screen::toggleFullScreen() +{ + isWindowed = !isWindowed; + ResizeScreen(-1, -1); +} + +void Screen::toggleStretchMode() +{ + stretchMode = (stretchMode + 1) % 3; + ResizeScreen(-1, -1); +} + +void Screen::toggleLinearFilter() +{ + isFiltered = !isFiltered; + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, isFiltered ? "linear" : "nearest"); + SDL_DestroyTexture(m_screenTexture); + m_screenTexture = SDL_CreateTexture( + m_renderer, + SDL_PIXELFORMAT_ARGB8888, + SDL_TEXTUREACCESS_STREAMING, + 320, + 240 + ); +} + +void Screen::ClearScreen( int colour ) +{ + //FillRect(m_screen, colour) ; +} diff --git a/desktop_version/src/Screen.h b/desktop_version/src/Screen.h new file mode 100644 index 00000000..be8e4179 --- /dev/null +++ b/desktop_version/src/Screen.h @@ -0,0 +1,40 @@ +#ifndef SCREEN_H +#define SCREEN_H + +#include + +class Screen +{ +public: + Screen(); + + void ResizeScreen(int x, int y); + void GetWindowSize(int* x, int* y); + + void UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect); + void ClearScreen(int colour); + void FlipScreen(); + + const SDL_PixelFormat* GetFormat(); + + void toggleFullScreen(); + void toggleStretchMode(); + void toggleLinearFilter(); + + bool isWindowed; + bool isFiltered; + bool badSignalEffect; + bool glScreen; + int stretchMode; + + SDL_Window *m_window; + SDL_Renderer *m_renderer; + SDL_Texture *m_screenTexture; + SDL_Surface* m_screen; + + SDL_Rect filterSubrect; +}; + + + +#endif /* SCREEN_H */ diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp new file mode 100644 index 00000000..c16e3d77 --- /dev/null +++ b/desktop_version/src/Script.cpp @@ -0,0 +1,3545 @@ +#include "Script.h" +#include "Graphics.h" + +#include "Entity.h" +#include "Music.h" +#include "KeyPoll.h" +#include "Map.h" + +scriptclass::scriptclass() +{ + //Start SDL + + //Init + for (int i = 0; i < 500; i++) + { + commands.push_back(std::string()); + } + for (int i = 0; i < 40; i++) + { + words.push_back(std::string()); + txt.push_back(std::string()); + } + position = 0; + scriptlength = 0; + scriptdelay = 0; + running = false; + + +} + +void scriptclass::clearcustom(){ + customscript.clear(); +} + +void scriptclass::tokenize( std::string t ) +{ + j = 0; + tempword = ""; + + for (size_t i = 0; i < t.length(); i++) + { + currentletter = t.substr(i, 1); + if (currentletter == "(" || currentletter == ")" || currentletter == ",") + { + words[j] = tempword; + std::transform(words[j].begin(), words[j].end(), words[j].begin(), ::tolower); + j++; + tempword = ""; + } + else if (currentletter == " ") + { + //don't do anything - i.e. strip out spaces. + } + else + { + tempword += currentletter; + } + } + + if (tempword != "") + { + words[j] = tempword; + } +} + +void scriptclass::run( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music ) +{ + while(running && scriptdelay<=0 && !game.pausescript) + { + if (position < scriptlength) + { + //Let's split or command in an array of words + tokenize(commands[position]); + + //For script assisted input + game.press_left = false; + game.press_right = false; + game.press_action = false; + game.press_map = false; + + //Ok, now we run a command based on that string + if (words[0] == "moveplayer") + { + //USAGE: moveplayer(x offset, y offset) + int player = obj.getplayer(); + obj.entities[player].xp += ss_toi(words[1]); + obj.entities[player].yp += ss_toi(words[2]); + scriptdelay = 1; + } + if (words[0] == "warpdir") + { + int temprx=ss_toi(words[1])-1; + int tempry=ss_toi(words[2])-1; + int curlevel=temprx+(ed.maxwidth*(tempry)); + ed.level[curlevel].warpdir=ss_toi(words[3]); + //If screen warping, then override all that: + dwgfx.backgrounddrawn = false; + + //Do we update our own room? + if(game.roomx-100==temprx && game.roomy-100==tempry){ + map.warpx=false; map.warpy=false; + if(ed.level[curlevel].warpdir==0){ + map.background = 1; + }else if(ed.level[curlevel].warpdir==1){ + map.warpx=true; + map.background=3; + dwgfx.rcol = ed.getwarpbackground(temprx,tempry); + }else if(ed.level[curlevel].warpdir==2){ + map.warpy=true; + map.background=4; + dwgfx.rcol = ed.getwarpbackground(temprx,tempry); + }else if(ed.level[curlevel].warpdir==3){ + map.warpx=true; map.warpy=true; + map.background = 5; + dwgfx.rcol = ed.getwarpbackground(temprx,tempry); + } + } + } + if (words[0] == "ifwarp") + { + if (ed.level[ss_toi(words[1])-1+(ed.maxwidth*(ss_toi(words[2])-1))].warpdir == ss_toi(words[3])) + { + load("custom_"+words[4]); + position--; + } + } + if (words[0] == "destroy") + { + if(words[1]=="gravitylines"){ + for(int edi=0; edi= ss_toi(words[1])) + { + load("custom_"+words[2]); + position--; + } + } + if (words[0] == "customiftrinketsless") + { + if (game.trinkets < ss_toi(words[1])) + { + load("custom_"+words[2]); + position--; + } + } + else if (words[0] == "customifflag") + { + if (obj.flags[ss_toi(words[1])]==1) + { + load("custom_"+words[2]); + position--; + } + } + if (words[0] == "custommap") + { + if(words[1]=="on"){ + map.customshowmm=true; + }else if(words[1]=="off"){ + map.customshowmm=false; + } + } + if (words[0] == "delay") + { + //USAGE: delay(frames) + scriptdelay = ss_toi(words[1]); + } + if (words[0] == "flag") + { + if(ss_toi(words[1])>=0 && ss_toi(words[1])<100){ + if(words[2]=="on"){ + obj.changeflag(ss_toi(words[1]),1); + }else if(words[2]=="off"){ + obj.changeflag(ss_toi(words[1]),0); + } + } + } + if (words[0] == "flash") + { + //USAGE: flash(frames) + game.flashlight = ss_toi(words[1]); + } + if (words[0] == "shake") + { + //USAGE: shake(frames) + game.screenshake = ss_toi(words[1]); + } + if (words[0] == "walk") + { + //USAGE: walk(dir,frames) + if (words[1] == "left") + { + game.press_left = true; + } + else if (words[1] == "right") + { + game.press_right = true; + } + scriptdelay = ss_toi(words[2]); + } + if (words[0] == "flip") + { + game.press_action = true; + scriptdelay = 1; + } + if (words[0] == "tofloor") + { + if(obj.entities[obj.getplayer()].onroof>0) + { + game.press_action = true; + scriptdelay = 1; + } + } + if (words[0] == "playef") + { + music.playef(ss_toi(words[1]), ss_toi(words[2])); + } + if (words[0] == "play") + { + music.play(ss_toi(words[1])); + } + if (words[0] == "stopmusic") + { + music.haltdasmusik(); + } + if (words[0] == "resumemusic") + { + music.play(music.resumesong); + } + if (words[0] == "musicfadeout") + { + music.fadeout(); + } + if (words[0] == "musicfadein") + { + music.musicfadein = 90; + //if(!game.muted) music.fadeMusicVolumeIn(3000); + } + if (words[0] == "trinketscriptmusic") + { + music.play(4); + } + if (words[0] == "gotoposition") + { + //USAGE: gotoposition(x position, y position, gravity position) + int player = obj.getplayer(); + obj.entities[player].xp = ss_toi(words[1]); + obj.entities[player].yp = ss_toi(words[2]); + game.gravitycontrol = ss_toi(words[3]); + + } + if (words[0] == "gotoroom") + { + //USAGE: gotoroom(x,y) (manually add 100) + map.gotoroom(ss_toi(words[1])+100, ss_toi(words[2])+100, dwgfx, game, obj, music); + } + if (words[0] == "cutscene") + { + dwgfx.showcutscenebars = true; + } + if (words[0] == "endcutscene") + { + dwgfx.showcutscenebars = false; + } + if (words[0] == "untilbars") + { + if (dwgfx.showcutscenebars) + { + if (dwgfx.cutscenebarspos < 360) + { + scriptdelay = 1; + position--; + } + } + else + { + if (dwgfx.cutscenebarspos > 0) + { + scriptdelay = 1; + position--; + } + } + } + else if (words[0] == "text") + { + //oh boy + //first word is the colour. + if (words[1] == "cyan") + { + r = 164; + g = 164; + b = 255; + } + else if (words[1] == "player") + { + r = 164; + g = 164; + b = 255; + } + else if (words[1] == "red") + { + r = 255; + g = 60; + b = 60; + } + else if (words[1] == "green") + { + r = 144; + g = 255; + b = 144; + } + else if (words[1] == "yellow") + { + r = 255; + g = 255; + b = 134; + } + else if (words[1] == "blue") + { + r = 95; + g = 95; + b = 255; + } + else if (words[1] == "purple") + { + r = 255; + g = 134; + b = 255; + } + else if (words[1] == "gray") + { + r = 174; + g = 174; + b = 174; + } + else + { + //use a gray + r = 174; + g = 174; + b = 174; + } + + //next are the x,y coordinates + textx = ss_toi(words[2]); + texty = ss_toi(words[3]); + + //Number of lines for the textbox! + txtnumlines = ss_toi(words[4]); + for (int i = 0; i < txtnumlines; i++) + { + position++; + txt[i] = commands[position]; + } + } + else if (words[0] == "position") + { + //are we facing left or right? for some objects we don't care, default at 0. + j = 0; + + //the first word is the object to position relative to + if (words[1] == "player") + { + i = obj.getplayer(); + j = obj.entities[i].dir; + } + else if (words[1] == "cyan") + { + i = obj.getcrewman(0); + j = obj.entities[i].dir; + } + else if (words[1] == "purple") + { + i = obj.getcrewman(1); + j = obj.entities[i].dir; + } + else if (words[1] == "yellow") + { + i = obj.getcrewman(2); + j = obj.entities[i].dir; + } + else if (words[1] == "red") + { + i = obj.getcrewman(3); + j = obj.entities[i].dir; + } + else if (words[1] == "green") + { + i = obj.getcrewman(4); + j = obj.entities[i].dir; + } + else if (words[1] == "blue") + { + i = obj.getcrewman(5); + j = obj.entities[i].dir; + } + else if (words[1] == "centerx") + { + words[2] = "donothing"; + j = -1; + textx = -500; + } + else if (words[1] == "centery") + { + words[2] = "donothing"; + j = -1; + texty = -500; + } + else if (words[1] == "center") + { + words[2] = "donothing"; + j = -1; + textx = -500; + texty = -500; + } + + //next is whether to position above or below + if (words[2] == "above") + { + if (j == 1) //left + { + textx = obj.entities[i].xp -10000; //tells the box to be oriented correctly later + texty = obj.entities[i].yp - 16 - (txtnumlines*8); + } + else if (j == 0) //Right + { + textx = obj.entities[i].xp - 16; + texty = obj.entities[i].yp - 18 - (txtnumlines * 8); + } + } + else + { + if (j == 1) //left + { + textx = obj.entities[i].xp -10000; //tells the box to be oriented correctly later + texty = obj.entities[i].yp + 26; + } + else if (j == 0) //Right + { + textx = obj.entities[i].xp - 16; + texty = obj.entities[i].yp + 26; + } + } + } + else if (words[0] == "customposition") + { + //are we facing left or right? for some objects we don't care, default at 0. + j = 0; + + //the first word is the object to position relative to + if (words[1] == "player") + { + i = obj.getcustomcrewman(0); + j = obj.entities[i].dir; + } + else if (words[1] == "cyan") + { + i = obj.getcustomcrewman(0); + j = obj.entities[i].dir; + } + else if (words[1] == "purple") + { + i = obj.getcustomcrewman(1); + j = obj.entities[i].dir; + } + else if (words[1] == "yellow") + { + i = obj.getcustomcrewman(2); + j = obj.entities[i].dir; + } + else if (words[1] == "red") + { + i = obj.getcustomcrewman(3); + j = obj.entities[i].dir; + } + else if (words[1] == "green") + { + i = obj.getcustomcrewman(4); + j = obj.entities[i].dir; + } + else if (words[1] == "blue") + { + i = obj.getcustomcrewman(5); + j = obj.entities[i].dir; + } + else if (words[1] == "centerx") + { + words[2] = "donothing"; + j = -1; + textx = -500; + } + else if (words[1] == "centery") + { + words[2] = "donothing"; + j = -1; + texty = -500; + } + else if (words[1] == "center") + { + words[2] = "donothing"; + j = -1; + textx = -500; + texty = -500; + } + + if(i==0 && words[1]!="player" && words[1]!="cyan"){ + //Requested crewmate is not actually on screen + words[2] = "donothing"; + j = -1; + textx = -500; + texty = -500; + } + + //next is whether to position above or below + if (words[2] == "above") + { + if (j == 1) //left + { + textx = obj.entities[i].xp -10000; //tells the box to be oriented correctly later + texty = obj.entities[i].yp - 16 - (txtnumlines*8); + } + else if (j == 0) //Right + { + textx = obj.entities[i].xp - 16; + texty = obj.entities[i].yp - 18 - (txtnumlines * 8); + } + } + else + { + if (j == 1) //left + { + textx = obj.entities[i].xp -10000; //tells the box to be oriented correctly later + texty = obj.entities[i].yp + 26; + } + else if (j == 0) //Right + { + textx = obj.entities[i].xp - 16; + texty = obj.entities[i].yp + 26; + } + } + } + else if (words[0] == "backgroundtext") + { + game.backgroundtext = true; + } + else if (words[0] == "flipme") + { + if(dwgfx.flipmode) texty += 2*(120 - texty); + } + else if (words[0] == "speak_active") + { + //Ok, actually display the textbox we've initilised now! + dwgfx.createtextbox(txt[0], textx, texty, r, g, b); + if (txtnumlines > 1) + { + for (i = 1; i < txtnumlines; i++) + { + dwgfx.addline(txt[i]); + } + } + + //the textbox cannot be outside the screen. Fix if it is. + if (textx <= -1000) + { + //position to the left of the player + textx += 10000; + textx -= dwgfx.textboxwidth(); + textx += 16; + dwgfx.textboxmoveto(textx); + } + + if (textx == -500) + { + dwgfx.textboxcenterx(); + } + + if (texty == -500) + { + dwgfx.textboxcentery(); + } + + dwgfx.textboxadjust(); + dwgfx.textboxactive(); + + if (!game.backgroundtext) + { + game.advancetext = true; + game.hascontrol = false; + game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + } + else if (words[0] == "speak") + { + //Exactly as above, except don't make the textbox active (so we can use multiple textboxes) + dwgfx.createtextbox(txt[0], textx, texty, r, g, b); + if (txtnumlines > 1) + { + for (i = 1; i < txtnumlines; i++) + { + dwgfx.addline(txt[i]); + } + } + + //the textbox cannot be outside the screen. Fix if it is. + if (textx <= -1000) + { + //position to the left of the player + textx += 10000; + textx -= dwgfx.textboxwidth(); + textx += 16; + dwgfx.textboxmoveto(textx); + } + + if (textx == -500) + { + dwgfx.textboxcenterx(); + } + + if (texty == -500) + { + dwgfx.textboxcentery(); + } + + dwgfx.textboxadjust(); + //dwgfx.textboxactive(); + + if (!game.backgroundtext) + { + game.advancetext = true; + game.hascontrol = false; + game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + } + else if (words[0] == "endtext") + { + dwgfx.textboxremove(); + game.hascontrol = true; + game.advancetext = false; + } + else if (words[0] == "endtextfast") + { + dwgfx.textboxremovefast(); + game.hascontrol = true; + game.advancetext = false; + } + else if (words[0] == "do") + { + //right, loop from this point + looppoint = position; + loopcount = ss_toi(words[1]); + } + else if (words[0] == "loop") + { + //right, loop from this point + loopcount--; + if (loopcount > 0) + { + position = looppoint; + } + } + else if (words[0] == "vvvvvvman") + { + //Create the super VVVVVV combo! + i = obj.getplayer(); + obj.entities[i].xp = 30; + obj.entities[i].yp = 46; + obj.entities[i].size = 13; + obj.entities[i].colour = 23; + obj.entities[i].cx = 36;// 6; + obj.entities[i].cy = 12+80;// 2; + obj.entities[i].h = 126-80;// 21; + } + else if (words[0] == "undovvvvvvman") + { + //Create the super VVVVVV combo! + i = obj.getplayer(); + obj.entities[i].xp = 100; + obj.entities[i].size = 0; + obj.entities[i].colour = 0; + obj.entities[i].cx = 6; + obj.entities[i].cy = 2; + obj.entities[i].h = 21; + } + else if (words[0] == "createentity") + { + obj.createentity(game, ss_toi(words[1]), ss_toi(words[2]), ss_toi(words[3]), ss_toi(words[4]), ss_toi(words[5])); + } + else if (words[0] == "createcrewman") + { + if (words[3] == "cyan") + { + r=0; + } + else if (words[3] == "red") + { + r=15; + } + else if (words[3] == "green") + { + r=13; + } + else if (words[3] == "yellow") + { + r=14; + } + else if (words[3] == "blue") + { + r=16; + } + else if (words[3] == "purple") + { + r=20; + } + else if (words[3] == "gray") + { + r=19; + } + else + { + r = 19; + } + + //convert the command to the right index + if (words[5] == "followplayer") words[5] = "10"; + if (words[5] == "followpurple") words[5] = "11"; + if (words[5] == "followyellow") words[5] = "12"; + if (words[5] == "followred") words[5] = "13"; + if (words[5] == "followgreen") words[5] = "14"; + if (words[5] == "followblue") words[5] = "15"; + + if (words[5] == "followposition") words[5] = "16"; + if (words[5] == "faceleft") + { + words[5] = "17"; + words[6] = "0"; + } + if (words[5] == "faceright") + { + words[5] = "17"; + words[6] = "1"; + } + if (words[5] == "faceplayer") + { + words[5] = "18"; + words[6] = "0"; + } + if (words[5] == "panic") + { + words[5] = "20"; + words[6] = "0"; + } + + if (ss_toi(words[5]) >= 16) + { + obj.createentity(game, ss_toi(words[1]), ss_toi(words[2]), 18, r, ss_toi(words[4]), ss_toi(words[5]), ss_toi(words[6])); + } + else + { + obj.createentity(game, ss_toi(words[1]), ss_toi(words[2]), 18, r, ss_toi(words[4]), ss_toi(words[5])); + } + } + else if (words[0] == "changemood") + { + if (words[1] == "player") + { + i=obj.getplayer(); + } + else if (words[1] == "cyan") + { + i=obj.getcrewman(0); + } + else if (words[1] == "customcyan") + { + i=obj.getcustomcrewman(0); + } + else if (words[1] == "red") + { + i=obj.getcrewman(3); + } + else if (words[1] == "green") + { + i=obj.getcrewman(4); + } + else if (words[1] == "yellow") + { + i=obj.getcrewman(2); + } + else if (words[1] == "blue") + { + i=obj.getcrewman(5); + } + else if (words[1] == "purple") + { + i=obj.getcrewman(1); + } + else if (words[1] == "pink") + { + i=obj.getcrewman(1); + } + + if (ss_toi(words[2]) == 0) + { + obj.entities[i].tile = 0; + } + else + { + obj.entities[i].tile = 144; + } + } + else if (words[0] == "changecustommood") + { + if (words[1] == "player") + { + i=obj.getcustomcrewman(0); + obj.customcrewmoods[0]=ss_toi(words[2]); + } + else if (words[1] == "cyan") + { + i=obj.getcustomcrewman(0); + obj.customcrewmoods[0]=ss_toi(words[2]); + } + else if (words[1] == "customcyan") + { + i=obj.getcustomcrewman(0); + obj.customcrewmoods[0]=ss_toi(words[2]); + } + else if (words[1] == "red") + { + i=obj.getcustomcrewman(3); + obj.customcrewmoods[3]=ss_toi(words[2]); + } + else if (words[1] == "green") + { + i=obj.getcustomcrewman(4); + obj.customcrewmoods[4]=ss_toi(words[2]); + } + else if (words[1] == "yellow") + { + i=obj.getcustomcrewman(2); + obj.customcrewmoods[2]=ss_toi(words[2]); + } + else if (words[1] == "blue") + { + i=obj.getcustomcrewman(5); + obj.customcrewmoods[5]=ss_toi(words[2]); + } + else if (words[1] == "purple") + { + i=obj.getcustomcrewman(1); + obj.customcrewmoods[1]=ss_toi(words[2]); + } + else if (words[1] == "pink") + { + i=obj.getcustomcrewman(1); + obj.customcrewmoods[1]=ss_toi(words[2]); + } + + if (ss_toi(words[2]) == 0) + { + obj.entities[i].tile = 0; + } + else + { + obj.entities[i].tile = 144; + } + } + else if (words[0] == "changetile") + { + if (words[1] == "player") + { + i=obj.getplayer(); + } + else if (words[1] == "cyan") + { + i=obj.getcrewman(0); + } + else if (words[1] == "red") + { + i=obj.getcrewman(3); + } + else if (words[1] == "green") + { + i=obj.getcrewman(4); + } + else if (words[1] == "yellow") + { + i=obj.getcrewman(2); + } + else if (words[1] == "blue") + { + i=obj.getcrewman(5); + } + else if (words[1] == "purple") + { + i=obj.getcrewman(1); + } + + obj.entities[i].tile = ss_toi(words[2]); + } + else if (words[0] == "flipgravity") + { + //not something I'll use a lot, I think. Doesn't need to be very robust! + if (words[1] == "player") + { + i=obj.getplayer(); + } + else if (words[1] == "cyan") + { + i=obj.getcrewman(0); + } + else if (words[1] == "red") + { + i=obj.getcrewman(3); + } + else if (words[1] == "green") + { + i=obj.getcrewman(4); + } + else if (words[1] == "yellow") + { + i=obj.getcrewman(2); + } + else if (words[1] == "blue") + { + i=obj.getcrewman(5); + } + else if (words[1] == "purple") + { + i=obj.getcrewman(1); + } + + obj.entities[i].rule =7; + obj.entities[i].tile = 6; + } + else if (words[0] == "changegravity") + { + //not something I'll use a lot, I think. Doesn't need to be very robust! + if (words[1] == "player") + { + i=obj.getplayer(); + } + else if (words[1] == "cyan") + { + i=obj.getcrewman(0); + } + else if (words[1] == "red") + { + i=obj.getcrewman(3); + } + else if (words[1] == "green") + { + i=obj.getcrewman(4); + } + else if (words[1] == "yellow") + { + i=obj.getcrewman(2); + } + else if (words[1] == "blue") + { + i=obj.getcrewman(5); + } + else if (words[1] == "purple") + { + i=obj.getcrewman(1); + } + + obj.entities[i].tile +=12; + } + else if (words[0] == "changedir") + { + if (words[1] == "player") + { + i=obj.getplayer(); + } + else if (words[1] == "cyan") + { + i=obj.getcrewman(0); + } + else if (words[1] == "red") + { + i=obj.getcrewman(3); + } + else if (words[1] == "green") + { + i=obj.getcrewman(4); + } + else if (words[1] == "yellow") + { + i=obj.getcrewman(2); + } + else if (words[1] == "blue") + { + i=obj.getcrewman(5); + } + else if (words[1] == "purple") + { + i=obj.getcrewman(1); + } + + if (ss_toi(words[2]) == 0) + { + obj.entities[i].dir = 0; + } + else + { + obj.entities[i].dir = 1; + } + } + else if (words[0] == "alarmon") + { + game.alarmon = true; + game.alarmdelay = 0; + } + else if (words[0] == "alarmoff") + { + game.alarmon = false; + } + else if (words[0] == "changeai") + { + if (words[1] == "player") + { + i=obj.getplayer(); + } + else if (words[1] == "cyan") + { + i=obj.getcrewman(0); + } + else if (words[1] == "red") + { + i=obj.getcrewman(3); + } + else if (words[1] == "green") + { + i=obj.getcrewman(4); + } + else if (words[1] == "yellow") + { + i=obj.getcrewman(2); + } + else if (words[1] == "blue") + { + i=obj.getcrewman(5); + } + else if (words[1] == "purple") + { + i=obj.getcrewman(1); + } + + if (words[2] == "followplayer") words[2] = "10"; + if (words[2] == "followpurple") words[2] = "11"; + if (words[2] == "followyellow") words[2] = "12"; + if (words[2] == "followred") words[2] = "13"; + if (words[2] == "followgreen") words[2] = "14"; + if (words[2] == "followblue") words[2] = "15"; + + if (words[2] == "followposition") words[2] = "16"; + if (words[2] == "faceleft") + { + words[2] = "17"; + words[3] = "0"; + } + if (words[2] == "faceright") + { + words[2] = "17"; + words[3] = "1"; + } + + + obj.entities[i].state = ss_toi(words[2]); + if (obj.entities[i].state == 16) + { + obj.entities[i].para=ss_toi(words[3]); + } + else if (obj.entities[i].state == 17) + { + obj.entities[i].dir=ss_toi(words[3]); + } + } + else if (words[0] == "alarmon") + { + game.alarmon = true; + game.alarmdelay = 0; + } + else if (words[0] == "alarmoff") + { + game.alarmon = false; + } + else if (words[0] == "activateteleporter") + { + i = obj.getteleporter(); + obj.entities[i].tile = 6; + obj.entities[i].colour = 102; + } + else if (words[0] == "changecolour") + { + if (words[1] == "player") + { + i=obj.getplayer(); + } + else if (words[1] == "cyan") + { + i=obj.getcrewman(0); + } + else if (words[1] == "red") + { + i=obj.getcrewman(3); + } + else if (words[1] == "green") + { + i=obj.getcrewman(4); + } + else if (words[1] == "yellow") + { + i=obj.getcrewman(2); + } + else if (words[1] == "blue") + { + i=obj.getcrewman(5); + } + else if (words[1] == "purple") + { + i=obj.getcrewman(1); + } + + if (words[2] == "cyan") + { + obj.entities[i].colour = 0; + } + else if (words[2] == "red") + { + obj.entities[i].colour = 15; + } + else if (words[2] == "green") + { + obj.entities[i].colour = 13; + } + else if (words[2] == "yellow") + { + obj.entities[i].colour = 14; + } + else if (words[2] == "blue") + { + obj.entities[i].colour = 16; + } + else if (words[2] == "purple") + { + obj.entities[i].colour = 20; + } + else if (words[2] == "teleporter") + { + obj.entities[i].colour = 102; + } + } + else if (words[0] == "squeak") + { + if (words[1] == "player") + { + music.playef(11, 10); + } + else if (words[1] == "cyan") + { + music.playef(11, 10); + } + else if (words[1] == "red") + { + music.playef(16, 10); + } + else if (words[1] == "green") + { + music.playef(12, 10); + } + else if (words[1] == "yellow") + { + music.playef(14, 10); + } + else if (words[1] == "blue") + { + music.playef(13, 10); + } + else if (words[1] == "purple") + { + music.playef(15, 10); + } + else if (words[1] == "cry") + { + music.playef(2, 10); + } + else if (words[1] == "terminal") + { + music.playef(20, 10); + } + } + else if (words[0] == "blackout") + { + game.blackout = true; + } + else if (words[0] == "blackon") + { + game.blackout = false; + } + else if (words[0] == "setcheckpoint") + { + i = obj.getplayer(); + game.savepoint = 0; + game.savex = obj.entities[i].xp ; + game.savey = obj.entities[i].yp; + game.savegc = game.gravitycontrol; + game.saverx = game.roomx; + game.savery = game.roomy; + game.savedir = obj.entities[i].dir; + } + else if (words[0] == "gamestate") + { + game.state = ss_toi(words[1]); + game.statedelay = 0; + } + else if (words[0] == "textboxactive") + { + dwgfx.textboxactive(); + } + else if (words[0] == "gamemode") + { + if (words[1] == "teleporter") + { + //TODO this draw the teleporter screen. This is a problem. :( + game.gamestate = 5; + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + //dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + + dwgfx.resumegamemode = false; + + game.useteleporter = false; //good heavens don't actually use it + } + else if (words[1] == "game") + { + dwgfx.resumegamemode = true; + } + } + else if (words[0] == "ifexplored") + { + if (map.explored[ss_toi(words[1]) + (20 * ss_toi(words[2]))] == 1) + { + load(words[3]); + position--; + } + } + else if (words[0] == "iflast") + { + if (game.lastsaved==ss_toi(words[1])) + { + load(words[2]); + position--; + } + } + else if (words[0] == "ifskip") + { + if (game.nocutscenes) + { + load(words[1]); + position--; + } + } + else if (words[0] == "ifflag") + { + if (obj.flags[ss_toi(words[1])]==1) + { + load(words[2]); + position--; + } + } + else if (words[0] == "ifcrewlost") + { + if (game.crewstats[ss_toi(words[1])]==false) + { + load(words[2]); + position--; + } + } + else if (words[0] == "iftrinkets") + { + if (game.trinkets >= ss_toi(words[1])) + { + load(words[2]); + position--; + } + } + else if (words[0] == "iftrinketsless") + { + if (game.stat_trinkets < ss_toi(words[1])) + { + load(words[2]); + position--; + } + } + else if (words[0] == "hidecoordinates") + { + map.explored[ss_toi(words[1]) + (20 * ss_toi(words[2]))] = 0; + } + else if (words[0] == "showcoordinates") + { + map.explored[ss_toi(words[1]) + (20 * ss_toi(words[2]))] = 1; + } + else if (words[0] == "hideship") + { + map.hideship(); + } + else if (words[0] == "showship") + { + map.showship(); + } + else if (words[0] == "showsecretlab") + { + map.explored[16 + (20 * 5)] = 1; + map.explored[17 + (20 * 5)] = 1; + map.explored[18 + (20 * 5)] = 1; + map.explored[17 + (20 * 6)] = 1; + map.explored[18 + (20 * 6)] = 1; + map.explored[19 + (20 * 6)] = 1; + map.explored[19 + (20 * 7)] = 1; + map.explored[19 + (20 * 8)] = 1; + } + else if (words[0] == "hidesecretlab") + { + map.explored[16 + (20 * 5)] = 0; + map.explored[17 + (20 * 5)] = 0; + map.explored[18 + (20 * 5)] = 0; + map.explored[17 + (20 * 6)] = 0; + map.explored[18 + (20 * 6)] = 0; + map.explored[19 + (20 * 6)] = 0; + map.explored[19 + (20 * 7)] = 0; + map.explored[19 + (20 * 8)] = 0; + } + else if (words[0] == "showteleporters") + { + map.showteleporters = true; + } + else if (words[0] == "showtargets") + { + map.showtargets = true; + } + else if (words[0] == "showtrinkets") + { + map.showtrinkets = true; + } + else if (words[0] == "hideteleporters") + { + map.showteleporters = false; + } + else if (words[0] == "hidetargets") + { + map.showtargets = false; + } + else if (words[0] == "hidetrinkets") + { + map.showtrinkets = false; + } + else if (words[0] == "hideplayer") + { + obj.entities[obj.getplayer()].invis = true; + } + else if (words[0] == "showplayer") + { + obj.entities[obj.getplayer()].invis = false; + } + else if (words[0] == "teleportscript") + { + game.teleportscript = words[1]; + } + else if (words[0] == "clearteleportscript") + { + game.teleportscript = ""; + } + else if (words[0] == "nocontrol") + { + game.hascontrol = false; + } + else if (words[0] == "hascontrol") + { + game.hascontrol = true; + } + else if (words[0] == "companion") + { + game.companion = ss_toi(words[1]); + } + else if (words[0] == "befadein") + { + dwgfx.fadeamount = 0; + dwgfx.fademode= 0; + } + else if (words[0] == "fadein") + { + dwgfx.fademode = 4; + } + else if (words[0] == "fadeout") + { + dwgfx.fademode = 2; + } + else if (words[0] == "untilfade") + { + if (dwgfx.fademode>1) + { + scriptdelay = 1; + position--; + } + } + else if (words[0] == "entersecretlab") + { + game.unlock[8] = true; + game.insecretlab = true; + } + else if (words[0] == "leavesecretlab") + { + game.insecretlab = false; + } + else if (words[0] == "resetgame") + { + map.resetnames(); + map.resetmap(); + map.resetplayer(dwgfx, game, obj, music); + map.tdrawback = true; + + obj.resetallflags(); + i = obj.getplayer(); + obj.entities[i].tile = 0; + + game.trinkets = 0; + game.crewmates=0; + for (i = 0; i < 100; i++) + { + obj.collect[i] = 0; + obj.customcollect[i] = 0; + } + game.deathcounts = 0; + game.advancetext = false; + game.hascontrol = true; + game.frames = 0; + game.seconds = 0; + game.minutes = 0; + game.hours = 0; + game.gravitycontrol = 0; + game.teleport = false; + game.companion = 0; + game.roomchange = false; + game.teleport_to_new_area = false; + game.teleport_to_x = 0; + game.teleport_to_y = 0; + + game.teleportscript = ""; + + //get out of final level mode! + map.finalmode = false; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + map.finalstretch = false; + } + else if (words[0] == "loadscript") + { + load(words[1]); + position--; + } + else if (words[0] == "rollcredits") + { + game.gamestate = 6; + dwgfx.fademode = 4; + game.creditposition = 0; + } + else if (words[0] == "finalmode") + { + map.finalmode = true; + map.finalx = ss_toi(words[1]); + map.finaly = ss_toi(words[2]); + game.roomx = map.finalx; + game.roomy = map.finaly; + map.gotoroom(game.roomx, game.roomy, dwgfx, game, obj, music); + } + else if (words[0] == "rescued") + { + if (words[1] == "red") + { + game.crewstats[3] = true; + } + else if (words[1] == "green") + { + game.crewstats[4] = true; + } + else if (words[1] == "yellow") + { + game.crewstats[2] = true; + } + else if (words[1] == "blue") + { + game.crewstats[5] = true; + } + else if (words[1] == "purple") + { + game.crewstats[1] = true; + } + else if (words[1] == "player") + { + game.crewstats[0] = true; + } + else if (words[1] == "cyan") + { + game.crewstats[0] = true; + } + } + else if (words[0] == "missing") + { + if (words[1] == "red") + { + game.crewstats[3] = false; + } + else if (words[1] == "green") + { + game.crewstats[4] = false; + } + else if (words[1] == "yellow") + { + game.crewstats[2] = false; + } + else if (words[1] == "blue") + { + game.crewstats[5] = false; + } + else if (words[1] == "purple") + { + game.crewstats[1] = false; + } + else if (words[1] == "player") + { + game.crewstats[0] = false; + } + else if (words[1] == "cyan") + { + game.crewstats[0] = false; + } + } + else if (words[0] == "face") + { + if (words[1] == "player") + { + i=obj.getplayer(); + } + else if (words[1] == "cyan") + { + i=obj.getcrewman(0); + } + else if (words[1] == "red") + { + i=obj.getcrewman(3); + } + else if (words[1] == "green") + { + i=obj.getcrewman(4); + } + else if (words[1] == "yellow") + { + i=obj.getcrewman(2); + } + else if (words[1] == "blue") + { + i=obj.getcrewman(5); + } + else if (words[1] == "purple") + { + i=obj.getcrewman(1); + } + + if (words[2] == "player") + { + j=obj.getplayer(); + } + else if (words[2] == "cyan") + { + j=obj.getcrewman(0); + } + else if (words[2] == "red") + { + j=obj.getcrewman(3); + } + else if (words[2] == "green") + { + j=obj.getcrewman(4); + } + else if (words[2] == "yellow") + { + j=obj.getcrewman(2); + } + else if (words[2] == "blue") + { + j=obj.getcrewman(5); + } + else if (words[2] == "purple") + { + j=obj.getcrewman(1); + } + + if (obj.entities[j].xp > obj.entities[i].xp + 5) + { + obj.entities[i].dir = 1; + } + else if (obj.entities[j].xp < obj.entities[i].xp - 5) + { + obj.entities[i].dir = 0; + } + } + else if (words[0] == "jukebox") + { + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].type == 13 && obj.entities[j].active) + { + obj.entities[j].colour = 4; + } + } + if (ss_toi(words[1]) == 1) + { + obj.createblock(5, 88 - 4, 80, 20, 16, 25); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 88 && obj.entities[j].yp==80) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 2) + { + obj.createblock(5, 128 - 4, 80, 20, 16, 26); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 128 && obj.entities[j].yp==80) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 3) + { + obj.createblock(5, 176 - 4, 80, 20, 16, 27); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 176 && obj.entities[j].yp==80) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 4) + { + obj.createblock(5, 216 - 4, 80, 20, 16, 28); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 216 && obj.entities[j].yp==80) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 5) + { + obj.createblock(5, 88 - 4, 128, 20, 16, 29); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 88 && obj.entities[j].yp==128) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 6) + { + obj.createblock(5, 176 - 4, 128, 20, 16, 30); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 176 && obj.entities[j].yp==128) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 7) + { + obj.createblock(5, 40 - 4, 40, 20, 16, 31); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 40 && obj.entities[j].yp==40) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 8) + { + obj.createblock(5, 216 - 4, 128, 20, 16, 32); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 216 && obj.entities[j].yp==128) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 9) + { + obj.createblock(5, 128 - 4, 128, 20, 16, 33); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 128 && obj.entities[j].yp==128) + { + obj.entities[j].colour = 5; + } + } + } + else if (ss_toi(words[1]) == 10) + { + obj.createblock(5, 264 - 4, 40, 20, 16, 34); + for (j = 0; j < obj.nentity; j++) + { + if (obj.entities[j].xp == 264 && obj.entities[j].yp==40) + { + obj.entities[j].colour = 5; + } + } + } + } + else if (words[0] == "createactivityzone") + { + if (words[1] == "red") + { + i=3; + } + else if (words[1] == "green") + { + i=4; + } + else if (words[1] == "yellow") + { + i=2; + } + else if (words[1] == "blue") + { + i=5; + } + else if (words[1] == "purple") + { + i=1; + } + + if (i == 4) + { + obj.createblock(5, obj.entities[obj.getcrewman(i)].xp - 32, obj.entities[obj.getcrewman(i)].yp-20, 96, 60, i); + } + else + { + obj.createblock(5, obj.entities[obj.getcrewman(i)].xp - 32, 0, 96, 240, i); + } + } + else if (words[0] == "createrescuedcrew") + { + //special for final level cutscene + //starting at 180, create the rescued crewmembers (ingoring violet, who's at 155) + i = 215; + if (game.crewstats[2] && game.lastsaved!=2) + { + obj.createentity(game, i, 153, 18, 14, 0, 17, 0); + i += 25; + } + if (game.crewstats[3] && game.lastsaved!=3) + { + obj.createentity(game, i, 153, 18, 15, 0, 17, 0); + i += 25; + } + if (game.crewstats[4] && game.lastsaved!=4) + { + obj.createentity(game, i, 153, 18, 13, 0, 17, 0); + i += 25; + } + if (game.crewstats[5] && game.lastsaved!=5) + { + obj.createentity(game, i, 153, 18, 16, 0, 17, 0); + i += 25; + } + } + else if (words[0] == "restoreplayercolour") + { + i = obj.getplayer(); + obj.entities[i].colour = 0; + } + else if (words[0] == "changeplayercolour") + { + i = obj.getplayer(); + + if (words[1] == "cyan") + { + obj.entities[i].colour = 0; + } + else if (words[1] == "red") + { + obj.entities[i].colour = 15; + } + else if (words[1] == "green") + { + obj.entities[i].colour = 13; + } + else if (words[1] == "yellow") + { + obj.entities[i].colour = 14; + } + else if (words[1] == "blue") + { + obj.entities[i].colour = 16; + } + else if (words[1] == "purple") + { + obj.entities[i].colour = 20; + } + else if (words[1] == "teleporter") + { + obj.entities[i].colour = 102; + } + } + else if (words[0] == "altstates") + { + obj.altstates = ss_toi(words[1]); + } + else if (words[0] == "activeteleporter") + { + i = obj.getteleporter(); + obj.entities[i].colour = 101; + } + else if (words[0] == "foundtrinket") + { + //music.silencedasmusik(); + music.haltdasmusik(); + music.playef(3,10); + + game.trinkets++; + obj.collect[ss_toi(words[1])] = 1; + + dwgfx.textboxremovefast(); + + dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a shiny trinket!"); + dwgfx.textboxcenterx(); + + dwgfx.createtextbox(" " + help.number(game.trinkets) + " out of Twenty ", 50, 135, 174, 174, 174); + dwgfx.textboxcenterx(); + + if (!game.backgroundtext) + { + game.advancetext = true; + game.hascontrol = false; + game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + } + else if (words[0] == "foundlab") + { + music.playef(3,10); + + dwgfx.textboxremovefast(); + + dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found the secret lab!"); + dwgfx.textboxcenterx(); + dwgfx.textboxcentery(); + + if (!game.backgroundtext) + { + game.advancetext = true; + game.hascontrol = false; + game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + } + else if (words[0] == "foundlab2") + { + dwgfx.textboxremovefast(); + + dwgfx.createtextbox("The secret lab is seperate from", 50, 85, 174, 174, 174); + dwgfx.addline("the rest of the game. You can"); + dwgfx.addline("now come back here at any time"); + dwgfx.addline("by selecting the new SECRET LAB"); + dwgfx.addline("option in the play menu."); + dwgfx.textboxcenterx(); + dwgfx.textboxcentery(); + + if (!game.backgroundtext) + { + game.advancetext = true; + game.hascontrol = false; + game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + } + else if (words[0] == "everybodysad") + { + for (i = 0; i < obj.nentity; i++) + { + if (obj.entities[i].rule == 6 || obj.entities[i].rule == 0) + { + obj.entities[i].tile = 144; + } + } + } + else if (words[0] == "startintermission2") + { + map.finalmode = true; //Enable final level mode + map.finalx = 46; + map.finaly = 54; //Current + + game.savex = 228; + game.savey = 129; + game.saverx = 53; + game.savery = 49; + game.savegc = 0; + game.savedir = 0; //Intermission level 2 + game.savepoint = 0; + game.gravitycontrol = 0; + + map.gotoroom(46, 54, dwgfx, game, obj, music); + } + else if (words[0] == "telesave") + { + if (!game.intimetrial && !game.nodeathmode && !game.inintermission) game.savetele(map, obj, music); + } + else if (words[0] == "createlastrescued") + { + if (game.lastsaved==2) + { + r=14; + } + else if (game.lastsaved==3) + { + r=15; + } + else if (game.lastsaved==4) + { + r=13; + } + else if (game.lastsaved==5) + { + r=16; + } + else + { + r = 19; + } + + obj.createentity(game, 200, 153, 18, r, 0, 19, 30); + i = obj.getcrewman(game.lastsaved); + obj.entities[i].dir = 1; + } + else if (words[0] == "specialline") + { + switch(ss_toi(words[1])) + { + case 1: + txtnumlines = 1; + + txt[0] = "I'm worried about " + game.unrescued() + ", Doctor!"; + break; + case 2: + txtnumlines = 3; + + if (game.crewrescued() < 5) + { + txt[1] = "to helping you find the"; + txt[2] = "rest of the crew!"; + } + else + { + txtnumlines = 2; + txt[1] = "to helping you find " + game.unrescued() + "!"; + } + break; + } + } + else if (words[0] == "trinketbluecontrol") + { + if (game.trinkets == 20 && obj.flags[67] == 1) + { + load("talkblue_trinket6"); + position--; + } + else if (game.trinkets >= 19 && obj.flags[67] == 0) + { + load("talkblue_trinket5"); + position--; + } + else + { + load("talkblue_trinket4"); + position--; + } + } + else if (words[0] == "trinketyellowcontrol") + { + if (game.trinkets >= 19) + { + load("talkyellow_trinket3"); + position--; + } + else + { + load("talkyellow_trinket2"); + position--; + } + } + else if (words[0] == "redcontrol") + { + if (game.insecretlab) + { + load("talkred_14"); + position--; + } + else if (game.roomx != 104) + { + if (game.roomx == 100) + { + load("talkred_10"); + position--; + } + else if (game.roomx == 107) + { + load("talkred_11"); + position--; + } + else if (game.roomx == 114) + { + load("talkred_12"); + position--; + } + } + else if (obj.flags[67] == 1) + { + //game complete + load("talkred_13"); + position--; + } + else if (obj.flags[35] == 1 && obj.flags[52] == 0) + { + //Intermission level + obj.flags[52] = 1; + load("talkred_9"); + position--; + } + else if (obj.flags[51] == 0) + { + //We're back home! + obj.flags[51] = 1; + load("talkred_5"); + position--; + } + else if (obj.flags[48] == 0 && game.crewstats[5]) + { + //Victoria's back + obj.flags[48] = 1; + load("talkred_6"); + position--; + } + else if (obj.flags[49] == 0 && game.crewstats[4]) + { + //Verdigris' back + obj.flags[49] = 1; + load("talkred_7"); + position--; + } + else if (obj.flags[50] == 0 && game.crewstats[2]) + { + //Vitellary's back + obj.flags[50] = 1; + load("talkred_8"); + position--; + } + else if (obj.flags[45] == 0 && !game.crewstats[5]) + { + obj.flags[45] = 1; + load("talkred_2"); + position--; + } + else if (obj.flags[46] == 0 && !game.crewstats[4]) + { + obj.flags[46] = 1; + load("talkred_3"); + position--; + } + else if (obj.flags[47] == 0 && !game.crewstats[2]) + { + obj.flags[47] = 1; + load("talkred_4"); + position--; + } + else + { + obj.flags[45] = 0; + obj.flags[46] = 0; + obj.flags[47] = 0; + load("talkred_1"); + position--; + } + } + //TODO: Non Urgent fix compiler nesting errors without adding complexity + if (words[0] == "greencontrol") + { + if (game.insecretlab) + { + load("talkgreen_11"); + position--; + } + else if (game.roomx == 103 && game.roomy == 109) + { + load("talkgreen_8"); + position--; + } + else if (game.roomx == 101 && game.roomy == 109) + { + load("talkgreen_9"); + position--; + } + else if (obj.flags[67] == 1) + { + //game complete + load("talkgreen_10"); + position--; + } + else if (obj.flags[34] == 1 && obj.flags[57] == 0) + { + //Intermission level + obj.flags[57] = 1; + load("talkgreen_7"); + position--; + } + else if (obj.flags[53] == 0) + { + //Home! + obj.flags[53] = 1; + load("talkgreen_6"); + position--; + } + else if (obj.flags[54] == 0 && game.crewstats[2]) + { + obj.flags[54] = 1; + load("talkgreen_5"); + position--; + } + else if (obj.flags[55] == 0 && game.crewstats[3]) + { + obj.flags[55] = 1; + load("talkgreen_4"); + position--; + } + else if (obj.flags[56] == 0 && game.crewstats[5]) + { + obj.flags[56] = 1; + load("talkgreen_3"); + position--; + } + else if (obj.flags[58] == 0) + { + obj.flags[58] = 1; + load("talkgreen_2"); + position--; + } + else + { + load("talkgreen_1"); + position--; + } + } + else if (words[0] == "bluecontrol") + { + if (game.insecretlab) + { + load("talkblue_9"); + position--; + } + else if (obj.flags[67] == 1) + { + //game complete, everything changes for victoria + if (obj.flags[41] == 1 && obj.flags[42] == 0) + { + //second trinket conversation + obj.flags[42] = 1; + load("talkblue_trinket2"); + position--; + } + else if (obj.flags[41] == 0 && obj.flags[42] == 0) + { + //Third trinket conversation + obj.flags[42] = 1; + load("talkblue_trinket3"); + position--; + } + else + { + //Ok, we've already dealt with the trinket thing; so either you have them all, or you don't. If you do: + if (game.trinkets >= 20) + { + load("startepilogue"); + position--; + } + else + { + load("talkblue_8"); + position--; + } + } + } + else if (obj.flags[33] == 1 && obj.flags[40] == 0) + { + //Intermission level + obj.flags[40] = 1; + load("talkblue_7"); + position--; + } + else if (obj.flags[36] == 0 && game.crewstats[5]) + { + //Back on the ship! + obj.flags[36] = 1; + load("talkblue_3"); + position--; + } + else if (obj.flags[41] == 0 && game.crewrescued() <= 4) + { + //First trinket conversation + obj.flags[41] = 1; + load("talkblue_trinket1"); + position--; + } + else if (obj.flags[41] == 1 && obj.flags[42] == 0 && game.crewrescued() == 5) + { + //second trinket conversation + obj.flags[42] = 1; + load("talkblue_trinket2"); + position--; + } + else if (obj.flags[41] == 0 && obj.flags[42] == 0 && game.crewrescued() == 5) + { + //Third trinket conversation + obj.flags[42] = 1; + load("talkblue_trinket3"); + position--; + } + else if (obj.flags[37] == 0 && game.crewstats[2]) + { + obj.flags[37] = 1; + load("talkblue_4"); + position--; + } + else if (obj.flags[38] == 0 && game.crewstats[3]) + { + obj.flags[38] = 1; + load("talkblue_5"); + position--; + } + else if (obj.flags[39] == 0 && game.crewstats[4]) + { + obj.flags[39] = 1; + load("talkblue_6"); + position--; + } + else + { + //if all else fails: + //if yellow is found + if (game.crewstats[2]) + { + load("talkblue_2"); + position--; + } + else + { + load("talkblue_1"); + position--; + } + } + } + else if (words[0] == "yellowcontrol") + { + if (game.insecretlab) + { + load("talkyellow_12"); + position--; + } + else if (obj.flags[67] == 1) + { + //game complete + load("talkyellow_11"); + position--; + } + else if (obj.flags[32] == 1 && obj.flags[31] == 0) + { + //Intermission level + obj.flags[31] = 1; + load("talkyellow_6"); + position--; + } + else if (obj.flags[27] == 0 && game.crewstats[2]) + { + //Back on the ship! + obj.flags[27] = 1; + load("talkyellow_10"); + position--; + } + else if (obj.flags[43] == 0 && game.crewrescued() == 5 && !game.crewstats[5]) + { + //If by chance we've rescued everyone except Victoria by the end, Vitellary provides you with + //the trinket information instead. + obj.flags[43] = 1; + obj.flags[42] = 1; + obj.flags[41] = 1; + load("talkyellow_trinket1"); + position--; + } + else if (obj.flags[24] == 0 && game.crewstats[5]) + { + obj.flags[24] = 1; + load("talkyellow_8"); + position--; + } + else if (obj.flags[26] == 0 && game.crewstats[4]) + { + obj.flags[26] = 1; + load("talkyellow_7"); + position--; + } + else if (obj.flags[25] == 0 && game.crewstats[3]) + { + obj.flags[25] = 1; + load("talkyellow_9"); + position--; + } + else if (obj.flags[28] == 0) + { + obj.flags[28] = 1; + load("talkyellow_3"); + position--; + } + else if (obj.flags[29] == 0) + { + obj.flags[29] = 1; + load("talkyellow_4"); + position--; + } + else if (obj.flags[30] == 0) + { + obj.flags[30] = 1; + load("talkyellow_5"); + position--; + } + else if (obj.flags[23] == 0) + { + obj.flags[23] = 1; + load("talkyellow_2"); + position--; + } + else + { + load("talkyellow_1"); + position--; + obj.flags[23] = 0; + } + } + else if (words[0] == "purplecontrol") + { + //Controls Purple's conversion + //Crew rescued: + if (game.insecretlab) + { + load("talkpurple_9"); + position--; + } + else if (obj.flags[67] == 1) + { + //game complete + load("talkpurple_8"); + position--; + } + else if (obj.flags[17] == 0 && game.crewstats[4]) + { + obj.flags[17] = 1; + load("talkpurple_6"); + position--; + } + else if (obj.flags[15] == 0 && game.crewstats[5]) + { + obj.flags[15] = 1; + load("talkpurple_4"); + position--; + } + else if (obj.flags[16] == 0 && game.crewstats[3]) + { + obj.flags[16] = 1; + load("talkpurple_5"); + position--; + } + else if (obj.flags[18] == 0 && game.crewstats[2]) + { + obj.flags[18] = 1; + load("talkpurple_7"); + position--; + } + else if (obj.flags[19] == 1 && obj.flags[20] == 0 && obj.flags[21] == 0) + { + //intermission one: if played one / not had first conversation / not played two [conversation one] + obj.flags[21] = 1; + load("talkpurple_intermission1"); + position--; + } + else if (obj.flags[20] == 1 && obj.flags[21] == 1 && obj.flags[22] == 0) + { + //intermission two: if played two / had first conversation / not had second conversation [conversation two] + obj.flags[22] = 1; + load("talkpurple_intermission2"); + position--; + } + else if (obj.flags[20] == 1 && obj.flags[21] == 0 && obj.flags[22] == 0) + { + //intermission two: if played two / not had first conversation / not had second conversation [conversation three] + obj.flags[22] = 1; + load("talkpurple_intermission3"); + position--; + } + else if (obj.flags[12] == 0) + { + //Intro conversation + obj.flags[12] = 1; + load("talkpurple_intro"); + position--; + } + else if (obj.flags[14] == 0) + { + //Shorter intro conversation + obj.flags[14] = 1; + load("talkpurple_3"); + position--; + } + else + { + //if all else fails: + //if green is found + if (game.crewstats[4]) + { + load("talkpurple_2"); + position--; + } + else + { + load("talkpurple_1"); + position--; + } + } + } + + position++; + } + else + { + running = false; + } + } + + if(scriptdelay>0) + { + scriptdelay--; + } +} + +void scriptclass::resetgametomenu( Graphics& dwgfx, Game& game,mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music ) +{ + game.gamestate = TITLEMODE; + dwgfx.flipmode = false; + obj.nentity = 0; + dwgfx.fademode = 4; + game.createmenu("gameover"); +} + +void scriptclass::startgamemode( int t, KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music ) +{ + switch(t) + { + case 0: //Normal new game + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.start(obj, music); + game.jumpheld = true; + dwgfx.showcutscenebars = true; + dwgfx.cutscenebarspos = 320; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intro"); + break; + case 1: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.start(obj, music); + game.loadtele(map, obj, music); + game.gravitycontrol = game.savegc; + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 2: //Load Quicksave + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.start(obj, music); + game.loadquick(map, obj, music); + game.gravitycontrol = game.savegc; + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + //a very special case for here needs to ensure that the tower is set correctly + if (map.towermode) + { + map.resetplayer(dwgfx, game, obj, music); + + i = obj.getplayer(); + map.ypos = obj.entities[i].yp - 120; + map.bypos = map.ypos / 2; + map.cameramode = 0; + map.colsuperstate = 0; + } + dwgfx.fademode = 4; + break; + case 3: + //Start Time Trial 1 + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; + game.intimetrial = true; + game.timetrialcountdown = 150; + game.timetrialparlost = false; + game.timetriallevel = 0; + game.timetrialpar = 75; + game.timetrialshinytarget = 2; + + music.fadeout(); + game.gamestate = GAMEMODE; + game.starttrial(game.timetriallevel, obj, music); + game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 4: + //Start Time Trial 2 + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; + game.intimetrial = true; + game.timetrialcountdown = 150; + game.timetrialparlost = false; + game.timetriallevel = 1; + game.timetrialpar = 165; + game.timetrialshinytarget = 4; + + music.fadeout(); + game.gamestate = GAMEMODE; + game.starttrial(game.timetriallevel, obj, music); + game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 5: + //Start Time Trial 3 tow + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; + game.intimetrial = true; + game.timetrialcountdown = 150; + game.timetrialparlost = false; + game.timetriallevel = 2; + game.timetrialpar = 105; + game.timetrialshinytarget = 2; + + music.fadeout(); + game.gamestate = GAMEMODE; + game.starttrial(game.timetriallevel, obj, music); + game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 6: + //Start Time Trial 4 station + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; + game.intimetrial = true; + game.timetrialcountdown = 150; + game.timetrialparlost = false; + game.timetriallevel = 3; + game.timetrialpar = 200; + game.timetrialshinytarget = 5; + + music.fadeout(); + game.gamestate = GAMEMODE; + game.starttrial(game.timetriallevel, obj, music); + game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 7: + //Start Time Trial 5 warp + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; + game.intimetrial = true; + game.timetrialcountdown = 150; + game.timetrialparlost = false; + game.timetriallevel = 4; + game.timetrialpar = 120; + game.timetrialshinytarget = 1; + + music.fadeout(); + game.gamestate = GAMEMODE; + game.starttrial(game.timetriallevel, obj, music); + game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 8: + //Start Time Trial 6// final level! + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; + game.intimetrial = true; + game.timetrialcountdown = 150; + game.timetrialparlost = false; + game.timetriallevel = 5; + game.timetrialpar = 135; + game.timetrialshinytarget = 1; + + music.fadeout(); + map.finalmode = true; //Enable final level mode + map.finalx = 46; + map.finaly = 54; //Current + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.gamestate = GAMEMODE; + game.starttrial(game.timetriallevel, obj, music); + game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 9: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.nodeathmode = true; + game.start(obj, music); + game.jumpheld = true; + dwgfx.showcutscenebars = true; + dwgfx.cutscenebarspos = 320; + //game.starttest(obj, music); + //music.play(4); + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + + load("intro"); + break; + case 10: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.nodeathmode = true; + game.nocutscenes = true; + + game.start(obj, music); + game.jumpheld = true; + dwgfx.showcutscenebars = true; + dwgfx.cutscenebarspos = 320; + //game.starttest(obj, music); + //music.play(4); + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + + load("intro"); + break; + case 11: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + + game.startspecial(0, obj, music); + game.jumpheld = true; + + //Secret lab, so reveal the map, give them all 20 trinkets + for (int j = 0; j < 20; j++) + { + obj.collect[j] = true; + for (i = 0; i < 20; i++) + { + map.explored[i + (j * 20)] = 1; + } + } + game.trinkets = 20; + game.insecretlab = true; + map.showteleporters = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + music.play(11); + dwgfx.fademode = 4; + break; + case 12: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 2; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + game.companion = 11; + game.supercrewmate = true; + game.scmprogress = 0; + map.finalmode = true; + map.finalx = 41; + map.finaly = 56; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_1"); + break; + case 13: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 3; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + game.companion = 11; + game.supercrewmate = true; + game.scmprogress = 0; + map.finalmode = true; + map.finalx = 41; + map.finaly = 56; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_1"); + break; + case 14: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 4; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + game.companion = 11; + game.supercrewmate = true; + game.scmprogress = 0; + map.finalmode = true; + map.finalx = 41; + map.finaly = 56; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_1"); + break; + case 15: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 5; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + game.companion = 11; + game.supercrewmate = true; + game.scmprogress = 0; + map.finalmode = true; + map.finalx = 41; + map.finaly = 56; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_1"); + break; + case 16: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 2; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + map.finalmode = true; + map.finalx = 41; + map.finaly = 56; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_2"); + break; + case 17: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 3; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + map.finalmode = true; + map.finalx = 41; + map.finaly = 56; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_2"); + break; + case 18: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 4; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + map.finalmode = true; + map.finalx = 41; + map.finaly = 56; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_2"); + break; + case 19: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 5; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + map.finalmode = true; + map.finalx = 41; + map.finaly = 56; + map.final_colormode = false; + map.final_mapcol = 0; + map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_2"); + break; + case 20: + //Level editor + hardreset(key, dwgfx, game, map, obj, help, music); + ed.reset(); + music.fadeout(); + + game.gamestate = EDITORMODE; + game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 21: //play custom level (in editor) + game.gamestate = GAMEMODE; + music.fadeout(); + hardreset(key, dwgfx, game, map, obj, help, music); + game.customstart(obj, music); + game.jumpheld = true; + + + map.custommode = true; + map.customx = 100; + map.customy = 100; + + //dwgfx.showcutscenebars = true; + //dwgfx.cutscenebarspos = 320; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + if(ed.levmusic>0){ + music.play(ed.levmusic); + }else{ + music.currentsong=-1; + } + //load("intro"); + break; + case 22: //play custom level (in game) + //Initilise the level + //First up, find the start point + ed.weirdloadthing(ed.ListOfMetaData[game.playcustomlevel].filename); + ed.findstartpoint(game); + + game.gamestate = GAMEMODE; + music.fadeout(); + hardreset(key, dwgfx, game, map, obj, help, music); + game.customstart(obj, music); + game.jumpheld = true; + + map.custommodeforreal = true; + map.custommode = true; + map.customx = 100; + map.customy = 100; + + //dwgfx.showcutscenebars = true; + //dwgfx.cutscenebarspos = 320; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + ed.generatecustomminimap(dwgfx, map); + map.customshowmm=true; + if(ed.levmusic>0){ + music.play(ed.levmusic); + }else{ + music.currentsong=-1; + } + dwgfx.fademode = 4; + //load("intro"); + break; + case 23: //Continue in custom level + //Initilise the level + //First up, find the start point + ed.weirdloadthing(ed.ListOfMetaData[game.playcustomlevel].filename); + ed.findstartpoint(game); + + game.gamestate = GAMEMODE; + music.fadeout(); + hardreset(key, dwgfx, game, map, obj, help, music); + map.custommodeforreal = true; + map.custommode = true; + map.customx = 100; + map.customy = 100; + + game.customstart(obj, music); + game.customloadquick(ed.ListOfMetaData[game.playcustomlevel].filename, map, obj, music); + game.jumpheld = true; + game.gravitycontrol = game.savegc; + + + //dwgfx.showcutscenebars = true; + //dwgfx.cutscenebarspos = 320; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0) + { + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + } + else + { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + /* Handled by load + if(ed.levmusic>0){ + music.play(ed.levmusic); + }else{ + music.currentsong=-1; + } + */ + ed.generatecustomminimap(dwgfx, map); + dwgfx.fademode = 4; + //load("intro"); + break; + case 100: + game.savestats(map, dwgfx); + + SDL_Quit(); + exit(0); + break; + } +} + +void scriptclass::teleport( Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music ) +{ + //er, ok! Teleport to a new area, so! + //A general rule of thumb: if you teleport with a companion, get rid of them! + game.companion = 0; + + i = obj.getplayer(); //less likely to have a serious collision error if the player is centered + obj.entities[i].xp = 150; + obj.entities[i].yp = 110; + if(game.teleport_to_x==17 && game.teleport_to_y==17) obj.entities[i].xp = 88; //prevent falling! + + if (game.teleportscript == "levelonecomplete") + { + game.teleport_to_x = 2; + game.teleport_to_y = 11; + } + else if (game.teleportscript == "gamecomplete") + { + game.teleport_to_x = 2; + game.teleport_to_y = 11; + } + + game.gravitycontrol = 0; + map.gotoroom(100+game.teleport_to_x, 100+game.teleport_to_y, dwgfx, game, obj, music); + j = obj.getteleporter(); + obj.entities[j].state = 2; + game.teleport_to_new_area = false; + + game.savepoint = obj.entities[j].para; + game.savex = obj.entities[j].xp + 44; + game.savey = obj.entities[j].yp + 44; + game.savegc = 0; + + game.saverx = game.roomx; + game.savery = game.roomy; + game.savedir = obj.entities[obj.getplayer()].dir; + + if(game.teleport_to_x==0 && game.teleport_to_y==0) + { + game.state = 4020; + } + else if(game.teleport_to_x==0 && game.teleport_to_y==16) + { + game.state = 4030; + } + else if(game.teleport_to_x==7 && game.teleport_to_y==9) + { + game.state = 4040; + } + else if(game.teleport_to_x==8 && game.teleport_to_y==11) + { + game.state = 4050; + } + else if(game.teleport_to_x==14 && game.teleport_to_y==19) + { + game.state = 4030; + } + else if(game.teleport_to_x==17 && game.teleport_to_y==12) + { + game.state = 4020; + } + else if(game.teleport_to_x==17 && game.teleport_to_y==17) + { + game.state = 4020; + } + else if(game.teleport_to_x==18 && game.teleport_to_y==7) + { + game.state = 4060; + } + else + { + game.state = 4010; + } + + if (game.teleportscript != "") + { + game.state = 0; + load(game.teleportscript); + game.teleportscript = ""; + } + else + { + //change music based on location + if (dwgfx.setflipmode && game.teleport_to_x == 11 && game.teleport_to_y == 4) + { + music.niceplay(9); + } + else + { + music.changemusicarea(game.teleport_to_x, game.teleport_to_y); + } + if (!game.intimetrial && !game.nodeathmode && !game.inintermission) + { + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Game Saved ", -1, 202, 174, 174, 174); + dwgfx.textboxtimer(25); + } + else + { + dwgfx.createtextbox(" Game Saved ", -1, 12, 174, 174, 174); + dwgfx.textboxtimer(25); + } + game.savetele(map, obj, music); + } + } +} + +void scriptclass::hardreset( KeyPoll& key, Graphics& dwgfx, Game& game,mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music ) +{ + //Game: + game.hascontrol = true; + game.gravitycontrol = 0; + game.teleport = false; + game.companion = 0; + game.roomchange = false; + game.teleport_to_new_area = false; + game.teleport_to_x = 0; + game.teleport_to_y = 0; + game.teleportscript = ""; + + game.tapleft = 0; + game.tapright = 0; + game.startscript = false; + game.newscript = ""; + game.alarmon = false; + game.alarmdelay = 0; + game.blackout = false; + game.useteleporter = false; + game.teleport_to_teleporter = 0; + + game.nodeathmode = false; + game.nocutscenes = false; + + for (i = 0; i < 6; i++) + { + game.crewstats[i] = false; + } + game.crewstats[0] = true; + game.lastsaved = 0; + + game.deathcounts = 0; + game.gameoverdelay = 0; + game.frames = 0; + game.seconds = 0; + game.minutes = 0; + game.hours = 0; + game.gamesaved = false; + game.savetime = "00:00"; + game.savearea = "nowhere"; + game.savetrinkets = 0; + + game.intimetrial = false; + game.timetrialcountdown = 0; + game.timetrialshinytarget = 0; + game.timetrialparlost = false; + game.timetrialpar = 0; + game.timetrialresulttime = 0; + + game.totalflips = 0; + game.hardestroom = "Welcome Aboard"; + game.hardestroomdeaths = 0; + game.currentroomdeaths=0; + + game.swnmode = false; + game.swntimer = 0; + game.swngame = 0;//Not playing sine wave ninja! + game.swnstate = 0; + game.swnstate2 = 0; + game.swnstate3 = 0; + game.swnstate4 = 0; + game.swndelay = 0; + game.swndeaths = 0; + game.supercrewmate = false; + game.scmhurt = false; + game.scmprogress = 0; + game.scmmoveme = false; + game.swncolstate = 0; + game.swncoldelay = 0; + game.swnrank = 0; + game.swnmessage = 0; + game.creditposx = 0; + game.creditposy = 0; + game.creditposdelay = 0; + + game.inintermission = false; + game.insecretlab = false; + + game.crewmates=0; + + game.state = 0; + game.statedelay = 0; + + game.hascontrol = true; + game.advancetext = false; + + //dwgraphicsclass + dwgfx.backgrounddrawn = false; + dwgfx.textboxremovefast(); + dwgfx.flipmode = false; //This will be reset if needs be elsewhere + dwgfx.showcutscenebars = false; + + //mapclass + map.warpx = false; + map.warpy = false; + map.showteleporters = false; + map.showtargets = false; + map.showtrinkets = false; + map.finalmode = false; + map.finalstretch = false; + map.finalx = 50; + map.finaly = 50; + map.final_colormode = false; + map.final_colorframe = 0; + map.final_colorframedelay = 0; + map.final_mapcol = 0; + map.final_aniframe = 0; + map.final_aniframedelay = 0; + map.rcol = 0; + map.resetnames(); + map.custommode=false; + map.custommodeforreal=false; + + map.customshowmm=true; + + for (j = 0; j < 20; j++) + { + for (i = 0; i < 20; i++) + { + map.roomdeaths[i] = 0; + map.roomdeathsfinal[i] = 0; + map.explored[i + (j * 20)] = 0; + } + } + //entityclass + obj.nearelephant = false; + obj.upsetmode = false; + obj.upset = 0; + + obj.trophytext = 0 ; + obj.trophytype = 0; + obj.altstates = 0; + + for (i = 0; i < 100; i++) + { + obj.flags[i] = false; + } + + for (i = 0; i < 6; i++){ + obj.customcrewmoods[i]=1; + } + + for (i = 0; i < 20; i++) + { + obj.collect[i] = 0; + obj.customcollect[i] = 0; + } + + if (obj.getplayer() > -1){ + obj.entities[obj.getplayer()].tile = 0; + } + + //Script Stuff + position = 0; + scriptlength = 0; + scriptdelay = 0; + scriptname = "null"; + running = false; +} diff --git a/desktop_version/src/Script.h b/desktop_version/src/Script.h new file mode 100644 index 00000000..29b36a19 --- /dev/null +++ b/desktop_version/src/Script.h @@ -0,0 +1,75 @@ +#ifndef SCRIPT_H +#define SCRIPT_H + +#include +#include + +#include "Enums.h" + + +class KeyPoll; class Graphics; class Game; class mapclass; class entityclass; class UtilityClass;class musicclass; + + +class scriptclass +{ +public: + + + scriptclass(); + + void load(std::string t); + void loadother(std::string t); + + + void inline add(std::string t) + { + commands[scriptlength] = t; + scriptlength++; + } + + void clearcustom(); + + void tokenize(std::string t); + + void run(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + + void resetgametomenu(Graphics& dwgfx, Game& game,mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + + void startgamemode(int t, KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + + void teleport(Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + + void hardreset(KeyPoll& key, Graphics& dwgfx, Game& game,mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + + //Script contents + std::vector commands; + std::vector words; + std::vector txt; + std::string scriptname; + int position, scriptlength; + int looppoint, loopcount; + + int scriptdelay; + bool running; + std::string tempword; + std::string currentletter; + + //Textbox stuff + int textx; + int texty; + int r,g,b; + int txtnumlines; + + //Misc + int i, j, k; + + //Custom level stuff + std::vector customscript; +}; + +#endif /* SCRIPT_H */ diff --git a/desktop_version/src/Scripts.cpp b/desktop_version/src/Scripts.cpp new file mode 100644 index 00000000..bbf149d3 --- /dev/null +++ b/desktop_version/src/Scripts.cpp @@ -0,0 +1,6580 @@ +#ifndef SCRIPTS_H +#define SCRIPTS_H + +#include "Script.h" + +#include + +extern scriptclass script; + +void scriptclass::load(std::string t) +{ + //loads script name t into the array + position = 0; + scriptlength=0; + running = true; + + int maxlength = (std::min(int(t.length()),7)); + std::string customstring=""; + for(int i=0; i=7) cscriptname+=t[i]; + } + + int scriptstart=-1; + int scriptend=-1; + std::string tstring; + + for(size_t i=0; i-1){ + if(scriptend==-1){ + scriptend=customscript.size(); + } + + //Ok, we've got the relavent script segment, we do a pass to assess it, then run it! + int customcutscenemode=0; + for(int i=scriptstart; i=0 && ti<=50){ + for(int ti2=0; ti2=0 && ti<=50){ + for(int ti2=0; ti2 +#include "SoundSystem.h" +#include "FileSystemUtils.h" + +MusicTrack::MusicTrack(const char* fileName) +{ + m_music = Mix_LoadMUS(fileName); + m_isValid = true; + if(m_music == NULL) + { + fprintf(stderr, "Unable to load Ogg Music file: %s\n", Mix_GetError());; + m_isValid = false; + } +} + +MusicTrack::MusicTrack(SDL_RWops *rw) +{ + m_music = Mix_LoadMUS_RW(rw, 0); + m_isValid = true; + if(m_music == NULL) + { + fprintf(stderr, "Unable to load Magic Binary Music file: %s\n", Mix_GetError()); + m_isValid = false; + } +} + +SoundTrack::SoundTrack(const char* fileName) +{ + sound = NULL; + + unsigned char *mem; + size_t length = 0; + FILESYSTEM_loadFileToMemory(fileName, &mem, &length); + SDL_RWops *fileIn = SDL_RWFromMem(mem, length); + sound = Mix_LoadWAV_RW(fileIn, 1); + FILESYSTEM_freeMemory(&mem); + + if (sound == NULL) + { + fprintf(stderr, "Unable to load WAV file: %s\n", Mix_GetError()); + } +} + +SoundSystem::SoundSystem() +{ + int audio_rate = 44100; + Uint16 audio_format = AUDIO_S16SYS; + int audio_channels = 2; + int audio_buffers = 1024; + + if (Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) != 0) + { + fprintf(stderr, "Unable to initialize audio: %s\n", Mix_GetError()); + SDL_assert(0 && "Unable to initialize audio!"); + } +} + +void SoundSystem::playMusic(MusicTrack* music) +{ + if(!music->m_isValid) + { + fprintf(stderr, "Invalid mix specified: %s\n", Mix_GetError()); + } + if(Mix_PlayMusic(music->m_music, 0) == -1) + { + fprintf(stderr, "Unable to play Ogg file: %s\n", Mix_GetError()); + } +} diff --git a/desktop_version/src/SoundSystem.h b/desktop_version/src/SoundSystem.h new file mode 100644 index 00000000..5eb192c4 --- /dev/null +++ b/desktop_version/src/SoundSystem.h @@ -0,0 +1,29 @@ +#ifndef SOUNDSYSTEM_H +#define SOUNDSYSTEM_H + +#include + +class MusicTrack +{ +public: + MusicTrack(const char* fileName); + MusicTrack(SDL_RWops *rw); + Mix_Music *m_music; + bool m_isValid; +}; + +class SoundTrack +{ +public: + SoundTrack(const char* fileName); + Mix_Chunk *sound; +}; + +class SoundSystem +{ +public: + SoundSystem(); + void playMusic(MusicTrack* music); +}; + +#endif /* SOUNDSYSTEM_H */ diff --git a/desktop_version/src/Spacestation2.cpp b/desktop_version/src/Spacestation2.cpp new file mode 100644 index 00000000..94905181 --- /dev/null +++ b/desktop_version/src/Spacestation2.cpp @@ -0,0 +1,3220 @@ +#include "Spacestation2.h" + +#include "MakeAndPlay.h" + +std::vector spacestation2class::loadlevel(int rx, int ry, Game& game, entityclass& obj) +{ + int t; + rx -= 100; + ry -= 100; + + rx += 50 - 12; + ry += 50 - 14; //Space Station + + t = rx + (ry * 100); + + std::vector tmap; + roomname = "Untitled room ["+UtilityClass::String(rx) + "," + UtilityClass::String(ry)+"]"; + + switch(t) + { + #if !defined(MAKEANDPLAY) + case rn(50,50): + + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,840,841,841,841,841,841,841,841,841,682,680,680,680,680,680,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,1120,6,6,6,6,6,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,680,680,680,680,680,680,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,680,680,680,680,680,680,680,680,680,680,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("653,653,653,653,653,653,653,653,653,653,653,653,654,680,680,680,680,680,680,680,680,680,680,680,680,680,680,652,653,653,653,653,653,653,653,653,653,653,653,653"); + tmap.push_back("0,0,0,0,0,716,0,0,0,716,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,716,0,0,0,716,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,716,0,0,0,716,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,716,0,0,0,716,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,716,0,0,0,716,0,840,841,682,680,680,680,680,680,680,680,680,680,680,680,680,681,841,842,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,716,0,0,0,716,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,716,0,0,0,716,0,0,0,840,841,841,841,841,841,841,841,841,841,841,841,841,842,0,0,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,196,197,197,197,197,197,198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,276,277,277,277,277,277,278,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,716,0,0,0,716,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,196,197,197,197,197,197,198,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,276,277,277,277,277,277,278,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 96, 40, 10, 0, 450500); // (savepoint) + if(game.intimetrial) + { + obj.createentity(game, 136, 92, 11, 48); // (horizontal gravity line) + } + + roomname = "Outer Hull"; //If not yet in level, use "The Space Station"; + + break; + + case rn(49,50): + + tmap.push_back("295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,417,698,698,698,698,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); + tmap.push_back("295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,295,295,417,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,860,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("295,295,295,295,295,295,336,376,376,376,376,376,377,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + tmap.push_back("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + roomname = "The Filter"; //If not yet in level, use "The Space Station" + break; + + case rn(49,49): + + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,108,268,268,268,268,268,268,268,268"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,229,850,850,691,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,229,0,0,809,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,229,0,0,809,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,229,0,0,809,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,229,0,0,809,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,229,0,0,849,850,227,107,107,229,850,850,850,850,850,227,107,107,107,107,107,107,107,107,107,107,229,850,851,0,0,8,8,8,8"); + tmap.push_back("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,227,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,187,188,188,188"); + tmap.push_back("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,267,268,268,268,268,268,268,268,268,268,268,269,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,770,771,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,811,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,811,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,811,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,811,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,730,770,770,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,148,188,188,188,188,189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,107,107,107,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,107,107,107,107,107,229,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,227,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,107,107,107,107,107,148,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,149,107,107,107"); + tmap.push_back("107,107,107,107,107,107,229,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + + obj.createentity(game, 128, 176, 10, 1, 449490); // (savepoint) + obj.createentity(game, 160, 192, 3); //Disappearing Platform + obj.createentity(game, 192, 192, 3); //Disappearing Platform + obj.createentity(game, 224, 192, 3); //Disappearing Platform + obj.createentity(game, 256, 192, 3); //Disappearing Platform + obj.createentity(game, 216-4, 168, 1, 0, 4, 160, 88, 256, 192); // Enemy, bounded + obj.createentity(game, 184-24, 96, 1, 1, 4, 160, 88, 256, 192); // Enemy, bounded + obj.createentity(game, 256, 8, 2, 10, 4); //Big Threadmill, >>>>>> + roomname = "Boldly To Go"; + break; + + + case rn(49,48): + + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,761,761,761,761,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,680,680,680,680,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,290,450,450,450,450,450,450,450,450,451,680,680,680,680,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,840,841,409,289,289,411,841,841,682,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,6,6,6,6,6,6,6,6,6,409,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,0,0,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,369,370,370,370,370,370,370,370,370,331,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,761,762,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,449,450,450,450,450,450,450,450,450,450,450,450,450"); + tmap.push_back("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0"); + tmap.push_back("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,840,841,841,409,289,411,841,841,841,841,841,841,841,841,841,841,841,841,841,841,842,0,0"); + tmap.push_back("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,0,0,0,409,289,411,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); + tmap.push_back("289,289,289,289,289,289,411,680,721,761,761,409,289,289,411,761,761,761,761,761,409,289,330,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370"); + tmap.push_back("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + + obj.createentity(game, 192, 96, 9, 2); // (shiny trinket) + roomname = "One Way Room"; + break; + + + case rn(49,47): + + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253"); + tmap.push_back("92,92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,9,9,9,9,9"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,0,0,763,764,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,93,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,173"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,172,173,173,173,173,173,173,173,173,173,173,174,0,0,0,0,212,92,92,92"); + + obj.createentity(game, 56, 24, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 120, 24, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 184, 24, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 88, 72, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 216, 72, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 280, 72, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 32, 10, 0, 447490); // (savepoint) + obj.createentity(game, 288, 160, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 280, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 160, 216, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 224, 216, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 248, 24, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 120, 168, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 184, 168, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 216, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 152, 72, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 224, 120, 10, 0, 447491); // (savepoint) + + roomname = "Conveying a New Idea"; + break; + + + case rn(50,47): + + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,100,98,98,98,98,98,98,98,98,98,98,98,98,98,98,99,259,259,259,259,259,259,259,259,100,98,98,98"); + tmap.push_back("9,9,9,9,9,9,9,9,9,9,9,9,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,7,7,7,7,7,7,7,7,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,680,680,680,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,680,680,680,218,98,98,98"); + tmap.push_back("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,8,8,8,8,8,8,8,8,178,179,179,179,179,179,179,180,680,680,680,680,218,98,98,98"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,139,179,179,179,179,179,179,179,179,140,98,98,98,98,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,99,259,259,259,259,259,259,259,259,100,98,98,98,98,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,9,9,9,9,9,9,9,9,258,259,259,259,100,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,840,841,841,218,98,98,220,841,841,841,841,218,98,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98"); + tmap.push_back("98,98,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,98,220,0,0,0,0,218,98,98,98"); + + obj.createentity(game, 0, 72, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 96, 24, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 160, 24, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 168, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 168, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 160, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 160, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 0, 160, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 0, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 216, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 216, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 216, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 0, 168, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 72, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 72, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 112, 2, 8, 4); //Threadmill, >>> + roomname = "Upstream Downstream"; + break; + + case rn(50,48): + + tmap.push_back("292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,452,453,453,453,453,453,294,292,292,292,292,292,292,292,292,292,292,293,453,453,453,453,453,454,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,9,9,9,9,9,9,412,292,292,292,292,292,292,292,292,292,292,414,9,9,9,9,9,9,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,452,453,453,453,453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,333,373,373,373,374,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,414,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,372,373,373,373,334,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,414,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,412,292,292,292,292,292,292,292"); + tmap.push_back("453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,412,292,292,292,292,292,292,292"); + tmap.push_back("373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + + obj.platformtile = 119; + obj.createentity(game, 64, 72, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded + obj.createentity(game, 96, 80, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded + obj.createentity(game, 128, 88, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded + obj.createentity(game, 160, 96, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded + obj.createentity(game, 192, 104, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded + obj.createentity(game, 224, 112, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded + obj.createentity(game, 264, 96, 10, 1, 448500); // (savepoint) + roomname = "The High Road is Low"; + break; + + case rn(50,49): + + tmap.push_back("274,274,274,274,274,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113,113,113,113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,273,115,113,113,113,113,113,113,113,113,113,113,113,113,114,275,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,9,233,113,113,113,113,113,113,113,113,113,113,113,113,235,9,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,273,115,113,113,113,113,113,113,113,113,113,113,114,275,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,9,233,113,113,113,113,113,113,113,113,113,113,235,9,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,273,115,113,113,113,113,113,113,113,113,114,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,233,113,113,113,113,113,113,113,113,235,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,273,115,113,113,113,113,113,113,114,275,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8"); + tmap.push_back("194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,9,233,113,113,113,113,113,113,235,9,0,0,0,0,0,0,193,194,194,194,194,194,194,194,194"); + tmap.push_back("113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,273,115,113,113,113,113,114,275,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,9,233,113,113,113,113,235,9,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,273,115,113,113,114,275,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,9,233,113,113,235,9,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,273,115,114,275,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,9,233,235,9,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,273,275,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,9,9,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,8,8,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push_back("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,194,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + + obj.createentity(game, 144, 200, 3, 51); //Disappearing Platform + obj.createentity(game, 24, 16, 10, 0, 449500); // (savepoint) + obj.createentity(game, 280, 16, 10, 0, 449501); // (savepoint) + obj.createentity(game, 0, 8, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 8, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 224, 8, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 288, 8, 2, 9, 4); //Threadmill, <<< + roomname = "Give Me A V"; + break; + + case rn(51,49): + + tmap.push_back("244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,85,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,7,7,7,7,7,7,7,7,7,7,7,1125,9,9,9,9"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("164,164,164,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,6,6,6,6,6,6,6,6,6,6,6,1122,8,8,8,8"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164"); + tmap.push_back("83,83,83,124,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,125,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + + obj.createentity(game, 0, 8, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 64, 8, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 8, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 192, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 256, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 152, 88, 10, 1, 449510); // (savepoint) + obj.createentity(game, 152, 120, 10, 0, 449511); // (savepoint) + obj.createentity(game, 128, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 256, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 32, 208, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 64, 208, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 208, 2, 10, 4); //Big Threadmill, >>>>>> + roomname = "Select Track"; + break; + + case rn(52,49): + + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); + tmap.push_back("9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); + tmap.push_back("364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.createentity(game, 0, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 256, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 152, 128, 1, 0, 5, 72, 120, 256, 200); // Enemy, bounded + obj.createentity(game, 240, 168, 1, 1, 5, 72, 120, 256, 200); // Enemy, bounded + obj.createentity(game, 72, 168, 1, 1, 5, 72, 120, 256, 200); // Enemy, bounded + obj.createentity(game, 0, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 256, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 32, 3,10); //Disappearing Platform + obj.createentity(game, 96, 32, 3,10); //Disappearing Platform + obj.createentity(game, 192, 32, 3,10); //Disappearing Platform + obj.createentity(game, 224, 32, 3,10); //Disappearing Platform + roomname = "You Chose... Poorly"; + break; + + case rn(53,49): + + tmap.push_back("107,107,107,107,107,107,107,107,229,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,227,107,107,107,107,107,107,107,107"); + tmap.push_back("268,268,268,268,268,268,268,268,269,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,267,268,268,268,268,268,268,268,268"); + tmap.push_back("9,9,9,9,9,9,9,9,9,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,9,9,9,9,9,9,9,9,9"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,267,268,268,268,268,268,268,269,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,849,850,850,850,850,850,850,850,850,850,850,850,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); + tmap.push_back("188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + + obj.createentity(game, 0, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 64, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 192, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 256, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 152, 120, 10, 0, 449530); // (savepoint) + obj.createentity(game, 0, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 256, 112, 2, 10, 4); //Big Threadmill, >>>>>> + roomname = "Hyperspace Bypass 5"; + break; + + case rn(54,49): + + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,763,764,764,764,764,764,764,764,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,173,173,174,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,253,253,254,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,0,0,0,0,843,844,844,844,844,844,844,844,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,173,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,214,8,8,8,8,8,8,8,8,8,8,8,8,212,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + + obj.platformtile = 319; + obj.createentity(game, 0, 104, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 64, 104, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 0, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 112, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 136, 104, 2, 0, 5, 136, 88, 200, 152); // Platform, bounded + obj.createentity(game, 168, 104, 2, 0, 5, 136, 88, 200, 152); // Platform, bounded + obj.createentity(game, 80, 112, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 80, 104, 2, 9, 4); //Threadmill, <<< + roomname = "Plain Sailing from Here On"; + break; + + + case rn(54,48): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,645,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,775,776,777,0,0,775,776,777,0,0,775,776,777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,855,856,857,0,0,855,856,857,0,0,855,856,857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,775,776,777,0,0,775,776,777,0,0,775,776,777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,525,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,855,856,857,0,0,855,856,857,0,0,855,856,857,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,485,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,775,776,777,0,0,775,776,777,0,0,775,776,777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("8,8,8,0,0,0,0,0,855,856,857,0,0,855,856,857,0,0,855,856,857,0,0,0,0,8,8,8,8,8,8,8,0,0,0,0,603,483,483,483"); + tmap.push_back("564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,565,0,0,0,0,603,483,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,484,644,644,644,645,0,0,0,0,603,483,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("483,483,605,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,603,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); + + obj.platformtile = 10; + obj.createentity(game, 264, 128, 10, 0, 448540); // (savepoint) + obj.createentity(game, 192, 32, 3, 10); //Disappearing Platform + obj.createentity(game, 32, 176, 2, 3, 4); // Platform + obj.createentity(game, 256, 120, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 224, 184, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 0, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 16, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 104, 24, 10, 0, 448541); // (savepoint) + roomname = "Ha Ha Ha Not Really"; + break; + + + case rn(53,48): + + tmap.push_back("510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); + tmap.push_back("671,671,671,671,671,671,671,671,671,671,512,511,671,671,671,671,671,671,671,671,671,671,671,671,671,671,512,511,671,671,671,671,671,671,671,671,671,671,671,671"); + tmap.push_back("9,9,9,9,9,9,9,9,9,9,630,632,9,9,9,9,9,9,9,9,9,9,9,9,9,9,630,632,9,9,9,9,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,670,672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,670,672,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,590,592,0,0,0,0,0,0,0,0,0,0,0,0,0,0,590,592,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,630,632,8,8,8,8,8,8,8,8,8,8,8,8,8,8,630,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,590,591,591,591,591,591,591,591,591,591,591,591,552,551,591,591,591,591,591,591,591,591,591,591,591,591,591,591,552,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,630,510,511,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,512,510,510,510,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,9,9,9,9,9,9,0,0,0,0,0,0,0,0,630,510,510,510,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,630,510,632,0,0,0,0,778,779,779,779,779,779,779,779,779,779,779,779,779,780,0,0,0,0,630,510,510,510,632,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,630,510,632,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,630,510,510,510,632,8,8,8,8"); + tmap.push_back("0,0,0,0,0,0,630,510,632,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,630,510,510,510,551,591,591,591,591"); + tmap.push_back("0,0,0,0,0,0,630,510,632,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); + tmap.push_back("0,0,0,0,590,591,552,510,632,0,0,0,0,818,698,698,0,0,0,0,0,0,0,0,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); + tmap.push_back("0,0,0,0,630,510,510,510,632,0,0,0,0,818,698,698,590,591,591,591,591,591,591,592,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); + tmap.push_back("8,8,8,8,630,510,510,510,632,0,0,0,0,818,698,698,630,510,510,510,510,510,510,632,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); + tmap.push_back("591,591,591,591,552,510,510,510,632,0,0,0,0,818,698,698,630,510,510,510,510,510,510,632,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); + tmap.push_back("510,510,510,510,510,510,510,510,632,0,0,0,0,818,698,698,630,510,510,510,510,510,510,632,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); + tmap.push_back("510,510,510,510,510,510,510,510,632,0,0,0,0,818,698,698,630,510,510,510,510,510,510,632,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); + + obj.platformtile = 279; + obj.createentity(game, 32, 168, 9, 3); // (shiny trinket) + obj.createentity(game, 16, 112, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 0, 112, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 0, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 256, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 96, 32, 2, 3, 4); // Platform + obj.createentity(game, 240, 88, 2, 2, 4); // Platform + obj.createentity(game, 128, 184, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 152, 168, 10, 1, 448530); // (savepoint) + obj.createentity(game, 72, 128, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 184, 128, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 48, 104, 2, 10, 4); //Big Threadmill, >>>>>> + + roomname="You Just Keep Coming Back"; + break; + + case rn(52,48): + + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("450,450,450,450,291,289,289,289,290,450,450,450,450,450,450,450,450,450,291,289,289,290,450,450,450,450,450,450,450,450,450,291,289,289,289,290,450,450,450,450"); + tmap.push_back("9,9,9,9,409,289,289,289,411,7,7,7,7,7,7,7,7,7,409,289,289,411,7,7,7,7,7,7,7,7,7,409,289,289,289,411,9,9,9,9"); + tmap.push_back("0,0,0,0,449,450,450,450,451,680,680,680,680,680,680,680,680,680,409,289,289,411,680,680,680,680,680,680,680,680,680,449,450,450,450,451,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,449,450,450,451,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,7,7,7,7,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,369,370,370,371,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,369,370,370,371,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,449,450,450,451,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,449,450,450,451,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,6,6,6,6,6,6,6,6,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,369,370,370,370,370,370,370,371,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,411,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); + tmap.push_back("0,0,369,370,370,370,370,370,371,680,680,680,680,680,680,680,409,289,289,289,289,289,289,411,680,680,680,680,680,680,680,369,370,370,370,370,370,371,0,0"); + tmap.push_back("8,8,409,289,289,289,289,289,411,6,6,6,6,6,6,6,409,289,289,289,289,289,289,411,6,6,6,6,6,6,6,409,289,289,289,289,289,411,8,8"); + tmap.push_back("370,370,331,289,289,289,289,289,330,370,370,370,370,370,370,370,331,289,289,289,289,289,289,330,370,370,370,370,370,370,370,331,289,289,289,289,289,330,370,370"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + + obj.platformtile = 359; + obj.createentity(game, 256, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 256, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 0, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 0, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 120, 104, 2, 0, 4, 96, 64, 224, 160); // Platform, bounded + obj.createentity(game, 168, 80, 2, 0, 4, 96, 64, 224, 160); // Platform, bounded + obj.createentity(game, 72, 64, 10, 1, 448520); // (savepoint) + obj.createentity(game, 232, 64, 10, 1, 448521); // (savepoint) + obj.createentity(game, 232, 144, 10, 0, 448522); // (savepoint) + obj.createentity(game, 72, 144, 10, 0, 448523); // (savepoint) + roomname = "Gordian Knot"; + break; + + + case rn(51,48): + + tmap.push_back("313,313,313,313,313,313,313,435,0,0,0,0,433,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313"); + tmap.push_back("313,313,313,313,313,313,313,435,0,0,0,0,433,313,313,313,313,313,313,313,313,313,313,313,313,313,313,314,474,474,474,474,474,474,474,474,474,474,474,474"); + tmap.push_back("313,313,313,313,313,313,313,435,770,770,771,0,433,313,313,313,313,313,313,313,313,313,313,313,313,313,313,435,9,9,9,9,9,9,9,9,9,9,9,9"); + tmap.push_back("313,313,313,313,313,313,313,435,689,689,811,0,433,313,313,313,313,313,313,313,313,313,313,313,313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,314,474,474,474,475,689,689,811,0,473,474,474,474,474,474,474,474,474,474,474,474,474,474,474,475,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,0,0,0,0,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,393,394,394,394,394,394,394,395,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,473,474,474,474,474,474,474,475,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,850,850,850,850,850,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,354,394,394,394,394,394,395,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,313,313,313,313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("313,313,313,313,313,313,313,313,313,435,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); + tmap.push_back("313,313,313,313,313,313,313,313,313,354,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394"); + tmap.push_back("313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313"); + tmap.push_back("313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313"); + + obj.createentity(game, 256, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 192, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 64, 112, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 256, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 96, 40, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 160, 40, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 32, 40, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 72, 80, 10, 1, 448510); // (savepoint) + obj.createentity(game, 104, 128, 1, 0, 5, 104, 120, 288, 200); // Enemy, bounded + obj.createentity(game, 160+8, 168, 1, 1, 5, 104, 120, 288, 200); // Enemy, bounded + obj.createentity(game, 216+16, 128, 1, 0, 5, 104, 120, 288, 200); // Enemy, bounded + + roomname = "Backsliders"; + break; + + case rn(51,47): + + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,777,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283"); + tmap.push_back("283,284,444,444,444,444,444,444,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,284,444,444,444,444"); + tmap.push_back("283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,443,445,695,817,0,0"); + tmap.push_back("283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0"); + tmap.push_back("283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0"); + tmap.push_back("283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,363,365,695,817,0,0"); + tmap.push_back("283,324,364,364,364,364,364,364,364,364,364,365,695,695,695,695,363,364,364,364,364,364,364,364,364,364,364,364,364,365,695,695,695,695,403,324,364,364,364,364"); + tmap.push_back("283,283,283,283,283,283,283,284,444,444,444,445,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,443,444,444,444,444,444"); + tmap.push_back("283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,817,0,0"); + tmap.push_back("283,283,283,283,283,283,283,405,856,856,856,856,856,856,856,856,403,283,283,283,283,283,283,283,283,283,283,283,283,405,856,856,856,856,856,856,856,857,0,0"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,363,364,364,364,325,283,283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364"); + tmap.push_back("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.createentity(game, 72, 184, 10, 0, 447510); // (savepoint) + obj.createentity(game, 80, 128, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 144, 128, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 208, 128, 2, 10, 4); //Big Threadmill, >>>>>> + + obj.createentity(game, 24 - 8, 144 - 8, 1, 10, 0); // Enemy + + obj.createentity(game, 24 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 8 + (117 * 3), 144 - 8, 1, 10, 1); // Enemy + + //LIES emitter starts here + roomname = "The Cuckoo"; + break; + + case rn(52,47): + + tmap.push_back("310,311,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,312,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("310,432,0,0,0,0,0,0,772,773,773,773,773,773,773,773,773,773,773,773,430,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("310,432,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,430,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("471,472,0,0,0,390,391,391,391,391,391,391,391,391,391,391,392,692,692,692,430,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,430,311,471,471,471,471,471,471,471,471,312,432,692,692,692,430,310,310,311,471,471,471,472,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,430,432,0,812,692,692,692,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,430,432,0,812,692,692,692,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,430,432,0,812,692,692,692,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("391,391,391,391,391,352,432,0,812,692,692,692,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,432,0,812,692,390,392,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,432,0,812,692,430,432,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,432,0,812,692,430,432,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,432,0,812,692,430,432,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,432,0,812,692,430,432,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,390,391,391,391,352,432,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,432,0,852,853,430,432,853,853,853,430,432,853,853,853,430,310,310,432,853,854,0,0,430,310,310,310,310,432,0,0,0,0,0,0"); + tmap.push_back("471,471,471,471,471,312,432,0,0,0,430,432,0,0,0,430,432,0,0,0,470,312,311,472,0,0,0,0,470,312,311,471,471,472,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,470,472,0,0,0,470,472,0,0,0,470,472,0,0,0,0,470,472,0,0,0,0,0,0,470,472,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,390,392,0,0,0,390,392,0,0,0,390,392,0,0,0,0,390,392,0,0,0,0,0,0,390,392,0,0,0,0,0,0,0,0,0"); + tmap.push_back("391,391,391,391,391,352,432,0,0,0,430,432,0,0,0,430,432,0,0,0,390,352,351,392,0,0,0,0,390,352,351,391,391,392,0,0,0,0,0,0"); + tmap.push_back("471,471,471,471,471,471,472,0,0,0,430,432,0,0,0,470,472,0,0,0,430,310,310,432,0,0,0,0,470,471,471,471,471,472,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,430,310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,430,310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,430,310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,430,310,310,432,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8"); + tmap.push_back("391,391,391,391,391,391,391,391,391,391,352,351,391,391,391,391,391,391,391,391,352,310,310,351,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391"); + tmap.push_back("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + + obj.createentity(game, 8, 200, 10, 1, 447520); // (savepoint) + obj.createentity(game, 200, 192, 9, 4); // (shiny trinket) + obj.createentity(game, 232, 96, 10, 1, 447521); // (savepoint) + + obj.createentity(game, 24 - 60 - 8, 144 - 8, 1, 10, 0); // Enemy + + obj.createentity(game, 24 - 60 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 60 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 60 - 8 + (117 * 3), 144 - 8, 1, 10, 1); // Enemy + //LIES Emitter, manually positioned + roomname = "Clarion Call"; + break; + + case rn(51,46): + + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,111,271,272,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,232,686,686,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,232,686,686,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,232,686,686,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,232,686,686,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,151,191,192,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,270,271,271,271,271,271,271,271,271,271,271,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,151,191,191,191,191,191,191,191,191,191,191,191,191,191,192,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + tmap.push_back("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + + obj.createentity(game, 176, 104, 10, 0, 446510); // (savepoint) + + obj.createentity(game, 7 * 8, 17 * 8, 1, 12, 0); // Enemy + + obj.createentity(game, 7*8, 2*8, 1, 12, 1); // Enemy + //FACTORY emitter starts here + roomname = "The Solution is Dilution"; + break; + + case rn(51,45): + + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,252,253,94,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,172,173,134,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,252,253,253,253,253,253,253,253,253,253,253,253,253,253,253"); + tmap.push_back("92,92,92,92,93,253,254,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173"); + tmap.push_back("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,133,173,174,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,252,253,94,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,172,173,134,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + + obj.createentity(game, 96, 168, 10, 0, 445510); // (savepoint) + + obj.createentity(game, 7 * 8, 36 * 8, 1, 12, 0); // Enemy + + obj.createentity(game, 7 * 8, (36 * 8)-108, 1, 12, 1); // Enemy + obj.createentity(game, 7 * 8, (36 * 8)-216, 1, 12, 1); // Enemy + //FACTORY emitter starts here (manually placed) + + roomname = "Lighter Than Air"; + break; + + + case rn(51,44): + + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,453,453,453,453,453,453,453,294,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,454,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,454,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,372,334,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,293,453,454,701,701,701,701,701,701,701,701,823,0,0,372,334,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,414,701,701,701,701,701,701,701,372,373,373,373,373,373,334,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,454,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); + tmap.push_back("292,292,292,292,333,373,374,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,373,334,292,292"); + tmap.push_back("292,292,292,292,292,292,414,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + + obj.createentity(game, 224, 200, 10, 1, 444510); // (savepoint) + + obj.createentity(game, 56, 40, 1, 0, 2); // Enemy //collector + + obj.createentity(game, 7 * 8, 36 * 8, 1, 12, 0); // Enemy + + obj.createentity(game, 7 * 8, (36 * 8)-108, 1, 12, 1); // Enemy + obj.createentity(game, 7 * 8, (36 * 8)-216, 1, 12, 1); // Enemy + //FACTORY emitter starts here (manually placed) + + if(!game.intimetrial) + { + obj.createentity(game, 18 * 8, (5 * 8) + 4, 14); //Teleporter! + } + roomname = "Level Complete!"; + break; + + //Ok! Big open area is here: + case rn(52,45): + + tmap.push_back("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,287,447,448,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,408,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,408,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,367"); + tmap.push_back("286,286,408,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,447,447"); + tmap.push_back("286,286,408,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("447,447,448,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,727,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,768,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,808,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,808,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,808,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,366,368,686,686,686,686,808,0,0,0"); + tmap.push_back("367,367,367,367,368,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,408,686,686,686,686,808,0,0,0"); + tmap.push_back("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,327,367,368,686,686,808,0,0,0"); + tmap.push_back("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,408,686,686,808,0,0,0"); + tmap.push_back("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,366,367,328,286,286,408,686,686,808,0,0,0"); + tmap.push_back("286,286,286,286,327,367,368,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,408,686,686,808,0,0,0"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,327,367,368,808,0,0,0"); + tmap.push_back("286,286,286,286,286,286,408,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,286,286,408,808,0,0,0"); + tmap.push_back("286,286,286,286,286,286,327,367,367,367,367,367,367,368,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,286,286,408,808,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,408,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,286,286,408,808,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,367,367,367,367,367,367,367,367,368,686,686,686,686,406,286,286,286,286,286,286,408,808,0,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,686,686,686,686,406,286,286,286,286,286,286,327,367,368,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,367,367,367,328,286,286,286,286,286,286,286,286,408,0,0"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,367"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + roomname = "Green Grotto"; + break; + + case rn(52,44): + + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,218,98,98,98,98"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,218,98,98,98,98"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,99,259,259"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,220,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,220,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,220,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,220,0,0"); + tmap.push_back("98,98,98,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,0,0"); + tmap.push_back("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0"); + tmap.push_back("98,98,98,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,99,260,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,178,179,179,179,179,179,179,179,180,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,258,259,259,259,259,259,259,259,260,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,681,841,841,841,841,841,841,842,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,139,180,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,178,179,179,179,179,179,180,0,0,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,258,259,259,259,259,259,260,0,0,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 248 - 4, 160 - 48, 1, 1, 0); // Enemy + obj.createentity(game, 124, 120, 20, 1); // (terminal) + obj.createblock(5, 124-4, 120, 20, 16, 14); + + obj.createentity(game, 156, 40, 20, 1); // (terminal) + obj.createblock(5, 156-4, 40, 20, 16, 15); + + roomname = "The Hanged Man, Reversed"; + break; + + case rn(53,45): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370"); + tmap.push_back("450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,330,370,371,0,0,0,0,369,370,331,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + + obj.createentity(game, 152, 120, 10, 0, 445530); // (savepoint) + roomname = "doomS"; + break; + + case rn(53,47): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,249,91,90,251,0,0,0,0,0,0,0,0,249,91,90,251,0,0,0,0,0,0,0,0,249,91,90,251,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,249,251,0,0,0,0,0,0,0,0,0,0,249,251,0,0,0,0,0,0,0,0,0,0,249,251,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,169,171,0,0,0,0,0,0,0,0,0,0,169,171,0,0,0,0,0,0,0,0,0,0,169,171,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,169,131,130,171,0,0,0,0,0,0,0,0,169,131,130,171,0,0,0,0,0,0,0,0,169,131,130,171,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); + tmap.push_back("8,8,8,8,8,8,209,89,89,211,8,8,8,8,8,8,8,8,209,89,89,211,8,8,8,8,8,8,8,8,209,89,89,211,8,8,8,8,8,8"); + tmap.push_back("170,170,170,170,170,170,131,89,89,130,170,170,170,170,170,170,170,170,131,89,89,130,170,170,170,170,170,170,170,170,131,89,89,130,170,170,170,170,170,170"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + + obj.createentity(game, 24-60-8, 144-8, 1, 10, 0); // Enemy + //LIES Emitter, manually positioned + + obj.createentity(game, 24 - 60 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 60 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 60 - 8 + (117 * 3), 144 - 8, 1, 10, 1); // Enemy + + roomname = "Chinese Rooms"; + break; + + case rn(53,46): + + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,450,451,0,0,0,0,449,450,291,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370"); + tmap.push_back("450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 152, 96, 10, 1, 446530); // (savepoint) + roomname = "Swoop"; + break; + + case rn(52,46): + + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + tmap.push_back("107,107,108,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,189,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,267,268,268,268,268,268,268,268,268,268,268,268,109,107,107,108,268,268,268,268,268,268,268,268,268,109,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,9,9,9,9,9,9,9,9,9,9,9,9,227,107,107,229,9,9,9,9,9,9,9,9,9,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,267,268,268,269,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,0,0,0,0,0,0,0,0,0,187,188,188,189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,229,0,0,0,0,0,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,148,188,188,188,188,188,188"); + tmap.push_back("107,107,229,8,8,8,8,8,8,8,8,8,227,107,107,229,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,227,108,268,268,268,268,268,268"); + tmap.push_back("107,107,148,188,188,188,188,188,188,188,188,188,149,107,107,148,188,188,188,188,188,188,188,188,188,188,188,189,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); + tmap.push_back("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); + + obj.createentity(game, 64, 40, 10, 1, 446520); // (savepoint) + obj.createentity(game, 208, 88, 3, 827); //Disappearing Platform + obj.createentity(game, 152, 160, 3, 827); //Disappearing Platform + obj.createentity(game, 96, 88, 3, 827); //Disappearing Platform + obj.createentity(game, 40, 160, 3, 827); //Disappearing Platform + roomname = "Manic Mine"; + break; + + + case rn(53,44): + + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,91,89,211,0,0,0,0,0,0,0,0,0,0,209,89,90,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,8,8,0,0,0,0,0,0,8,8,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,210,210,0,0,0,0,0,0,210,210,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,9,9,0,0,0,0,0,0,9,9,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,8,8,0,0,0,0,8,8,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,210,210,0,0,0,0,210,210,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,9,9,0,0,0,0,9,9,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,775,776,776,776,209,89,211,776,776,776,776,776,776,776,776,776,776,209,89,211,776,776,776,777,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,209,89,211,695,695,695,695,695,695,695,695,695,695,209,89,211,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,209,89,211,695,695,695,695,695,695,695,695,695,695,209,89,211,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,209,89,211,695,695,695,695,695,695,695,695,695,695,209,89,211,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,209,89,130,170,170,170,170,170,170,170,170,170,170,131,89,211,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,249,250,91,89,89,89,89,89,89,89,89,89,89,90,250,251,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,695,695,249,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + roomname = "Sorrow"; + break; + + + case rn(54,45): + + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,473,474,474,474,474,474,474,315,313,313,313,313,313,313,313,313,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,433,313,313,313,313,313,313,313,313,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,473,474,474,474,474,474,474,474,315,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,0,0,0,0,0,0,0,0,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("394,394,394,394,394,355,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("474,474,474,474,474,315,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,689,689,689,0,0,0,0,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,354,394,394,394,394,394,394,394,395,689,689,689,393,394,394,395,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,314,474,474,474,474,474,474,474,475,689,689,689,473,474,474,475,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,689,689,689,0,0,0,0,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,0,0,0,0,0,689,689,689,0,0,0,0,0,0,0,433,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,393,394,394,394,395,689,689,689,393,394,394,394,394,394,394,355,313,435,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,473,474,474,474,475,689,689,689,473,474,474,474,474,474,474,474,474,475,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,0,0,0,0,0,689,689,689,0,0,0,0,0,0,0,0,0,0,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,849,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,851,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,433,313,313,313,313"); + tmap.push_back("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,433,313,313,313,313"); + tmap.push_back("394,394,394,394,394,355,313,354,394,394,394,394,394,394,394,394,395,0,0,0,0,0,0,0,0,0,0,393,394,394,394,394,394,394,394,355,313,313,313,313"); + tmap.push_back("313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,435,0,0,0,0,0,0,0,0,0,0,433,313,313,313,313,313,313,313,313,313,313,313,313"); + tmap.push_back("313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,354,394,394,394,394,394,394,394,394,394,394,355,313,313,313,313,313,313,313,313,313,313,313,313"); + + obj.createentity(game, 144-4, 208, 1, 1, 6); // Enemy + obj.createentity(game, 128+4, 8, 1, 0, 6); // Enemy + obj.createentity(game, 64, 200, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 216, 200, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 96, 160, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 160, 160, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 208, 160, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 248, 184, 10, 1, 445540); // (savepoint) + obj.createentity(game, 184, 24, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 64, 64, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 152, 64, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 152, 88, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 64, 88, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 96, 136, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 160, 136, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 184, 136, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 152, 24, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 104, 200, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 104, 136, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 104, 160, 2, 9, 4); //Threadmill, <<< + + roomname = "$eeing Dollar $ign$"; + break; + + case rn(54,44): + + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,87,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("247,247,247,247,247,88,86,86,86,86,86,86,86,86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,246,247,247,247,88,86,86,86,86,86,86,86,86,208,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,698,246,247,247,247,88,86,86,86,86,208,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,699,859,859,859,859,246,247,88,86,86,208,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,0,0,0,0,0,246,88,86,208,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,778,779,779,779,779,779,206,86,208,698,698,698,698,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,818,699,859,859,859,859,206,86,208,698,698,698,698,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,818,820,0,0,0,0,206,86,208,698,698,698,698,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,818,820,0,778,780,0,206,86,208,698,698,698,698,206,86,86,86,86,86,87,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,818,820,0,858,860,0,206,86,208,698,698,698,698,206,86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,818,820,0,0,0,0,206,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,818,739,779,779,779,779,206,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,858,859,859,859,859,166,128,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,820,0,0,0,0,166,167,128,86,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,820,0,818,698,166,167,167,167,128,86,86,86,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,818,698,166,167,167,167,128,86,86,86,86,86,86,86,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,166,167,167,167,167"); + tmap.push_back("0,0,0,818,698,206,86,87,247,247,247,247,247,247,247,247,247,247,248,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,818,698,206,86,208,0,0,0,0,0,0,0,0,0,0,0,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,858,859,206,86,208,859,859,700,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,0,0,206,86,208,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,0,0,206,86,208,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,0,0,206,86,208,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,0,0,206,86,208,0,0,818,698,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,0,0,206,86,208,0,0,818,698,166,167,167,167,167,167,167,167,167,167,167,128,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,0,0,206,86,208,0,0,818,698,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,0,0,206,86,208,0,0,818,698,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + tmap.push_back("0,0,0,0,0,206,86,208,0,0,818,698,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + + obj.createentity(game, 184, 56, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 248, 56, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 312, 56, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 152, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 216, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 280, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 280, 128, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 272, 88, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 64, 152, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 120, 152, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 96, 192, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 152, 192, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 240, 88, 2, 9, 4); //Threadmill, <<< + roomname = "Parabolica"; + break; + + case rn(54,47): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0"); + tmap.push_back("0,0,0,0,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,0,0,0,0"); + tmap.push_back("0,0,0,0,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,779,780,0,0"); + tmap.push_back("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); + tmap.push_back("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); + tmap.push_back("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); + tmap.push_back("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); + tmap.push_back("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); + tmap.push_back("0,0,0,0,0,0,0,858,859,859,859,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,206,86,86,87,247,247,247,247,247,247,247,247,247,247,88,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,87,247,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,246,247,247,248,0,0,0,0,0,0,0,0,0,0,246,247,247,248,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0"); + tmap.push_back("0,0,0,0,166,167,167,168,0,0,0,0,0,0,0,0,0,0,166,167,167,168,0,0,0,0,0,0,0,0,0,0,166,167,167,168,0,0,0,0"); + tmap.push_back("0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0"); + tmap.push_back("0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0"); + tmap.push_back("0,0,0,0,206,86,86,127,167,167,167,167,167,167,167,167,167,167,128,86,86,127,167,167,167,167,167,167,167,167,167,167,128,86,86,127,167,167,167,167"); + tmap.push_back("0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("8,8,8,8,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("167,167,167,167,128,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + + obj.createentity(game, 96, 80, 10, 1, 447540); // (savepoint) + obj.createentity(game, 64, 184, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 112, 184, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 176, 184, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 224, 184, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 232, 128, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 288, 128, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 288, 184, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 120, 112, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 168, 112, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 208, 168, 10, 1, 447541); // (savepoint) + + obj.createentity(game, 24 - 60 - 8, 144 - 8, 1, 10, 0); // Enemy + + obj.createentity(game, 24 - 60 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 60 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 60 - 8 + (117 * 3), 144 - 8, 1, 10, 1); // Enemy + + //LIES Emitter, manually positioned + roomname = "Spikes Do!"; + break; + + case rn(54,46): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,1125,9,9,9,9,9"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,840,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,842,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 64, 152, 10, 1, 446540); // (savepoint) + obj.createentity(game, 120, 72, 3, 707); //Disappearing Platform + obj.createentity(game, 248, 72, 3, 707); //Disappearing Platform + obj.createentity(game, 184, 200, 3, 707); //Disappearing Platform + roomname = "What Lies Beneath?"; + break; + + case rn(55,47): + + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,249,250,250,250,250,250,250,91,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); + tmap.push_back("0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); + tmap.push_back("0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,170,170,131,89"); + tmap.push_back("0,0,0,0,0,0,0,0,169,170,170,170,170,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); + tmap.push_back("170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + + obj.createentity(game, 0, 128, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 128, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 112, 128, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 0, 184, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 184, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 184, 184, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 152, 168, 10, 1, 447550); // (savepoint) + + obj.createentity(game, 264, 136, 1, 0, 2); // Enemy //Collector + obj.createentity(game, 24 - 60 - 8, 144 - 8, 1, 10, 0); // Enemy + obj.createentity(game, 24 - 60 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy + obj.createentity(game, 24 - 60 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy + //LIES Emitter, manually positioned, collector! + roomname = "Chipper Cipher"; + break; + + case rn(55,46): + + tmap.push_back("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,683,683,683,683,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,683,683,683,683,664,506,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,683,683,683,683,683,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,844,844,844,844,844,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,506,504,626,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,624,504,626,0,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,763,764,764,764,764,764,764,764,624,504,626,764,764,764,764,764,764,764,765,0,0,624,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,624,504,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,664,506,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,624,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,624,504,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,664,506,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,624,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,624,504,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,664,506,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,0,624,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,0,624,504,504,504,504,504,504,504,504"); + tmap.push_back("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,0,624,504,504,504,504,504,504,504,504"); + + obj.createentity(game, 40, 72, 3, 787); //Disappearing Platform + roomname = "If You Fall Up"; + break; + + case rn(55,45): + + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,500,498,499,659,659,659,659,659,500,498,498,620,0,0,0,0,618,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,620,0,0,0,0,618,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,620,0,0,0,0,618,498"); + tmap.push_back("498,498,499,659,659,659,659,500,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,660,0,0,0,0,0,618,498,498,620,0,0,0,0,618,498"); + tmap.push_back("498,498,620,9,9,9,9,658,659,659,659,659,659,500,498,498,620,0,0,0,0,0,9,9,9,0,0,0,0,0,618,498,498,620,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,9,9,9,9,9,9,658,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,660,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0,0,618,498,620,0,0,0,0,0,8,8,8,8,8,8,8,8,618,498"); + tmap.push_back("498,498,620,0,0,0,0,8,8,8,8,8,8,578,579,579,580,0,0,0,0,0,618,498,620,0,0,0,0,0,578,579,579,579,579,579,579,579,540,498"); + tmap.push_back("498,498,620,0,0,0,0,578,579,579,579,579,579,540,498,498,620,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,539,579,579,579,579,579,540,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,500,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,775,776,776,776,776,776,776,776,776,776,618,498,620,776,776,776,776,776,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,618,498,620,695,695,695,695,695,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,620,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,618,498,620,695,695,695,695,695,618,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,695,695,695,695,618,498,539,579,579,579,579,579,540,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,695,695,695,695,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + tmap.push_back("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,695,695,695,695,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + + obj.platformtile = 159; + obj.createentity(game, 24, 80, 2, 3, 6); // Platform + obj.createentity(game, 64, 176, 10, 0, 445550); // (savepoint) + obj.createentity(game, 216 - 4, 192, 10, 1, 445551); // (savepoint) + roomname = "Just Pick Yourself Down"; + break; + + + case rn(55,44): + + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); + tmap.push_back("367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,368,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + + obj.createentity(game, 32, 40, 10, 1, 444560); // (savepoint) + obj.createentity(game, 56, 24, 10, 0, 444551); // (savepoint) + obj.createentity(game, 80, 40, 10, 1, 444552); // (savepoint) + obj.createentity(game, 104, 24, 10, 0, 444553); // (savepoint) + obj.createentity(game, 128, 40, 10, 1, 444554); // (savepoint) + obj.createentity(game, 152, 24, 10, 0, 444555); // (savepoint) + obj.createentity(game, 176, 40, 10, 1, 444556); // (savepoint) + obj.createentity(game, 200, 24, 10, 0, 444557); // (savepoint) + obj.createentity(game, 224, 40, 10, 1, 444558); // (savepoint) + obj.createentity(game, 248, 24, 10, 0, 444559); // (savepoint) + obj.createentity(game, 272, 40, 10, 1, 444550); // (savepoint) + obj.createentity(game, 0, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 256, 16, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 0, 56, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 64, 56, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 128, 56, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 192, 56, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 256, 56, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 0, 88, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 64, 88, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 88, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 192, 88, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 240, 88, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 0, 128, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 64, 128, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 128, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 192, 128, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 240, 128, 2, 9, 4); //Threadmill, <<< + roomname = "The Warning"; + break; + + //Super driller starts here! + case rn(56,44): + + tmap.push_back("298,298,298,298,298,298,298,420,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("459,459,459,459,459,459,459,460,0,0,0,0,418,298,298,298,298,298,298,298,298,299,459,459,459,459,300,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,420,9,9,9,9,418,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,420,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,420,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,299,459,460,0,0,0,0,458,459,300,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,420,9,9,0,0,0,0,9,9,418,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,420,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("379,379,379,379,379,380,0,0,0,0,0,0,418,298,298,298,298,298,298,420,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,298,298,299,459,460,0,0,0,0,0,0,0,0,458,459,300,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,298,298,420,9,9,0,0,0,0,0,0,0,0,9,9,418,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,420,0,0,378,379,379,379,340,298,298,298,298,420,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,420,0,0,458,459,459,459,300,298,298,298,298,420,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,299,459,460,0,0,0,0,0,0,0,0,0,0,0,0,458,459,300,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,420,9,9,0,0,0,0,0,0,0,0,0,0,0,0,9,9,418,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,339,379,379,379,380,0,0,418,298,298,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298"); + tmap.push_back("299,459,459,459,459,459,459,459,459,460,0,0,418,299,459,460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,458,459,300,298,298,298,298,298"); + tmap.push_back("420,0,0,0,0,0,0,0,0,0,0,0,418,420,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,418,298,298,298,298,298"); + tmap.push_back("420,49,0,0,0,0,0,0,0,0,0,0,418,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298"); + tmap.push_back("420,49,0,0,0,0,0,0,0,0,0,0,418,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298"); + tmap.push_back("420,49,0,0,0,0,0,0,0,0,0,0,458,460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,458,459,300,298,298,298"); + tmap.push_back("420,49,0,0,0,0,50,378,379,379,379,380,9,9,0,0,0,0,0,0,0,8,8,8,8,8,8,0,0,0,0,0,0,0,9,9,418,298,298,298"); + tmap.push_back("420,49,0,0,0,0,50,418,298,298,298,420,0,0,0,0,0,0,0,0,50,378,379,379,379,379,380,49,0,0,0,0,0,0,0,0,418,298,298,298"); + tmap.push_back("420,49,0,0,0,0,50,418,298,298,298,420,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,418,298,298,298"); + tmap.push_back("420,49,0,0,0,0,50,418,298,299,459,460,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,458,459,300,298"); + tmap.push_back("420,49,0,0,0,0,50,418,298,420,9,9,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,9,9,418,298"); + tmap.push_back("420,49,0,0,0,0,50,418,298,420,0,0,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,0,0,418,298"); + tmap.push_back("420,49,0,0,0,0,50,418,298,420,0,0,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,0,0,418,298"); + + obj.createentity(game, 176, 80, 3, 55); //Disappearing Platform + obj.createentity(game, 0, 56, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 16, 56, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 72, 72, 10, 1, 444561); // (savepoint) + obj.createentity(game, 8, 144, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 48, 144, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 0, 16, 2, 10, 4); //Big Threadmill, >>>>>> + + + roomname = "Getting Here is Half the Fun"; + break; + + case rn(56,45): + + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,652,653,653,653,653,654,49,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,614,8,8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,612,492"); + tmap.push_back("614,49,0,0,0,0,50,612,533,573,573,573,573,573,573,573,573,573,574,49,0,0,0,0,0,0,0,0,50,572,573,573,573,573,573,573,573,573,534,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,652,494,492,492,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,533,574,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,652,494,492,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,533,574,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,652,494,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,533,574,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,652,494,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492"); + tmap.push_back("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492"); + + roomname = "Your Bitter Tears... Delicious"; + break; + + case rn(56,46): + + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,86,86,86,86,87,248,49,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,166,168,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,127,168,8,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,127,168,8,0,0,0,0,0,50,206,127,168,8,0,0,0,0,8,166,128,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,127,168,8,0,0,0,0,50,206,86,127,168,0,0,0,0,166,128,86,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,127,168,0,0,0,0,50,206,86,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,208,0,0,0,0,50,206,86,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,208,0,0,0,0,50,206,86,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86"); + tmap.push_back("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,208,0,0,0,0,50,206,86,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86"); + + roomname = "Easy Mode Unlocked"; + break; + + case rn(56,47): + + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,8,8,8,8,215,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,136,176,176,176,176,137,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + + roomname = "Vici!"; + break; + + case rn(56,48): + + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,470,312,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,9,470,312,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,9,470,312,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,9,470,471,312,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,9,9,470,471,312,310,310,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,9,9,470,471,312,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,9,9,470,312,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,50,390,352,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,351,392,8,8,8,8,0,0,0,0,0,0,0,0,50,430,310,310,310,310,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,351,391,391,391,392,49,0,0,0,0,0,0,0,50,470,471,471,471,312,310,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,9,9,9,9,470,312,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,311,472,49,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,351,392,8,8,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,391,392,8,8,0,0,0,0,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,391,392,8,8,0,0,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,391,392,8,0,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,392,8,0,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,392,8,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,392,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,50,430,310,310"); + tmap.push_back("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,50,430,310,310"); + + roomname = "Vidi"; + break; + + case rn(56,49): + + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,99,259,259,259,259,259,259,259,259,260,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,99,260,9,9,9,9,9,9,9,9,9,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,178,140,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,50,178,179,179,179,179,179,140,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,50,258,100,98,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,0,0,50,258,100,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98"); + tmap.push_back("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98"); + + roomname="Veni"; + break; + + case rn(56,50): + + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); + tmap.push_back("211,49,0,0,0,0,0,249,250,250,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,250,250,250,250,91,89,89"); + tmap.push_back("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("130,170,170,170,170,170,171,0,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,0,0,0,0,209,89,89"); + tmap.push_back("89,89,89,89,89,89,211,0,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,0,209,89,89"); + tmap.push_back("89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); + tmap.push_back("89,89,89,89,89,89,211,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,169,170,170,170,170,170,170,170,131,89,89"); + tmap.push_back("89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89,89,89"); + + obj.createentity(game, 224, 144, 9, 5); // (shiny trinket) + obj.createentity(game, 96, 152, 10, 1, 450560); // (savepoint) + + obj.createentity(game, 24, 152, 20, 1); // (terminal) + obj.createblock(5, 24-4, 152, 20, 16, 16); + roomname = "Doing Things The Hard Way"; + break; + + //Final section: The overlap + + case rn(53,43): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,761,761,761,761,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,657,680,680,680,680,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495"); + tmap.push_back("495,495,495,617,9,9,9,9,9,9,9,9,9,9,1123,7,7,7,680,680,680,680,7,7,7,1125,9,9,9,9,9,9,9,9,9,9,9,9,615,495"); + tmap.push_back("656,656,656,657,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,655,656"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("576,576,576,576,576,576,576,576,576,577,8,8,8,8,1120,680,680,680,680,680,680,680,680,680,680,1122,8,8,8,8,575,576,576,576,576,576,576,576,576,576"); + tmap.push_back("495,495,495,495,495,495,495,495,495,536,576,576,576,576,577,680,680,680,680,680,680,680,680,680,680,575,576,576,576,576,537,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,6,6,6,6,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,575,576,576,577,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,655,656,656,657,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,7,7,7,7,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,841,841,841,841,841,841,841,841,841,841,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + + obj.platformtile = 707; + obj.createentity(game, 272, 40, 2, 14, 2); // Platform + obj.createentity(game, 240, 40, 3, 707); //Disappearing Platform + + if(game.intimetrial && game.timetriallevel > 0) + { + obj.fatal_top(); + } + roomname = "Exhaust Chute"; + break; + + case rn(56,43): + + tmap.push_back("301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("462,462,462,462,303,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("9,9,9,9,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("0,0,0,0,461,303,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("0,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,302,462,462,462,462,462,462,462,462,462,462,462,462,462,303,301,301,301,301,301"); + tmap.push_back("0,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,302,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,301,301"); + tmap.push_back("0,0,0,0,0,461,303,301,301,301,301,301,301,301,301,301,302,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,461,303,301,301,301,301"); + tmap.push_back("0,0,0,0,0,0,421,301,301,301,301,301,301,301,302,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,301"); + tmap.push_back("0,0,0,0,0,0,421,301,301,301,301,301,302,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,461,303,301,301,301"); + tmap.push_back("0,0,0,0,0,0,461,462,462,462,462,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,461,303,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,381,343,301,301"); + tmap.push_back("382,382,382,382,382,382,382,382,382,382,382,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301"); + tmap.push_back("301,301,301,301,301,301,301,301,301,301,301,301,342,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,381,343,301,301,301"); + tmap.push_back("462,462,462,462,462,462,462,462,462,462,462,462,303,301,342,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,301"); + tmap.push_back("704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,342,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,381,343,301,301,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,824,704,704,704,421,301,301,301,301,301,342,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,864,865,865,865,421,301,301,301,301,301,301,301,342,382,382,382,382,382,382,382,382,382,382,382,382,382,343,301,301,301,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("382,382,382,382,382,382,382,383,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("301,301,301,301,301,301,301,423,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + tmap.push_back("301,301,301,301,301,301,301,423,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + + obj.createentity(game, 0, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 64, 168, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 72, 128, 10, 1, 443560); // (savepoint) + + obj.createentity(game, (21 * 8), (9 * 8), 14); //Teleporter! + + if(game.intimetrial) + { + obj.createblock(1, 56+16, 0, 32, 150, 82); + } + else + { + if(obj.flags[7] == 0) + { + if (game.nocutscenes) + { + obj.changeflag(7, 1); + game.teleportscript = "levelonecomplete"; + } + else + { + obj.createblock(1, 56, 0, 32, 150, 32); + } + } + } + roomname = "A Wrinkle in Time"; + break; + + + case rn(55,43): + + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("247,247,247,88,86,86,86,87,247,247,247,247,247,247,247,88,86,86,86,86,86,86,86,86,87,247,247,247,247,247,247,247,88,86,86,86,87,247,247,247"); + tmap.push_back("9,9,9,206,86,86,86,208,9,9,9,9,9,9,9,206,86,86,86,86,86,86,86,86,208,9,9,9,9,9,9,9,206,86,86,86,208,9,9,9"); + tmap.push_back("0,0,0,246,247,247,247,248,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,208,0,0,0,0,0,0,0,246,247,247,247,248,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,247,247,247,247,247,247,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,858,859,859,859,859,860,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,0,0,0,0,0,0,0,0,166,167,167,167,167,167,167,168,0,0,0,0,0,0,0,0"); + tmap.push_back("86,86,86,86,86,86,86,86,86,87,247,247,247,88,86,208,0,0,0,0,0,0,0,0,206,86,87,247,247,247,88,127,167,168,0,0,0,0,0,0"); + tmap.push_back("86,86,86,86,86,86,86,86,86,208,0,0,0,206,86,208,0,0,0,0,0,0,0,0,206,86,208,0,0,0,206,86,86,127,167,168,0,0,0,0"); + tmap.push_back("86,86,86,86,86,86,86,86,86,208,0,0,0,206,86,208,8,8,8,8,8,8,8,8,206,86,208,0,0,0,206,86,86,86,86,127,167,168,0,0"); + tmap.push_back("86,86,86,86,86,86,86,86,86,208,0,0,0,206,86,127,167,167,167,167,167,167,167,167,128,86,208,0,0,0,206,86,86,86,86,86,86,127,167,167"); + tmap.push_back("86,86,86,86,86,86,86,86,86,208,779,779,779,206,86,86,86,86,86,86,86,86,86,86,86,86,208,779,779,779,206,86,86,86,86,86,86,86,86,86"); + tmap.push_back("247,247,247,247,247,247,247,247,247,248,698,698,698,246,247,247,247,247,247,247,247,247,247,247,247,247,248,698,698,698,246,247,247,247,247,247,247,247,247,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,698,698,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,698,698,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,858,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,860,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + + obj.createentity(game, 0, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 63, 64-16, 1, 3, 4, 64, 0, 256, 204); // Enemy, bounded + obj.createentity(game, 256-28, 80, 1, 2, 4, 64, 0, 256, 204); // Enemy, bounded + obj.createentity(game, 48, 168, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 104, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 152, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 240, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 288, 168, 2, 9, 4); //Threadmill, <<< + obj.createentity(game, 160 - 48, 184 - 8, 1, 3, 5);// , 160, 0, 320, 240); // Enemy, bounded + obj.createentity(game, 160 - 28 + 48, 184 - 8, 1, 2, 5);// , 0, 0, 160, 240); // Enemy, bounded + roomname = "Brass Sent Us Under The Top"; + break; + + case rn(54,43): + + tmap.push_back("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,627,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); + tmap.push_back("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,627,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); + tmap.push_back("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,667,668,509,507,507,507,507,508,668,668,668,668,668,668,668,668,668,668"); + tmap.push_back("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,9,9,627,507,507,507,507,629,9,9,9,9,9,9,9,9,9,9"); + tmap.push_back("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,667,668,668,668,668,669,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("668,668,668,668,668,668,668,668,509,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,627,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,627,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,627,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,627,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("588,588,589,0,0,769,770,770,627,507,507,507,507,507,507,629,770,770,771,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,629,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,629,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,629,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,548,588,588,588,588,589,0,0,0,0,0,0,0,0,0,0,0,0,587,588,588,588,588,588,588"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,627,507,507,507,507,507,507"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,627,507,507,507,507,507,507"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,629,8,8,8,8,8,8,8,8,8,8,8,8,627,507,507,507,507,507,507"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,548,588,588,588,588,588,588,588,588,588,588,588,588,549,507,507,507,507,507,507"); + tmap.push_back("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); + tmap.push_back("507,507,629,0,0,809,689,689,667,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668"); + tmap.push_back("507,507,629,0,0,809,689,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,629,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,629,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,629,0,0,849,850,850,850,850,850,850,850,850,850,850,850,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("507,507,548,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588"); + tmap.push_back("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); + tmap.push_back("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); + + obj.createentity(game, 64, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 128, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 192, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 256, 168, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 32+4, 48, 10, 0, 443540); // (savepoint) + obj.createentity(game, 208-4, 48, 1, 0, 3, 104, 40, 324, 136); // Enemy, bounded + obj.createentity(game, 136 + 4, 96, 10, 1, 443541); // (savepoint) + + roomname = "The Tomb of Mad Carew"; + break; + + case rn(52,43): + + tmap.push_back("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,472,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,430,310,310,310,311,471,471,471,471,471,471,471,471,471,471,471"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,430,310,310,310,432,692,692,692,692,692,692,692,814,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,852,853,853,853,853,853,430,310,310,310,432,853,853,853,853,853,853,853,854,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,432,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,432,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,432,0,0,0,0,0,0,390,391,391,391,391"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,390,391,391,391,391,391,391,391,352,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,352,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("471,471,471,471,471,471,312,310,310,311,471,471,312,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("9,9,9,9,9,9,430,310,310,432,9,9,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,470,471,471,472,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,772,773,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("391,391,391,391,392,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("310,310,310,310,432,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("310,310,310,310,432,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + + obj.createentity(game, 56, 144, 10, 0, 443520); // (savepoint) + obj.createentity(game, 152, 80, 10, 1, 443521); // (savepoint) + roomname = "The Sensible Room"; + break; + + case rn(51,43): + + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,8,8,8,8,8,8,8,8,8,8,8,8"); + tmap.push_back("170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89,89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,91,90,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,249,251,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + + obj.createentity(game, 0, -200, 1, 16, 6, -64, -500, 320 + 64, 340); + roomname = "B-B-B-Busted"; + break; + + + case rn(50,43): + + tmap.push_back("286,286,286,286,286,408,689,689,811,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,408,689,689,811,0,0,0,406,287,447,447,447,447,288,286,286,286,286,286,286,287,447,447,447,447,288,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,408,689,689,811,0,0,0,446,448,9,9,9,9,446,447,447,447,447,447,447,448,9,9,9,9,446,447,447,447,447,447,447,447,447,447"); + tmap.push_back("286,286,286,286,286,408,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,850,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("286,286,286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,367,368,8,8,8,8,366,367,367,367,367,367,367,368,8,8,8,8,8,8,8,8"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,367,367,367,328,286,286,286,286,286,286,327,367,367,367,367,367,367,367,367"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("447,447,447,447,288,286,286,287,447,447,447,447,288,286,286,287,447,447,447,447,288,286,286,287,447,447,447,447,288,286,286,287,447,447,447,447,447,447,447,447"); + tmap.push_back("9,9,9,9,446,447,447,448,9,9,9,9,446,447,447,448,9,9,9,9,446,447,447,448,9,9,9,9,446,447,447,448,9,9,9,9,9,9,9,9"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("367,367,367,368,8,8,8,8,366,367,367,368,8,8,8,8,366,367,367,368,8,8,8,8,366,367,367,368,8,8,8,8,366,367,367,367,367,367,367,367"); + tmap.push_back("286,286,286,327,367,367,367,367,328,286,286,327,367,367,367,367,328,286,286,327,367,367,367,367,328,286,286,327,367,367,367,367,328,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + + obj.createentity(game, 280, 192, 10, 1, 443500); // (savepoint) + obj.createentity(game, 64, 80, 10, 1, 443501); // (savepoint) + + if(!game.nocutscenes) + { + obj.createblock(1, 0, 0, 112, 112, 8); + } + roomname = "V Stitch"; + break; + + + case rn(49,43): + + tmap.push_back("492,614,680,680,680,680,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,680,680,802,0,0,0,612,492,492,492,492,492"); + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,612,492,492,492,492,492"); + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,612,492,492,492,492,492"); + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,612,492,492,492,492,492"); + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,612,492,492,492,492,492"); + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,6,6,6,6,6,6,6,6,6,6,6,1122,8,8,8,612,492,492,492,492,492"); + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,840,841,841,841,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492"); + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,612,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492"); + if(game.nodeathmode || game.intimetrial) + { + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,652,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + } + else + { + tmap.push_back("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,652,653,653,654,9,9,9,9,9,9,9,9,9,9,9,9,9,9,612,492,492"); + } + tmap.push_back("492,533,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,533,573,573,573,574,0,0,0,0,572,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,8,8,8,8,8,8,0,0,0,0,612,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,572,573,573,573,573,574,0,0,0,0,652,653,653"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,493,653,653,653,654,0,0,0,0,9,9,9"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,614,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,8,8,8,8,612,492,492,614,0,0,0,0,612,614,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,534,492,492,533,573,573,573,573,534,614,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("841,841,841,841,841,841,841,842,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + tmap.push_back("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + + obj.platformtile = 747; + obj.createentity(game, 120, 72, 3, 747); //Disappearing Platform + obj.createentity(game, 120, 112, 3, 747); //Disappearing Platform + obj.createentity(game, 120, 128, 3, 747); //Disappearing Platform + obj.createentity(game, 88, 72, 2, 15, 4); // Platform + obj.createentity(game, 192, 128, 9, 6); // (shiny trinket) + obj.createentity(game, 240, 136, 10, 0, 443490); // (savepoint) + roomname = "Prize for the Reckless"; + if(game.nodeathmode) + { + roomname = "I Can't Believe You Got This Far"; + } + else if (game.intimetrial) + { + roomname = "Imagine Spikes There, if You Like"; + } + break; + + case rn(48,43): + + tmap.push_back("89,89,211,695,695,695,695,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,211,695,695,695,695,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,211,695,695,695,695,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,91,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,0,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,0,0,0,815,695,695,695,695,695,695,209,89,89"); + tmap.push_back("89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,815,695,695,695,695,695,695,249,250,250"); + tmap.push_back("89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,815,695,695,695,695,695,695,695,695,695"); + tmap.push_back("89,89,211,0,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,815,695,695,695,695,695,695,695,695,695"); + tmap.push_back("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856"); + tmap.push_back("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + + obj.createentity(game, 152, 32, 10, 1, 443480); // (savepoint) + obj.createentity(game, 152, 184, 10, 0, 443481); // (savepoint) + obj.createentity(game, 272, 120, 1, 2, 8); // Enemy + obj.createentity(game, 32, 96, 1, 3, 8); // Enemy + obj.createentity(game, 104, 80, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 168, 80, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 232, 80, 2, 8, 4); //Threadmill, >>> + obj.createentity(game, 56, 144, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 120, 144, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 184, 144, 2, 8, 4); //Threadmill, >>> + roomname = "A Deception"; + break; + + case rn(48,42): + + tmap.push_back("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("310,310,310,310,310,310,310,310,311,471,471,471,471,471,471,312,310,310,310,310,311,471,471,471,471,471,471,312,310,310,310,310,310,310,310,310,310,310,310,310"); + tmap.push_back("310,310,310,310,310,310,310,310,432,9,9,9,9,9,9,430,310,310,310,310,432,9,9,9,9,9,9,430,310,310,310,310,311,471,471,471,471,471,471,471"); + tmap.push_back("310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,310,310,432,774,0,0,0,0,0,430,311,471,471,471,472,0,0,0,0,0,0,430,311,471,471,471,472,0,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,310,310,432,814,0,0,0,0,0,430,432,9,9,9,9,0,0,0,0,0,0,430,432,9,9,9,9,0,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,311,471,472,814,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,470,472,0,0,0,0,0,0,0,0,0,0,470,472,0,0,0,0,0,0,0,0,390,391,391"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,431,9,0,0,0,0,0,0,0,0,0,0,431,9,0,0,0,0,0,0,0,0,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,9,0,0,772,773,773,773,773,773,773,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,431,8,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,311,471,471,471,472,692,692,814,0,0,0,0,0,0,0,0,0,0,0,390,392,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,812,692,692,692,692,390,391,352,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,8,8,8,8,0,0,0,0,0,0,430,432,8,8,8,8,0,0,0,812,692,692,692,692,430,310,310,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,390,391,391,392,0,0,0,0,0,0,430,351,391,391,391,392,0,0,0,852,853,853,853,853,430,310,310,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,430,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,430,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,0,0,430,310,310,310,310"); + tmap.push_back("310,310,432,692,692,692,692,390,391,391,391,352,310,310,432,8,8,8,8,8,8,430,310,310,310,310,432,8,8,8,8,8,8,8,8,430,310,310,310,310"); + tmap.push_back("310,310,432,692,692,692,692,430,310,310,310,310,310,310,351,391,391,391,391,391,391,352,310,310,310,310,351,391,391,391,391,391,391,391,391,352,310,310,310,310"); + tmap.push_back("310,310,432,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + + obj.platformtile = 239; + obj.createentity(game, 88, 112, 2, 0, 4, 88, 64, 264, 168); // Platform, bounded + obj.createentity(game, 136, 112, 2, 1, 4, 88, 64, 264, 168); // Platform, bounded + obj.createentity(game, 184, 112, 2, 0, 4, 88, 64, 264, 168); // Platform, bounded + obj.createentity(game, 232, 112, 2, 1, 4, 88, 64, 264, 168); // Platform, bounded + obj.createentity(game, 56, 64, 10, 0, 442480); // (savepoint) + obj.createentity(game, 280, 152, 10, 1, 442481); // (savepoint) + + roomname = "Down Under"; + break; + + case rn(49,42): + + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("0,0,0,858,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,377,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,296,456,456,456,456,456,456,457,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,295,295,295,295,295,295,295,295,417,9,9,9,9,9,9,9,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,296,456,456,456,456,456,456,456,457,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,858,859,859,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,0,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,778,779,779,779,779,779,415,295,295,295,295,295,417,779,779,779,780,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,415,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,376,376,376,337,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,8,8,8,8,8,8,8,415,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,0,0,0,0,375,376,376,376,376,376,376,337,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,779,779,779,779,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); + tmap.push_back("295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); + + obj.createentity(game, 16, 104, 2, 10, 4); //Big Threadmill, >>>>>> + obj.createentity(game, 104, 184, 2, 11, 4); //Big Threadmill, <<<<<< + obj.createentity(game, 144, 168, 10, 1, 442490); // (savepoint) + obj.createentity(game, 24, 112, 10, 0, 442491); // (savepoint) + roomname = "Shenanigan"; + break; + + case rn(49,41): + + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + tmap.push_back("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,609,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,609,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,609,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,849,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,609,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,609,489,489,489,489,489"); + tmap.push_back("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0,769,770,770,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + tmap.push_back("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + + obj.createentity(game, 192, 88, 10, 0, 441490); // (savepoint) + + if(!game.intimetrial) + { + if(game.companion==0 && obj.flags[10]==0 && !game.crewstats[2]) //also need to check if he's rescued in a previous game + { + obj.createentity(game, 42, 86, 16, 0); + obj.createblock(1, 0, 0, 140, 240, 34); + } + } + roomname = "Frown Upside Down"; + break; + + case rn(48,41): + + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,299,459,459,459,459,459,459,459,300,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,299,459,460,683,683,683,683,683,683,683,458,459,300,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,299,460,683,683,683,683,683,683,683,683,683,683,683,458,300,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,458,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8"); + tmap.push_back("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,378,379,379,380,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,378,379,379"); + tmap.push_back("298,298,298,339,380,683,683,683,683,683,683,683,683,683,683,683,378,340,298,298,420,0,0,0,0,0,0,0,0,0,0,8,8,8,378,379,379,340,298,298"); + tmap.push_back("298,298,298,298,339,379,380,683,683,683,683,683,683,683,378,379,340,298,298,298,420,0,0,0,0,0,0,0,8,8,8,378,379,379,340,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,339,379,379,379,379,379,379,379,340,298,298,298,298,298,420,0,0,0,0,8,8,8,378,379,379,340,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,420,8,8,8,8,378,379,379,340,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,339,379,379,379,379,340,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + tmap.push_back("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + + obj.createentity(game, (5 * 8) - 4, (8 * 8) + 4, 14); //Teleporter! + + if(game.intimetrial) + { + obj.createblock(1, 280, 0, 32, 240, 82); + } + roomname = "Energize"; + break; + + case rn(53,42): + + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,9,9,9,9,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); + tmap.push_back("0,0,0,858,859,859,859,859,859,859,859,859,859,859,859,860,0,0,0,0,0,0,0,0,858,859,859,859,859,859,859,859,859,859,859,859,860,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); + tmap.push_back("373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + + obj.createentity(game, 40, 24, 10, 0, 442530); // (savepoint) + obj.createentity(game, 264, 24, 10, 0, 442531); // (savepoint) + + roomname = "Driller"; + break; + + case rn(54,42): + + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253,253,253,94,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,9,9,9,9,9,9,9,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,174,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,8,8,8,8,0,0,0,0,8,8,8,8,212,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("8,8,8,8,8,8,8,8,8,8,8,8,8,212,92,133,173,173,173,174,0,0,0,0,172,173,173,173,134,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("173,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,254,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,172,173,134,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + + obj.createentity(game, 128, 80, 3, 867); //Disappearing Platform + obj.createentity(game, 160, 80, 3, 867); //Disappearing Platform + obj.createentity(game, 192, 80, 3, 867); //Disappearing Platform + obj.createentity(game, 128, 88, 3, 867); //Disappearing Platform + obj.createentity(game, 160, 88, 3, 867); //Disappearing Platform + obj.createentity(game, 192, 88, 3, 867); //Disappearing Platform + obj.createentity(game, 128, 96, 3, 867); //Disappearing Platform + obj.createentity(game, 128, 104, 3, 867); //Disappearing Platform + obj.createentity(game, 128, 112, 3, 867); //Disappearing Platform + obj.createentity(game, 128, 120, 3, 867); //Disappearing Platform + obj.createentity(game, 160, 96, 3, 867); //Disappearing Platform + obj.createentity(game, 160, 104, 3, 867); //Disappearing Platform + obj.createentity(game, 160, 112, 3, 867); //Disappearing Platform + obj.createentity(game, 160, 120, 3, 867); //Disappearing Platform + obj.createentity(game, 192, 96, 3, 867); //Disappearing Platform + obj.createentity(game, 192, 104, 3, 867); //Disappearing Platform + obj.createentity(game, 192, 112, 3, 867); //Disappearing Platform + obj.createentity(game, 192, 120, 3, 867); //Disappearing Platform + + if(!game.nocutscenes) + { + if(obj.flags[68]==0) + { + obj.createblock(1, 32, 0, 320, 240, 17); + obj.flags[68] = 1; + } + } + roomname = "Quicksand"; + break; + + case rn(52,42): + + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,769,770,770,770,770,770,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + + obj.createentity(game, 144, 40, 3); //Disappearing Platform + obj.createentity(game, 200, 128, 3); //Disappearing Platform + roomname = "Boo! Think Fast!"; + break; + + case rn(50,42): + + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,615,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,615,495,617,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,615,495,617,680,680,681,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,655,656,657,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,7,7,7,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,536,576,576,576,576,576,576,576,576,577,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,496,656,656,656,656,656,656,656,656,657,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,6,6,6,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576"); + tmap.push_back("495,495,495,495,495,617,680,680,680,680,680,680,575,576,577,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,841,841,841,841,841,841,615,495,617,841,841,842,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,615,495,617,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,617,0,0,0,0,0,0,615,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495"); + + obj.createentity(game, 288, 160, 10, 1, 442500); // (savepoint) + + + obj.createentity(game, 135, 75, 2, 0, 3, 100, 70, 320, 160); + obj.createentity(game, 185, 110, 2, 0, 3, 100, 70, 320, 160); + obj.createentity(game, 235, 145, 2, 0, 3, 100, 70, 320, 160); + roomname = "Stop and Reflect"; + break; + + case rn(51,42): + + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,87,247,247,247,247,247,247,247,247,247,88,87,247,247,247,247,247,247,247,88,87,247,247,247,247,247,247,247,247,247,88,86,86"); + tmap.push_back("86,86,86,86,86,86,86,208,9,9,9,9,9,9,9,9,9,206,208,9,9,9,9,9,9,9,206,208,9,9,9,9,9,9,9,9,9,206,86,86"); + tmap.push_back("86,86,86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("247,247,247,247,247,247,88,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,0,0,0,166,168,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("0,0,0,0,778,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,206,86,86"); + tmap.push_back("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); + tmap.push_back("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); + tmap.push_back("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); + tmap.push_back("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); + tmap.push_back("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); + tmap.push_back("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); + tmap.push_back("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); + tmap.push_back("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); + tmap.push_back("167,167,167,167,167,167,167,167,167,167,167,167,168,698,698,698,166,167,167,167,168,698,698,698,166,167,167,167,168,698,698,698,166,167,167,167,167,128,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,127,167,167,167,128,86,86,86,127,167,167,167,128,86,86,86,127,167,167,167,128,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + + obj.platformtile = 207; + obj.createentity(game, 112-4, 200-4, 1, 1, 6, 104, 144, 264, 240); // Enemy, bounded + obj.createentity(game, 176-4, 152, 1, 0, 6, 104, 144, 264, 240); // Enemy, bounded + obj.createentity(game, 240-4, 200-4, 1, 1, 6, 104, 144, 264, 240); // Enemy, bounded + obj.createentity(game, 64, 48, 2, 3, 4); // Platform + obj.createentity(game, 272, 152, 9, 1); // (shiny trinket) + + if(!game.nocutscenes) + { + obj.createblock(1, 16, 0, 320, 240, 47); + } + + roomname = "Trench Warfare"; + break; + + case rn(50,41): + + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,212,92,93,253,253,253,94,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,94,92,92,92"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,212,92,214,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,212,92,214,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,212,92,214,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,252,253,254,0,0,0,252,253,253,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,252,253,253,94"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,763,764,764,764,764,764,764,764,764,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,174,0,0,0,172,173,173,173,173,174,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92,92,214,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,92,92,92,212,92,92,92,92,214,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92,92,214,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,252,253,253,253,253,254,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,725,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212"); + tmap.push_back("92,92,92,92,92,214,683,683,683,683,683,683,172,173,174,683,683,683,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,134"); + tmap.push_back("92,92,92,92,92,214,683,683,683,683,683,683,212,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,214,683,683,683,683,683,683,212,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,214,683,683,683,683,683,683,212,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("92,92,92,92,92,214,683,683,683,683,683,683,212,92,133,173,173,173,134,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + + obj.createentity(game, 120+2, 8, 1, 0, 3); // Enemy + obj.createentity(game, 264+2, 8, 1, 0, 3); // Enemy + obj.createentity(game, 120+2, 208-4, 1, 1, 3); // Enemy + obj.createentity(game, 192+2, 176-4, 1, 1, 3); // Enemy + obj.createentity(game, 192+2, 40, 1, 0, 3); // Enemy + + obj.createentity(game, 64, 80, 10, 1, 441501); // (savepoint) + obj.createentity(game, 64, 136, 10, 0, 441502); // (savepoint) + + roomname = "The Yes Men"; + break; + + case rn(50,40): + + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,444,444,285,283,284,444,444,444,444,444,444,444,444,444,444,444"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,403,283,405,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,364,364,364,364,364"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,365,8,8,8,8,363,364,364,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,325,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,403,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,444,444,444,444,444,444"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,363,364,365,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,363,364,364,364,364,364,364,364,364"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,403,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283,283,283"); + tmap.push_back("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + + obj.platformtile = 10; + obj.createentity(game, 136-32, 64, 3, 10); //Disappearing Platform + obj.createentity(game, 136, 64, 3, 10); //Disappearing Platform + obj.createentity(game, 136+32, 64, 3, 10); //Disappearing Platform + obj.createentity(game, 56, 104, 10, 1, 440500); // (savepoint) + obj.createentity(game, 56, 152, 2, 3, 3); // Platform + obj.createentity(game, 280, 192, 10, 1, 440501); // (savepoint) + + roomname = "Gantry and Dolly"; + break; + + case rn(51,40): + + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("656,656,656,656,656,656,656,657,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,575,576,576,576,537,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,655,656,656,656,497,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("576,577,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,536,576,577,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,536,576,577,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,536,576,577,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,496,656,656,656,656,656,656,656,656,656,497,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,617,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,617,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,615,495,495,495,495"); + tmap.push_back("656,656,656,657,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,615,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,615,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,615,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,575,576,577,680,680,680,655,656,657,680,680,680,575,576,576,576,576,577,680,680,680,655,656,657,680,680,680,680,615,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,615,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,615,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("576,576,576,576,576,576,576,537,495,617,680,680,680,680,680,680,680,680,680,615,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,615,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); + tmap.push_back("495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,537,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495"); + + obj.createentity(game, 88, 104, 21, 1); // (savepoint) + obj.createentity(game, 112, 104, 21, 1, 440511); // (savepoint) + obj.createentity(game, 136, 88, 1, 0, 0); // Enemy //the radar dish + //obj.createentity(game, 176, 104, 10, 1, 440512); // (savepoint) + obj.createentity(game, 200, 104, 21, 1); // (savepoint) + obj.createentity(game, 224, 104, 21, 1); // (savepoint) + obj.createentity(game, 256, 32, 1, 0, 0); // Enemy //in this case, the transmitter + + if(!game.intimetrial) + { + obj.createblock(1, 120, 0, 320, 240, 31); + } + + roomname = "Comms Relay"; + break; + + case rn(50,39): + + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,372,373,374,698,698,698,698,372,373,373,373,374,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,412,292,414,698,698,698,698,412,292,292,292,414,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,412,292,414,698,698,698,698,412,292,292,292,414,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,452,453,454,698,698,698,698,412,292,292,292,414,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,412,292,292,292,414,698,698,698,698,698,698,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,859,859,859,859,859,859,859,859,859,859,412,292,292,292,414,859,859,859,859,859,859,412"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,452"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,333,373,373,373,373,373,374,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,454,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292,333,373,373,373,373,373,373,373"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + tmap.push_back("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + + obj.createentity(game, 200, 32, 1, 0, 8); // Enemy + obj.createentity(game, 168, 104, 10, 1, 439500); // (savepoint) + + roomname = "Security Sweep"; + break; + + case rn(51,39): + + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,96,256,256,256,256,256,256,256,256,256,97,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,217,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,217,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,217,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("95,95,217,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,256,256,256,256,256,256"); + tmap.push_back("95,95,217,0,0,0,175,176,177,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0"); + tmap.push_back("95,95,217,0,0,0,215,95,217,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0"); + tmap.push_back("95,95,217,0,0,0,215,95,217,770,771,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0"); + tmap.push_back("95,95,217,0,0,0,215,95,217,689,811,0,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,97,95,217,0,0,0,0,0,0"); + tmap.push_back("95,95,217,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); + tmap.push_back("95,95,217,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); + tmap.push_back("95,95,217,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); + tmap.push_back("256,256,257,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,175,176,176"); + tmap.push_back("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,215,95,95"); + tmap.push_back("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,215,95,95"); + tmap.push_back("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,215,95,95"); + tmap.push_back("0,0,0,0,0,0,215,95,136,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,809,689,215,95,217,0,0,0,215,95,95"); + tmap.push_back("0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,849,850,215,95,217,0,0,0,215,95,95"); + tmap.push_back("0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,215,95,217,0,0,0,215,95,95"); + tmap.push_back("0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,255,256,257,0,0,0,215,95,95"); + tmap.push_back("176,176,176,176,176,176,137,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,215,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,215,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,215,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,215,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,136,176,176,176,176,176,176,176,176,176,137,95,95"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + + obj.createentity(game, 24, 168, 10, 1, 439510); // (savepoint) + obj.createentity(game, 280, 48, 10, 0, 439511); // (savepoint) + obj.createentity(game, 80, 88, 1, 3, 3); // Enemy + obj.createentity(game, 224 - 16, 128, 1, 2, 3); // Enemy + + obj.createentity(game, 256-4, 200, 20, 1); // (terminal) + obj.createblock(5, 256-8, 200, 20, 16, 6); + roomname = "Linear Collider"; + break; + + case rn(52,39): + + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,411,7,7,7,7,7,7,7,7,7,7,7,7,7,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + tmap.push_back("450,450,450,450,450,450,450,291,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,681,841,841,841,841,841,841,682,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,369,370,371,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,409,289,411,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,409,289,411,0,0,0,0,0,0,0"); + tmap.push_back("370,370,371,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,409,289,330,370,370,370,370,370,370,370"); + tmap.push_back("289,289,411,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,411,0,0,0,0,449,450,451,680,680,680,680,680,680,721,761,761,761,761,761,761,722,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,411,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,411,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,411,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,411,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,330,370,370,370,370,370,370,370,370,370,370,370,370,370,371,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,6,6,6,6,6,6,6,6,6,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,330,370,370,370,370,370,370,370,370,371,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,841,841,841,841,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289,289,289,289,289,289,289"); + tmap.push_back("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289,289,289,289,289,289,289"); + + obj.createentity(game, 192, 48, 10, 0, 439520); // (savepoint) + obj.createentity(game, 112, 160, 10, 1, 439521); // (savepoint) + roomname = "Atmospheric Filtering Unit"; + break; + + case rn(53,39): + + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + tmap.push_back("644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,695,695,695,695,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("564,564,564,564,565,0,0,815,695,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,695,695,695,695,563,564,565,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,483,483,605,0,0,815,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,605,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,483,483,605,0,0,815,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,605,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,483,483,605,0,0,815,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,605,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,483,483,605,0,0,815,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,605,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,483,483,524,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,525,483,605,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483"); + tmap.push_back("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483"); + + roomname = "Traffic Jam"; + + obj.createentity(game, 45, 118, 1, 1, 4); + obj.createentity(game, 205, 118, 1, 1, 4); + obj.createentity(game, 125, 18, 1, 0, 4); + + obj.createentity(game, 232, 184, 10, 0, 1); + break; + + case rn(53,40): + + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,772,773,773,773,773,773,773,773,773,773,773,773,773,773,773,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,852,853,853,853,853,694,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,773,773,773,773,773,773,774,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + tmap.push_back("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); + roomname = "Leap of Faith"; + break; + + case rn(53,41): + + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,846,847,847,847,847,847,847,847,847,847,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("286,286,327,367,367,367,367,367,367,367,367,367,367,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("447,447,447,447,447,447,447,447,288,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,406,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,406,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,446,447,447,447,447,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); + tmap.push_back("367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push_back("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + + obj.createentity(game, 152, 168, 10, 1, 441530); // (savepoint) + + if(!game.nocutscenes) + { + obj.createblock(1, 72, 0, 320, 240, 30); + } + + roomname = "Solitude"; + break; + + case rn(52,41): + + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); + tmap.push_back("164,164,164,164,164,164,164,164,164,164,164,164,165,680,680,680,680,680,680,680,680,680,680,680,680,680,680,163,164,164,164,164,164,164,164,164,164,164,164,164"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,205,6,6,6,6,6,6,6,6,6,6,6,6,6,6,203,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,124,164,164,164,164,164,164,164,164,164,164,164,164,164,164,125,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + + roomname = "Conundrum"; + + if(!game.nocutscenes) + { + obj.createblock(1, 10, 0, 60, 240, 22); + obj.createblock(1, 280, 0, 320, 240, 21); + } + break; + + case rn(51,41): + + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("87,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,88,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,699,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,700,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,820,0,778,779,779,779,779,779,779,779,779,779,779,779,779,780,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,820,0,818,699,859,859,859,859,859,859,859,859,859,859,700,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,820,0,818,820,0,0,0,0,0,0,0,0,0,0,818,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,820,0,818,820,0,778,779,779,779,779,779,779,780,0,818,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,820,0,818,820,0,818,699,859,859,859,859,700,820,0,818,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,820,0,818,820,0,818,820,0,0,0,0,818,820,0,818,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("208,698,820,0,818,820,0,818,820,0,778,780,0,818,820,0,818,820,0,818,820,0,818,820,0,818,246,247,247,247,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("208,698,820,0,818,820,0,818,820,0,858,860,0,818,820,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,820,0,818,820,0,818,820,0,0,0,0,818,820,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,820,0,818,820,0,818,739,779,779,779,779,740,820,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,820,0,818,820,0,858,859,859,859,859,859,859,860,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,820,0,818,820,0,0,0,0,0,0,0,0,0,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,820,0,818,739,779,779,779,779,779,779,779,779,779,779,740,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,820,0,858,859,859,859,859,859,859,859,859,859,859,859,859,860,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,739,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,740,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("208,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); + tmap.push_back("127,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + + roomname = "Welcome Aboard"; + break; + + case rn(52,40): + + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,90,250,250,250,250,250,250,250,91,89,89,89,90,250,250,250,251,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,90,251,9,9,9,9,9,9,9,249,250,250,250,251,9,9,9,9,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,90,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,90,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("90,250,250,250,250,250,251,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("211,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("211,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("211,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("211,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("211,0,0,0,0,0,0,0,0,0,169,170,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); + tmap.push_back("130,170,170,170,171,8,8,8,8,8,209,89,89,89,211,8,8,8,8,8,8,8,8,169,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,130,170,170,170,170,170,131,89,89,89,130,170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + + obj.createentity(game, 216, 144, 10, 1, 440520); // (savepoint) + obj.createentity(game, 16, 136, 9, 0); // (shiny trinket) + + roomname = "It's a Secret to Nobody"; + break; + + + + default: + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + roomname = "Outer Space"; + obj.fatal_bottom(); + break; + #endif + } + + return tmap; +} diff --git a/desktop_version/src/Spacestation2.h b/desktop_version/src/Spacestation2.h new file mode 100644 index 00000000..a4498a7c --- /dev/null +++ b/desktop_version/src/Spacestation2.h @@ -0,0 +1,17 @@ +#ifndef SPACESTATION2_H +#define SPACESTATION2_H + +#include "Game.h" +#include "Entity.h" + +#include +#include + +class spacestation2class +{ +public: + std::vector loadlevel(int rx, int ry, Game& game, entityclass& obj); + std::string roomname; +}; + +#endif /* SPACESTATION2_H */ diff --git a/desktop_version/src/SteamNetwork.c b/desktop_version/src/SteamNetwork.c new file mode 100644 index 00000000..c0adcc24 --- /dev/null +++ b/desktop_version/src/SteamNetwork.c @@ -0,0 +1,219 @@ +#include "Network.h" + +#include +#include +#include + +/* Steamworks interface versions */ + +#define VVVVVV_STEAMCLIENT "SteamClient017" +#define VVVVVV_STEAMUSERSTATS "STEAMUSERSTATS_INTERFACE_VERSION011" + +/* Shared object file name */ + +#if defined(_WIN32) +#define NETWORK_LIBRARY "steam_api.dll" +#elif defined(__APPLE__) +#define NETWORK_LIBRARY "libsteam_api.dylib" +#elif defined(__linux__) +#define NETWORK_LIBRARY "libsteam_api.so" +#else +#error NETWORK_LIBRARY: Unrecognized platform! +#endif + +/* Function Pointer Types */ + +typedef uint8_t (*SteamAPI_InitFunc)(); +typedef void (*SteamAPI_ShutdownFunc)(); +typedef void (*SteamAPI_RunCallbacksFunc)(); +typedef intptr_t (*SteamInternal_CreateInterfaceFunc)(const char*); +typedef int32_t (*SteamAPI_GetHSteamUserFunc)(); +typedef int32_t (*SteamAPI_GetHSteamPipeFunc)(); +typedef intptr_t (*SteamAPI_ISteamClient_GetISteamUserStatsFunc)( + intptr_t, + int32_t, + int32_t, + const char* +); +typedef uint8_t (*SteamAPI_ISteamUserStats_RequestCurrentStatsFunc)(intptr_t); +typedef uint8_t (*SteamAPI_ISteamUserStats_StoreStatsFunc)(intptr_t); +typedef uint8_t (*SteamAPI_ISteamUserStats_GetStatFunc)( + intptr_t, + const char*, + int32_t* +); +typedef uint8_t (*SteamAPI_ISteamUserStats_SetStatFunc)( + intptr_t, + const char*, + int32_t +); +typedef uint8_t (*SteamAPI_ISteamUserStats_SetAchievementFunc)( + intptr_t, + const char* +); + +/* DLL, Entry Points */ + +static void *libHandle = NULL; +static intptr_t steamUserStats = (intptr_t) NULL; + +#define DEFINE_FUNC(name) static name##Func name = NULL; +DEFINE_FUNC(SteamAPI_Init) +DEFINE_FUNC(SteamAPI_Shutdown) +DEFINE_FUNC(SteamAPI_RunCallbacks) +DEFINE_FUNC(SteamInternal_CreateInterface) +DEFINE_FUNC(SteamAPI_GetHSteamUser) +DEFINE_FUNC(SteamAPI_GetHSteamPipe) +DEFINE_FUNC(SteamAPI_ISteamClient_GetISteamUserStats) +DEFINE_FUNC(SteamAPI_ISteamUserStats_RequestCurrentStats) +DEFINE_FUNC(SteamAPI_ISteamUserStats_StoreStats) +DEFINE_FUNC(SteamAPI_ISteamUserStats_GetStat) +DEFINE_FUNC(SteamAPI_ISteamUserStats_SetStat) +DEFINE_FUNC(SteamAPI_ISteamUserStats_SetAchievement) +#undef DEFINE_FUNC + +/* Clean up after ourselves... */ + +static void ClearPointers() +{ + SDL_UnloadObject(libHandle); + libHandle = NULL; + steamUserStats = (intptr_t) NULL; + SteamAPI_Init = NULL; + SteamAPI_Shutdown = NULL; + SteamAPI_RunCallbacks = NULL; + SteamInternal_CreateInterface = NULL; + SteamAPI_GetHSteamUser = NULL; + SteamAPI_GetHSteamPipe = NULL; + SteamAPI_ISteamClient_GetISteamUserStats = NULL; + SteamAPI_ISteamUserStats_RequestCurrentStats = NULL; + SteamAPI_ISteamUserStats_StoreStats = NULL; + SteamAPI_ISteamUserStats_GetStat = NULL; + SteamAPI_ISteamUserStats_SetStat = NULL; + SteamAPI_ISteamUserStats_SetAchievement = NULL; +} + +/* NETWORK API Implementation */ + +int NETWORK_init() +{ + intptr_t steamClient; + int32_t steamUser, steamPipe; + + libHandle = SDL_LoadObject(NETWORK_LIBRARY); + if (!libHandle) + { + printf("%s not found!\n", NETWORK_LIBRARY); + return 0; + } + + #define LOAD_FUNC(name) \ + name = (name##Func) SDL_LoadFunction(libHandle, #name); \ + if (!name) \ + { \ + printf("%s symbol %s not found!\n", NETWORK_LIBRARY, #name); \ + ClearPointers(); \ + return 0; \ + } + LOAD_FUNC(SteamAPI_Init) + LOAD_FUNC(SteamAPI_Shutdown) + LOAD_FUNC(SteamAPI_RunCallbacks) + LOAD_FUNC(SteamInternal_CreateInterface) + LOAD_FUNC(SteamAPI_GetHSteamUser) + LOAD_FUNC(SteamAPI_GetHSteamPipe) + LOAD_FUNC(SteamAPI_ISteamClient_GetISteamUserStats) + LOAD_FUNC(SteamAPI_ISteamUserStats_RequestCurrentStats) + LOAD_FUNC(SteamAPI_ISteamUserStats_StoreStats) + LOAD_FUNC(SteamAPI_ISteamUserStats_GetStat) + LOAD_FUNC(SteamAPI_ISteamUserStats_SetStat) + LOAD_FUNC(SteamAPI_ISteamUserStats_SetAchievement) + #undef LOAD_FUNC + + if (!SteamAPI_Init()) + { + printf("Steamworks not initialized!\n"); + ClearPointers(); + return 0; + } + steamClient = SteamInternal_CreateInterface(VVVVVV_STEAMCLIENT); + steamUser = SteamAPI_GetHSteamUser(); + steamPipe = SteamAPI_GetHSteamPipe(); + if (!steamClient || !steamUser || !steamPipe) + { + SteamAPI_Shutdown(); + printf(VVVVVV_STEAMCLIENT " not created!\n"); + ClearPointers(); + return 0; + } + steamUserStats = SteamAPI_ISteamClient_GetISteamUserStats( + steamClient, + steamUser, + steamPipe, + VVVVVV_STEAMUSERSTATS + ); + if (!steamUserStats) + { + SteamAPI_Shutdown(); + printf(VVVVVV_STEAMUSERSTATS " not created!\n"); + ClearPointers(); + return 0; + } + SteamAPI_ISteamUserStats_RequestCurrentStats(steamUserStats); + return 1; +} + +void NETWORK_shutdown() +{ + if (libHandle) + { + SteamAPI_Shutdown(); + ClearPointers(); + } +} + +void NETWORK_update() +{ + if (libHandle) + { + SteamAPI_RunCallbacks(); + } +} + +void NETWORK_unlockAchievement(const char *name) +{ + if (libHandle) + { + SteamAPI_ISteamUserStats_SetAchievement( + steamUserStats, + name + ); + SteamAPI_ISteamUserStats_StoreStats(steamUserStats); + } +} + +int32_t NETWORK_getAchievementProgress(const char *name) +{ + int32_t result = -1; + if (libHandle) + { + SteamAPI_ISteamUserStats_GetStat( + steamUserStats, + name, + &result + ); + } + return result; +} + +void NETWORK_setAchievementProgress(const char *name, int32_t stat) +{ + if (libHandle) + { + SteamAPI_ISteamUserStats_SetStat( + steamUserStats, + name, + stat + ); + SteamAPI_ISteamUserStats_StoreStats(steamUserStats); + } +} diff --git a/desktop_version/src/TerminalScripts.cpp b/desktop_version/src/TerminalScripts.cpp new file mode 100644 index 00000000..2ce78d2a --- /dev/null +++ b/desktop_version/src/TerminalScripts.cpp @@ -0,0 +1,903 @@ +#ifndef TERMINALSCRIPTS_H +#define TERMINALSCRIPTS_H + +#include "Script.h" + +void scriptclass::loadother(std::string t) +{ + //loads script name t into the array + if (t == "terminal_station_1") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= PERSONAL LOG =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,120,6)"); + add(" Almost everyone has been "); + add(" evacuated from the space "); + add(" station now. The rest of us "); + add(" are leaving in a couple of "); + add(" days, once our research has "); + add(" been completed. "); + add("position(center)"); + add("speak"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "alreadyvisited") + { + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("...oh, I've already found this."); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_outside_1") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,5)"); + add(" ... our first breakthrough was "); + add(" the creation of the inversion "); + add(" plane, which creates a "); + add(" mirrored dimension beyond a "); + add(" given event horizon ... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("ifexplored(2,16,alreadyvisited)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showcoordinates(2,16)"); + add("delay(10)"); + add("hidecoordinates(2,16)"); + add("delay(10)"); + add("showcoordinates(2,16)"); + add("delay(10)"); + add("hidecoordinates(2,16)"); + add("delay(10)"); + add("showcoordinates(2,16)"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_outside_2") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,3)"); + add("...with just a small modification to"); + add("the usual parameters, we were able "); + add("to stabilise an infinite tunnel! "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("ifexplored(8,9,alreadyvisited)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showcoordinates(8,9)"); + add("delay(10)"); + add("hidecoordinates(8,9)"); + add("delay(10)"); + add("showcoordinates(8,9)"); + add("delay(10)"); + add("hidecoordinates(8,9)"); + add("delay(10)"); + add("showcoordinates(8,9)"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_outside_3") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,3)"); + add(" ... the final step in creating "); + add(" the dimensional stabiliser was "); + add(" to create a feedback loop ... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("ifexplored(14,1,alreadyvisited)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showcoordinates(14,1)"); + add("delay(10)"); + add("hidecoordinates(14,1)"); + add("delay(10)"); + add("showcoordinates(14,1)"); + add("delay(10)"); + add("hidecoordinates(14,1)"); + add("delay(10)"); + add("showcoordinates(14,1)"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_outside_4") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,4)"); + add(" ...despite our best efforts, "); + add(" the dimensional stabiliser "); + add(" won't hold out forever. Its "); + add(" collapse is inevitable... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("Huh? These coordinates aren't"); + add("even in this dimension!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_outside_5") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Personal Log =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,5)"); + add(" ... I've had to seal off "); + add(" access to most of our "); + add(" research. Who knows what "); + add(" could happen if it fell "); + add(" into the wrong hands? ... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showsecretlab()"); + add("delay(10)"); + add("hidesecretlab()"); + add("delay(10)"); + add("showsecretlab()"); + add("delay(10)"); + add("hidesecretlab()"); + add("delay(10)"); + add("showsecretlab()"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_outside_6") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,3)"); + add("... access to the control center"); + add("is still possible through the "); + add("main atmospheric filters ... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("ifexplored(12,14,alreadyvisited)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showcoordinates(12,14)"); + add("delay(10)"); + add("hidecoordinates(12,14)"); + add("delay(10)"); + add("showcoordinates(12,14)"); + add("delay(10)"); + add("hidecoordinates(12,14)"); + add("delay(10)"); + add("showcoordinates(12,14)"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_finallevel") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,9)"); + add("* DIMENSIONAL STABILITY GENERATOR *"); + add(""); + add(" [ Currently Generating ] "); + add(" Maximum Stability "); + add(""); + add(" [ Status ]"); + add(" Online"); + add(""); + add("READY _"); + add("position(center)"); + add("speak_active"); + + add("endtextfast"); + add("delay(10)"); + + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("Aha! This must be what's" ); + add("causing the interference!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("I wonder if I can turn it off?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add("WARNING: Disabling the Dimensional"); + add("Stability Generator may lead to"); + add("instability! Are you sure you want"); + add("to do this?"); + add("position(center)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("Yes!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,6)"); + add("Seriously! The whole dimension"); + add("could collapse! Just think about"); + add("this for a minute!"); + add(""); + add("Are you really sure you want"); + add("to do this?"); + add("position(center)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("Yes!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("stopmusic"); + add("gamestate(200)"); + } + else if (t == "finalterminal_finish") + { + + + //add("delay(15)"); add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + + add("text(gray,0,114,3)"); + add(" -= WARNING =- "); + add(""); + add(" DIMENSIONAL STABILISER OFFLINE "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(cyan,0,0,1)"); + add("Uh oh..."); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("play(2)"); + add("changemood(player,0)"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_station_2") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,3)"); + add(" ...everything collapses, "); + add(" eventually. It's the way "); + add(" of the universe. "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_station_3") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add("I wonder if the generator we set"); + add("up in the polar dimension is"); + add("what's affecting our teleporters?"); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,1)"); + add("No, it's probably just a glitch."); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_station_4") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= PERSONAL LOG =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,2)"); + add(" Hah! Nobody will ever "); + add(" get this one. "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_warp_1") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add("...The other day I was chased"); + add("down a hallway by a giant cube"); + add("with the word AVOID on it."); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,1)"); + add("These security measures go too far!"); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_warp_2") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,2)"); + add("The only way into my private lab"); + add("anymore is by teleporter."); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add("I've made sure that it's"); + add("difficult for unauthorised"); + add("personnel to gain access."); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_lab_1") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add("... it turns out the key to"); + add("stabilising this dimension was"); + add("to create a balancing force"); + add("outside of it!"); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,2)"); + add("Though it looks like that's just"); + add("a temporary solution, at best."); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add("I've been working on"); + add("something more permanent,"); + add("but it seems it's going"); + add("to be too late..."); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_lab_2") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,1)"); + add("?SYNTAX ERROR"); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_secretlab") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" -= WARNING =-"); + add(""); + add(" The Super-Gravitron is intended "); + add(" for entertainment purposes only. "); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add("Anyone found using the Super"); + add("Gravitron for educational"); + add("purposes may be asked to"); + add("stand in the naughty corner."); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_shipcomputer") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add(" -= D.S.S. SOULEYE =- "); + add(""); + add(" Ship Navigation Controls "); + add("position(center)"); + add("speak_active"); + + add("ifflag(67,terminal_letsgo)"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add("Error! Error! Cannot isolate"); + add("dimensional coordinates!"); + add("Interference detected!"); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_letsgo") + { + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Now that the ship is fixed,"); + add("we can leave anytime we want!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,3)"); + add("We've all agreed to"); + add("keep exploring this"); + add("dimension, though."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Who knows what we'll find?"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_radio") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" -= SHIP RADIO =- "); + add(""); + add(" [ Status ]"); + add(" Broadcasting"); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukebox") + { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,7)"); + add(" -= JUKEBOX =- "); + add(""); + add(" Songs will continue to play "); + add(" until you leave the ship."); + add(""); + add(" Collect trinkets to"); + add(" unlock new songs!"); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("iftrinketsless(5,terminal_jukeunlock1)"); + add("iftrinketsless(8,terminal_jukeunlock2)"); + add("iftrinketsless(10,terminal_jukeunlock3)"); + add("iftrinketsless(12,terminal_jukeunlock4)"); + add("iftrinketsless(14,terminal_jukeunlock41)"); + add("iftrinketsless(16,terminal_jukeunlock5)"); + add("iftrinketsless(18,terminal_jukeunlock6)"); + add("iftrinketsless(20,terminal_jukeunlock7)"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukeunlock1") + { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 5 Trinkets"); + add(""); + add(" Pushing onwards "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukeunlock2") + { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 8 Trinkets"); + add(""); + add(" Positive force "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukeunlock3") + { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 10 Trinkets"); + add(""); + add(" Presenting VVVVVV "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukeunlock4") + { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 12 Trinkets"); + add(""); + add(" Potential for anything "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukeunlock41") + { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 14 Trinkets"); + add(""); + add(" Pressure Cooker "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukeunlock5") + { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 16 Trinkets"); + add(""); + add(" Predestined fate "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukeunlock6") + { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 18 Trinkets"); + add(""); + add(" Popular Potpourri "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_jukeunlock7") + { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 20 Trinkets"); + add(""); + add(" Pipe Dream "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + } + else if (t == "terminal_juke1") + { + add("play(4)"); + add("squeak(terminal)"); + add("jukebox(1)"); + } + else if (t == "terminal_juke2") + { + add("play(1)"); + add("squeak(terminal)"); + add("jukebox(2)"); + } + else if (t == "terminal_juke3") + { + add("play(2)"); + add("squeak(terminal)"); + add("jukebox(3)"); + } + else if (t == "terminal_juke4") + { + add("play(6)"); + add("squeak(terminal)"); + add("jukebox(4)"); + } + else if (t == "terminal_juke5") + { + add("play(3)"); + add("squeak(terminal)"); + add("jukebox(5)"); + } + else if (t == "terminal_juke6") + { + add("play(8)"); + add("squeak(terminal)"); + add("jukebox(6)"); + } + else if (t == "terminal_juke7") + { + add("play(11)"); + add("squeak(terminal)"); + add("jukebox(7)"); + } + else if (t == "terminal_juke8") + { + add("play(10)"); + add("squeak(terminal)"); + add("jukebox(8)"); + } + else if (t == "terminal_juke9") + { + add("play(12)"); + add("squeak(terminal)"); + add("jukebox(9)"); + } + else if (t == "terminal_juke10") + { + add("play(9)"); + add("squeak(terminal)"); + add("jukebox(10)"); + } +} + +#endif /* TERMINALSCRIPTS_H */ diff --git a/desktop_version/src/Textbox.cpp b/desktop_version/src/Textbox.cpp new file mode 100644 index 00000000..a33512d2 --- /dev/null +++ b/desktop_version/src/Textbox.cpp @@ -0,0 +1,154 @@ +#include "Textbox.h" + +textboxclass::textboxclass() +{ + firstcreate(); +} + +void textboxclass::firstcreate() +{ + //Like clear, only it creates the actual arrays, etc + for (int iter = 0; iter < 10; iter++) + { + std::string t; + t = ""; + line.push_back(t); + } + x = 0; + y = 0; + w = 0; + h = 0; + numlines = 0; + lw = 0; + tl = 0; + tm = 0; + active = false; + timer = 0; +} + +void textboxclass::clear() +{ + //Set all values to a default, required for creating a new entity + for (size_t iter = 0; iter < line.size(); iter++) + { + line[iter]=""; + } + xp = 0; + yp = 0; + w = 0; + h = 0; + numlines = 1; + lw = 0; + tl = 0; + tm = 0; + active = true; + timer = 0; +} + +void textboxclass::centerx() +{ + resize(); + xp = 160 - (w / 2); + resize(); +} +void textboxclass::centery() +{ + resize(); + yp = 120 - (h / 2); + resize(); +} + +void textboxclass::adjust() +{ + resize(); + if (xp < 10) xp = 10; + if (yp < 10) yp = 10; + if (xp + w > 310) xp = 310 - w; + if (yp + h > 230) yp = 230 - h; + resize(); +} + +void textboxclass::initcol(int rr, int gg, int bb) +{ + tr = rr; + tg = gg; + tb = bb; + r = 0; + g = 0; + b = 0; + tl = 0.5; +} + +void textboxclass::setcol(int rr, int gg, int bb) +{ + r = rr; + g = gg; + b = bb; +} + +void textboxclass::update() +{ + if (tm == 0) + { + tl += .1f; + if (tl >= 1) + { + tl = 1; + tm = 1; + } + setcol(int(tr * tl), int(tg * tl), int(tb * tl)); + } + else if (tm == 2) + { + tl -= .1f; + if (tl <= 0.5) + { + tl = 0.5; + active = false; + } + setcol(int(tr * tl), int(tg * tl), int(tb * tl)); + } + if (timer > 0) + { + timer--; + if (timer == 0) tm = 2; + } +} + +void textboxclass::remove() +{ + tm = 2; + tl = 1.0f; //Remove mode +} + +void textboxclass::removefast() +{ + tm = 2; + tl = 0.4f; //Remove mode +} + +void textboxclass::resize() +{ + //Set the width and height to the correct sizes + max = 0; + for (int iter = 0; iter < numlines; iter++) + { + if (line[iter].length() > (unsigned int)max) max = line[iter].length(); + } + + lw = max; + w = (max +2) * 8; + h = (numlines + 2) * 8; + textrect.x = xp; + textrect.y = yp; + textrect.w = w; + textrect.h = h; +} + +void textboxclass::addline(std::string t) +{ + line[numlines] = t; + numlines++; + resize(); + if (numlines >= 12) numlines = 0; +} diff --git a/desktop_version/src/Textbox.h b/desktop_version/src/Textbox.h new file mode 100644 index 00000000..d9ded508 --- /dev/null +++ b/desktop_version/src/Textbox.h @@ -0,0 +1,54 @@ +#ifndef TEXTBOX_H +#define TEXTBOX_H + +#include "SDL.h" +#include +#include + +class textboxclass +{ +public: + textboxclass(); + + void firstcreate(); + + void clear(); + + void centerx(); + + void centery(); + + void adjust(); + + void initcol(int rr, int gg, int bb); + + void setcol(int rr, int gg, int bb); + + void update(); + + void remove(); + + void removefast(); + + void resize(); + + void addline(std::string t); +public: + //Fundamentals + std::vector line; + int xp, yp, lw, w, h, numlines; + int x,y; + int r,g,b; + int tr,tg,tb; + SDL_Rect textrect; + bool active; + int timer; + + float tl; + int tm; + + int max; + +}; + +#endif /* TEXTBOX_H */ diff --git a/desktop_version/src/Tower.cpp b/desktop_version/src/Tower.cpp new file mode 100644 index 00000000..fd5f7240 --- /dev/null +++ b/desktop_version/src/Tower.cpp @@ -0,0 +1,1192 @@ +#include "Tower.h" + +#include "UtilityClass.h" + +towerclass::towerclass() +{ + minitowermode = false; + //We init the lookup table: + for (int i = 0; i < 700; i++) + { + vmult.push_back(int(i * 40)); + } + //We create a blank map + for (int j = 0; j < 700; j++) + { + for (int i = 0; i < 40; i++) + { + contents.push_back(0); + } + } + for (int j = 0; j < 120; j++) + { + for (int i = 0; i < 40; i++) + { + back.push_back(0); + minitower.push_back(0); + } + } + + loadbackground(); + loadmap(); +} + +int towerclass::backat(int xp, int yp, int yoff) +{ + yp = yp * 8; + yp += yoff; + yoff = yp % 8; + yp = (yp - yoff) / 8; + + if (xp >= 0 && xp < 40) + { + while (yp < 0) yp += 120; + while (yp >= 120) yp -= 120; + return back[xp + vmult[yp]]; + } + return 0; +} + +int towerclass::at(int xp, int yp, int yoff) +{ + if (minitowermode) + { + return miniat(xp, yp, yoff); + } + else + { + yp = yp * 8; + yp += yoff; + yoff = yp % 8; + yp = (yp - yoff) / 8; + + while (yp < 0) yp += 700; + while (yp >= 700) yp -= 700; + if (xp >= 0 && xp < 40) + { + return contents[xp + vmult[yp]]; + } + else if (xp == -1) + { + return contents[vmult[yp]]; + } + else if (xp == 40) + { + return contents[39 + vmult[yp]]; + } + return 0; + } +} + +int towerclass::miniat(int xp, int yp, int yoff) +{ + yp = yp * 8; + yp += yoff; + yoff = yp % 8; + yp = (yp - yoff) / 8; + + while (yp < 0) yp += 100; + while (yp >= 100) yp -= 100; + if (xp >= 0 && xp < 40) + { + return minitower[xp + vmult[yp]]; + } + else if (xp == -1) + { + return minitower[vmult[yp]]; + } + else if (xp == 40) + { + return minitower[39 + vmult[yp]]; + } + return 0; +} + +void towerclass::fillbackground(std::vector& tmap) +{ + for (int j = 0; j < 120; j++) + { + std::vector maprow = split(tmap[j], ','); + for (int i = 0; i < 40; i++) + { + back[i + vmult[j]] = atoi(maprow[i].c_str()); + } + } +} + +void towerclass::fillminitower(std::vector& tmap) +{ + + + for (int j = 0; j < 100; j++) + { + std::vector maprow = split(tmap[j], ','); + for (int i = 0; i < 40; i++) + { + minitower[i + vmult[j]] = atoi(maprow[i].c_str()); + } + } +} + +void towerclass::loadminitower1() +{ + std::vector tmap; + //Loads the first minitower into the array. + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,14,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,22,14,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,22,14,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,22,14,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,28,28,28,22,14,12,12,12,12,12"); + tmap.push_back("23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("6,6,6,6,6,6,6,6,28,28,28,28,28,28,28,28,28,28,28,28,6,6,6,6,6,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("18,18,18,18,18,18,18,19,28,28,28,28,28,28,28,28,28,28,28,28,17,18,18,18,19,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,15,19,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,15,19,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,15,19,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,15,19,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,15,19,28,28,28,17,18,16,12,12,12,12,12,12,12,12,12,15,19,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,15,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,15,19,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,22,14,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,22,14,12,12,12"); + tmap.push_back("12,12,13,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12"); + tmap.push_back("12,12,21,28,28,28,17,19,28,28,28,22,23,23,23,24,7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,21,28,28,28,7,7,7,7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,13,23,23,23,23,14,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,13,23,24,7,7,7,7,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,15,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,13,23,24,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,19,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,21,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,21,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,13,23,24,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,24,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,18,18,18,16,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,23,14,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,17,19,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,22,24,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,23,23,23,23,23,23,23,23"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,6,6,6,6,6,6"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,18,18,18,18"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,17,19,28,28,28,28,28,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,22,24,28,28,28,28,28,0,0,28,28,28,28,28,28,28,28,28,0,0,0,20,13,23,23,23,23"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,20,21,28,28,17,18"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,20,21,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,17,19,0,0,0,20,21,28,28,22,23"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,22,24,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,15,18,18,18,18"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + + fillminitower(tmap); +} + +void towerclass::loadminitower2() +{ + std::vector tmap; + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,13,23,23,23,23,23,23,23,23,23"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,22,24,28,28,0,0,0,0,0,0,0"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,28,28,28,28,0,0,0,0,0,0,0"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,22,24,28,28,28,28,28,28,0,0,0,0,0,0,0"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,22,24,28,28,28,28,28,28,28,28,28,28,0,17,18,18,18,18,18"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,28,28,28,28,28,28,28,28,28,28,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,28,28,28,28,28,28,28,28,28,28,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,11,22,24,10,0,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("18,18,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("23,23,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("18,18,18,18,18,19,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,13,23,23,23,23,23,23,14,13,23,23,23,23,23,23,23,14,12,12,12,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,9,9,9,9,9,9,22,24,9,9,9,9,9,9,9,22,23,23,23,23,24,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,28,28,28,28,28,6,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,25,27,0,0,0,0,0,0,0,28,28,28,28,28,26,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,28,28,28,28,28,7,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,21,8,8,8,8,8,8,17,18,18,18,19,8,8,8,6,17,18,18,18,18,19,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,15,18,18,18,18,18,18,16,12,12,12,15,18,18,18,18,16,12,12,12,12,21,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,6,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,19,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,13,23,23,23,24,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,21,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,21,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,22,24,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,25,27,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,17,19,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,20,21,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,20,21,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,21,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,24,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,0,0,28,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,28,17,19,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,24,0,28,28,28,28,28,28,28,20,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,13,24,0,0,28,28,28,28,28,28,17,16,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,13,24,0,0,0,28,28,28,28,28,28,20,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,24,0,0,0,0,28,28,28,28,28,17,16,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,13,24,0,0,0,0,0,28,28,28,28,28,20,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,13,24,0,0,0,0,0,0,28,28,28,28,17,16,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,13,24,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,13,24,0,0,0,0,0,0,28,28,28,28,28,17,16,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,13,24,0,0,0,0,0,0,0,28,28,28,28,28,20,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,13,24,0,0,0,0,0,0,0,0,28,28,28,28,17,16,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("23,23,24,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,17,16,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,20,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,28,28,17,16,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + + fillminitower(tmap); +} + + +void towerclass::loadbackground() +{ + //Loads the background into the array. + std::vector tmap; + tmap.push_back("1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,4,0,0"); + tmap.push_back("2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,4,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4"); + tmap.push_back("0,5,4,0,0,0,0,0,0,5,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,2"); + tmap.push_back("5,1,1,4,0,0,0,0,5,1,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,2,0"); + tmap.push_back("1,1,1,1,4,0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,5,1,1,1,1,1,2,0,0"); + tmap.push_back("1,1,1,1,1,4,5,1,1,1,1,1,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,3,1,1,1,1,1,4,0,0"); + tmap.push_back("1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,3,1,1,1,1,1,4,0"); + tmap.push_back("1,1,1,1,1,1,1,1,2,3,1,1,2,3,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,3,1,1,1,1,1,4"); + tmap.push_back("1,1,1,1,1,1,1,2,0,0,3,2,0,0,3,2,0,0,0,0,0,0,5,4,5,1,1,4,0,0,0,0,0,0,3,1,1,1,1,1"); + tmap.push_back("1,1,1,1,1,1,2,0,5,4,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,0,0,0,3,1,1,1,1"); + tmap.push_back("1,1,1,1,1,1,4,5,1,2,0,0,0,0,0,0,0,0,0,0,0,3,1,1,1,2,3,1,1,4,0,0,0,0,0,0,3,1,1,1"); + tmap.push_back("1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,1,1,4,0,3,1,1,4,0,0,0,0,0,0,3,1,1"); + tmap.push_back("3,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,2,0,5,1,1,1,4,0,0,0,0,0,0,3,1"); + tmap.push_back("0,3,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,4,5,1,1,2,0,0,3,1,1,1,2,0,0,0,0,0,0,0,3"); + tmap.push_back("0,0,3,1,1,1,4,0,0,0,0,0,5,4,0,0,0,0,5,1,1,1,1,2,0,0,0,0,3,1,2,0,5,4,0,0,0,0,0,0"); + tmap.push_back("0,0,0,3,1,1,1,4,0,0,0,5,1,2,0,0,0,0,3,1,1,1,1,4,5,4,0,0,5,1,4,5,1,1,4,0,0,0,0,0"); + tmap.push_back("0,0,0,0,3,1,1,1,4,0,0,3,1,4,0,0,0,0,5,1,1,1,1,1,1,1,4,5,1,1,1,1,1,1,2,0,0,0,0,0"); + tmap.push_back("0,0,0,0,5,1,1,1,1,4,0,0,3,1,4,5,4,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0"); + tmap.push_back("0,0,0,5,1,1,1,1,1,1,4,0,0,3,1,1,1,1,1,1,1,1,2,3,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,5"); + tmap.push_back("0,0,5,1,1,1,2,3,1,1,1,4,0,0,3,1,1,1,1,1,1,2,0,0,3,1,1,1,1,1,1,1,4,0,0,0,0,0,5,1"); + tmap.push_back("0,0,3,1,1,2,0,0,3,1,1,1,4,0,0,3,1,1,1,1,1,4,0,0,0,3,2,3,1,1,1,1,1,4,0,0,0,0,3,1"); + tmap.push_back("0,0,0,3,2,0,0,0,0,3,2,3,1,4,0,0,3,1,1,1,1,1,4,0,0,0,0,0,3,1,1,2,3,1,4,0,0,0,0,3"); + tmap.push_back("0,0,0,0,0,0,5,4,0,0,0,0,3,1,4,0,0,3,2,3,1,1,1,4,0,0,0,0,0,3,2,0,0,3,1,4,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,3,1,4,0,0,0,0,3,1,4,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0,0,3,2,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,5,1,1,4,5,4,0,0,3,2,0,0,0,3,1,1,2,0,0,5,4,0,0,0,0,5,4,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,5,1,1,1,1,1,2,0,0,0,0,0,0,0,0,3,1,4,0,0,3,1,4,0,0,5,1,1,4,0,0,5,4,0,0"); + tmap.push_back("0,0,0,0,5,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,3,1,4,0,0,3,1,4,5,1,2,3,1,4,5,1,1,4,0"); + tmap.push_back("0,0,0,5,1,1,1,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,3,1,4,0,0,3,1,1,2,0,0,3,1,1,1,1,1,4"); + tmap.push_back("0,0,0,3,1,1,2,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,3,1,4,0,0,3,2,0,0,0,0,3,1,1,1,1,1"); + tmap.push_back("4,0,0,0,3,2,0,0,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,5,1,1,1,1,1"); + tmap.push_back("1,4,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,5,4,0,0,0,0,0,3,1,4,0,5,4,0,0,5,1,1,1,1,1,1"); + tmap.push_back("3,1,4,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,3,1,4,5,4,0,0,5,1,2,0,3,1,4,5,1,1,1,2,3,1,1"); + tmap.push_back("0,3,1,4,0,0,5,1,1,1,2,3,1,1,2,0,0,0,0,3,1,1,1,4,5,1,2,0,0,0,3,1,1,1,1,2,0,5,1,1"); + tmap.push_back("0,5,1,1,4,5,1,1,1,2,0,0,3,2,0,0,0,0,0,5,1,1,1,1,1,2,0,0,0,0,0,3,1,1,2,0,5,1,1,1"); + tmap.push_back("5,1,1,1,1,1,1,1,1,4,5,4,0,0,0,0,0,0,0,3,1,1,1,1,1,4,0,0,0,0,0,5,1,2,0,0,3,1,1,1"); + tmap.push_back("1,1,1,2,3,1,1,1,1,1,1,1,4,5,4,0,0,5,4,0,3,1,1,1,1,1,4,0,0,0,5,1,2,0,0,0,0,3,1,1"); + tmap.push_back("1,1,2,0,0,3,1,1,1,1,1,1,1,1,1,4,5,1,2,0,5,1,1,1,2,3,2,0,0,0,3,1,4,0,0,0,0,0,3,1"); + tmap.push_back("1,2,0,0,0,0,3,1,1,2,3,1,1,1,1,1,1,2,0,5,1,1,1,1,4,0,0,5,4,0,0,3,1,4,0,0,0,0,0,3"); + tmap.push_back("2,0,0,0,0,0,5,1,2,0,0,3,1,1,1,1,2,0,5,1,1,1,1,1,1,4,5,1,1,4,0,0,3,1,4,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,5,1,2,0,0,0,0,3,1,1,1,4,5,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,3,2,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,3,2,0,0,0,0,0,0,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,5,4,0,0,0,0,5,4,0,0,0,0,0,3,1,1,1,1,2,3,1,1,1,1,1,1,2,0,0,5,4,0,0,5,4,0,0,0,5"); + tmap.push_back("5,1,1,4,0,0,5,1,2,0,0,0,0,0,0,3,1,1,2,0,0,3,1,1,1,1,2,0,0,5,1,1,4,5,1,2,0,0,5,1"); + tmap.push_back("1,1,1,1,4,5,1,2,0,0,0,0,0,0,0,0,3,2,0,0,0,0,3,1,1,2,0,0,5,1,1,1,1,1,2,0,0,5,1,1"); + tmap.push_back("1,1,1,1,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,4,0,0,3,1,1,1,1,2,0,0,5,1,1,1"); + tmap.push_back("1,1,1,1,1,1,1,2,0,5,4,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,3,1,1,2,0,0,5,1,1,1,1"); + tmap.push_back("1,1,1,1,1,1,1,4,5,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,3,1,4,0,0,3,1,1,1,1"); + tmap.push_back("1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,2,0,0,5,1,1,4,0,0,3,1,1,1"); + tmap.push_back("1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,2,0,0,5,1,1,1,2,0,0,5,1,1,1"); + tmap.push_back("3,1,1,1,1,1,1,2,0,0,0,0,0,5,4,0,0,5,1,1,1,1,1,1,1,2,0,0,5,1,1,1,2,0,0,5,1,1,1,1"); + tmap.push_back("0,3,1,1,1,1,1,4,0,0,5,4,5,1,1,4,5,1,1,1,1,1,1,1,2,0,0,5,1,1,1,2,0,0,5,1,1,1,1,1"); + tmap.push_back("0,0,3,1,1,1,1,1,4,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,3,1,1,2,0,0,5,1,1,1,1,1,1"); + tmap.push_back("0,0,0,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,3,2,0,0,5,1,1,1,1,1,1,1"); + tmap.push_back("0,0,0,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,0,0,0,3,1,1,1,1,1,1,1"); + tmap.push_back("0,0,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,1,4,0,0,0,0,0,3,1,1,1,1,1,1"); + tmap.push_back("0,5,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,1,1,1,1,1,1,2,0,0,3,1,4,0,0,0,0,5,1,2,3,1,1,1"); + tmap.push_back("5,1,1,1,1,1,1,1,1,1,1,1,2,3,2,0,0,3,1,1,1,1,2,0,0,0,0,3,1,4,0,0,5,1,2,0,0,3,1,1"); + tmap.push_back("1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,5,4,0,3,1,1,2,0,0,0,0,0,0,3,1,4,5,1,2,0,0,0,0,3,1"); + tmap.push_back("1,1,1,1,1,1,1,1,1,1,1,1,1,4,5,1,1,4,0,3,1,4,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,3"); + tmap.push_back("3,1,1,1,1,2,3,1,1,2,3,1,1,1,1,1,1,1,4,0,3,1,4,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0"); + tmap.push_back("0,3,1,1,2,0,0,3,2,0,0,3,1,1,1,1,1,1,2,0,0,3,2,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,3,2,0,0,0,0,0,0,0,0,3,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,5,1,2,3,1,1,1,4,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0,5,1,2,0,0,3,1,1,1,4,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,5,1,1,1,2,3,1,4,0,0,0,0,0,3,2,0,0,0,0,3,1,1,1,4,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,3,1,4,0,0,0,0,0,0,0,0,0,0,0,3,1,1,1,4,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,3,1,4,0,0,0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,4,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,5,1,1,1,2,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,5,1,1,1,2,3,1,4,0,0,0,0,0,0,5,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("5,1,1,1,2,0,0,3,1,4,0,0,0,0,5,1,1,1,2,3,2,3,2,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("1,1,1,2,0,0,0,5,1,2,0,0,0,5,1,1,1,2,0,0,0,0,0,0,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("1,1,2,0,0,0,5,1,2,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("1,2,0,0,0,0,3,1,4,0,0,5,1,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,0,0"); + tmap.push_back("2,0,0,0,0,0,0,3,1,4,5,1,1,1,1,1,1,4,0,0,0,0,0,0,5,1,2,3,1,1,1,4,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,3,1,1,1,1,1,1,1,1,1,4,5,4,0,0,0,3,2,0,0,3,1,1,1,4,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,5,1,2,3,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,5,1,1,4,0,3,1,1,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,2,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,3,1,1,1,4,0,3,1,1,1,1,2,0,0,0,5,4,0,0,5,1,1,1,1,1,1,1,2,0,5,4,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,3,1,1,2,0,5,1,1,1,1,4,0,0,5,1,2,0,5,1,1,1,1,1,1,1,2,0,5,1,1,4,0,0"); + tmap.push_back("0,0,0,0,0,0,0,5,1,2,0,5,1,1,1,1,1,1,4,0,3,1,4,5,1,1,1,1,1,1,1,2,0,5,1,1,1,1,4,0"); + tmap.push_back("0,0,0,0,0,0,5,1,2,0,5,1,1,1,1,1,1,1,1,4,0,3,1,1,1,1,1,1,1,1,2,0,5,1,1,1,1,1,1,4"); + tmap.push_back("0,0,0,0,0,0,3,2,0,0,3,1,1,1,1,2,3,1,1,1,4,0,3,1,1,1,1,1,1,1,4,0,3,1,1,1,1,1,1,1"); + tmap.push_back("0,0,5,4,0,0,0,0,0,0,0,3,1,1,2,0,5,1,1,1,2,0,0,3,1,1,1,1,1,1,1,4,0,3,1,1,1,1,1,1"); + tmap.push_back("0,5,1,1,4,0,0,0,0,0,0,0,3,2,0,5,1,1,1,1,4,0,0,0,3,1,1,1,1,1,1,1,4,0,3,1,1,1,1,2"); + tmap.push_back("0,3,1,1,1,4,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,3,1,1,1,1,1,1,1,4,5,1,1,1,2,0"); + tmap.push_back("0,0,3,1,1,1,4,0,0,0,0,0,0,0,3,1,1,1,1,1,1,2,0,5,4,0,3,1,1,1,1,1,1,1,1,1,1,2,0,0"); + tmap.push_back("0,0,0,3,1,1,1,4,0,0,0,0,0,0,0,3,1,1,1,1,2,0,5,1,2,0,5,1,1,1,1,1,1,1,1,1,2,0,0,0"); + tmap.push_back("0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,4,5,1,2,0,5,1,2,3,1,1,1,1,1,1,1,4,0,0,0"); + tmap.push_back("0,0,5,1,1,1,2,0,5,4,0,0,0,0,5,1,1,1,1,1,1,1,2,0,0,3,2,0,5,1,1,1,1,1,1,1,1,4,0,0"); + tmap.push_back("0,5,1,1,1,2,0,0,3,1,4,0,0,5,1,1,1,1,1,1,1,2,0,5,4,0,0,0,3,1,1,1,1,1,1,1,1,1,4,0"); + tmap.push_back("5,1,1,1,2,0,5,4,0,3,1,4,0,3,1,1,1,1,1,1,2,0,5,1,1,4,5,4,0,3,1,1,1,1,2,3,1,1,1,4"); + tmap.push_back("1,1,1,2,0,5,1,1,4,0,3,1,4,0,3,1,1,1,1,2,0,5,1,1,1,1,1,1,4,5,1,1,1,2,0,0,3,1,1,1"); + tmap.push_back("1,1,1,4,5,1,1,1,1,4,5,1,1,4,0,3,1,1,1,4,0,3,1,1,1,1,1,1,1,1,1,1,1,4,0,0,0,3,1,1"); + tmap.push_back("1,1,1,1,1,1,2,3,1,1,1,1,1,1,4,0,3,1,1,1,4,0,3,1,1,1,1,1,1,1,1,1,1,1,4,0,0,5,1,1"); + tmap.push_back("3,1,1,1,1,1,4,0,3,1,1,1,1,1,1,4,0,3,1,1,1,4,0,3,1,1,1,1,1,2,3,1,1,1,2,0,5,1,1,1"); + tmap.push_back("0,3,1,1,1,1,1,4,0,3,1,1,1,1,1,1,4,0,3,1,1,2,0,5,1,1,1,1,1,4,0,3,1,1,4,5,1,1,1,1"); + tmap.push_back("0,0,3,1,1,1,1,1,4,0,3,1,1,1,1,1,1,4,0,3,2,0,5,1,1,1,1,1,1,1,4,0,3,1,1,1,1,1,1,2"); + tmap.push_back("0,0,0,3,1,1,1,1,1,4,0,3,1,1,1,1,1,1,4,0,0,5,1,1,1,1,1,1,1,1,2,0,5,1,1,1,1,1,2,0"); + tmap.push_back("0,0,0,0,3,1,1,1,1,2,0,0,3,1,1,1,1,1,1,4,5,1,1,1,1,1,1,1,1,2,0,5,1,1,1,1,1,2,0,0"); + tmap.push_back("4,0,0,0,0,3,1,1,2,0,5,4,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,5,1,1,1,1,1,2,0,0,0"); + tmap.push_back("1,4,0,0,0,0,3,2,0,5,1,1,1,2,3,1,1,1,1,1,1,1,1,2,3,1,1,2,0,5,1,1,1,1,1,2,0,0,0,0"); + tmap.push_back("1,1,4,0,0,0,0,0,5,1,1,1,2,0,5,1,1,1,1,1,1,1,1,4,0,3,2,0,5,1,1,1,1,1,2,0,0,0,0,0"); + tmap.push_back("1,1,1,4,0,0,0,5,1,1,1,2,0,5,1,2,3,2,3,1,1,1,1,1,4,0,0,0,3,1,1,1,1,2,0,0,0,0,0,0"); + tmap.push_back("1,1,1,2,0,0,5,1,1,1,2,0,5,1,2,0,0,0,0,3,1,1,1,1,1,4,0,0,0,3,1,1,2,0,0,0,0,0,0,5"); + tmap.push_back("1,1,2,0,0,5,1,1,1,1,4,0,3,2,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,3,2,0,0,0,0,0,0,5,1"); + tmap.push_back("1,2,0,0,5,1,1,1,1,1,1,4,0,0,0,0,0,0,5,1,2,3,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,5,1,1"); + tmap.push_back("1,4,0,0,3,1,1,1,1,1,1,1,4,0,0,0,0,5,1,2,0,0,3,1,1,2,0,0,5,4,0,0,0,0,0,0,5,1,1,1"); + tmap.push_back("1,1,4,0,0,3,1,1,1,1,1,1,1,4,0,0,5,1,2,0,0,0,0,3,2,0,0,5,1,1,4,0,0,0,0,5,1,1,1,1"); + tmap.push_back("1,1,1,4,0,0,3,1,1,1,1,2,3,1,4,5,1,2,0,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,5,1,1,1,1,1"); + tmap.push_back("1,1,1,1,4,0,0,3,1,1,2,0,0,3,1,1,2,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,5,1,1,1,2,3,1"); + tmap.push_back("1,1,1,1,2,0,0,0,3,2,0,0,0,0,3,2,0,0,0,0,0,0,0,0,5,1,2,3,1,1,1,1,1,1,1,1,2,0,0,3"); + tmap.push_back("1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,3,1,1,2,3,1,1,2,0,0,0,0"); + tmap.push_back("1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,3,2,0,0,3,2,0,0,0,0,0"); + fillbackground(tmap); +} + +void towerclass::fillcontents(std::vector& tmap) +{ + for (int j = 0; j < 700; j++) + { + std::vector maprow = split(tmap[j], ','); + for (int i = 0; i < 40; i++) + { + contents[i + vmult[j]] = atoi(maprow[i].c_str()); + } + } +} + +void towerclass::loadmap() +{ + std::vector tmap; + //Loads the map into the array. + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,19,28,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,24,28,28,28,28,22,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,28,28,28,28,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,28,28,28,28,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,23,23,24,28,0,0,17,18,18,19,0,0,28,22,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,22,23,23,24,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,19,0,0,28,28,0,0,17,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,24,0,0,28,28,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,17,18,18,19,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,22,14,13,24,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,22,24,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,19,10,0,28,28,0,11,17,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,24,0,0,28,28,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,19,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,24,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,17,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,22,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,19,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,24,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,17,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,22,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,19,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,28,28,0,11,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,24,0,0,0,28,28,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,11,17,18,18,18,18,19,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,22,23,23,23,23,24,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,19,10,0,28,28,0,11,17,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,24,0,0,28,28,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,17,18,18,19,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,22,23,23,24,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,18,18,19,28,0,0,0,28,28,0,0,0,28,17,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,28,28,28,28,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,19,28,28,28,28,17,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,24,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,13,23,23,24,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,21,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,12,12,12,21,0,0,0,0,0,0,0,8,8,0,0,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,21,28,28,28,20,12,13,23,23,24,0,0,0,0,0,0,8,17,19,0,0,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("23,23,23,23,23,24,28,28,28,20,12,21,28,28,28,0,0,0,0,0,8,17,16,21,0,0,28,28,22,23,23,23,23,23,23,23,23,23,23,23"); + tmap.push_back("28,28,28,28,28,28,28,28,28,20,12,21,28,28,28,0,0,0,0,8,17,16,12,21,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,20,12,21,28,28,28,0,0,0,8,17,16,12,12,21,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,20,12,21,28,28,28,0,0,8,17,16,12,12,12,21,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("18,18,18,18,18,18,18,18,18,16,12,21,28,28,28,0,0,17,16,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,7,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,7,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,9,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,7,22,14,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,28,7,22,14,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,28,28,7,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,6,28,28,0,0,28,28,0,28,28,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,19,6,28,0,0,17,18,19,28,28,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,15,19,6,0,0,20,12,21,28,28,0,28,28,28,28,28,22,23,23,23,23,14,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,0,20,12,21,28,28,0,28,28,28,28,28,28,28,0,0,0,20,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,20,12,21,28,28,0,28,28,28,28,28,28,28,0,0,0,20,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,16,12,21,28,28,0,28,28,28,0,0,0,0,0,0,0,22,14,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,28,28,28,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,28,0,28,28,28,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,6,0,17,18,18,19,0,0,0,0,0,0,0,22,14,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,20,12,12,21,0,0,0,0,0,0,0,28,20,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,16,12,12,21,10,0,0,0,0,0,0,28,22,14,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,0,28,28,22,14,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,28,28,28,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,28,28,28,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,0,0,0,28,28,28,28,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,0,0,0,28,28,28,28,17,16,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,0,0,0,28,28,28,28,17,16,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,20,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,24,0,0,0,0,28,28,28,28,17,16,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,0,0,0,28,28,28,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,7,0,0,0,28,28,28,0,0,0,0,28,28,28,28,28,17,16,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,7,28,0,0,0,28,28,28,0,0,0,0,28,28,28,28,28,20,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,7,28,28,0,0,0,28,28,28,0,0,0,0,28,28,28,28,17,16,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,13,24,9,28,28,28,0,0,0,28,28,28,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,9,0,28,28,28,0,0,0,28,28,28,0,0,0,0,28,28,28,17,16,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,28,28,28,0,0,0,28,28,28,0,0,0,0,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,23,23,23,24,0,0,28,28,28,0,0,0,28,28,28,0,0,0,17,18,18,18,16,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,28,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,28,0,0,8,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,28,0,8,17,16,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,28,8,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,6,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,6,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,17,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,0,8,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,8,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("23,23,23,23,23,14,12,12,21,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23"); + tmap.push_back("28,28,28,28,28,20,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,20,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,20,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,20,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("18,19,28,28,28,20,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"); + tmap.push_back("12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("23,24,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23"); + tmap.push_back("7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28"); + tmap.push_back("28,28,0,0,0,0,0,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28"); + tmap.push_back("28,28,0,0,0,0,0,17,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28"); + tmap.push_back("0,0,0,0,0,0,0,22,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,8,8,8,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,17,18,19,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,22,23,24,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,28,28,28,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,28,28,28,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,28,28,28,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,28,28,28,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0"); + tmap.push_back("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,0,0"); + tmap.push_back("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,24,0,0"); + tmap.push_back("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0"); + tmap.push_back("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0"); + tmap.push_back("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0"); + tmap.push_back("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0,28,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,0,0,0,0,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,24,0,0,0,0,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,17,18,18,18,18,18,18,19,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,22,23,23,23,23,23,23,24,10,0,0,0,0,0,0,0,0,0,0,28,28,0,0,28,28,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,7,7,7,7,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,28,28,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,28,28,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,28,28,28,28,28,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,17,18,18,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,22,23,23,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,24,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,17,18,18,19,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,22,23,23,24,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,8,8,8,8,8,8,8,8"); + tmap.push_back("18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,17,18,18,18,18,18,18,18"); + tmap.push_back("12,21,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,22,23,23,23,23,23,14,12"); + tmap.push_back("12,15,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,28,28,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,21,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,28,28,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,15,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,28,28,28,28,28,28,20,12"); + tmap.push_back("23,23,14,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,28,28,28,28,28,28,22,23"); + tmap.push_back("28,28,20,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,28,28,28,28,28,28"); + tmap.push_back("28,28,22,23,23,23,23,14,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,20,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,20,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,20,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,28,28"); + tmap.push_back("28,28,28,28,28,28,28,22,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,28,28"); + tmap.push_back("0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("8,8,8,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8"); + tmap.push_back("18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,18"); + tmap.push_back("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,21,6,6,6,6,6,6,28,28,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); + tmap.push_back("12,12,15,18,18,18,18,18,19,28,28,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,8,8,8,8,8,8,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,17,18,18,18,18,18,16,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,17,18,16,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,22,23,14,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,15,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,8,8,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,15,18,19,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,23,24,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,8,8,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,20,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,8,8,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,15,18,19,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,23,24,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,8,8,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,17,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,13,23,23,23,23,23,14,21,0,0,0,20,12,12,12,13,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,21,9,9,9,9,9,20,21,0,0,0,20,12,12,12,21,9,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,21,0,0,0,0,0,20,21,0,0,0,20,12,12,12,21,0,9,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,21,0,0,0,0,0,20,21,0,0,0,22,23,23,23,24,0,0,9,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,21,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0,0,9,20,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,14,12"); + tmap.push_back("23,24,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,22,23"); + tmap.push_back("0,0,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,22,24,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,23,23,14,12,12,12,12,12,12,21,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,21,0,0,0,0,0,0"); + tmap.push_back("18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,15,19,0,0,17,18,18"); + tmap.push_back("12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,13,24,0,0,20,12,12"); + tmap.push_back("12,12,12,15,18,18,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,21,0,0,0,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,21,0,0,0,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,21,8,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,23,23,14,12,21,0,0,0,20,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,15,19,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,21,0,0,17,16,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,0,0,17,18,18,18,19,0,0,0,0,0,0,0,0,11,20,12,21,0,0,22,23,23,14"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,0,20,12,12,12,21,0,0,0,0,0,0,0,0,11,20,12,21,0,0,0,0,0,20"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,20,12,12,12,21,8,8,8,8,0,0,0,0,11,20,12,21,0,0,0,0,0,20"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,16,12,12,12,15,18,18,18,19,10,0,0,0,11,20,12,21,0,0,0,0,0,20"); + tmap.push_back("23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,21,0,0,0,0,0,22"); + tmap.push_back("9,9,9,9,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,21,0,0,0,0,0,9"); + tmap.push_back("0,0,0,0,11,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,21,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,15,18,18,19,0,0,0"); + tmap.push_back("0,0,0,0,0,11,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,12,12,13,24,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,13,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,21,10,0,0,0,11,20,12,12,13,24,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,13,24,9,9,9,9,9,9,9,9,20,12,12,12,12,12,12,21,10,0,0,0,11,20,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,21,10,0,0,0,11,20,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,22,23,23,23,23,23,23,24,10,0,0,0,11,20,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,21,10,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,11,20,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,21,10,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,17,16,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,21,10,0,28,28,28,28,28,28,28,28,28,0,0,17,18,18,18,18,18,18,18,16,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,17,16,21,10,0,28,28,28,28,28,28,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,17,16,12,21,10,0,28,28,28,28,28,28,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,22,14,12,15,19,8,6,6,6,6,6,6,6,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,22,14,12,15,18,18,18,18,18,18,18,19,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,12,12,12,12,13,23,23,23,24,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,13,23,23,23,24,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,15,19,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,21,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,15,18,19,0,0"); + tmap.push_back("18,18,19,0,0,0,11,20,12,21,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,13,23,23,23,23,14,12,12,15,18,18"); + tmap.push_back("12,12,21,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12,12,21,28,28,28,28,22,23,23,23,14,12"); + tmap.push_back("23,23,24,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,22,23"); + tmap.push_back("0,0,0,0,0,0,11,20,12,21,28,28,28,28,17,18,18,19,0,0,0,0,20,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,21,28,28,28,28,20,12,12,15,18,18,18,18,16,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,21,28,28,28,28,22,23,23,23,14,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,22,23,23,23,14,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,28,28,0,0,22,23,23,23,14,12,12,21,28,28,28,28,17,18,18,19,0,0"); + tmap.push_back("18,19,0,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,21,28,28,28,28,20,12,12,15,18,18"); + tmap.push_back("12,15,18,18,18,18,18,16,12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,21,28,28,28,28,20,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,21,28,28,28,28,22,23,23,23,14,12"); + tmap.push_back("23,23,14,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,21,28,28,28,28,0,0,0,0,22,23"); + tmap.push_back("0,0,22,23,23,23,14,12,12,12,12,12,12,21,28,28,28,28,6,6,8,8,0,0,0,0,20,12,12,21,28,28,28,28,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,22,23,23,23,14,12,12,21,28,28,28,28,17,18,18,19,0,0,0,0,20,12,12,21,28,28,28,28,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,28,28,22,23,23,24,28,28,28,28,20,12,12,21,0,0,0,0,20,12,12,21,28,28,28,28,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,0,0,0,0,20,12,12,21,6,6,6,6,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,20,12,12,15,18,18,18,19,8,8,8,8,0,0"); + tmap.push_back("8,8,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,20,12,12,12,12,12,12,15,18,18,18,19,8,8"); + tmap.push_back("18,19,8,8,8,8,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,22,23,23,23,14,12,12,12,12,12,12,15,18,18"); + tmap.push_back("12,15,18,18,18,19,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,0,0,0,0,22,23,23,23,14,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,15,18,18,18,19,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,0,0,0,0,28,28,28,28,22,23,23,23,14,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,20,12,12,21,28,28,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,16,12,12,21,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,6,8,8,0,0,0,0,0,0,28,28,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,19,8,8,8,8,0,0,28,28,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,19,0,0,28,28,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12"); + tmap.push_back("23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,21,28,28,28,28,22,23"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,11,20,21,28,28,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,11,20,21,28,28,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,21,28,28,28,28,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,21,28,28,28,28,0,0"); + tmap.push_back("18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,28,28,0,0,11,20,15,18,18,18,18,18,18"); + tmap.push_back("12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,28,28,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,22,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,24,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,17,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,22,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,14,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,13,23,23,23,23,23,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,6,6,6,6,6,6,6,6,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,17,18,18,18,18,18,18,18,18,18,19,0,0,0,0,0,0,17,18,18,19,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,22,23,23,24,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,13,23,23,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,17,18,16,12,12,12,12,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,22,23,23,23,23,23,14,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,6,6,6,6,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,17,18,18,19,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,22,23,23,24,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,22,23,24,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,17,18,19,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,22,23,24,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,28,28,28,28,28,28,28,17,19,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,21,28,28,28,28,28,28,28,28,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,20,12,12,12"); + tmap.push_back("12,15,18,18,18,18,18,18,18,18,18,18,18,16,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,6,6,6,6,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,19,28,28,28,28,28,17,19,28,28,28,28,28,28,28,0,0,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,6,6,6,6,20,21,28,28,28,28,28,28,28,0,0,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,16,21,28,28,28,28,28,28,28,0,0,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,17,18,18,18,18,18,16,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,22,23,14,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,20,12,12,12,12,12,12,12"); + tmap.push_back("23,23,23,23,23,14,13,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,22,14,13,23,23,23,23,23"); + tmap.push_back("28,28,28,28,28,22,24,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,22,24,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,7,7,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,7,7,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28"); + tmap.push_back("18,18,18,18,18,18,18,18,19,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,22,23,23,23,23,23,14,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,22,24,28,28,28,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,7,7,28,28,28,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,6,6,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,28,28,28,28,28,17,19,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,15,18,18,18,18,18,16,15,18,18,18,18,18,18,19,10,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,17,18,18,18,16,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,0,22,23,23,23,14,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,13,23,23,23,14,12,13,23,23,23,23,23,23,23,23,23,24,10,0,0,0,0,0,0,0,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,24,9,9,9,20,12,21,7,7,7,7,7,7,7,7,9,9,0,0,0,0,0,0,0,0,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,22,23,24,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,22,14,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,10,0,0,0,17,18,19,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,15,19,8,8,8,20,12,21,6,6,6,6,6,6,6,6,8,8,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,15,18,18,18,16,12,15,18,18,18,18,18,18,18,18,18,19,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,24,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,24,7,7,7,7,7,9,9,9,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,13,24,0,0,0,0,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,17,16,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,6,6,6,6,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,17,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,15,19,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,22,23,23,23,23,14,13,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,20,21,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,22,24,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,14,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,15,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,17,19,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,20,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,16,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,22,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,22,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,22,23,23,23,14,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,19,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,14,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,22,23,23,14,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,22,23,23,14,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,28,28,28,22,23,23,24,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("23,23,23,23,23,14,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,20,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,22,23,23,23,23,23,24,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); + tmap.push_back("18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + tmap.push_back("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + + fillcontents(tmap); +} diff --git a/desktop_version/src/Tower.h b/desktop_version/src/Tower.h new file mode 100644 index 00000000..0ba2cc72 --- /dev/null +++ b/desktop_version/src/Tower.h @@ -0,0 +1,51 @@ +#ifndef TOWER_H +#define TOWER_H + +#include +#include + +class towerclass +{ +public: + towerclass(); + + int backat(int xp, int yp, int yoff); + + int at(int xp, int yp, int yoff); + + int miniat(int xp, int yp, int yoff); + + void fillbackground(std::vector& tmap); + + void fillminitower(std::vector& tmap); + + void loadminitower1(); + + void loadminitower2(); + + void loadbackground(); + + void fillcontents(std::vector& tmap); + + void loadmap(); + + //public var back:Array = new Array(); + //public var contents:Array = new Array(); + //public var minitower:Array = new Array(); + //public var vmult:Array = new Array(); + + std::vector back; + std::vector contents; + std::vector minitower; + std::vector vmult; + + bool minitowermode; + int i; + int k; +}; + + + + + +#endif /* TOWER_H */ diff --git a/desktop_version/src/UtilityClass.cpp b/desktop_version/src/UtilityClass.cpp new file mode 100644 index 00000000..38f66cc8 --- /dev/null +++ b/desktop_version/src/UtilityClass.cpp @@ -0,0 +1,360 @@ +#include "UtilityClass.h" + +#include "SDL.h" + +#include + +/* Used by UtilityClass::GCString to generate a button list */ +const char *GCChar(SDL_GameControllerButton button) +{ + if (button == SDL_CONTROLLER_BUTTON_A) + { + return "A"; + } + else if (button == SDL_CONTROLLER_BUTTON_B) + { + return "B"; + } + else if (button == SDL_CONTROLLER_BUTTON_X) + { + return "X"; + } + else if (button == SDL_CONTROLLER_BUTTON_Y) + { + return "Y"; + } + else if (button == SDL_CONTROLLER_BUTTON_BACK) + { + return "BACK"; + } + else if (button == SDL_CONTROLLER_BUTTON_GUIDE) + { + return "GUIDE"; + } + else if (button == SDL_CONTROLLER_BUTTON_START) + { + return "START"; + } + else if (button == SDL_CONTROLLER_BUTTON_LEFTSTICK) + { + return "L3"; + } + else if (button == SDL_CONTROLLER_BUTTON_RIGHTSTICK) + { + return "R3"; + } + else if (button == SDL_CONTROLLER_BUTTON_LEFTSHOULDER) + { + return "LB"; + } + else if (button == SDL_CONTROLLER_BUTTON_RIGHTSHOULDER) + { + return "RB"; + } + SDL_assert(0 && "Unhandled button!"); + return NULL; +} + +int ss_toi( std::string _s ) +{ + std::istringstream i(_s); + int x; + i >> x; + return x; +} + +std::vector split( const std::string &s, char delim, std::vector &elems ) +{ + std::stringstream ss(s); + std::string item; + while(std::getline(ss, item, delim)) + { + elems.push_back(item); + } + return elems; +} + +std::vector split( const std::string &s, char delim ) +{ + std::vector elems; + return split(s, delim, elems); +} + +UtilityClass::UtilityClass() : +glow(0), + glowdir(0) +{ + for (int i = 0; i < 30; i++) + { + splitseconds.push_back(int((i * 100) / 30)); + } + + slowsine = 0; +} + +std::string UtilityClass::String( int _v ) +{ + std::ostringstream os; + os << _v; + return(os.str()); +} + +std::string UtilityClass::GCString(std::vector buttons) +{ + std::string retval = ""; + for (size_t i = 0; i < buttons.size(); i += 1) + { + retval += GCChar(buttons[i]); + if ((i + 1) < buttons.size()) + { + retval += ","; + } + } + return retval; +} + +std::string UtilityClass::twodigits( int t ) +{ + if (t < 10) + { + return "0" + String(t); + } + if (t >= 100) + { + return "??"; + } + return String(t); +} + +std::string UtilityClass::timestring( int t ) +{ + //given a time t in frames, return a time in seconds + tempstring = ""; + temp = (t - (t % 30)) / 30; + if (temp < 60) //less than one minute + { + t = t % 30; + tempstring = String(temp) + ":" + twodigits(splitseconds[t]); + } + else + { + temp2 = (temp - (temp % 60)) / 60; + temp = temp % 60; + t = t % 30; + tempstring = String(temp2) + ":" + twodigits(temp) + ":" + twodigits(splitseconds[t]); + } + return tempstring; +} + +std::string UtilityClass::number( int _t ) +{ + switch(_t) + { + case 0: + return "Zero"; + break; + case 1: + return "One"; + break; + case 2: + return "Two"; + break; + case 3: + return "Three"; + break; + case 4: + return "Four"; + break; + case 5: + return "Five"; + break; + case 6: + return "Six"; + break; + case 7: + return "Seven"; + break; + case 8: + return "Eight"; + break; + case 9: + return "Nine"; + break; + case 10: + return "Ten"; + break; + case 11: + return "Eleven"; + break; + case 12: + return "Twelve"; + break; + case 13: + return "Thirteen"; + break; + case 14: + return "Fourteen"; + break; + case 15: + return "Fifteen"; + break; + case 16: + return "Sixteen"; + break; + case 17: + return "Seventeen"; + break; + case 18: + return "Eighteen"; + break; + case 19: + return "Nineteen"; + break; + case 20: + return "Twenty"; + break; + case 21: + return "Twenty One"; + break; + case 22: + return "Twenty Two"; + break; + case 23: + return "Twenty Three"; + break; + case 24: + return "Twenty Four"; + break; + case 25: + return "Twenty Five"; + break; + case 26: + return "Twenty Six"; + break; + case 27: + return "Twenty Seven"; + break; + case 28: + return "Twenty Eight"; + break; + case 29: + return "Twenty Nine"; + break; + case 30: + return "Thirty"; + break; + case 31: + return "Thirty One"; + break; + case 32: + return "Thirty Two"; + break; + case 33: + return "Thirty Three"; + break; + case 34: + return "Thirty Four"; + break; + case 35: + return "Thirty Five"; + break; + case 36: + return "Thirty Six"; + break; + case 37: + return "Thirty Seven"; + break; + case 38: + return "Thirty Eight"; + break; + case 39: + return "Thirty Nine"; + break; + case 40: + return "Forty"; + break; + case 41: + return "Forty One"; + break; + case 42: + return "Forty Two"; + break; + case 43: + return "Forty Three"; + break; + case 44: + return "Forty Four"; + break; + case 45: + return "Forty Five"; + break; + case 46: + return "Forty Six"; + break; + case 47: + return "Forty Seven"; + break; + case 48: + return "Forty Eight"; + break; + case 49: + return "Forty Nine"; + break; + case 50: + return "Fifty"; + break; + } + return "Lots"; +} + +bool UtilityClass::intersects( SDL_Rect A, SDL_Rect B ) +{ + int leftA, leftB; + int rightA, rightB; + int topA, topB; + int bottomA, bottomB; + //Calculate the sides of rect A + leftA = A.x; + rightA = A.x + A.w; + topA = A.y; + bottomA = A.y + A.h; + //Calculate the sides of rect B + leftB = B.x; + rightB = B.x + B.w; + topB = B.y; + bottomB = B.y + B.h; + + if( bottomA <= topB ) + { + return false; + } + if( topA >= bottomB ) + { + return false; + } + if( rightA <= leftB ) + { + return false; + } + if( leftA >= rightB ) + { + return false; + } + //If none of the sides from A are outside B return true; } + + return true; +} + +void UtilityClass::updateglow() +{ + slowsine++; + if (slowsine >= 64) slowsine = 0; + + if (glowdir == 0) { + glow+=2; + if (glow >= 62) glowdir = 1; + }else { + glow-=2; + if (glow < 2) glowdir = 0; + } +} diff --git a/desktop_version/src/UtilityClass.h b/desktop_version/src/UtilityClass.h new file mode 100644 index 00000000..24e89885 --- /dev/null +++ b/desktop_version/src/UtilityClass.h @@ -0,0 +1,46 @@ +#ifndef UTILITYCLASS_H +#define UTILITYCLASS_H + +#include +#include +#include + +int ss_toi(std::string _s); + +std::vector split(const std::string &s, char delim, std::vector &elems); + +std::vector split(const std::string &s, char delim); + + +//helperClass +class UtilityClass +{ +public: + UtilityClass(); + + static std::string String(int _v); + + static std::string GCString(std::vector buttons); + + std::string twodigits(int t); + + std::string timestring(int t); + + std::string number(int _t); + + + static bool intersects( SDL_Rect A, SDL_Rect B ); + + void updateglow(); + + int glow; + int slowsine; + int glowdir; + int globaltemp; + int temp; + int temp2; + std::string tempstring; + std::vector splitseconds; +}; + +#endif /* UTILITYCLASS_H */ diff --git a/desktop_version/src/WarpClass.cpp b/desktop_version/src/WarpClass.cpp new file mode 100644 index 00000000..8aca2269 --- /dev/null +++ b/desktop_version/src/WarpClass.cpp @@ -0,0 +1,1033 @@ +#include "WarpClass.h" + +#include "MakeAndPlay.h" + +std::vector warpclass::loadlevel(int rx, int ry , Game& game, entityclass& obj) +{ + int t; + + rx -= 100; + ry -= 100; + rx += 50 - 14; + ry += 49; //warp + + t = rx + (ry * 100); + std::vector tmap; + coin = 0; + rcol = 0; + warpx = false; + warpy = false; + + roomname = "Untitled room ["+UtilityClass::String(rx) + "," + UtilityClass::String(ry)+"]"; + + switch(t) + { + #if !defined(MAKEANDPLAY) + case rn(50,50): + + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("161,161,161,161,161,161,161,161,161,161,161,161,161,122,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,162,160,161,161,161,161,161,161,162,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,80,80,80,80,80,202,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("241,241,241,241,241,241,241,241,241,241,241,241,241,82,80,202,200,80,80,80,80,80,80,202,200,80,121,161,161,161,161,161,161,161,161,161,161,161,161,161"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,200,80,80,80,80,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,240,241,241,241,241,241,241,242,240,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,160,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,81,241,241,241,241,241,241,241,241,241,241,241,241,241"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + tmap.push_back("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + + obj.createentity(game, 288, 168, 10, 1, 50500); // (savepoint) + + if(game.intimetrial) + { + obj.createblock(0, 0, 0, 8, 240); + } + + rcol = 0; + warpy = true; + roomname = "This is how it is"; + break; + + case rn(51,50): + + tmap.push_back("247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,86,208,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("167,167,167,167,167,168,166,167,167,167,167,168,0,0,0,0,206,86,208,0,0,0,0,166,167,167,167,167,167,167,167,167,168,166,167,167,167,167,167,167"); + tmap.push_back("247,247,247,247,247,248,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86,208,246,247,247,247,247,247,247"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,87,247,247,247,247,88,86,208,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,208,126,126,126,126,206,86,208,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,208,126,126,126,126,206,86,208,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,246,247,247,247,247,248,0,0,0,0,206,86,208,0,0,0,0,206,86,208,126,126,126,126,206,86,208,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,166,167,167,167,167,168,0,0,0,0,206,86,208,0,0,0,0,206,86,208,126,126,126,126,206,86,208,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,127,167,167,167,167,128,86,208,0,0,0,0,0,0,0"); + tmap.push_back("167,167,168,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86,208,0,0,0,0,166,167,167"); + tmap.push_back("247,247,248,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,246,247,247,247,247,247,247,247,247,248,0,0,0,0,246,247,247"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,246,247,248,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,246,247,247,247,247,248,0,0,0,0,246,247,248,0,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("167,167,167,167,167,168,0,0,0,0,0,0,0,0,0,0,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + tmap.push_back("247,247,247,88,86,208,0,0,0,0,0,0,0,0,0,0,206,86,87,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126"); + tmap.push_back("126,126,126,206,86,208,0,0,0,0,166,167,167,167,167,168,206,86,208,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126"); + tmap.push_back("126,126,126,206,86,208,0,0,0,0,206,86,86,86,86,208,206,86,208,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126"); + rcol = 2; + warpx = true; + roomname = "A Bisected Spiral"; + break; + + + case rn(51,51): + + tmap.push_back("83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83"); + tmap.push_back("244,244,244,244,244,245,0,0,0,0,243,244,244,244,244,244,244,245,0,0,0,0,243,244,244,244,244,244,244,245,0,0,0,0,243,244,244,244,244,244"); + tmap.push_back("164,164,164,165,0,0,0,0,0,0,0,0,163,164,164,165,0,0,0,0,0,0,0,0,163,164,164,165,0,0,0,0,0,0,0,0,163,164,164,164"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,243,244,244,244"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,163,164,164,164,164,164,164,164,164,164,164,165"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,243,244,244,245,243,244,244,244,244,244,244,244,244,244,244,245"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,164,164"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,163,164,164,164,164,164,164,164,164,164,164,165,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,243,244,244,245,243,244,244,244,244,244,244,244,244,244,244,245,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,164,164,164,165,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); + tmap.push_back("244,244,244,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,244,244,244,245,0,0,0,0,0,0,0,0,243,244,244,244"); + tmap.push_back("164,164,164,164,164,165,0,0,0,0,163,164,164,164,164,164,164,165,0,0,0,0,163,164,164,164,164,164,164,165,0,0,0,0,163,164,164,164,164,164"); + tmap.push_back("83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83"); + + obj.createentity(game, 248, 80, 10, 1, 51510); // (savepoint) + obj.createentity(game, 136, 128, 1, 3, 3, 128, 120, 288, 152); // Enemy, bounded + obj.createentity(game, 104, 192, 10, 1, 51511); // (savepoint) + rcol = 1; + warpy = true; + roomname = "Take the Red Pill"; + break; + + case rn(52,51): + + tmap.push_back("95,95,95,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("256,256,256,256,256,257,0,0,0,0,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("176,176,176,176,176,176,176,176,176,177,175,176,177,0,0,0,0,175,176,177,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176"); + tmap.push_back("256,256,256,256,256,256,256,256,256,257,215,95,217,0,0,0,0,215,95,217,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,255,256,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,175,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("176,176,176,176,176,177,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,175,176,176,177,175,176,176,176,177,175,176,176,176,176,176,176"); + tmap.push_back("95,95,95,95,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,215,95,95,95,217,215,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,215,95,95,95,217,215,95,95,95,95,95,95"); + tmap.push_back("95,95,95,95,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,215,95,95,95,217,215,95,95,95,95,95,95"); + tmap.push_back("256,256,256,256,256,257,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,255,256,256,256,257,255,256,256,256,256,256,256"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,255,256,257,0,0,0,0,215,95,217,0,0,0,0,255,256,256,257,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,255,256,257,0,0,0,0,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176"); + tmap.push_back("95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + tmap.push_back("256,256,256,256,256,256,256,256,256,256,97,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,96,256,256,256,256,256,256,256,256,256,256,256,256,256"); + tmap.push_back("135,135,135,135,135,135,135,135,135,135,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); + tmap.push_back("135,135,135,135,135,135,135,135,135,135,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); + tmap.push_back("135,135,135,135,135,135,135,135,135,135,215,95,217,175,176,176,176,176,176,176,176,176,176,177,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); + tmap.push_back("135,135,135,135,135,135,135,135,135,135,215,95,217,215,95,95,95,95,95,95,95,95,95,217,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); + tmap.push_back("135,135,135,135,135,135,135,135,135,135,215,95,217,215,95,95,95,95,95,95,95,95,95,217,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); + + obj.createentity(game, 32, 24, 1, 3, 4, -56, -40, 384, 312); // Enemy, bounded + obj.createentity(game, 96, 24, 1, 3, 4, -56, -40, 384, 312); // Enemy, bounded + obj.createentity(game, 160, 24, 1, 3, 4, -56, -40, 384, 312); // Enemy, bounded + obj.createentity(game, 224, 24, 1, 3, 4, -56, -40, 384, 312); // Enemy, bounded + obj.createentity(game, 232, 152, 10, 1, 51520); // (savepoint) + rcol = 5; + warpx = true; + roomname = "Short Circuit"; + break; + + case rn(52,50): + + tmap.push_back("213,212,92,214,172,174,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,252,254,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,252,254,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,252,254,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,7,7,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,253"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,173"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,172,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,174,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,6,6,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,172,174,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,172,174,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + tmap.push_back("213,212,92,214,252,254,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + + obj.createentity(game, 32, 16, 10, 0, 50520); // (savepoint) + rcol = 4; + warpy = true; + roomname = "As you like it"; + break; + + + case rn(53,50): + + tmap.push_back("250,250,250,250,250,250,251,0,0,0,209,211,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("170,170,170,170,170,170,170,170,170,171,209,211,0,0,0,169,170,170,170,170,170,170,170,171,169,171,169,170,170,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("250,250,250,250,250,250,250,250,250,251,209,211,0,0,0,249,250,250,250,250,250,250,250,251,209,211,249,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("170,170,170,170,171,169,171,0,0,0,209,211,169,170,170,170,170,170,170,170,170,171,0,0,209,211,0,0,169,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("89,89,89,89,211,209,211,0,0,0,209,211,209,89,89,89,89,89,89,89,89,211,0,0,209,211,0,0,209,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("250,250,250,250,251,209,211,0,0,0,209,211,249,250,250,250,250,250,250,250,250,251,0,0,209,211,0,0,249,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,0,0,169,171,0,0,209,211,0,0,169,171,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,169,171,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("170,170,170,170,171,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,169,171,169,170,170,170,170"); + tmap.push_back("89,89,89,89,211,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,209,211,209,89,89,89,89"); + tmap.push_back("250,250,250,250,251,249,251,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,249,251,0,0,209,211,0,0,0,209,211,249,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0"); + tmap.push_back("170,170,170,170,170,170,170,170,170,171,209,211,0,0,0,209,211,0,0,0,209,211,169,170,170,170,170,171,209,211,0,0,0,209,211,0,0,0,169,170"); + tmap.push_back("250,250,250,250,250,250,250,250,250,251,249,251,0,0,0,209,211,0,0,0,249,251,249,250,250,250,250,251,249,251,0,0,0,209,211,0,0,0,249,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0"); + tmap.push_back("170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,209,211,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,209,211,169,170,170,170,170"); + + obj.createentity(game, 16, 120, 10, 1, 50530); // (savepoint) + rcol = 3; + warpx = true; + roomname = "Maze With No Entrance"; + break; + + case rn(53,49): + + tmap.push_back("126,126,126,126,206,86,208,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,166,167,167,167,167,168,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,166,167"); + tmap.push_back("126,126,126,126,206,86,208,206,86,86,86,86,208,6,6,6,6,206,86,208,6,6,6,6,6,6,6,6,6,6,6,206,86,208,6,6,6,6,206,86"); + tmap.push_back("126,126,126,126,206,86,208,206,86,86,86,86,208,166,167,167,168,206,86,208,166,167,167,168,166,167,168,166,167,167,168,206,86,208,166,167,167,168,206,86"); + tmap.push_back("126,126,126,126,206,86,208,206,86,86,86,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86"); + tmap.push_back("126,126,126,126,206,86,208,206,86,86,86,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86"); + tmap.push_back("126,126,126,126,206,86,208,206,86,86,86,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86"); + tmap.push_back("126,126,126,126,206,86,208,206,86,86,86,86,208,246,247,247,248,246,247,248,246,247,247,248,206,86,208,246,247,247,248,246,247,248,246,247,247,248,206,86"); + tmap.push_back("126,126,126,126,206,86,208,206,86,86,86,86,208,7,7,7,7,7,7,7,7,7,7,7,206,86,208,7,7,7,7,7,7,7,7,7,7,7,206,86"); + tmap.push_back("126,126,126,126,206,86,208,246,247,247,247,247,248,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,246,247"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,167"); + tmap.push_back("126,126,126,126,206,86,208,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86"); + + obj.createentity(game, 64, 152, 10, 0, 49530); // (savepoint) + rcol = 2; + warpy = true; + roomname = "As we go up, we go down"; + break; + + case rn(54,49): + + tmap.push_back("80,80,80,202,200,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,202,200,80"); + tmap.push_back("241,241,241,242,200,202,240,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,242,200,202,240,241"); + tmap.push_back("0,0,0,0,200,202,7,7,7,7,7,7,160,161,161,162,7,7,7,7,7,7,7,160,161,161,162,7,7,7,7,7,7,7,7,7,200,202,0,0"); + tmap.push_back("0,0,0,0,200,202,0,0,0,0,0,0,240,241,241,242,0,0,0,0,0,0,0,240,241,241,242,0,0,0,0,0,0,0,0,0,240,242,0,0"); + tmap.push_back("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,240,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("161,161,161,161,161,162,0,0,0,0,160,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,161,161,161,161,161"); + tmap.push_back("80,80,80,80,80,202,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,80,80,80,80"); + tmap.push_back("80,80,80,80,80,202,0,0,0,0,200,202,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,200,80,80,80,80,80"); + tmap.push_back("80,80,80,80,80,202,0,0,0,0,200,202,160,161,161,162,0,0,0,0,0,0,0,160,161,161,162,0,0,0,0,0,0,0,200,80,80,80,80,80"); + tmap.push_back("80,80,80,80,80,202,0,0,0,0,200,202,200,80,80,202,0,0,0,0,0,0,0,200,80,80,202,0,0,0,0,0,0,0,200,80,80,80,80,80"); + tmap.push_back("80,80,80,80,80,202,0,0,0,0,200,202,240,241,241,242,0,0,0,0,0,0,0,240,241,241,242,0,0,0,0,0,0,0,200,80,80,80,80,80"); + tmap.push_back("80,80,80,80,80,202,0,0,0,0,200,202,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,200,80,80,80,80,80"); + tmap.push_back("80,80,80,80,80,202,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,80,80,80,80"); + tmap.push_back("241,241,241,241,241,242,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,241,241,241,241,241"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,160,161,161,162,0,0,0,0,0,0,0,0,0,160,162,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,6,6,6,6,6,6,6,240,241,241,242,6,6,6,6,6,6,6,6,6,200,202,0,0"); + tmap.push_back("161,161,161,161,161,161,161,161,161,162,200,202,0,0,0,0,160,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,162,200,202,160,161"); + tmap.push_back("80,80,80,80,80,80,80,80,80,202,200,202,0,0,0,0,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,202,200,80"); + + obj.createentity(game, 296, 64, 10, 1, 49540); // (savepoint) + obj.createentity(game, 152-4-15+8, 32, 1, 0, 6, 128, 32, 288, 200); // Enemy, bounded + obj.createentity(game, 240-4-15+8, 186, 1, 1, 6, 128, 32, 288, 200); // Enemy, bounded + obj.createentity(game, 296, 152, 10, 0, 49541); // (savepoint) + rcol = 0; + warpx = true; + roomname = "Time to get serious"; + break; + + + case rn(54,50): + + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,247"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,167,168,166,167,167"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,248,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,166,167,167,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,246,247,247,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + tmap.push_back("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); + if(!game.intimetrial) + { + obj.createentity(game, (7 * 8) + 4, (6 * 8), 14); //Teleporter! + } + rcol = 2; + warpy = true; + roomname = "Wheeler's Wormhole"; + break; + + case rn(55,50): + + tmap.push_back("212,92,92,214,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,0,0,0,0,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,0,0,0,0,0,0,0,0,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,252,253,253,254,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214"); + tmap.push_back("252,253,253,254,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,252,253,253,254"); + tmap.push_back("0,0,0,0,0,0,0,0,172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,252,253,253,254,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,174,0,0,0,0,212,92,92,214,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,0,0,0,0,212,92,92,214,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); + tmap.push_back("172,173,173,174,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,172,173,173,174"); + tmap.push_back("252,253,253,254,172,173,173,174,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,174,0,0,0,0,0,0,0,0,252,253,253,254"); + tmap.push_back("0,0,0,0,252,253,253,254,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,252,253,253,254,172,173,173,174,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,172,173,173,174,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,172,173,173,174,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,172,173,173,174,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,172,173,173,174,0,0,0,0"); + tmap.push_back("172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,172,173,173,174"); + tmap.push_back("212,92,92,214,172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,212,92,92,214,172,173,173,174,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + tmap.push_back("212,92,92,214,212,92,92,214,212,92,92,214,172,173,173,174,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + + obj.createentity(game, 96, 72, 1, 3, 8, 64, 56, 256, 152); // Enemy, bounded + obj.createentity(game, 240, 120, 1, 2, 8, 64, 56, 256, 152); // Enemy, bounded + obj.createentity(game, 72, 16, 10, 0, 50550); // (savepoint) + obj.createentity(game, 264, 176, 10, 1, 50551); // (savepoint) + rcol = 4; + warpx = true; + roomname = "Ascending and Descending"; + break; + + case rn(55,51): + + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83"); + tmap.push_back("244,244,244,245,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,203,83"); + tmap.push_back("0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("0,0,0,0,0,0,0,0,203,205,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("164,164,164,165,0,0,0,0,203,205,0,0,0,0,163,164,165,163,164,164,164,164,164,164,164,164,164,164,164,164,165,163,164,165,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,243,245,0,0,0,0,203,83,205,203,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,205,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,243,244,245,243,244,244,244,244,244,244,244,244,244,244,244,244,245,243,244,245,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,163,164,164,164,164,164,164,164,164,165,7,7,7,7,7,7,7,7,163,165,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,243,244,244,244,244,244,244,244,244,245,0,0,0,0,0,0,0,0,243,245,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,163,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,163,165,0,0,0,0,0,0,0,0,163,164,164,164,164,164,164,164,164,165,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,243,245,6,6,6,6,6,6,6,6,243,244,244,244,244,244,244,244,244,245,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,163,164,165,163,164,164,164,164,164,164,164,164,164,164,164,164,165,163,164,165,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83,205,203,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,205,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,243,244,245,243,244,244,244,244,244,244,244,244,244,244,244,244,245,243,244,245,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,163,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,165,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,203,205,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83"); + + obj.createentity(game, 280, 24, 1, 2, 3, 128, 16, 304, 216); // Enemy, bounded + obj.createentity(game, 136, 192, 1, 3, 3, 128, 16, 304, 216); // Enemy, bounded + obj.createentity(game, 40, 8, 1, 0, 10, 24, -56, 120, 280); // Enemy, bounded + obj.createentity(game, 88, 8, 1, 0, 10, 24, -40, 120, 272); // Enemy, bounded + obj.createentity(game, 256, 128, 10, 1, 51550); // (savepoint) + obj.createentity(game, 136, 32, 10, 1, 51551); // (savepoint) + rcol = 1; + warpy = true; + roomname = "Shockwave Rider"; + break; + + case rn(54,51): + + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,209,89,89,211,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,249,250,250,251,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,169,170,170,171,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,209,89,89,211,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,209,89,89,211,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,0,0,0,209,89,89,211,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,209,89,89,211,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,209,89,89,211,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,209,89,89,211,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,209,89,89,211,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + tmap.push_back("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,249,250,250,251,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,169,170,170,171,169,170,170,170,170,170,170,170,170,171,0,0,0,0,169,170,170,170"); + tmap.push_back("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,209,89,89,211,209,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89"); + + obj.createentity(game, 296, 32, 10, 1, 51540); // (savepoint) + obj.createentity(game, 184, 192, 1, 18, 48, -800, -24, 4000, 264); // Enemy, bounded + obj.createentity(game, 88, 136, 1, 17, 48, -800, -32, 4000, 272); // Enemy, bounded + obj.createentity(game, 184, 80, 1, 18, 48, -800, -32, 4000, 272); // Enemy, bounded + + + obj.createentity(game, 8, 32, 20, 1); // (terminal) + obj.createblock(5, 8-8, 32, 20, 16, 17); + + rcol = 3; + warpx = true; + roomname = "Sweeney's Maze"; + break; + + case rn(54,52): + + tmap.push_back("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,177,0,0,0,0,215,95,95,95"); + tmap.push_back("256,256,256,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,257,0,0,0,0,255,256,256,256"); + tmap.push_back("176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,176"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("256,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,256"); + tmap.push_back("176,176,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,177,0,0,0,0,175,176,176,176"); + tmap.push_back("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,257,0,0,0,0,215,95,95,95"); + + obj.createentity(game, 288, 200, 10, 1, 52540); // (savepoint) + obj.createentity(game, 48, 16, 1, 1, 10, 0, -40, 320, 296); // Enemy, bounded + obj.createentity(game, 64, 16+8+4+2, 1, 1, 10, 0, -48, 320, 280); // Enemy, bounded + obj.createentity(game, 80, 16+16+8+4, 1, 1, 10, 0, -40, 320, 280); // Enemy, bounded + obj.createentity(game, 96, 16+24+12+6, 1, 1, 10, 0, -40, 320, 304); // Enemy, bounded + obj.createentity(game, 112, 16+32+16+8, 1, 1, 10, 0, -48, 320, 288); // Enemy, bounded + obj.createentity(game, 128, 16+40+20+10, 1, 1, 10, 0, -40, 320, 280); // Enemy, bounded + obj.createentity(game, 144, 16+48+24+12, 1, 1, 10, 0, -56, 320, 296); // Enemy, bounded + obj.createentity(game, 160, 16+56+28+14, 1, 1, 10, 0, -48, 320, 288); // Enemy, bounded + obj.createentity(game, 176, 16+64+32+16, 1, 1, 10, 0, -48, 320, 296); // Enemy, bounded + obj.createentity(game, 192, 16+72+36+18, 1, 1, 10, 0, -40, 320, 280); // Enemy, bounded + obj.createentity(game, 208, 16+80+40+20, 1, 1, 10, 0, -48, 320, 280); // Enemy, bounded + rcol = 5; + warpy = true; + roomname = "Mind The Gap"; + break; + + case rn(53,52): + + tmap.push_back("207,207,207,207,207,207,207,207,207,207,207,207,207,206,86,208,206,208,0,0,0,0,206,208,206,86,208,207,207,207,207,206,86,208,246,247,247,248,206,86"); + tmap.push_back("207,207,207,207,207,207,207,207,207,207,207,207,207,206,86,208,206,208,0,0,0,0,206,208,206,86,208,207,207,207,207,206,86,208,0,0,0,0,206,86"); + tmap.push_back("167,167,167,167,167,167,167,167,167,167,167,167,167,128,86,208,206,208,0,0,0,0,206,208,206,86,127,167,167,167,167,128,86,208,0,0,0,0,206,86"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,208,206,208,0,0,0,0,206,208,206,86,86,86,86,86,86,86,86,208,0,0,0,0,206,86"); + tmap.push_back("247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,208,0,0,0,0,206,208,246,247,247,247,247,247,247,247,247,248,0,0,0,0,246,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,166,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("166,168,0,0,0,0,166,168,166,167,167,167,167,167,167,168,206,208,0,0,0,0,206,208,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); + tmap.push_back("246,248,0,0,0,0,246,248,246,247,247,247,247,247,247,248,206,208,0,0,0,0,206,208,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,166,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,206,208,0,0,0,0,206,208,166,167,167,167,167,167,167,168,166,168,0,0,0,0,166,168"); + tmap.push_back("247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,208,0,0,0,0,206,208,246,247,247,247,247,247,247,248,246,248,0,0,0,0,246,248"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,166,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("166,168,0,0,0,0,166,168,166,167,167,167,167,167,167,168,206,208,0,0,0,0,206,208,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); + tmap.push_back("246,248,0,0,0,0,246,248,246,247,247,247,247,247,247,248,246,248,0,0,0,0,246,248,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); + tmap.push_back("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + + obj.createentity(game, 152, 200, 10, 1, 52530); // (savepoint) + obj.createentity(game, 248, 48, 1, 3, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 152, 48, 1, 3, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 152, 96, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 56, 96, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 104, 144, 1, 3, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 200, 144, 1, 3, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 280, 16, 9, 12); //Shiny Trinket + + + obj.createentity(game, 24, 200, 20, 1); // (terminal) + obj.createblock(5, 24-8, 200, 20, 16, 18); + rcol = 2; + warpx = true; + roomname = "Edge Games"; + break; + + case rn(53,51): + + tmap.push_back("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); + tmap.push_back("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); + tmap.push_back("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); + tmap.push_back("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); + tmap.push_back("244,244,245,0,0,0,0,243,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,244,244"); + tmap.push_back("0,0,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,164,164,164,164,164,164,165,0,0,0,0,163,165,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,244,244,244,244,244,244,245,0,0,0,0,243,245,0,0,0,0,0,0,0,0"); + tmap.push_back("164,164,164,164,164,164,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,164,164,164,164"); + tmap.push_back("83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83"); + tmap.push_back("244,244,244,244,244,244,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,244,244,244,244"); + tmap.push_back("0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0"); + tmap.push_back("0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0"); + tmap.push_back("0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0"); + tmap.push_back("0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0"); + tmap.push_back("0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,0,0,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,0"); + tmap.push_back("0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0"); + tmap.push_back("0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0"); + tmap.push_back("0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,0,0,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,0"); + tmap.push_back("164,164,164,165,0,0,0,0,163,165,0,0,0,0,163,164,164,164,164,164,164,164,164,164,164,164,164,165,0,0,0,0,163,165,0,0,0,0,163,164"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83"); + tmap.push_back("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83"); + tmap.push_back("244,244,244,245,0,0,0,0,243,245,0,0,0,0,243,244,244,244,244,244,244,244,244,244,244,244,244,245,0,0,0,0,243,245,0,0,0,0,243,244"); + tmap.push_back("164,164,165,0,0,0,0,163,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,164,164"); + tmap.push_back("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); + tmap.push_back("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); + tmap.push_back("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); + + obj.createentity(game, 152, 112, 13); + rcol = 1; + warpx = true; + warpy = true; + roomname = "The Brown Gate"; + break; + + case rn(55,49): + + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,252,253,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,254,0,0"); + tmap.push_back("6,6,172,173,174,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,172,173,174,6,6"); + tmap.push_back("173,174,212,92,214,0,0,0,0,0,0,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,174,0,0,0,0,212,92,214,172,173"); + tmap.push_back("253,254,252,253,254,0,0,0,0,0,0,252,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,0,252,253,254,252,253"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,174,0,0,0,0,172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,172,173,173,174,0,0,0,0,0,212,92,92,214,0,0,0,0,212,92,92,214,0,0,0,0,0,172,173,173,174,0,0,0,0,0"); + tmap.push_back("6,6,6,6,6,252,253,253,254,6,6,6,6,6,252,253,253,254,0,0,0,0,252,253,253,254,6,6,6,6,6,252,253,253,254,6,6,6,6,6"); + tmap.push_back("173,173,173,173,173,173,173,173,173,173,173,173,173,174,172,173,174,0,0,0,0,0,0,172,173,174,172,173,173,173,173,173,173,173,173,173,173,173,173,173"); + tmap.push_back("92,92,92,92,92,92,92,92,92,92,92,92,92,214,212,92,214,0,0,0,0,0,0,212,92,214,212,92,92,92,92,92,92,92,92,92,92,92,92,92"); + tmap.push_back("253,253,253,253,253,253,253,253,253,253,253,253,253,254,212,92,214,0,0,0,0,0,0,212,92,214,252,253,253,253,253,253,253,253,253,253,253,253,253,253"); + tmap.push_back("7,7,172,173,174,7,7,7,7,7,7,7,7,7,212,92,214,0,0,0,0,0,0,212,92,214,7,7,7,7,7,7,7,7,7,172,173,174,7,7"); + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,212,92,214,172,173,173,173,173,174,212,92,214,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,252,253,254,0,0,0,0,0,0,0,0,0,252,253,254,252,253,253,253,253,254,252,253,254,0,0,0,0,0,0,0,0,0,252,253,254,0,0"); + tmap.push_back("0,0,172,173,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,174,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,172,173,173,173,173,173,174,0,0,0,0,0,0,0,0,172,173,173,173,173,173,174,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,252,253,253,253,253,253,254,0,0,0,0,0,0,0,0,252,253,253,253,253,253,254,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + tmap.push_back("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + + obj.createentity(game, 152, 112, 13); + obj.createentity(game, 152, 152, 10, 0, 49550); // (savepoint) + rcol = 4; + warpx = true; + warpy = true; + roomname = "To The Batcave!"; + break; + + case rn(55,52): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,209,89,89,89,89,89,89,211,6,6,6,6,6,6,6,6,0,0,0,0,0,0,6,6"); + tmap.push_back("170,170,170,170,170,170,170,170,171,169,170,170,170,170,170,171,209,89,89,89,89,89,89,211,169,170,170,170,170,170,170,171,0,0,0,0,0,0,169,170"); + tmap.push_back("89,89,89,89,89,89,89,89,211,249,250,250,250,250,250,251,209,89,89,89,89,89,89,211,249,250,250,250,250,250,250,251,0,0,0,0,0,0,209,89"); + tmap.push_back("89,89,89,89,89,89,89,89,211,7,7,7,7,7,7,7,209,89,89,89,89,89,89,211,7,7,7,7,7,7,7,7,0,0,0,0,0,0,209,89"); + tmap.push_back("250,250,250,250,250,250,250,250,251,0,0,0,0,0,0,0,249,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,250"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,170,170,171,0"); + tmap.push_back("6,6,6,6,6,6,6,6,6,6,209,89,89,89,89,89,211,6,6,6,6,6,6,6,6,6,6,6,6,6,6,209,89,89,89,89,89,89,211,6"); + tmap.push_back("170,171,169,170,170,170,170,170,170,171,209,89,89,89,89,89,211,169,170,170,170,170,170,170,170,170,170,170,170,170,171,209,89,89,89,89,89,89,211,169"); + tmap.push_back("250,251,209,89,89,89,89,89,89,211,249,250,250,250,250,250,251,249,250,250,250,250,250,250,250,250,250,250,250,250,251,249,250,250,250,250,250,250,251,249"); + tmap.push_back("7,7,209,89,89,89,89,89,89,211,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7"); + tmap.push_back("0,0,249,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 152, 112, 13); + obj.createentity(game, 136, 40, 10, 1, 52550); // (savepoint) + rcol = 3; + warpx = true; + warpy = true; + roomname = "This will make you flip"; + break; + + case rn(52,52): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,175,176,176,177,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("176,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,215,95,95,217,0,0,0,0,0,0,0,0,175,176"); + tmap.push_back("95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,136,176,176,176,176,137,95,217,215,95,95,217,0,0,0,0,0,0,0,0,215,95"); + tmap.push_back("95,95,217,6,6,6,6,6,6,6,6,6,0,0,0,0,215,95,95,95,95,95,95,95,95,217,215,95,95,217,6,6,6,6,6,6,6,6,215,95"); + tmap.push_back("95,95,217,175,176,176,176,176,176,176,176,177,0,0,0,0,255,256,256,256,256,256,256,256,256,257,215,95,95,217,175,176,176,176,177,175,176,177,215,95"); + tmap.push_back("256,256,257,255,256,256,256,256,256,256,256,257,0,0,0,0,175,177,7,7,7,7,7,175,176,177,215,95,95,217,215,95,95,95,217,255,256,257,255,256"); + tmap.push_back("176,177,0,0,0,0,0,0,0,175,176,177,0,0,0,0,255,257,0,0,0,0,0,215,95,217,215,95,95,217,215,95,95,95,217,7,7,7,175,176"); + tmap.push_back("256,257,0,0,0,0,0,0,0,215,95,217,0,0,0,0,7,7,0,0,0,0,0,255,256,257,255,256,256,257,255,256,256,256,257,0,0,0,255,256"); + tmap.push_back("0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,175,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("176,177,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,175,176,176,176,176,176,176"); + tmap.push_back("95,217,0,0,0,0,0,0,0,255,256,257,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,6,6,6,215,95,95,95,95,95,95"); + tmap.push_back("95,217,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,0,215,95,217,0,0,0,0,175,176,177,215,95,95,95,95,95,95"); + tmap.push_back("256,257,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,6,6,6,6,6,255,256,257,0,0,0,0,255,256,257,255,256,256,256,256,256,256"); + tmap.push_back("7,7,7,7,7,7,7,7,7,175,176,176,176,176,176,177,175,176,176,176,176,176,176,176,176,177,0,0,0,0,175,176,176,177,7,7,7,7,7,7"); + tmap.push_back("0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,217,215,95,95,95,95,95,95,95,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,255,256,256,256,256,256,257,215,95,96,256,256,256,256,97,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,255,256,256,257,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + obj.createentity(game, 152, 112, 13); + obj.createentity(game, 288, 120, 10, 1, 52520); // (savepoint) + rcol = 5; + warpx = true; + warpy = true; + roomname = "Twisty Little Passages"; + break; + + case rn(50,51): + + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,205,243,244,244,244,244,244,244,244,244,244,244,245,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,205,163,164,165,163,164,164,164,164,164,164,164,165,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); + tmap.push_back("244,244,244,244,244,244,244,244,244,244,244,244,244,245,203,83,205,243,244,244,244,244,244,244,244,245,0,0,0,0,243,244,244,244,244,244,244,244,244,244"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("164,164,164,164,164,164,165,49,50,163,165,0,0,0,203,83,205,163,164,164,164,164,164,164,164,165,0,0,0,0,163,164,165,49,50,163,164,165,163,164"); + tmap.push_back("83,83,83,83,83,83,205,49,50,203,205,0,0,0,203,83,205,203,83,83,83,83,83,83,83,205,0,0,0,0,203,83,205,49,50,203,83,205,203,83"); + tmap.push_back("244,244,244,244,244,244,245,49,50,243,245,0,0,0,203,83,205,243,244,244,244,244,244,244,244,245,0,0,0,0,203,83,205,49,50,203,83,205,243,244"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,163,164,165,0,0,0,0,203,83,205,49,50,203,83,205,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,163,164,164,165,203,83,205,49,50,203,83,205,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,203,83,83,205,203,83,205,49,50,203,83,205,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,203,83,83,205,203,83,205,49,50,203,83,205,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,243,244,244,245,203,83,205,49,50,203,83,205,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,0,0,0,0,203,83,205,49,50,203,83,205,0,0"); + tmap.push_back("164,164,164,164,164,164,165,49,50,163,165,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,0,0,0,0,203,83,205,49,50,203,83,205,163,164"); + tmap.push_back("83,83,83,83,83,83,205,49,50,203,205,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,0,0,0,0,203,83,205,49,50,203,83,205,203,83"); + tmap.push_back("244,244,244,244,244,244,245,49,50,243,245,0,0,0,203,83,205,0,0,0,0,0,0,243,244,245,0,0,0,0,243,244,245,49,50,243,244,245,243,244"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("164,164,164,164,164,164,164,164,164,164,164,164,164,165,203,83,205,163,164,164,164,164,164,164,164,165,0,0,0,0,163,164,164,164,164,164,164,164,164,164"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,205,243,244,245,243,244,244,244,244,244,244,244,245,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,205,163,164,164,164,164,164,164,164,164,164,164,165,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); + tmap.push_back("83,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); + + obj.createentity(game, 152, 112, 13); + obj.createentity(game, 24, 128, 10, 1, 52510); // (savepoint) + obj.createentity(game, 56, 48, 1, 0, 10, -16, -16, 336, 256); // Enemy, bounded + obj.createentity(game, 264, 48, 1, 0, 10, -16, -16, 336, 256); // Enemy, bounded + obj.createentity(game, 152, 48, 1, 2, 8, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 152, 176, 1, 2, 8, -24, -16, 344, 256); // Enemy, bounded + rcol = 1; + warpx = true; + warpy = true; + roomname = "That's Why I Have To Kill You"; + break; + + case rn(52,49): + + tmap.push_back("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + tmap.push_back("247,247,247,247,247,248,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,246,247,247,247,247,247"); + tmap.push_back("7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,7,7,7,7,7,7"); + tmap.push_back("6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,6,6,6,6,6,6"); + tmap.push_back("167,167,167,167,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,166,167,167,168,166,167"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,208,206,86"); + tmap.push_back("86,86,86,86,86,208,166,168,49,50,166,168,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,206,208,0,0,0,0,246,247,247,248,206,86"); + tmap.push_back("247,247,247,247,247,248,246,248,49,50,246,248,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,208,0,0,0,0,7,7,7,7,246,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("167,167,167,167,167,167,167,168,49,50,166,168,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,206,208,0,0,0,0,166,167,167,167,167,167"); + tmap.push_back("247,247,247,247,247,247,247,248,49,50,206,208,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,208,0,0,0,0,246,247,247,247,247,247"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("6,6,6,6,166,168,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,166,168,6,6,6,6"); + tmap.push_back("167,167,167,168,206,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,208,166,167,167,167"); + tmap.push_back("247,247,247,248,246,248,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,246,248,246,247,247,247"); + tmap.push_back("167,167,167,167,167,168,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,166,167,167,167,167,167"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + tmap.push_back("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + + obj.createentity(game, 152, 112, 13); + obj.createentity(game, 248, 16, 1, 0, 10, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 64, 16, 1, 0, 10, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 200, 56, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 152, 56, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 104, 56, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded + obj.createentity(game, 152, 152, 10, 0, 49520); // (savepoint) + rcol = 2; + warpx = true; + warpy = true; + roomname = "I Love You"; + break; + + case rn(50,49): + + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,83,83,83,83,83,205,203,83,83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,243,244,244,244,244,244,244,244,244,245,203,83,83,83,205,0,0,0,0,0,243,244,244,244,245,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,244,244,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,163,164,164,164,165,0,0,0,0,0,163,164,164,164,164,164,164,164,164,164,164,164,164,164,165,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,83,83,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("244,244,245,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,84,244,244,244,244,244,244,244,244,244,85,83,205,0,0,0,0,0,243,244"); + tmap.push_back("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); + tmap.push_back("164,164,165,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,124,164,164,164,164,164,164,164,164,164,125,83,205,0,0,0,0,0,163,164"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,83,83,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,243,244,244,244,244,244,244,244,244,244,244,244,244,244,245,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,164,164,165,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,163,164,164,164,164,164,164,164,164,165,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); + tmap.push_back("83,83,205,0,0,0,0,0,203,83,83,83,205,203,83,83,83,83,83,83,83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); + rcol = 1; + warpy = true; + roomname = "Green Dudes Can't Flip"; + break; + + + case rn(51,49): + + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("176,176,176,177,0,0,0,0,0,0,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,0,0,0,0,0,0,175,176,176,176"); + tmap.push_back("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95"); + tmap.push_back("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95"); + tmap.push_back("256,256,256,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,256,256,256"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("176,176,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,176,176,176"); + tmap.push_back("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95"); + tmap.push_back("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95"); + tmap.push_back("256,256,256,257,0,0,0,0,0,0,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,0,0,255,256,256,256"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + warpx = true; + warpy = true; + rcol = 5; + + obj.entities[obj.nentity].active = true; + obj.nentity++; + obj.createentity(game, 14 * 8, (8 * 8) + 4, 14); //Teleporter! + obj.entities[obj.nentity - 2].active = false; + + if(game.intimetrial) + { + obj.createblock(1, 20, 0, 32, 240, 82); + } + + roomname = "Murdering Twinmaker"; + break; + + case rn(49,49): + + tmap.push_back("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,202,0,160,161,161,161,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,202,0,240,241,241,241,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,202,0,160,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,202,0,200,202,0,160,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,121,161,161,161,161,161,161,161,161,161,161,161,161,161,161"); + tmap.push_back("80,202,0,200,202,0,240,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80"); + tmap.push_back("80,202,0,200,202,0,160,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241"); + tmap.push_back("80,202,0,200,202,0,200,202,0,160,161,161,161,161,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("80,202,0,200,202,0,200,202,0,240,241,241,241,241,241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("80,202,0,200,202,0,200,202,0,160,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("80,202,0,200,202,0,200,202,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("80,202,0,200,202,0,200,202,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("80,202,0,200,202,0,200,202,0,240,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("80,202,0,200,202,0,200,202,0,160,161,161,161,161,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("80,202,0,200,202,0,200,202,0,240,241,241,241,241,241,242,0,0,0,0,0,0,0,160,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161"); + tmap.push_back("80,202,0,200,202,0,240,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80"); + tmap.push_back("80,202,0,200,202,0,160,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,81,241,241,241,241,241,241,241,241,241,241,241,241,241,241"); + tmap.push_back("80,202,0,200,202,0,240,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,202,0,240,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,202,0,160,161,161,161,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,202,0,240,241,241,241,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + tmap.push_back("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); + rcol = 0; + warpy = true; + + if(!game.intimetrial) + { + if(game.companion==0 && obj.flags[11]==0 && !game.crewstats[4]) //also need to check if he's rescued in a previous game + { + obj.createentity(game, 255, 121, 15, 0); + obj.createblock(1, 215, 0, 160, 240, 35); + } + } + roomname = "It's Not Easy Being Green"; + break; + + + default: + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push_back("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + //roomname = "Outer Space"; + + game.test = true; + game.teststring = "ERROR: Map not found in Warp Area"; + break; + #endif + } + + return tmap; +} diff --git a/desktop_version/src/WarpClass.h b/desktop_version/src/WarpClass.h new file mode 100644 index 00000000..8ae5d71d --- /dev/null +++ b/desktop_version/src/WarpClass.h @@ -0,0 +1,19 @@ +#ifndef WARPCLASS_H +#define WARPCLASS_H + +#include "Game.h" +#include "Entity.h" + +#include +#include + +class warpclass +{ +public: + std::vector loadlevel(int rx, int ry , Game& game, entityclass& obj); + std::string roomname; + int coin, rcol; + bool warpx, warpy; +}; + +#endif /* WARPCLASS_H */ diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp new file mode 100644 index 00000000..2b4fd5e4 --- /dev/null +++ b/desktop_version/src/editor.cpp @@ -0,0 +1,5353 @@ +#include "editor.h" + +#include "Graphics.h" +#include "Entity.h" +#include "Music.h" +#include "KeyPoll.h" +#include "Map.h" +#include "Script.h" +//#include "UtilityClass.h" +#include "time.h" + +#include "tinyxml.h" + +#include "Enums.h" + +#include "FileSystemUtils.h" + +#include + +edlevelclass::edlevelclass() +{ + tileset=0; + tilecol=0; + roomname=""; + warpdir=0; + platx1=0; + platy1=0; + platx2=320; + platy2=240; + platv=4; + enemyx1=0; + enemyy1=0; + enemyx2=320; + enemyy2=240; + enemytype=0; + directmode=0; +} + +editorclass::editorclass() +{ + maxwidth=20; + maxheight=20; + + //We create a blank map + for (int j = 0; j < 30 * maxwidth; j++) + { + for (int i = 0; i < 40 * maxheight; i++) + { + contents.push_back(0); + } + } + + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + swapmap.push_back(0); + } + } + + for (int i = 0; i < 30 * maxheight; i++) + { + vmult.push_back(int(i * 40 * maxwidth)); + } + + reset(); +} + +// comparison, not case sensitive. +bool compare_nocase (std::string first, std::string second) +{ + unsigned int i=0; + while ( (itolower(second[i])) + return false; + ++i; + } + if (first.length()NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + if(pText == NULL) + { + pText = ""; + } + + if (pKey == "MetaData") + { + + for( TiXmlElement* subElem = pElem->FirstChildElement(); subElem; subElem= subElem->NextSiblingElement()) + { + std::string pKey(subElem->Value()); + const char* pText = subElem->GetText() ; + if(pText == NULL) + { + pText = ""; + } + _data.filename = _path; + + if(pKey == "Created") + { + _data.timeCreated = pText; + } + + if(pKey == "Creator") + { + _data.creator = pText; + } + + if(pKey == "Title") + { + _data.title = pText; + } + + if(pKey == "Modified") + { + _data.timeModified = pText; + } + + if(pKey == "Modifiers") + { + _data.modifier = pText; + } + + if(pKey == "Desc1") + { + _data.Desc1 = pText; + } + + if(pKey == "Desc2") + { + _data.Desc2 = pText; + } + + if(pKey == "Desc3") + { + _data.Desc3 = pText; + } + + if(pKey == "website") + { + _data.website = pText; + } + } + } + } + return (_data.filename != ""); +} + +void editorclass::reset() +{ + version=2; //New smaller format change is 2 + + mapwidth=5; + mapheight=5; + + EditorData::GetInstance().title="Untitled Level"; + EditorData::GetInstance().creator="Unknown"; + Desc1=""; + Desc2=""; + Desc3=""; + website=""; + + roomnamehide=0; + zmod=false; + xmod=false; + spacemod=false; + spacemenu=0; + shiftmenu=false; + shiftkey=false; + saveandquit=false; + note=""; + notedelay=0; + roomnamemod=false; + textentry=false; + savemod=false; + loadmod=false; + deletekeyheld=false; + + titlemod=false; + creatormod=false; + desc1mod=false; + desc2mod=false; + desc3mod=false; + websitemod=false; + settingsmod=false; + warpmod=false; //Two step process + warpent=-1; + + boundarymod=0; + boundarytype=0; + boundx1=0; + boundx2=0; + boundy1=0; + boundy2=0; + + scripttextmod=false; + scripttextent=0; + scripttexttype=0; + + drawmode=0; + dmtile=0; + dmtileeditor=0; + entcol=0; + + tilex=0; + tiley=0; + levx=0; + levy=0; + keydelay=0; + lclickdelay=0; + savekey=false; + loadkey=false; + updatetiles=true; + changeroom=true; + levmusic=0; + + entframe=0; + entframedelay=0; + + numtrinkets=0; + numcrewmates=0; + EditorData::GetInstance().numedentities=0; + levmusic=0; + + roomtextmod=false; + roomtextent=0; + + for (int j = 0; j < maxheight; j++) + { + for (int i = 0; i < maxwidth; i++) + { + level[i+(j*maxwidth)].tileset=0; + level[i+(j*maxwidth)].tilecol=(i+j)%32; + level[i+(j*maxwidth)].roomname=""; + level[i+(j*maxwidth)].warpdir=0; + level[i+(j*maxwidth)].platx1=0; + level[i+(j*maxwidth)].platy1=0; + level[i+(j*maxwidth)].platx2=320; + level[i+(j*maxwidth)].platy2=240; + level[i+(j*maxwidth)].platv=4; + level[i+(j*maxwidth)].enemyx1=0; + level[i+(j*maxwidth)].enemyy1=0; + level[i+(j*maxwidth)].enemyx2=320; + level[i+(j*maxwidth)].enemyy2=240; + } + } + + for (int j = 0; j < 30 * maxwidth; j++) + { + for (int i = 0; i < 40 * maxheight; i++) + { + contents[i+(j*30*maxwidth)]=0; + } + } + + if(numhooks>0) + { + for(int i=0; i= 0) // FIXME: This is sketchy. -flibit + { + tstring=tstring[tstring.length()-1]; + } + else + { + tstring=""; + } + if(tstring==":") + { + tstring2=""; + tstring=script.customscript[i]; + for(size_t j=0; j1) sblength--; +} + +void editorclass::addhooktoscript(std::string t) +{ + //Adds hook+the scriptbuffer to the end of the scriptclass + removehookfromscript(t); + script.customscript.push_back(t+":"); + if(sblength>=1) + { + for(int i=0; i0) + { + if(sblength==t) + { + sblength--; + } + else + { + for(int i=t; i=t; i--) + { + sb[i+1]=sb[i]; + } + sb[t]=""; + sblength++; +} + +void editorclass::loadlevel( int rxi, int ryi ) +{ + //Set up our buffer array to be picked up by mapclass + rxi -= 100; + ryi -= 100; + if(rxi<0)rxi+=mapwidth; + if(ryi<0)ryi+=mapheight; + if(rxi>=mapwidth)rxi-=mapwidth; + if(ryi>=mapheight)ryi-=mapheight; + + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + swapmap[i+(j*40)]=contents[i+(rxi*40)+vmult[j+(ryi*30)]]; + } + } +} + +int editorclass::getlevelcol(int t) +{ + if(level[t].tileset==0) //Space Station + { + return level[t].tilecol; + } + else if(level[t].tileset==1) //Outside + { + return 32+level[t].tilecol; + } + else if(level[t].tileset==2) //Lab + { + return 40+level[t].tilecol; + } + else if(level[t].tileset==3) //Warp Zone + { + return 46+level[t].tilecol; + } + else if(level[t].tileset==4) //Ship + { + return 52+level[t].tilecol; + } + return 0; +} + +int editorclass::getenemycol(int t) +{ + switch(t) + { + //RED + case 3: + case 7: + case 12: + case 23: + case 28: + case 34: + case 42: + case 48: + case 58: + return 6; + break; + //GREEN + case 5: + case 9: + case 22: + case 25: + case 29: + case 31: + case 38: + case 46: + case 52: + case 53: + return 7; + break; + //BLUE + case 1: + case 6: + case 14: + case 27: + case 33: + case 44: + case 50: + case 57: + return 12; + break; + //YELLOW + case 4: + case 17: + case 24: + case 30: + case 37: + case 45: + case 51: + case 55: + return 9; + break; + //PURPLE + case 2: + case 11: + case 15: + case 19: + case 32: + case 36: + case 49: + return 20; + break; + //CYAN + case 8: + case 10: + case 13: + case 18: + case 26: + case 35: + case 41: + case 47: + case 54: + return 11; + break; + //PINK + case 16: + case 20: + case 39: + case 43: + case 56: + return 8; + break; + //ORANGE + case 21: + case 40: + return 17; + break; + default: + return 6; + break; + } + return 0; +} + +int editorclass::getwarpbackground(int rx, int ry) +{ + int tmp=rx+(maxwidth*ry); + switch(level[tmp].tileset) + { + case 0: //Space Station + switch(level[tmp].tilecol) + { + case 0: + return 3; + break; + case 1: + return 2; + break; + case 2: + return 1; + break; + case 3: + return 4; + break; + case 4: + return 5; + break; + case 5: + return 3; + break; + case 6: + return 1; + break; + case 7: + return 0; + break; + case 8: + return 5; + break; + case 9: + return 0; + break; + case 10: + return 2; + break; + case 11: + return 1; + break; + case 12: + return 5; + break; + case 13: + return 0; + break; + case 14: + return 3; + break; + case 15: + return 2; + break; + case 16: + return 4; + break; + case 17: + return 0; + break; + case 18: + return 3; + break; + case 19: + return 1; + break; + case 20: + return 4; + break; + case 21: + return 5; + break; + case 22: + return 1; + break; + case 23: + return 4; + break; + case 24: + return 5; + break; + case 25: + return 0; + break; + case 26: + return 3; + break; + case 27: + return 1; + break; + case 28: + return 5; + break; + case 29: + return 4; + break; + case 30: + return 5; + break; + case 31: + return 2; + break; + default: + return 6; + break; + } + break; + case 1: //Outside + switch(level[tmp].tilecol) + { + case 0: + return 3; + break; + case 1: + return 1; + break; + case 2: + return 0; + break; + case 3: + return 2; + break; + case 4: + return 4; + break; + case 5: + return 5; + break; + case 6: + return 2; + break; + case 7: + return 4; + break; + default: + return 6; + break; + } + break; + case 2: //Lab + switch(level[tmp].tilecol) + { + case 0: + return 0; + break; + case 1: + return 1; + break; + case 2: + return 2; + break; + case 3: + return 3; + break; + case 4: + return 4; + break; + case 5: + return 5; + break; + case 6: + return 6; + break; + default: + return 6; + break; + } + break; + case 3: //Warp Zone + switch(level[tmp].tilecol) + { + case 0: + return 0; + break; + case 1: + return 1; + break; + case 2: + return 2; + break; + case 3: + return 3; + break; + case 4: + return 4; + break; + case 5: + return 5; + break; + case 6: + return 6; + break; + default: + return 6; + break; + } + break; + case 4: //Ship + switch(level[tmp].tilecol) + { + case 0: + return 5; + break; + case 1: + return 0; + break; + case 2: + return 4; + break; + case 3: + return 2; + break; + case 4: + return 3; + break; + case 5: + return 1; + break; + case 6: + return 6; + break; + default: + return 6; + break; + } + break; + case 5: //Tower + return 6; + break; + default: + return 6; + break; + } +} + +int editorclass::getenemyframe(int t) +{ + switch(t) + { + case 0: + return 78; + break; + case 1: + return 88; + break; + case 2: + return 36; + break; + case 3: + return 164; + break; + case 4: + return 68; + break; + case 5: + return 48; + break; + case 6: + return 176; + break; + case 7: + return 168; + break; + case 8: + return 112; + break; + case 9: + return 114; + break; + default: + return 78; + break; + } + return 78; +} + + +void editorclass::placetile( int x, int y, int t ) +{ + if(x>=0 && y>=0 && x=0 && y>=0 && x<40 && y<30) + { + contents[x+(levx*40)+vmult[y+(levy*30)]]=t; + } + updatetiles=true; +} + +int editorclass::base( int x, int y ) +{ + //Return the base tile for the given tileset and colour + temp=x+(y*maxwidth); + if(level[temp].tileset==0) //Space Station + { + if(level[temp].tilecol>=22) + { + return 483 + ((level[temp].tilecol-22)*3); + } + else if(level[temp].tilecol>=11) + { + return 283 + ((level[temp].tilecol-11)*3); + } + else + { + return 83 + (level[temp].tilecol*3); + } + } + else if(level[temp].tileset==1) //Outside + { + return 480 + (level[temp].tilecol*3); + } + else if(level[temp].tileset==2) //Lab + { + return 280 + (level[temp].tilecol*3); + } + else if(level[temp].tileset==3) //Warp Zone/Intermission + { + return 80 + (level[temp].tilecol*3); + } + else if(level[temp].tileset==4) //SHIP + { + return 101 + (level[temp].tilecol*3); + } + return 0; +} + +int editorclass::backbase( int x, int y ) +{ + //Return the base tile for the background of the given tileset and colour + temp=x+(y*maxwidth); + if(level[temp].tileset==0) //Space Station + { + //Pick depending on tilecol + switch(level[temp].tilecol) + { + case 0: + case 5: + case 26: + return 680; //Blue + break; + case 3: + case 16: + case 23: + return 683; //Yellow + break; + case 9: + case 12: + case 21: + return 686; //Greeny Cyan + break; + case 4: + case 8: + case 24: + case 28: + case 30: + return 689; //Green + break; + case 20: + case 29: + return 692; //Orange + break; + case 2: + case 6: + case 11: + case 22: + case 27: + return 695; //Red + break; + case 1: + case 10: + case 15: + case 19: + case 31: + return 698; //Pink + break; + case 14: + case 18: + return 701; //Dark Blue + break; + case 7: + case 13: + case 17: + case 25: + return 704; //Cyan + break; + default: + return 680; + break; + } + + } + else if(level[temp].tileset==1) //outside + { + return 680 + (level[temp].tilecol*3); + } + else if(level[temp].tileset==2) //Lab + { + return 0; + } + else if(level[temp].tileset==3) //Warp Zone/Intermission + { + return 120 + (level[temp].tilecol*3); + } + else if(level[temp].tileset==4) //SHIP + { + return 741 + (level[temp].tilecol*3); + } + return 0; +} + +int editorclass::at( int x, int y ) +{ + if(x<0) return at(0,y); + if(y<0) return at(x,0); + if(x>=40) return at(39,y); + if(y>=30) return at(x,29); + + if(x>=0 && y>=0 && x<40 && y<30) + { + return contents[x+(levx*40)+vmult[y+(levy*30)]]; + } + return 0; +} + + +int editorclass::freewrap( int x, int y ) +{ + if(x<0) return freewrap(x+(mapwidth*40),y); + if(y<0) return freewrap(x,y+(mapheight*30)); + if(x>=(mapwidth*40)) return freewrap(x-(mapwidth*40),y); + if(y>=(mapheight*30)) return freewrap(x,y-(mapheight*30)); + + if(x>=0 && y>=0 && x<(mapwidth*40) && y<(mapheight*30)) + { + if(contents[x+vmult[y]]==0) + { + return 0; + } + else + { + if(contents[x+vmult[y]]>=2 && contents[x+vmult[y]]<80) + { + return 0; + } + if(contents[x+vmult[y]]>=680) + { + return 0; + } + } + } + return 1; +} + +int editorclass::backonlyfree( int x, int y ) +{ + //Returns 1 if tile is a background tile, 0 otherwise + if(x<0) return backonlyfree(0,y); + if(y<0) return backonlyfree(x,0); + if(x>=40) return backonlyfree(39,y); + if(y>=30) return backonlyfree(x,29); + + if(x>=0 && y>=0 && x<40 && y<30) + { + if(contents[x+(levx*40)+vmult[y+(levy*30)]]>=680) + { + return 1; + } + } + return 0; +} + +int editorclass::backfree( int x, int y ) +{ + //Returns 0 if tile is not a block or background tile, 1 otherwise + if(x<0) return backfree(0,y); + if(y<0) return backfree(x,0); + if(x>=40) return backfree(39,y); + if(y>=30) return backfree(x,29); + + if(x>=0 && y>=0 && x<40 && y<30) + { + if(contents[x+(levx*40)+vmult[y+(levy*30)]]==0) + { + return 0; + } + else + { + //if(contents[x+(levx*40)+vmult[y+(levy*30)]]>=2 && contents[x+(levx*40)+vmult[y+(levy*30)]]<80){ + // return 0; + //} + } + } + return 1; +} + +int editorclass::spikefree( int x, int y ) +{ + //Returns 0 if tile is not a block or spike, 1 otherwise + if(x==-1) return free(0,y); + if(y==-1) return free(x,0); + if(x==40) return free(39,y); + if(y==30) return free(x,29); + + if(x>=0 && y>=0 && x<40 && y<30) + { + if(contents[x+(levx*40)+vmult[y+(levy*30)]]==0) + { + return 0; + } + else + { + if(contents[x+(levx*40)+vmult[y+(levy*30)]]>=680) + { + return 0; + } + } + } + return 1; +} + +int editorclass::free( int x, int y ) +{ + //Returns 0 if tile is not a block, 1 otherwise + if(x==-1) return free(0,y); + if(y==-1) return free(x,0); + if(x==40) return free(39,y); + if(y==30) return free(x,29); + + if(x>=0 && y>=0 && x<40 && y<30) + { + if(contents[x+(levx*40)+vmult[y+(levy*30)]]==0) + { + return 0; + } + else + { + if(contents[x+(levx*40)+vmult[y+(levy*30)]]>=2 && contents[x+(levx*40)+vmult[y+(levy*30)]]<80) + { + return 0; + } + if(contents[x+(levx*40)+vmult[y+(levy*30)]]>=680) + { + return 0; + } + } + } + return 1; +} + +int editorclass::absfree( int x, int y ) +{ + //Returns 0 if tile is not a block, 1 otherwise, abs on grid + if(x>=0 && y>=0 && x=2 && contents[x+vmult[y]]<80) + { + return 0; + } + if(contents[x+vmult[y]]>=680) + { + return 0; + } + } + } + return 1; +} + +int editorclass::match( int x, int y ) +{ + if(free(x-1,y)==0 && free(x,y-1)==0 && free(x+1,y)==0 && free(x,y+1)==0) return 0; + + if(free(x-1,y)==0 && free(x,y-1)==0) return 10; + if(free(x+1,y)==0 && free(x,y-1)==0) return 11; + if(free(x-1,y)==0 && free(x,y+1)==0) return 12; + if(free(x+1,y)==0 && free(x,y+1)==0) return 13; + + if(free(x,y-1)==0) return 1; + if(free(x-1,y)==0) return 2; + if(free(x,y+1)==0) return 3; + if(free(x+1,y)==0) return 4; + if(free(x-1,y-1)==0) return 5; + if(free(x+1,y-1)==0) return 6; + if(free(x-1,y+1)==0) return 7; + if(free(x+1,y+1)==0) return 8; + + return 0; +} + +int editorclass::warpzonematch( int x, int y ) +{ + if(free(x-1,y)==0 && free(x,y-1)==0 && free(x+1,y)==0 && free(x,y+1)==0) return 0; + + if(free(x-1,y)==0 && free(x,y-1)==0) return 10; + if(free(x+1,y)==0 && free(x,y-1)==0) return 11; + if(free(x-1,y)==0 && free(x,y+1)==0) return 12; + if(free(x+1,y)==0 && free(x,y+1)==0) return 13; + + if(free(x,y-1)==0) return 1; + if(free(x-1,y)==0) return 2; + if(free(x,y+1)==0) return 3; + if(free(x+1,y)==0) return 4; + if(free(x-1,y-1)==0) return 5; + if(free(x+1,y-1)==0) return 6; + if(free(x-1,y+1)==0) return 7; + if(free(x+1,y+1)==0) return 8; + + return 0; +} + +int editorclass::outsidematch( int x, int y ) +{ + + if(backonlyfree(x-1,y)==0 && backonlyfree(x+1,y)==0) return 2; + if(backonlyfree(x,y-1)==0 && backonlyfree(x,y+1)==0) return 1; + + return 0; +} + +int editorclass::backmatch( int x, int y ) +{ + //Returns the first position match for a border + // 5 1 6 + // 2 X 4 + // 7 3 8 + /* + if(at(x-1,y)>=80 && at(x,y-1)>=80) return 10; + if(at(x+1,y)>=80 && at(x,y-1)>=80) return 11; + if(at(x-1,y)>=80 && at(x,y+1)>=80) return 12; + if(at(x+1,y)>=80 && at(x,y+1)>=80) return 13; + + if(at(x,y-1)>=80) return 1; + if(at(x-1,y)>=80) return 2; + if(at(x,y+1)>=80) return 3; + if(at(x+1,y)>=80) return 4; + if(at(x-1,y-1)>=80) return 5; + if(at(x+1,y-1)>=80) return 6; + if(at(x-1,y+1)>=80) return 7; + if(at(x+1,y+1)>=80) return 8; + */ + if(backfree(x-1,y)==0 && backfree(x,y-1)==0 && backfree(x+1,y)==0 && backfree(x,y+1)==0) return 0; + + if(backfree(x-1,y)==0 && backfree(x,y-1)==0) return 10; + if(backfree(x+1,y)==0 && backfree(x,y-1)==0) return 11; + if(backfree(x-1,y)==0 && backfree(x,y+1)==0) return 12; + if(backfree(x+1,y)==0 && backfree(x,y+1)==0) return 13; + + if(backfree(x,y-1)==0) return 1; + if(backfree(x-1,y)==0) return 2; + if(backfree(x,y+1)==0) return 3; + if(backfree(x+1,y)==0) return 4; + if(backfree(x-1,y-1)==0) return 5; + if(backfree(x+1,y-1)==0) return 6; + if(backfree(x-1,y+1)==0) return 7; + if(backfree(x+1,y+1)==0) return 8; + + return 0; +} + +int editorclass::edgetile( int x, int y ) +{ + switch(match(x,y)) + { + case 14: + return 0; + break; + case 10: + return 80; + break; + case 11: + return 82; + break; + case 12: + return 160; + break; + case 13: + return 162; + break; + case 1: + return 81; + break; + case 2: + return 120; + break; + case 3: + return 161; + break; + case 4: + return 122; + break; + case 5: + return 42; + break; + case 6: + return 41; + break; + case 7: + return 2; + break; + case 8: + return 1; + break; + case 0: + default: + return 0; + break; + } + return 0; +} + +int editorclass::warpzoneedgetile( int x, int y ) +{ + switch(backmatch(x,y)) + { + case 14: + return 0; + break; + case 10: + return 80; + break; + case 11: + return 82; + break; + case 12: + return 160; + break; + case 13: + return 162; + break; + case 1: + return 81; + break; + case 2: + return 120; + break; + case 3: + return 161; + break; + case 4: + return 122; + break; + case 5: + return 42; + break; + case 6: + return 41; + break; + case 7: + return 2; + break; + case 8: + return 1; + break; + case 0: + default: + return 0; + break; + } + return 0; +} + +int editorclass::outsideedgetile( int x, int y ) +{ + switch(outsidematch(x,y)) + { + case 2: + return 0; + break; + case 1: + return 1; + break; + case 0: + default: + return 2; + break; + } + return 2; +} + + +int editorclass::backedgetile( int x, int y ) +{ + switch(backmatch(x,y)) + { + case 14: + return 0; + break; + case 10: + return 80; + break; + case 11: + return 82; + break; + case 12: + return 160; + break; + case 13: + return 162; + break; + case 1: + return 81; + break; + case 2: + return 120; + break; + case 3: + return 161; + break; + case 4: + return 122; + break; + case 5: + return 42; + break; + case 6: + return 41; + break; + case 7: + return 2; + break; + case 8: + return 1; + break; + case 0: + default: + return 0; + break; + } + return 0; +} + +int editorclass::labspikedir( int x, int y, int t ) +{ + // a slightly more tricky case + if(free(x,y+1)==1) return 63 + (t*2); + if(free(x,y-1)==1) return 64 + (t*2); + if(free(x-1,y)==1) return 51 + (t*2); + if(free(x+1,y)==1) return 52 + (t*2); + return 63 + (t*2); +} + +int editorclass::spikedir( int x, int y ) +{ + if(free(x,y+1)==1) return 8; + if(free(x,y-1)==1) return 9; + if(free(x-1,y)==1) return 49; + if(free(x+1,y)==1) return 50; + return 8; +} + +void editorclass::findstartpoint(Game& game) +{ + //Ok! Scan the room for the closest checkpoint + int testeditor=-1; + //First up; is there a start point on this screen? + for(int i=0; i tempcontents; + for (int j = 0; j < 30 * oldwidth; j++) + { + for (int i = 0; i < 40 * oldheight; i++) + { + tempcontents.push_back(contents[i+(j*40*oldwidth)]); + } + } + + contents.clear(); + for (int j = 0; j < 30 * maxheight; j++) + { + for (int i = 0; i < 40 * maxwidth; i++) + { + contents.push_back(0); + } + } + + for (int j = 0; j < 30 * oldheight; j++) + { + for (int i = 0; i < 40 * oldwidth; i++) + { + contents[i+(j*40*oldwidth)]=tempcontents[i+(j*40*oldwidth)]; + } + } + + tempcontents.clear(); + + for (int i = 0; i < 30 * maxheight; i++) + { + vmult.push_back(int(i * 40 * maxwidth)); + } + + for (int j = 0; j < maxheight; j++) + { + for (int i = 0; i < maxwidth; i++) + { + level[i+(j*maxwidth)].tilecol=(i+j)%6; + } + } + contents.clear(); + +} + +int editorclass::findtrinket(int t) +{ + int ttrinket=0; + for(int i=0; iQueryIntAttribute("version", &version); + // save this for later + hRoot=TiXmlHandle(pElem); + } + + for( pElem = hRoot.FirstChild( "Data" ).FirstChild().Element(); pElem; pElem=pElem->NextSiblingElement()) + { + std::string pKey(pElem->Value()); + const char* pText = pElem->GetText() ; + if(pText == NULL) + { + pText = ""; + } + + if (pKey == "MetaData") + { + + for( TiXmlElement* subElem = pElem->FirstChildElement(); subElem; subElem= subElem->NextSiblingElement()) + { + std::string pKey(subElem->Value()); + const char* pText = subElem->GetText() ; + if(pText == NULL) + { + pText = ""; + } + + if(pKey == "Creator") + { + EditorData::GetInstance().creator = pText; + } + + if(pKey == "Title") + { + EditorData::GetInstance().title = pText; + } + + if(pKey == "Desc1") + { + Desc1 = pText; + } + + if(pKey == "Desc2") + { + Desc2 = pText; + } + + if(pKey == "Desc3") + { + Desc3 = pText; + } + + if(pKey == "website") + { + website = pText; + } + } + } + + if (pKey == "mapwidth") + { + mapwidth = atoi(pText); + } + if (pKey == "mapheight") + { + mapheight = atoi(pText); + } + if (pKey == "levmusic") + { + levmusic = atoi(pText); + } + + + if (pKey == "contents") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + //contents.clear(); + for(size_t i = 0; i < contents.size(); i++) + { + contents[i] =0; + } + int x =0; + int y =0; + for(size_t i = 0; i < values.size(); i++) + { + contents[x + (maxwidth*40*y)] = atoi(values[i].c_str()); + x++; + if(x == mapwidth*40) + { + x=0; + y++; + } + + } + } + } + + /*else if(version==1){ + if (pKey == "contents") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,','); + contents.clear(); + for(int i = 0; i < values.size(); i++) + { + contents.push_back(atoi(values[i].c_str())); + } + } + } + //} + */ + + + if (pKey == "edEntities") + { + int i = 0; + for( TiXmlElement* edEntityEl = pElem->FirstChildElement(); edEntityEl; edEntityEl=edEntityEl->NextSiblingElement()) + { + std::string pKey(edEntityEl->Value()); + //const char* pText = edEntityEl->GetText() ; + if(edEntityEl->GetText() != NULL) + { + edentity[i].scriptname = std::string(edEntityEl->GetText()) ; + } + edEntityEl->QueryIntAttribute("x", &edentity[i].x); + edEntityEl->QueryIntAttribute("y", &edentity[i].y); + edEntityEl->QueryIntAttribute("t", &edentity[i].t); + + edEntityEl->QueryIntAttribute("p1", &edentity[i].p1); + edEntityEl->QueryIntAttribute("p2", &edentity[i].p2); + edEntityEl->QueryIntAttribute("p3", &edentity[i].p3); + edEntityEl->QueryIntAttribute("p4", &edentity[i].p4); + edEntityEl->QueryIntAttribute("p5", &edentity[i].p5); + edEntityEl->QueryIntAttribute("p6", &edentity[i].p6); + + i++; + + } + + EditorData::GetInstance().numedentities = i; + } + + if (pKey == "levelMetaData") + { + int i = 0; + for( TiXmlElement* edLevelClassElement = pElem->FirstChildElement(); edLevelClassElement; edLevelClassElement=edLevelClassElement->NextSiblingElement()) + { + std::string pKey(edLevelClassElement->Value()); + if(edLevelClassElement->GetText() != NULL) + { + level[i].roomname = std::string(edLevelClassElement->GetText()) ; + } + + edLevelClassElement->QueryIntAttribute("tileset", &level[i].tileset); + edLevelClassElement->QueryIntAttribute("tilecol", &level[i].tilecol); + edLevelClassElement->QueryIntAttribute("platx1", &level[i].platx1); + edLevelClassElement->QueryIntAttribute("platy1", &level[i].platy1); + edLevelClassElement->QueryIntAttribute("platx2", &level[i].platx2); + edLevelClassElement->QueryIntAttribute("platy2", &level[i].platy2); + edLevelClassElement->QueryIntAttribute("platv", &level[i].platv); + edLevelClassElement->QueryIntAttribute("enemyx1", &level[i].enemyx1); + edLevelClassElement->QueryIntAttribute("enemyy1", &level[i].enemyy1); + edLevelClassElement->QueryIntAttribute("enemyx2", &level[i].enemyx2); + edLevelClassElement->QueryIntAttribute("enemyy2", &level[i].enemyy2); + edLevelClassElement->QueryIntAttribute("enemytype", &level[i].enemytype); + edLevelClassElement->QueryIntAttribute("directmode", &level[i].directmode); + + edLevelClassElement->QueryIntAttribute("warpdir", &level[i].warpdir); + + i++; + + } + } + + if (pKey == "script") + { + std::string TextString = (pText); + if(TextString.length()) + { + std::vector values = split(TextString,'|'); + script.clearcustom(); + for(size_t i = 0; i < values.size(); i++) + { + script.customscript.push_back(values[i]); + } + + } + } + + } + + gethooks(); + countstuff(); + version=2; + //saveconvertor(); +} + +void editorclass::save(std::string& _path) +{ + TiXmlDocument doc; + TiXmlElement* msg; + TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" ); + doc.LinkEndChild( decl ); + + TiXmlElement * root = new TiXmlElement( "MapData" ); + root->SetAttribute("version",version); + doc.LinkEndChild( root ); + + TiXmlComment * comment = new TiXmlComment(); + comment->SetValue(" Save file " ); + root->LinkEndChild( comment ); + + TiXmlElement * data = new TiXmlElement( "Data" ); + root->LinkEndChild( data ); + + msg = new TiXmlElement( "MetaData" ); + + time_t rawtime; + struct tm * timeinfo; + + time ( &rawtime ); + timeinfo = localtime ( &rawtime ); + + std::string timeAndDate = asctime (timeinfo); + //timeAndDate += dateStr; + + EditorData::GetInstance().timeModified = timeAndDate; + if(EditorData::GetInstance().timeModified == "") + { + EditorData::GetInstance().timeCreated = timeAndDate; + } + + //getUser + TiXmlElement* meta = new TiXmlElement( "Creator" ); + meta->LinkEndChild( new TiXmlText( EditorData::GetInstance().creator.c_str() )); + msg->LinkEndChild( meta ); + + meta = new TiXmlElement( "Title" ); + meta->LinkEndChild( new TiXmlText( EditorData::GetInstance().title.c_str() )); + msg->LinkEndChild( meta ); + + meta = new TiXmlElement( "Created" ); + meta->LinkEndChild( new TiXmlText( UtilityClass::String(version).c_str() )); + msg->LinkEndChild( meta ); + + meta = new TiXmlElement( "Modified" ); + meta->LinkEndChild( new TiXmlText( EditorData::GetInstance().modifier.c_str() ) ); + msg->LinkEndChild( meta ); + + meta = new TiXmlElement( "Modifiers" ); + meta->LinkEndChild( new TiXmlText( UtilityClass::String(version).c_str() )); + msg->LinkEndChild( meta ); + + meta = new TiXmlElement( "Desc1" ); + meta->LinkEndChild( new TiXmlText( Desc1.c_str() )); + msg->LinkEndChild( meta ); + + meta = new TiXmlElement( "Desc2" ); + meta->LinkEndChild( new TiXmlText( Desc2.c_str() )); + msg->LinkEndChild( meta ); + + meta = new TiXmlElement( "Desc3" ); + meta->LinkEndChild( new TiXmlText( Desc3.c_str() )); + msg->LinkEndChild( meta ); + + meta = new TiXmlElement( "website" ); + meta->LinkEndChild( new TiXmlText( website.c_str() )); + msg->LinkEndChild( meta ); + + data->LinkEndChild( msg ); + + msg = new TiXmlElement( "mapwidth" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(mapwidth).c_str() )); + data->LinkEndChild( msg ); + + msg = new TiXmlElement( "mapheight" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(mapheight).c_str() )); + data->LinkEndChild( msg ); + + msg = new TiXmlElement( "levmusic" ); + msg->LinkEndChild( new TiXmlText( UtilityClass::String(levmusic).c_str() )); + data->LinkEndChild( msg ); + + //New save format + std::string contentsString=""; + for(int y = 0; y < mapheight*30; y++ ) + { + for(int x = 0; x < mapwidth*40; x++ ) + { + contentsString += UtilityClass::String(contents[x + (maxwidth*40*y)]) + ","; + } + } + msg = new TiXmlElement( "contents" ); + msg->LinkEndChild( new TiXmlText( contentsString.c_str() )); + data->LinkEndChild( msg ); + + + //Old save format + /* + std::string contentsString; + for(int i = 0; i < contents.size(); i++ ) + { + contentsString += UtilityClass::String(contents[i]) + ","; + } + msg = new TiXmlElement( "contents" ); + msg->LinkEndChild( new TiXmlText( contentsString.c_str() )); + data->LinkEndChild( msg ); + */ + + msg = new TiXmlElement( "edEntities" ); + for(int i = 0; i < EditorData::GetInstance().numedentities; i++) + { + TiXmlElement *edentityElement = new TiXmlElement( "edentity" ); + edentityElement->SetAttribute( "x", edentity[i].x); + edentityElement->SetAttribute( "y", edentity[i].y); + edentityElement->SetAttribute( "t", edentity[i].t); + edentityElement->SetAttribute( "p1", edentity[i].p1); + edentityElement->SetAttribute( "p2", edentity[i].p2); + edentityElement->SetAttribute( "p3", edentity[i].p3); + edentityElement->SetAttribute( "p4", edentity[i].p4); + edentityElement->SetAttribute( "p5", edentity[i].p5); + edentityElement->SetAttribute( "p6", edentity[i].p6); + edentityElement->LinkEndChild( new TiXmlText( edentity[i].scriptname.c_str() )) ; + edentityElement->LinkEndChild( new TiXmlText( "" )) ; + msg->LinkEndChild( edentityElement ); + } + + data->LinkEndChild( msg ); + + msg = new TiXmlElement( "levelMetaData" ); + for(int i = 0; i < 400; i++) + { + TiXmlElement *edlevelclassElement = new TiXmlElement( "edLevelClass" ); + edlevelclassElement->SetAttribute( "tileset", level[i].tileset); + edlevelclassElement->SetAttribute( "tilecol", level[i].tilecol); + edlevelclassElement->SetAttribute( "platx1", level[i].platx1); + edlevelclassElement->SetAttribute( "platy1", level[i].platy1); + edlevelclassElement->SetAttribute( "platx2", level[i].platx2); + edlevelclassElement->SetAttribute( "platy2", level[i].platy2); + edlevelclassElement->SetAttribute( "platv", level[i].platv); + edlevelclassElement->SetAttribute( "enemyx1", level[i].enemyx1); + edlevelclassElement->SetAttribute( "enemyy1", level[i].enemyy1); + edlevelclassElement->SetAttribute( "enemyx2", level[i].enemyx2); + edlevelclassElement->SetAttribute( "enemyy2", level[i].enemyy2); + edlevelclassElement->SetAttribute( "enemytype", level[i].enemytype); + edlevelclassElement->SetAttribute( "directmode", level[i].directmode); + edlevelclassElement->SetAttribute( "warpdir", level[i].warpdir); + + edlevelclassElement->LinkEndChild( new TiXmlText( level[i].roomname.c_str() )) ; + msg->LinkEndChild( edlevelclassElement ); + } + data->LinkEndChild( msg ); + + std::string scriptString; + for(size_t i = 0; i < script.customscript.size(); i++ ) + { + scriptString += script.customscript[i] + "|"; + } + msg = new TiXmlElement( "script" ); + msg->LinkEndChild( new TiXmlText( scriptString.c_str() )); + data->LinkEndChild( msg ); + + doc.SaveFile((std::string(FILESYSTEM_getUserLevelDirectory()) + _path).c_str() ); +} + + +void addedentity( int xp, int yp, int tp, int p1/*=0*/, int p2/*=0*/, int p3/*=0*/, int p4/*=0*/, int p5/*=320*/, int p6/*=240*/) +{ + edentity[EditorData::GetInstance().numedentities].x=xp; + edentity[EditorData::GetInstance().numedentities].y=yp; + edentity[EditorData::GetInstance().numedentities].t=tp; + edentity[EditorData::GetInstance().numedentities].p1=p1; + edentity[EditorData::GetInstance().numedentities].p2=p2; + edentity[EditorData::GetInstance().numedentities].p3=p3; + edentity[EditorData::GetInstance().numedentities].p4=p4; + edentity[EditorData::GetInstance().numedentities].p5=p5; + edentity[EditorData::GetInstance().numedentities].p6=p6; + edentity[EditorData::GetInstance().numedentities].scriptname=""; + + EditorData::GetInstance().numedentities++; +} + +void naddedentity( int xp, int yp, int tp, int p1/*=0*/, int p2/*=0*/, int p3/*=0*/, int p4/*=0*/, int p5/*=320*/, int p6/*=240*/) +{ + edentity[EditorData::GetInstance().numedentities].x=xp; + edentity[EditorData::GetInstance().numedentities].y=yp; + edentity[EditorData::GetInstance().numedentities].t=tp; + edentity[EditorData::GetInstance().numedentities].p1=p1; + edentity[EditorData::GetInstance().numedentities].p2=p2; + edentity[EditorData::GetInstance().numedentities].p3=p3; + edentity[EditorData::GetInstance().numedentities].p4=p4; + edentity[EditorData::GetInstance().numedentities].p5=p5; + edentity[EditorData::GetInstance().numedentities].p6=p6; + edentity[EditorData::GetInstance().numedentities].scriptname=""; +} + +void copyedentity( int a, int b ) +{ + edentity[a].x=edentity[b].x; + edentity[a].y=edentity[b].y; + edentity[a].t=edentity[b].t; + edentity[a].p1=edentity[b].p1; + edentity[a].p2=edentity[b].p2; + edentity[a].p3=edentity[b].p3; + edentity[a].p4=edentity[b].p4; + edentity[a].p5=edentity[b].p5; + edentity[a].p6=edentity[b].p6; + edentity[a].scriptname=edentity[b].scriptname; +} + +void removeedentity( int t ) +{ + if(t==EditorData::GetInstance().numedentities-1) + { + EditorData::GetInstance().numedentities--; + } + else + { + for(int m=t; m=1) + { + //Fill in this pixel + FillRect(dwgfx.images[12], (i2*48)+i, (j2*36)+j, 1, 1, dwgfx.getRGB(tm, tm, tm)); + } + } + } + } + } + } + else if(ed.mapheight<=10 && ed.mapwidth<=10) + { + //2x map + for(int j2=0; j2=1) + { + //Fill in this pixel + FillRect(dwgfx.images[12], (i2*24)+i, (j2*18)+j, 1, 1, dwgfx.getRGB(tm, tm, tm)); + } + } + } + } + } + } + else + { + for(int j2=0; j2=1) + { + //Fill in this pixel + FillRect(dwgfx.images[12], (i2*12)+i, (j2*9)+j, 1, 1, dwgfx.getRGB(tm, tm, tm)); + } + } + } + } + } + } +} + +void editorrender( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help ) +{ + //TODO + //dwgfx.backbuffer.lock(); + + //Draw grid + + FillRect(dwgfx.backBuffer, 0, 0, 320,240, dwgfx.getRGB(0,0,0)); + for(int j=0; j<30; j++) + { + for(int i=0; i<40; i++) + { + fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(8,8,8)); //a simple grid + if(i%4==0) fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(16,16,16)); + if(j%4==0) fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(16,16,16)); + + //Minor guides + if(i==9) fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(24,24,24)); + if(i==30) fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(24,24,24)); + if(j==6 || j==7) fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(24,24,24)); + if(j==21 || j==22) fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(24,24,24)); + + //Major guides + if(i==20 || i==19) fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(32,32,32)); + if(j==14) fillbox(dwgfx, i*8, j*8, (i*8)+7, (j*8)+7, dwgfx.getRGB(32,32,32)); + } + } + + //Or draw background + //dwgfx.drawbackground(1, map); + if(!ed.settingsmod) + { + switch(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir) + { + case 1: + dwgfx.rcol=ed.getwarpbackground(ed.levx, ed.levy); + dwgfx.drawbackground(3, map); + break; + case 2: + dwgfx.rcol=ed.getwarpbackground(ed.levx, ed.levy); + dwgfx.drawbackground(4, map); + break; + case 3: + dwgfx.rcol=ed.getwarpbackground(ed.levx, ed.levy); + dwgfx.drawbackground(5, map); + break; + default: + break; + } + } + + //Draw map, in function + int temp; + if(ed.level[ed.levx+(ed.maxwidth*ed.levy)].tileset==0 || ed.level[ed.levx+(ed.maxwidth*ed.levy)].tileset==10) + { + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + temp=ed.contents[i + (ed.levx*40) + ed.vmult[j+(ed.levy*30)]]; + if(temp>0) dwgfx.drawtile(i*8,j*8,temp,0,0,0); + } + } + } + else + { + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + temp=ed.contents[i + (ed.levx*40) + ed.vmult[j+(ed.levy*30)]]; + if(temp>0) dwgfx.drawtile2(i*8,j*8,temp,0,0,0); + } + } + } + + //Edge tile fix + + //Buffer the sides of the new room with tiles from other rooms, to ensure no gap problems. + for(int j=0; j<30; j++) + { + //left edge + if(ed.freewrap((ed.levx*40)-1,j+(ed.levy*30))==1) + { + FillRect(dwgfx.backBuffer, 0,j*8, 2,8, dwgfx.getRGB(255,255,255-help.glow)); + } + //right edge + if(ed.freewrap((ed.levx*40)+40,j+(ed.levy*30))==1) + { + FillRect(dwgfx.backBuffer, 318,j*8, 2,8, dwgfx.getRGB(255,255,255-help.glow)); + } + } + + for(int i=0; i<40; i++) + { + if(ed.freewrap((ed.levx*40)+i,(ed.levy*30)-1)==1) + { + FillRect(dwgfx.backBuffer, i*8,0, 8,2, dwgfx.getRGB(255,255,255-help.glow)); + } + + if(ed.freewrap((ed.levx*40)+i,30+(ed.levy*30))==1) + { + FillRect(dwgfx.backBuffer, i*8,238, 8,2, dwgfx.getRGB(255,255,255-help.glow)); + } + } + + //Draw entities + game.customcol=ed.getlevelcol(ed.levx+(ed.levy*ed.maxwidth))+1; + ed.entcol=ed.getenemycol(game.customcol); + obj.customplatformtile=game.customcol*12; + + ed.temp=edentat(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30)); + for(int i=0; i< EditorData::GetInstance().numedentities; i++) + { + //if() on screen + int tx=(edentity[i].x-(edentity[i].x%40))/40; + int ty=(edentity[i].y-(edentity[i].y%30))/30; + + point tpoint; + SDL_Rect drawRect; + + if(tx==ed.levx && ty==ed.levy) + { + switch(edentity[i].t) + { + case 1: //Entities + //FillRect(dwgfx.backBuffer, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), 16,16, dwgfx.getRGB(64,32,64)); + //dwgfx.drawsprite((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),ed.getenemyframe(ed.level[ed.levx+(ed.levy*ed.maxwidth)].enemytype),164,48,48); + dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),ed.getenemyframe(ed.level[ed.levx+(ed.levy*ed.maxwidth)].enemytype),ed.entcol,help); + if(edentity[i].p1==0) dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+4,(edentity[i].y*8)- (ed.levy*30*8)+4, "V", 255, 255, 255 - help.glow, false); + if(edentity[i].p1==1) dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+4,(edentity[i].y*8)- (ed.levy*30*8)+4, "^", 255, 255, 255 - help.glow, false); + if(edentity[i].p1==2) dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+4,(edentity[i].y*8)- (ed.levy*30*8)+4, "<", 255, 255, 255 - help.glow, false); + if(edentity[i].p1==3) dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+4,(edentity[i].y*8)- (ed.levy*30*8)+4, ">", 255, 255, 255 - help.glow, false); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,16,dwgfx.getBGR(255,164,255)); + break; + case 2: //Threadmills & platforms + tpoint.x = (edentity[i].x*8)- (ed.levx*40*8); + tpoint.y = (edentity[i].y*8)- (ed.levy*30*8); + drawRect = dwgfx.tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL,dwgfx.backBuffer, &drawRect); + + if(edentity[i].p1<=4) + { + if(edentity[i].p1==0) dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+12,(edentity[i].y*8)- (ed.levy*30*8), "V", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + if(edentity[i].p1==1) dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+12,(edentity[i].y*8)- (ed.levy*30*8), "^", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + if(edentity[i].p1==2) dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+12,(edentity[i].y*8)- (ed.levy*30*8), "<", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + if(edentity[i].p1==3) dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+12,(edentity[i].y*8)- (ed.levy*30*8), ">", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),32,8,dwgfx.getBGR(255,255,255)); + } + + if(edentity[i].p1==5) + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), ">>>>", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),32,8,dwgfx.getBGR(255,255,255)); + } + else if(edentity[i].p1==6) + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), "<<<<", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),32,8,dwgfx.getBGR(255,255,255)); + } + + if(edentity[i].p1>=7) + { + //FillRect(dwgfx.backBuffer, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), 32,8, dwgfx.getBGR(64,128,64)); + tpoint.x = (edentity[i].x*8)- (ed.levx*40*8)+32; + tpoint.y = (edentity[i].y*8)- (ed.levy*30*8); + drawRect = dwgfx.tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL,dwgfx.backBuffer, &drawRect); + + } + + if(edentity[i].p1==7) + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+4,(edentity[i].y*8)- (ed.levy*30*8), "> > > > ", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),64,8,dwgfx.getBGR(255,255,255)); + } + else if(edentity[i].p1==8) + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)+4,(edentity[i].y*8)- (ed.levy*30*8), "< < < < ", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),64,8,dwgfx.getBGR(255,255,255)); + } + break; + case 3: //Disappearing Platform + //FillRect(dwgfx.backBuffer, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), 32,8, dwgfx.getBGR(64,64,128)); + + tpoint.x = (edentity[i].x*8)- (ed.levx*40*8); + tpoint.y = (edentity[i].y*8)- (ed.levy*30*8); + drawRect = dwgfx.tiles_rect; + drawRect.x += tpoint.x; + drawRect.y += tpoint.y; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL, dwgfx.backBuffer, &drawRect); + drawRect.x += 8; + BlitSurfaceStandard(dwgfx.entcolours[obj.customplatformtile],NULL,dwgfx.backBuffer, &drawRect); + + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), "////", 255 - help.glow, 255 - help.glow, 255 - help.glow, false); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),32,8,dwgfx.getBGR(255,255,255)); + break; + case 9: //Shiny Trinket + dwgfx.drawsprite((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),22,196,196,196); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,16,dwgfx.getRGB(164,164,255)); + break; + case 10: //Checkpoints + if(edentity[i].p1==0) //From roof + { + dwgfx.drawsprite((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),20,196,196,196); + } + else if(edentity[i].p1==1) //From floor + { + dwgfx.drawsprite((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),21,196,196,196); + } + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,16,dwgfx.getRGB(164,164,255)); + break; + case 11: //Gravity lines + if(edentity[i].p1==0) //Horizontal + { + int tx=edentity[i].x-(ed.levx*40); + int tx2=edentity[i].x-(ed.levx*40); + int ty=edentity[i].y-(ed.levy*30); + while(ed.spikefree(tx,ty)==0) tx--; + while(ed.spikefree(tx2,ty)==0) tx2++; + tx++; + FillRect(dwgfx.backBuffer, (tx*8),(ty*8)+4, (tx2-tx)*8,1, dwgfx.getRGB(194,194,194)); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),8,8,dwgfx.getRGB(164,255,164)); + edentity[i].p2=tx; + edentity[i].p3=(tx2-tx)*8; + } + else //Vertical + { + int tx=edentity[i].x-(ed.levx*40); + int ty=edentity[i].y-(ed.levy*30); + int ty2=edentity[i].y-(ed.levy*30); + while(ed.spikefree(tx,ty)==0) ty--; + while(ed.spikefree(tx,ty2)==0) ty2++; + ty++; + FillRect(dwgfx.backBuffer, (tx*8)+3,(ty*8), 1,(ty2-ty)*8, dwgfx.getRGB(194,194,194)); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),8,8,dwgfx.getRGB(164,255,164)); + edentity[i].p2=ty; + edentity[i].p3=(ty2-ty)*8; + } + break; + case 13://Warp tokens + dwgfx.drawsprite((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),18+(ed.entframe%2),196,196,196); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,16,dwgfx.getRGB(164,164,255)); + if(ed.temp==i) + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8)-8, + "("+help.String(((edentity[i].p1-int(edentity[i].p1%40))/40)+1)+","+help.String(((edentity[i].p2-int(edentity[i].p2%30))/30)+1)+")",210,210,255); + } + else + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8)-8,help.String(ed.findwarptoken(i)),210,210,255); + } + break; + case 15: //Crewmates + dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),144,obj.crewcolour(edentity[i].p1), help); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,24,dwgfx.getRGB(164,164,164)); + break; + case 16: //Start + if(edentity[i].p1==0) //Left + { + dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),0,obj.crewcolour(0), help); + } + else if(edentity[i].p1==1) + { + dwgfx.drawspritesetcol((edentity[i].x*8)- (ed.levx*40*8)-4,(edentity[i].y*8)- (ed.levy*30*8),3,obj.crewcolour(0), help); + } + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,24,dwgfx.getRGB(164,255,255)); + if(ed.entframe<2) + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)-12,(edentity[i].y*8)- (ed.levy*30*8)-8,"START",255,255,255); + } + else + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8)-12,(edentity[i].y*8)- (ed.levy*30*8)-8,"START",196,196,196); + } + break; + case 17: //Roomtext + if(edentity[i].scriptname.length()<1) + { + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),8,8,dwgfx.getRGB(96,96,96)); + } + else + { + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),edentity[i].scriptname.length()*8,8,dwgfx.getRGB(96,96,96)); + } + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8), edentity[i].scriptname, 196, 196, 255 - help.glow); + break; + case 18: //Terminals + dwgfx.drawsprite((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8)+8,17,96,96,96); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),16,24,dwgfx.getRGB(164,164,164)); + if(ed.temp==i) + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8)-8,edentity[i].scriptname,210,210,255); + } + break; + case 19: //Script Triggers + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),edentity[i].p1*8,edentity[i].p2*8,dwgfx.getRGB(255,164,255)); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),8,8,dwgfx.getRGB(255,255,255)); + if(ed.temp==i) + { + dwgfx.Print((edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8)-8,edentity[i].scriptname,210,210,255); + } + break; + case 50: //Warp lines + if(edentity[i].p1>=2) //Horizontal + { + int tx=edentity[i].x-(ed.levx*40); + int tx2=edentity[i].x-(ed.levx*40); + int ty=edentity[i].y-(ed.levy*30); + while(ed.free(tx,ty)==0) tx--; + while(ed.free(tx2,ty)==0) tx2++; + tx++; + fillboxabs(dwgfx, (tx*8),(ty*8)+1, (tx2-tx)*8,6, dwgfx.getRGB(255,255,194)); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),8,8,dwgfx.getRGB(255,255,164)); + edentity[i].p2=tx; + edentity[i].p3=(tx2-tx)*8; + } + else //Vertical + { + int tx=edentity[i].x-(ed.levx*40); + int ty=edentity[i].y-(ed.levy*30); + int ty2=edentity[i].y-(ed.levy*30); + while(ed.free(tx,ty)==0) ty--; + while(ed.free(tx,ty2)==0) ty2++; + ty++; + fillboxabs(dwgfx, (tx*8)+1,(ty*8), 6,(ty2-ty)*8, dwgfx.getRGB(255,255,194)); + fillboxabs(dwgfx, (edentity[i].x*8)- (ed.levx*40*8),(edentity[i].y*8)- (ed.levy*30*8),8,8,dwgfx.getRGB(255,255,164)); + edentity[i].p2=ty; + edentity[i].p3=(ty2-ty)*8; + } + break; + } + } + + //Need to also check warp point destinations + if(edentity[i].t==13 && ed.warpent!=i) + { + tx=(edentity[i].p1-(edentity[i].p1%40))/40; + ty=(edentity[i].p2-(edentity[i].p2%30))/30; + if(tx==ed.levx && ty==ed.levy) + { + dwgfx.drawsprite((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8),18+(ed.entframe%2),64,64,64); + fillboxabs(dwgfx, (edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8),16,16,dwgfx.getRGB(64,64,96)); + if(ed.tilex+(ed.levx*40)==edentity[i].p1 && ed.tiley+(ed.levy*30)==edentity[i].p2) + { + dwgfx.Print((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8)-8, + "("+help.String(((edentity[i].x-int(edentity[i].x%40))/40)+1)+","+help.String(((edentity[i].y-int(edentity[i].y%30))/30)+1)+")",190,190,225); + } + else + { + dwgfx.Print((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8)-8,help.String(ed.findwarptoken(i)),190,190,225); + } + } + } + } + + if(ed.boundarymod>0) + { + if(ed.boundarymod==1) + { + fillboxabs(dwgfx, ed.tilex*8, ed.tiley*8, 8,8,dwgfx.getRGB(255-(help.glow/2),191+(help.glow),210+(help.glow/2))); + fillboxabs(dwgfx, (ed.tilex*8)+2, (ed.tiley*8)+2, 4,4,dwgfx.getRGB(128-(help.glow/4),100+(help.glow/2),105+(help.glow/4))); + } + else if(ed.boundarymod==2) + { + if((ed.tilex*8)+8<=ed.boundx1 || (ed.tiley*8)+8<=ed.boundy1) + { + fillboxabs(dwgfx, ed.boundx1, ed.boundy1, 8, 8,dwgfx.getRGB(255-(help.glow/2),191+(help.glow),210+(help.glow/2))); + fillboxabs(dwgfx, ed.boundx1+2, ed.boundy1+2, 4, 4,dwgfx.getRGB(128-(help.glow/4),100+(help.glow/2),105+(help.glow/4))); + } + else + { + fillboxabs(dwgfx, ed.boundx1, ed.boundy1, (ed.tilex*8)+8-ed.boundx1,(ed.tiley*8)+8-ed.boundy1,dwgfx.getRGB(255-(help.glow/2),191+(help.glow),210+(help.glow/2))); + fillboxabs(dwgfx, ed.boundx1+2, ed.boundy1+2, (ed.tilex*8)+8-ed.boundx1-4,(ed.tiley*8)+8-ed.boundy1-4,dwgfx.getRGB(128-(help.glow/4),100+(help.glow/2),105+(help.glow/4))); + } + } + } + else + { + //Draw boundaries + int tmp=ed.levx+(ed.levy*ed.maxwidth); + if(ed.level[tmp].enemyx1!=0 && ed.level[tmp].enemyy1!=0 + && ed.level[tmp].enemyx2!=320 && ed.level[tmp].enemyy2!=240) + { + fillboxabs(dwgfx, ed.level[tmp].enemyx1, ed.level[tmp].enemyy1, + ed.level[tmp].enemyx2-ed.level[tmp].enemyx1, + ed.level[tmp].enemyy2-ed.level[tmp].enemyy1, + dwgfx.getBGR(255-(help.glow/2),64,64)); + } + + if(ed.level[tmp].platx1!=0 && ed.level[tmp].platy1!=0 + && ed.level[tmp].platx2!=320 && ed.level[tmp].platy2!=240) + { + fillboxabs(dwgfx, ed.level[tmp].platx1, ed.level[tmp].platy1, + ed.level[tmp].platx2-ed.level[tmp].platx1, + ed.level[tmp].platy2-ed.level[tmp].platy1, + dwgfx.getBGR(64,64,255-(help.glow/2))); + } + } + + //Draw connecting map guidelines + //TODO + + //Draw Cursor + switch(ed.drawmode) + { + case 0: + case 1: + case 2: + case 9: + case 10: + case 12: //Single point + fillboxabs(dwgfx, (ed.tilex*8),(ed.tiley*8),8,8, dwgfx.getRGB(200,32,32)); + break; + case 3: + case 4: + case 8: + case 13://2x2 + fillboxabs(dwgfx, (ed.tilex*8),(ed.tiley*8),16,16, dwgfx.getRGB(200,32,32)); + break; + case 5: + case 6: + case 7://Platform + fillboxabs(dwgfx, (ed.tilex*8),(ed.tiley*8),32,8, dwgfx.getRGB(200,32,32)); + break; + case 14: //X if not on edge + if(ed.tilex==0 || ed.tilex==39 || ed.tiley==0 || ed.tiley==29) + { + fillboxabs(dwgfx, (ed.tilex*8),(ed.tiley*8),8,8, dwgfx.getRGB(200,32,32)); + } + else + { + dwgfx.Print((ed.tilex*8),(ed.tiley*8),"X",255,0,0); + } + break; + case 11: + case 15: + case 16: //2x3 + fillboxabs(dwgfx, (ed.tilex*8),(ed.tiley*8),16,24, dwgfx.getRGB(200,32,32)); + break; + } + + if(ed.drawmode<3) + { + if(ed.zmod && ed.drawmode<2) + { + fillboxabs(dwgfx, (ed.tilex*8)-8,(ed.tiley*8)-8,24,24, dwgfx.getRGB(200,32,32)); + } + else if(ed.xmod && ed.drawmode<2) + { + fillboxabs(dwgfx, (ed.tilex*8)-16,(ed.tiley*8)-16,24+16,24+16, dwgfx.getRGB(200,32,32)); + } + } + + //If in directmode, show current directmode tile + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].directmode==1) + { + //Tile box for direct mode + int t2=0; + if(ed.dmtileeditor>0) + { + ed.dmtileeditor--; + if(ed.dmtileeditor<=4) + { + t2=(4-ed.dmtileeditor)*12; + } + + //Draw five lines of the editor + temp=ed.dmtile-(ed.dmtile%40); + temp-=80; + FillRect(dwgfx.backBuffer, 0,-t2,320,40, dwgfx.getRGB(0,0,0)); + FillRect(dwgfx.backBuffer, 0,-t2+40,320,2, dwgfx.getRGB(255,255,255)); + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset==0) + { + for(int i=0; i<40; i++) + { + dwgfx.drawtile(i*8,0-t2,(temp+1200+i)%1200,0,0,0); + dwgfx.drawtile(i*8,8-t2,(temp+1200+40+i)%1200,0,0,0); + dwgfx.drawtile(i*8,16-t2,(temp+1200+80+i)%1200,0,0,0); + dwgfx.drawtile(i*8,24-t2,(temp+1200+120+i)%1200,0,0,0); + dwgfx.drawtile(i*8,32-t2,(temp+1200+160+i)%1200,0,0,0); + } + } + else + { + for(int i=0; i<40; i++) + { + dwgfx.drawtile2(i*8,0-t2,(temp+1200+i)%1200,0,0,0); + dwgfx.drawtile2(i*8,8-t2,(temp+1200+40+i)%1200,0,0,0); + dwgfx.drawtile2(i*8,16-t2,(temp+1200+80+i)%1200,0,0,0); + dwgfx.drawtile2(i*8,24-t2,(temp+1200+120+i)%1200,0,0,0); + dwgfx.drawtile2(i*8,32-t2,(temp+1200+160+i)%1200,0,0,0); + } + } + //Highlight our little block + fillboxabs(dwgfx,((ed.dmtile%40)*8)-2,16-2,12,12,dwgfx.getRGB(196, 196, 255 - help.glow)); + fillboxabs(dwgfx,((ed.dmtile%40)*8)-1,16-1,10,10,dwgfx.getRGB(0,0,0)); + } + + if(ed.dmtileeditor>0 && t2<=30) + { + dwgfx.Print(2, 45-t2, "Tile:", 196, 196, 255 - help.glow, false); + dwgfx.Print(58, 45-t2, help.String(ed.dmtile), 196, 196, 255 - help.glow, false); + FillRect(dwgfx.backBuffer, 44,44-t2,10,10, dwgfx.getRGB(196, 196, 255 - help.glow)); + FillRect(dwgfx.backBuffer, 45,45-t2,8,8, dwgfx.getRGB(0,0,0)); + + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset==0) + { + dwgfx.drawtile(45,45-t2,ed.dmtile,0,0,0); + } + else + { + dwgfx.drawtile2(45,45-t2,ed.dmtile,0,0,0); + } + } + else + { + dwgfx.Print(2, 12, "Tile:", 196, 196, 255 - help.glow, false); + dwgfx.Print(58, 12, help.String(ed.dmtile), 196, 196, 255 - help.glow, false); + FillRect(dwgfx.backBuffer, 44,11,10,10, dwgfx.getRGB(196, 196, 255 - help.glow)); + FillRect(dwgfx.backBuffer, 45,12,8,8, dwgfx.getRGB(0,0,0)); + + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset==0) + { + dwgfx.drawtile(45,12,ed.dmtile,0,0,0); + } + else + { + dwgfx.drawtile2(45,12,ed.dmtile,0,0,0); + } + } + } + + + + + //Draw GUI + if(ed.boundarymod>0) + { + if(ed.boundarymod==1) + { + FillRect(dwgfx.backBuffer, 0,230,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,231,320,240, dwgfx.getRGB(0,0,0)); + switch(ed.boundarytype) + { + case 0: + dwgfx.Print(4, 232, "SCRIPT BOX: Click on top left", 255,255,255, false); + break; + case 1: + dwgfx.Print(4, 232, "ENEMY BOUNDS: Click on top left", 255,255,255, false); + break; + case 2: + dwgfx.Print(4, 232, "PLATFORM BOUNDS: Click on top left", 255,255,255, false); + break; + case 3: + dwgfx.Print(4, 232, "COPY TILES: Click on top left", 255,255,255, false); + break; + default: + dwgfx.Print(4, 232, "Click on top left", 255,255,255, false); + break; + } + } + else if(ed.boundarymod==2) + { + FillRect(dwgfx.backBuffer, 0,230,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,231,320,240, dwgfx.getRGB(0,0,0)); + switch(ed.boundarytype) + { + case 0: + dwgfx.Print(4, 232, "SCRIPT BOX: Click on bottom right", 255,255,255, false); + break; + case 1: + dwgfx.Print(4, 232, "ENEMY BOUNDS: Click on bottom right", 255,255,255, false); + break; + case 2: + dwgfx.Print(4, 232, "PLATFORM BOUNDS: Click on bottom right", 255,255,255, false); + break; + case 3: + dwgfx.Print(4, 232, "COPY TILES: Click on bottom right", 255,255,255, false); + break; + default: + dwgfx.Print(4, 232, "Click on bottom right", 255,255,255, false); + break; + } + } + } + else if(ed.scripteditmod) + { + //Elaborate C64 BASIC menu goes here! + FillRect(dwgfx.backBuffer, 0,0,320,240, dwgfx.getBGR(123, 111, 218)); + FillRect(dwgfx.backBuffer, 14,16,292,208, dwgfx.getRGB(162,48,61)); + switch(ed.scripthelppage) + { + case 0: + dwgfx.Print(16,28,"**** VVVVVV SCRIPT EDITOR ****", 123, 111, 218, true); + dwgfx.Print(16,44,"PRESS ESC TO RETURN TO MENU", 123, 111, 218, true); + //dwgfx.Print(16,60,"READY.", 123, 111, 218, false); + + if(ed.numhooks>0) + { + for(int i=0; i<9; i++) + { + if(ed.hookmenupage+i255) tr=255; + if (tg < 0) tg = 0; + if(tg>255) tg=255; + if (tb < 0) tb = 0; + if(tb>255) tb=255; + if (game.currentmenuname == "ed_settings") + { + dwgfx.bigprint( -1, 75, "Map Settings", tr, tg, tb, true); + } + else if (game.currentmenuname=="ed_desc") + { + if(ed.titlemod) + { + if(ed.entframe<2) + { + dwgfx.bigprint( -1, 35, key.keybuffer+"_", tr, tg, tb, true); + } + else + { + dwgfx.bigprint( -1, 35, key.keybuffer+" ", tr, tg, tb, true); + } + } + else + { + dwgfx.bigprint( -1, 35, EditorData::GetInstance().title, tr, tg, tb, true); + } + if(ed.creatormod) + { + if(ed.entframe<2) + { + dwgfx.Print( -1, 60, "by " + key.keybuffer+ "_", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 60, "by " + key.keybuffer+ " ", tr, tg, tb, true); + } + } + else + { + dwgfx.Print( -1, 60, "by " + EditorData::GetInstance().creator, tr, tg, tb, true); + } + if(ed.websitemod) + { + if(ed.entframe<2) + { + dwgfx.Print( -1, 70, key.keybuffer+"_", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 70, key.keybuffer+" ", tr, tg, tb, true); + } + } + else + { + dwgfx.Print( -1, 70, ed.website, tr, tg, tb, true); + } + if(ed.desc1mod) + { + if(ed.entframe<2) + { + dwgfx.Print( -1, 90, key.keybuffer+"_", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 90, key.keybuffer+" ", tr, tg, tb, true); + } + } + else + { + dwgfx.Print( -1, 90, ed.Desc1, tr, tg, tb, true); + } + if(ed.desc2mod) + { + if(ed.entframe<2) + { + dwgfx.Print( -1, 100, key.keybuffer+"_", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 100, key.keybuffer+" ", tr, tg, tb, true); + } + } + else + { + dwgfx.Print( -1, 100, ed.Desc2, tr, tg, tb, true); + } + if(ed.desc3mod) + { + if(ed.entframe<2) + { + dwgfx.Print( -1, 110, key.keybuffer+"_", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 110, key.keybuffer+" ", tr, tg, tb, true); + } + } + else + { + dwgfx.Print( -1, 110, ed.Desc3, tr, tg, tb, true); + } + } + else if (game.currentmenuname == "ed_music") + { + dwgfx.bigprint( -1, 65, "Map Music", tr, tg, tb, true); + + dwgfx.Print( -1, 85, "Current map music:", tr, tg, tb, true); + switch(ed.levmusic) + { + case 0: + dwgfx.Print( -1, 120, "No background music", tr, tg, tb, true); + break; + case 1: + dwgfx.Print( -1, 120, "1: Pushing Onwards", tr, tg, tb, true); + break; + case 2: + dwgfx.Print( -1, 120, "2: Positive Force", tr, tg, tb, true); + break; + case 3: + dwgfx.Print( -1, 120, "3: Potential For Anything", tr, tg, tb, true); + break; + case 4: + dwgfx.Print( -1, 120, "4: Passion For Exploring", tr, tg, tb, true); + break; + case 6: + dwgfx.Print( -1, 120, "5: Presenting VVVVVV", tr, tg, tb, true); + break; + case 8: + dwgfx.Print( -1, 120, "6: Predestined Fate", tr, tg, tb, true); + break; + case 10: + dwgfx.Print( -1, 120, "7: Popular Potpourri", tr, tg, tb, true); + break; + case 11: + dwgfx.Print( -1, 120, "8: Pipe Dream", tr, tg, tb, true); + break; + case 12: + dwgfx.Print( -1, 120, "9: Pressure Cooker", tr, tg, tb, true); + break; + case 13: + dwgfx.Print( -1, 120, "10: Paced Energy", tr, tg, tb, true); + break; + case 14: + dwgfx.Print( -1, 120, "11: Piercing The Sky", tr, tg, tb, true); + break; + default: + dwgfx.Print( -1, 120, "?: something else", tr, tg, tb, true); + break; + } + } + else if (game.currentmenuname == "ed_quit") + { + dwgfx.bigprint( -1, 90, "Save before", tr, tg, tb, true); + dwgfx.bigprint( -1, 110, "quiting?", tr, tg, tb, true); + } + + dwgfx.drawmenu(game, tr, tg, tb, 15); + + /* + dwgfx.Print(4, 224, "Enter name to save map as:", 255,255,255, false); + if(ed.entframe<2){ + dwgfx.Print(4, 232, ed.filename+"_", 196, 196, 255 - help.glow, true); + }else{ + dwgfx.Print(4, 232, ed.filename+" ", 196, 196, 255 - help.glow, true); + } + */ + } + else if(ed.scripttextmod) + { + FillRect(dwgfx.backBuffer, 0,221,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,222,320,240, dwgfx.getRGB(0,0,0)); + dwgfx.Print(4, 224, "Enter script id name:", 255,255,255, false); + if(ed.entframe<2) + { + dwgfx.Print(4, 232, edentity[ed.scripttextent].scriptname+"_", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(4, 232, edentity[ed.scripttextent].scriptname+" ", 196, 196, 255 - help.glow, true); + } + } + else if(ed.savemod) + { + FillRect(dwgfx.backBuffer, 0,221,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,222,320,240, dwgfx.getRGB(0,0,0)); + dwgfx.Print(4, 224, "Enter filename to save map as:", 255,255,255, false); + if(ed.entframe<2) + { + dwgfx.Print(4, 232, ed.filename+"_", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(4, 232, ed.filename+" ", 196, 196, 255 - help.glow, true); + } + } + else if(ed.loadmod) + { + FillRect(dwgfx.backBuffer, 0,221,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,222,320,240, dwgfx.getRGB(0,0,0)); + dwgfx.Print(4, 224, "Enter map filename to load:", 255,255,255, false); + if(ed.entframe<2) + { + dwgfx.Print(4, 232, ed.filename+"_", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(4, 232, ed.filename+" ", 196, 196, 255 - help.glow, true); + } + } + else if(ed.roomnamemod) + { + FillRect(dwgfx.backBuffer, 0,221,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,222,320,240, dwgfx.getRGB(0,0,0)); + dwgfx.Print(4, 224, "Enter new room name:", 255,255,255, false); + if(ed.entframe<2) + { + dwgfx.Print(4, 232, ed.level[ed.levx+(ed.levy*ed.maxwidth)].roomname+"_", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(4, 232, ed.level[ed.levx+(ed.levy*ed.maxwidth)].roomname+" ", 196, 196, 255 - help.glow, true); + } + } + else if(ed.roomtextmod) + { + FillRect(dwgfx.backBuffer, 0,221,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,222,320,240, dwgfx.getRGB(0,0,0)); + dwgfx.Print(4, 224, "Enter text string:", 255,255,255, false); + if(ed.entframe<2) + { + dwgfx.Print(4, 232, edentity[ed.roomtextent].scriptname+"_", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(4, 232, edentity[ed.roomtextent].scriptname+" ", 196, 196, 255 - help.glow, true); + } + } + else if(ed.warpmod) + { + //placing warp token + FillRect(dwgfx.backBuffer, 0,221,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,222,320,240, dwgfx.getRGB(0,0,0)); + dwgfx.Print(4, 224, "Left click to place warp destination", 196, 196, 255 - help.glow, false); + dwgfx.Print(4, 232, "Right click to cancel", 196, 196, 255 - help.glow, false); + } + else + { + if(ed.spacemod) + { + FillRect(dwgfx.backBuffer, 0,208,320,240, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,209,320,240, dwgfx.getRGB(0,0,0)); + + //Draw little icons for each thingy + int tx=6, ty=211, tg=32; + + if(ed.spacemenu==0) + { + for(int i=0; i<10; i++) + { + FillRect(dwgfx.backBuffer, 4+(i*tg), 209,20,20,dwgfx.getRGB(32,32,32)); + } + FillRect(dwgfx.backBuffer, 4+(ed.drawmode*tg), 209,20,20,dwgfx.getRGB(64,64,64)); + //0: + dwgfx.drawtile(tx,ty,83,0,0,0); + dwgfx.drawtile(tx+8,ty,83,0,0,0); + dwgfx.drawtile(tx,ty+8,83,0,0,0); + dwgfx.drawtile(tx+8,ty+8,83,0,0,0); + //1: + tx+=tg; + dwgfx.drawtile(tx,ty,680,0,0,0); + dwgfx.drawtile(tx+8,ty,680,0,0,0); + dwgfx.drawtile(tx,ty+8,680,0,0,0); + dwgfx.drawtile(tx+8,ty+8,680,0,0,0); + //2: + tx+=tg; + dwgfx.drawtile(tx+4,ty+4,8,0,0,0); + //3: + tx+=tg; + dwgfx.drawsprite(tx,ty,22,196,196,196); + //4: + tx+=tg; + dwgfx.drawsprite(tx,ty,21,196,196,196); + //5: + tx+=tg; + dwgfx.drawtile(tx,ty+4,3,0,0,0); + dwgfx.drawtile(tx+8,ty+4,4,0,0,0); + //6: + tx+=tg; + dwgfx.drawtile(tx,ty+4,24,0,0,0); + dwgfx.drawtile(tx+8,ty+4,24,0,0,0); + //7: + tx+=tg; + dwgfx.drawtile(tx,ty+4,1,0,0,0); + dwgfx.drawtile(tx+8,ty+4,1,0,0,0); + //8: + tx+=tg; + dwgfx.drawsprite(tx,ty,78+ed.entframe,196,196,196); + //9: + tx+=tg; + FillRect(dwgfx.backBuffer, tx+2,ty+8,12,1,dwgfx.getRGB(255,255,255)); + + for(int i=0; i<9; i++) + { + fillboxabs(dwgfx, 4+(i*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(i*tg)-4, 225-4,help.String(i+1),164,164,164,false); + } + + if(ed.drawmode==9)dwgfx.Print(22+(ed.drawmode*tg)-4, 225-4,"0",255,255,255,false); + + fillboxabs(dwgfx, 4+(9*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(9*tg)-4, 225-4, "0",164,164,164,false); + + fillboxabs(dwgfx, 4+(ed.drawmode*tg), 209,20,20,dwgfx.getRGB(200,200,200)); + if(ed.drawmode<9) + { + dwgfx.Print(22+(ed.drawmode*tg)-4, 225-4,help.String(ed.drawmode+1),255,255,255,false); + } + + dwgfx.Print(4, 232, "1/2", 196, 196, 255 - help.glow, false); + } + else + { + for(int i=0; i<7; i++) + { + FillRect(dwgfx.backBuffer, 4+(i*tg), 209,20,20,dwgfx.getRGB(32,32,32)); + } + FillRect(dwgfx.backBuffer, 4+((ed.drawmode-10)*tg), 209,20,20,dwgfx.getRGB(64,64,64)); + //10: + dwgfx.Print(tx,ty,"A",196, 196, 255 - help.glow, false); + dwgfx.Print(tx+8,ty,"B",196, 196, 255 - help.glow, false); + dwgfx.Print(tx,ty+8,"C",196, 196, 255 - help.glow, false); + dwgfx.Print(tx+8,ty+8,"D",196, 196, 255 - help.glow, false); + //11: + tx+=tg; + dwgfx.drawsprite(tx,ty,17,196,196,196); + //12: + tx+=tg; + fillboxabs(dwgfx, tx+4,ty+4,8,8,dwgfx.getRGB(96,96,96)); + //13: + tx+=tg; + dwgfx.drawsprite(tx,ty,18+(ed.entframe%2),196,196,196); + //14: + tx+=tg; + FillRect(dwgfx.backBuffer, tx+6,ty+2,4,12,dwgfx.getRGB(255,255,255)); + //15: + tx+=tg; + dwgfx.drawsprite(tx,ty,186,75, 75, 255- help.glow/4 - (fRandom()*20)); + //16: + tx+=tg; + dwgfx.drawsprite(tx,ty,184,160- help.glow/2 - (fRandom()*20), 200- help.glow/2, 220 - help.glow); + + if(ed.drawmode==10)dwgfx.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"R",255,255,255,false); + if(ed.drawmode==11)dwgfx.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"T",255,255,255,false); + if(ed.drawmode==12)dwgfx.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"Y",255,255,255,false); + if(ed.drawmode==13)dwgfx.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"U",255,255,255,false); + if(ed.drawmode==14)dwgfx.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"I",255,255,255,false); + if(ed.drawmode==15)dwgfx.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"O",255,255,255,false); + if(ed.drawmode==16)dwgfx.Print(22+((ed.drawmode-10)*tg)-4, 225-4,"P",255,255,255,false); + + fillboxabs(dwgfx, 4+(0*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(0*tg)-4, 225-4, "R",164,164,164,false); + fillboxabs(dwgfx, 4+(1*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(1*tg)-4, 225-4, "T",164,164,164,false); + fillboxabs(dwgfx, 4+(2*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(2*tg)-4, 225-4, "Y",164,164,164,false); + fillboxabs(dwgfx, 4+(3*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(3*tg)-4, 225-4, "U",164,164,164,false); + fillboxabs(dwgfx, 4+(4*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(4*tg)-4, 225-4, "I",164,164,164,false); + fillboxabs(dwgfx, 4+(5*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(5*tg)-4, 225-4, "O",164,164,164,false); + fillboxabs(dwgfx, 4+(6*tg), 209,20,20,dwgfx.getRGB(96,96,96)); + dwgfx.Print(22+(6*tg)-4, 225-4, "P",164,164,164,false); + + dwgfx.Print(4, 232, "2/2", 196, 196, 255 - help.glow, false); + } + + dwgfx.Print(128, 232, "< and > keys change tool", 196, 196, 255 - help.glow, false); + + FillRect(dwgfx.backBuffer, 0,198,120,10, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 0,199,119,9, dwgfx.getRGB(0,0,0)); + switch(ed.drawmode) + { + case 0: + dwgfx.Print(2,199, "1: Walls",196, 196, 255 - help.glow); + break; + case 1: + dwgfx.Print(2,199, "2: Backing",196, 196, 255 - help.glow); + break; + case 2: + dwgfx.Print(2,199, "3: Spikes",196, 196, 255 - help.glow); + break; + case 3: + dwgfx.Print(2,199, "4: Trinkets",196, 196, 255 - help.glow); + break; + case 4: + dwgfx.Print(2,199, "5: Checkpoint",196, 196, 255 - help.glow); + break; + case 5: + dwgfx.Print(2,199, "6: Disappear",196, 196, 255 - help.glow); + break; + case 6: + dwgfx.Print(2,199, "7: Conveyors",196, 196, 255 - help.glow); + break; + case 7: + dwgfx.Print(2,199, "8: Moving",196, 196, 255 - help.glow); + break; + case 8: + dwgfx.Print(2,199, "9: Enemies",196, 196, 255 - help.glow); + break; + case 9: + dwgfx.Print(2,199, "0: Grav Line",196, 196, 255 - help.glow); + break; + case 10: + dwgfx.Print(2,199, "R: Roomtext",196, 196, 255 - help.glow); + break; + case 11: + dwgfx.Print(2,199, "T: Terminal",196, 196, 255 - help.glow); + break; + case 12: + dwgfx.Print(2,199, "Y: Script Box",196, 196, 255 - help.glow); + break; + case 13: + dwgfx.Print(2,199, "U: Warp Token",196, 196, 255 - help.glow); + break; + case 14: + dwgfx.Print(2,199, "I: Warp Lines",196, 196, 255 - help.glow); + break; + case 15: + dwgfx.Print(2,199, "O: Crewmate",196, 196, 255 - help.glow); + break; + case 16: + dwgfx.Print(2,199, "P: Start Point",196, 196, 255 - help.glow); + break; + } + + FillRect(dwgfx.backBuffer, 260,198,80,10, dwgfx.getRGB(32,32,32)); + FillRect(dwgfx.backBuffer, 261,199,80,9, dwgfx.getRGB(0,0,0)); + dwgfx.Print(268,199, "("+help.String(ed.levx+1)+","+help.String(ed.levy+1)+")",196, 196, 255 - help.glow, false); + + } + else + { + //FillRect(dwgfx.backBuffer, 0,230,72,240, dwgfx.RGB(32,32,32)); + //FillRect(dwgfx.backBuffer, 0,231,71,240, dwgfx.RGB(0,0,0)); + if(ed.level[ed.levx+(ed.maxwidth*ed.levy)].roomname!="") + { + if(ed.tiley<28) + { + if(ed.roomnamehide>0) ed.roomnamehide--; + FillRect(dwgfx.backBuffer, 0,230+ed.roomnamehide,320,10, dwgfx.getRGB(0,0,0)); + dwgfx.Print(5,231+ed.roomnamehide,ed.level[ed.levx+(ed.maxwidth*ed.levy)].roomname, 196, 196, 255 - help.glow, true); + } + else + { + if(ed.roomnamehide<12) ed.roomnamehide++; + FillRect(dwgfx.backBuffer, 0,230+ed.roomnamehide,320,10, dwgfx.getRGB(0,0,0)); + dwgfx.Print(5,231+ed.roomnamehide,ed.level[ed.levx+(ed.maxwidth*ed.levy)].roomname, 196, 196, 255 - help.glow, true); + } + dwgfx.Print(4, 222, "SPACE ^ SHIFT ^", 196, 196, 255 - help.glow, false); + dwgfx.Print(268,222, "("+help.String(ed.levx+1)+","+help.String(ed.levy+1)+")",196, 196, 255 - help.glow, false); + } + else + { + dwgfx.Print(4, 232, "SPACE ^ SHIFT ^", 196, 196, 255 - help.glow, false); + dwgfx.Print(268,232, "("+help.String(ed.levx+1)+","+help.String(ed.levy+1)+")",196, 196, 255 - help.glow, false); + } + } + + if(ed.shiftmenu) + { + fillboxabs(dwgfx, 0, 127,161+8,140,dwgfx.getRGB(64,64,64)); + FillRect(dwgfx.backBuffer, 0,128,160+8,140, dwgfx.getRGB(0,0,0)); + dwgfx.Print(4, 130, "F1: Change Tileset",164,164,164,false); + dwgfx.Print(4, 140, "F2: Change Colour",164,164,164,false); + dwgfx.Print(4, 150, "F3: Change Enemies",164,164,164,false); + dwgfx.Print(4, 160, "F4: Enemy Bounds",164,164,164,false); + dwgfx.Print(4, 170, "F5: Platform Bounds",164,164,164,false); + + dwgfx.Print(4, 190, "F10: Direct Mode",164,164,164,false); + + dwgfx.Print(4, 210, "W: Change Warp Dir",164,164,164,false); + dwgfx.Print(4, 220, "E: Change Roomname",164,164,164,false); + + fillboxabs(dwgfx, 220, 207,100,60,dwgfx.getRGB(64,64,64)); + FillRect(dwgfx.backBuffer, 221,208,160,60, dwgfx.getRGB(0,0,0)); + dwgfx.Print(224, 210, "S: Save Map",164,164,164,false); + dwgfx.Print(224, 220, "L: Load Map",164,164,164,false); + } + } + + + if(!ed.settingsmod && !ed.scripteditmod) + { + //Same as above, without borders + switch(ed.drawmode) + { + case 0: + dwgfx.Print(2,2, "1: Walls",196, 196, 255 - help.glow); + break; + case 1: + dwgfx.Print(2,2, "2: Backing",196, 196, 255 - help.glow); + break; + case 2: + dwgfx.Print(2,2, "3: Spikes",196, 196, 255 - help.glow); + break; + case 3: + dwgfx.Print(2,2, "4: Trinkets",196, 196, 255 - help.glow); + break; + case 4: + dwgfx.Print(2,2, "5: Checkpoint",196, 196, 255 - help.glow); + break; + case 5: + dwgfx.Print(2,2, "6: Disappear",196, 196, 255 - help.glow); + break; + case 6: + dwgfx.Print(2,2, "7: Conveyors",196, 196, 255 - help.glow); + break; + case 7: + dwgfx.Print(2,2, "8: Moving",196, 196, 255 - help.glow); + break; + case 8: + dwgfx.Print(2,2, "9: Enemies",196, 196, 255 - help.glow); + break; + case 9: + dwgfx.Print(2,2, "0: Grav Line",196, 196, 255 - help.glow); + break; + case 10: + dwgfx.Print(2,2, "R: Roomtext",196, 196, 255 - help.glow); + break; + case 11: + dwgfx.Print(2,2, "T: Terminal",196, 196, 255 - help.glow); + break; + case 12: + dwgfx.Print(2,2, "Y: Script Box",196, 196, 255 - help.glow); + break; + case 13: + dwgfx.Print(2,2, "U: Warp Token",196, 196, 255 - help.glow); + break; + case 14: + dwgfx.Print(2,2, "I: Warp Lines",196, 196, 255 - help.glow); + break; + case 15: + dwgfx.Print(2,2, "O: Crewmate",196, 196, 255 - help.glow); + break; + case 16: + dwgfx.Print(2,2, "P: Start Point",196, 196, 255 - help.glow); + break; + } + + //dwgfx.Print(254, 2, "F1: HELP", 196, 196, 255 - help.glow, false); + } + + /* + for(int i=0; i0) + { + FillRect(dwgfx.backBuffer, 0,115,320,18, dwgfx.getRGB(92,92,92)); + FillRect(dwgfx.backBuffer, 0,116,320,16, dwgfx.getRGB(0,0,0)); + dwgfx.Print(0,121, ed.note,196-((45-ed.notedelay)*4), 196-((45-ed.notedelay)*4), 196-((45-ed.notedelay)*4), true); + } + + if (game.test) + { + dwgfx.Print(5, 5, game.teststring, 196, 196, 255 - help.glow, false); + } + + dwgfx.drawfade(); + + if (game.flashlight > 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) + { + game.screenshake--; + dwgfx.screenshake(); + } + else + { + dwgfx.render(); + } + //dwgfx.backbuffer.unlock(); +} + +void editorlogic( KeyPoll& key, Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help ) +{ + //Misc + help.updateglow(); + + map.bypos -= 2; + map.bscroll = -2; + + ed.entframedelay--; + if(ed.entframedelay<=0) + { + ed.entframe=(ed.entframe+1)%4; + ed.entframedelay=8; + } + + if(ed.notedelay>0) + { + ed.notedelay--; + } + + if (dwgfx.fademode == 1) + { + //Return to game + map.nexttowercolour(); + map.colstate = 10; + game.gamestate = 1; + dwgfx.fademode = 4; + music.stopmusic(); + music.play(6); + map.nexttowercolour(); + ed.settingsmod=false; + dwgfx.backgrounddrawn=false; + game.createmenu("mainmenu"); + } +} + + +void editorinput( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help, musicclass& music ) +{ + //TODO Mouse Input! + game.mx = (float) key.mx; + game.my = (float) key.my; + ed.tilex=(game.mx - (game.mx%8))/8; + ed.tiley=(game.my - (game.my%8))/8; + + game.press_left = false; + game.press_right = false; + game.press_action = false; + game.press_map = false; + + if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_a)) + { + game.press_left = true; + } + if (key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_d)) + { + game.press_right = true; + } + if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v)) + { + // || key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_DOWN) + game.press_action = true; + }; + + if (key.isDown(KEYBOARD_ENTER)) game.press_map = true; + if (key.isDown(27) && !ed.settingskey) + { + ed.settingskey=true; + if(ed.textentry) + { + key.disabletextentry(); + ed.roomnamemod=false; + ed.loadmod=false; + ed.savemod=false; + ed.textentry=false; + ed.titlemod=false; + ed.desc1mod=false; + ed.desc2mod=false; + ed.desc3mod=false; + ed.websitemod=false; + ed.creatormod=false; + if(ed.scripttextmod) + { + ed.scripttextmod=false; + removeedentity(ed.scripttextmod); + } + + ed.shiftmenu=false; + ed.shiftkey=false; + } + else if(ed.boundarymod>0) + { + ed.boundarymod=0; + } + else + { + + ed.settingsmod=!ed.settingsmod; + dwgfx.backgrounddrawn=false; + + game.createmenu("ed_settings"); + map.nexttowercolour(); + } + } + + if (!key.isDown(27)) + { + ed.settingskey=false; + } + + if(key.keymap[SDLK_LCTRL] || key.keymap[SDLK_RCTRL]) + { + if(key.leftbutton) key.rightbutton=true; + } + + if(ed.scripteditmod) + { + if(ed.scripthelppage==0) + { + //hook select menu + if(ed.keydelay>0) ed.keydelay--; + + if(key.keymap[SDLK_UP] && ed.keydelay<=0) + { + ed.keydelay=6; + ed.hookmenu--; + } + + if(key.keymap[SDLK_DOWN] && ed.keydelay<=0) + { + ed.keydelay=6; + ed.hookmenu++; + } + + if(ed.hookmenu>=ed.numhooks) + { + ed.hookmenu=ed.numhooks-1; + } + if(ed.hookmenu<0) ed.hookmenu=0; + + if(ed.hookmenu=ed.hookmenupage+9) + { + ed.hookmenupage=ed.hookmenu+8; + } + + if(!key.keymap[SDLK_BACKSPACE]) ed.deletekeyheld=0; + + if(key.keymap[SDLK_BACKSPACE] && ed.deletekeyheld==0) + { + ed.deletekeyheld=1; + music.playef(2); + ed.removehook(ed.hooklist[(ed.numhooks-1)-ed.hookmenu]); + } + + if (!game.press_action && !game.press_left && !game.press_right + && !key.keymap[SDLK_UP] && !key.keymap[SDLK_DOWN] && !key.isDown(27)) game.jumpheld = false; + if (!game.jumpheld) + { + if (game.press_action || game.press_left || game.press_right || game.press_map + || key.keymap[SDLK_UP] || key.keymap[SDLK_DOWN] || key.isDown(27)) + { + game.jumpheld = true; + } + if ((game.press_action || game.press_map) && ed.numhooks>0) + { + game.mapheld=true; + ed.scripthelppage=1; + key.keybuffer=""; + ed.sbscript=ed.hooklist[(ed.numhooks-1)-ed.hookmenu]; + ed.loadhookineditor(ed.sbscript); + + ed.sby=ed.sblength-1; + ed.pagey=0; + while(ed.sby>=20) + { + ed.pagey++; + ed.sby--; + } + key.keybuffer=ed.sb[ed.pagey+ed.sby]; + ed.sbx = ed.sb[ed.pagey+ed.sby].length(); + } + + if (key.isDown(27)) + { + ed.scripteditmod=false; + ed.settingsmod=false; + } + } + } + else if(ed.scripthelppage==1) + { + //Script editor! + if (key.isDown(27)) + { + ed.scripthelppage=0; + game.jumpheld = true; + //save the script for use again! + ed.addhook(ed.sbscript); + } + + if(ed.keydelay>0) ed.keydelay--; + + if(key.keymap[SDLK_UP] && ed.keydelay<=0) + { + ed.keydelay=6; + ed.sby--; + if(ed.sby<=5) + { + if(ed.pagey>0) + { + ed.pagey--; + ed.sby++; + } + else + { + if(ed.sby<0) ed.sby=0; + } + } + key.keybuffer=ed.sb[ed.pagey+ed.sby]; + } + + if(key.keymap[SDLK_DOWN] && ed.keydelay<=0) + { + ed.keydelay=6; + if(ed.sby+ed.pagey=20) + { + ed.pagey++; + ed.sby--; + } + } + key.keybuffer=ed.sb[ed.pagey+ed.sby]; + } + + if(key.pressedbackspace && ed.sb[ed.pagey+ed.sby]=="") + { + //Remove this line completely + ed.removeline(ed.pagey+ed.sby); + ed.sby--; + if(ed.sby<=5) + { + if(ed.pagey>0) + { + ed.pagey--; + ed.sby++; + } + else + { + if(ed.sby<0) ed.sby=0; + } + } + key.keybuffer=ed.sb[ed.pagey+ed.sby]; + } + + ed.sb[ed.pagey+ed.sby]=key.keybuffer; + ed.sbx = ed.sb[ed.pagey+ed.sby].length(); + + if(!game.press_map && !key.isDown(27)) game.mapheld=false; + if (!game.mapheld) + { + if(game.press_map) + { + game.mapheld=true; + //Continue to next line + if(ed.sby+ed.pagey>=ed.sblength) //we're on the last line + { + ed.sby++; + if(ed.sby>=20) + { + ed.pagey++; + ed.sby--; + } + if(ed.sby+ed.pagey>=ed.sblength) ed.sblength=ed.sby+ed.pagey; + key.keybuffer=ed.sb[ed.pagey+ed.sby]; + ed.sbx = ed.sb[ed.pagey+ed.sby].length(); + } + else + { + //We're not, insert a line instead + ed.sby++; + if(ed.sby>=20) + { + ed.pagey++; + ed.sby--; + } + ed.insertline(ed.sby+ed.pagey); + key.keybuffer=""; + ed.sbx = 0; + } + } + } + } + } + else if(ed.textentry) + { + if(ed.roomnamemod) + { + ed.level[ed.levx+(ed.levy*ed.maxwidth)].roomname=key.keybuffer; + } + else if(ed.savemod) + { + ed.filename=key.keybuffer; + } + else if(ed.loadmod) + { + ed.filename=key.keybuffer; + } + else if(ed.roomtextmod) + { + edentity[ed.roomtextent].scriptname=key.keybuffer; + } + else if(ed.scripttextmod) + { + edentity[ed.scripttextent].scriptname=key.keybuffer; + } + else if(ed.titlemod) + { + EditorData::GetInstance().title=key.keybuffer; + } + else if(ed.creatormod) + { + EditorData::GetInstance().creator=key.keybuffer; + } + else if(ed.websitemod) + { + ed.website=key.keybuffer; + } + else if(ed.desc1mod) + { + ed.Desc1=key.keybuffer; + } + else if(ed.desc2mod) + { + ed.Desc2=key.keybuffer; + } + else if(ed.desc3mod) + { + ed.Desc3=key.keybuffer; + } + + if(!game.press_map && !key.isDown(27)) game.mapheld=false; + if (!game.mapheld) + { + if(game.press_map) + { + game.mapheld=true; + if(ed.roomnamemod) + { + ed.level[ed.levx+(ed.levy*ed.maxwidth)].roomname=key.keybuffer; + ed.roomnamemod=false; + } + else if(ed.savemod) + { + std::string savestring=ed.filename+".vvvvvv"; + ed.save(savestring); + ed.note="[ Saved map: " + ed.filename+ ".vvvvvv]"; + ed.notedelay=45; + ed.savemod=false; + + ed.shiftmenu=false; + ed.shiftkey=false; + + if(ed.saveandquit) + { + //quit editor + dwgfx.fademode = 2; + } + } + else if(ed.loadmod) + { + std::string loadstring=ed.filename+".vvvvvv"; + ed.load(loadstring); + ed.note="[ Loaded map: " + ed.filename+ ".vvvvvv]"; + ed.notedelay=45; + ed.loadmod=false; + + ed.shiftmenu=false; + ed.shiftkey=false; + } + else if(ed.roomtextmod) + { + edentity[ed.roomtextent].scriptname=key.keybuffer; + ed.roomtextmod=false; + + ed.shiftmenu=false; + ed.shiftkey=false; + } + else if(ed.scripttextmod) + { + edentity[ed.scripttextent].scriptname=key.keybuffer; + ed.scripttextmod=false; + ed.clearscriptbuffer(); + if(!ed.checkhook(edentity[ed.scripttextent].scriptname)) + { + ed.addhook(edentity[ed.scripttextent].scriptname); + } + } + else if(ed.titlemod) + { + EditorData::GetInstance().title=key.keybuffer; + ed.titlemod=false; + } + else if(ed.creatormod) + { + EditorData::GetInstance().creator=key.keybuffer; + ed.creatormod=false; + } + else if(ed.websitemod) + { + ed.website=key.keybuffer; + ed.websitemod=false; + } + else if(ed.desc1mod) + { + ed.Desc1=key.keybuffer; + } + else if(ed.desc2mod) + { + ed.Desc2=key.keybuffer; + } + else if(ed.desc3mod) + { + ed.Desc3=key.keybuffer; + ed.desc3mod=false; + } + key.disabletextentry(); + ed.textentry=false; + + if(ed.desc1mod) + { + ed.desc1mod=false; + + ed.textentry=true; + ed.desc2mod=true; + key.enabletextentry(); + key.keybuffer=ed.Desc2; + } + else if(ed.desc2mod) + { + ed.desc2mod=false; + + ed.textentry=true; + ed.desc3mod=true; + key.enabletextentry(); + key.keybuffer=ed.Desc3; + } + } + } + } + else + { + if(ed.settingsmod) + { + if (!game.press_action && !game.press_left && !game.press_right + && !key.keymap[SDLK_UP] && !key.keymap[SDLK_DOWN]) game.jumpheld = false; + if (!game.jumpheld) + { + if (game.press_action || game.press_left || game.press_right || game.press_map + || key.keymap[SDLK_UP] || key.keymap[SDLK_DOWN]) + { + game.jumpheld = true; + } + + if(game.menustart) + { + if (game.press_left || key.keymap[SDLK_UP]) + { + game.currentmenuoption--; + } + else if (game.press_right || key.keymap[SDLK_DOWN]) + { + game.currentmenuoption++; + } + } + + if (game.currentmenuoption < 0) game.currentmenuoption = game.nummenuoptions-1; + if (game.currentmenuoption >= game.nummenuoptions ) game.currentmenuoption = 0; + + if (game.press_action) + { + if (game.currentmenuname == "ed_desc") + { + if (game.currentmenuoption == 0) + { + ed.textentry=true; + ed.titlemod=true; + key.enabletextentry(); + key.keybuffer=EditorData::GetInstance().title; + } + else if (game.currentmenuoption == 1) + { + ed.textentry=true; + ed.creatormod=true; + key.enabletextentry(); + key.keybuffer=EditorData::GetInstance().creator; + } + else if (game.currentmenuoption == 2) + { + ed.textentry=true; + ed.desc1mod=true; + key.enabletextentry(); + key.keybuffer=ed.Desc1; + } + else if (game.currentmenuoption == 3) + { + ed.textentry=true; + ed.websitemod=true; + key.enabletextentry(); + key.keybuffer=ed.website; + } + else if (game.currentmenuoption == 4) + { + music.playef(11, 10); + game.createmenu("ed_settings"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "ed_settings") + { + if (game.currentmenuoption == 0) + { + //Change level description stuff + music.playef(11, 10); + game.createmenu("ed_desc"); + map.nexttowercolour(); + } + else if (game.currentmenuoption == 1) + { + //Enter script editormode + music.playef(11, 10); + ed.scripteditmod=true; + ed.clearscriptbuffer(); + key.enabletextentry(); + key.keybuffer=""; + ed.hookmenupage=0; + ed.hookmenu=0; + ed.scripthelppage=0; + ed.scripthelppagedelay=0; + ed.sby=0; + ed.sbx=0, ed.pagey=0; + } + else if (game.currentmenuoption == 2) + { + music.playef(11, 10); + game.createmenu("ed_music"); + map.nexttowercolour(); + if(ed.levmusic>0) music.play(ed.levmusic); + } + else if (game.currentmenuoption == 3) + { + //Load level + ed.settingsmod=false; + dwgfx.backgrounddrawn=false; + map.nexttowercolour(); + + ed.loadmod=true; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=ed.filename; + ed.keydelay=6; + game.mapheld=true; + dwgfx.backgrounddrawn=false; + } + else if (game.currentmenuoption == 4) + { + //Save level + ed.settingsmod=false; + dwgfx.backgrounddrawn=false; + map.nexttowercolour(); + + ed.savemod=true; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=ed.filename; + ed.keydelay=6; + game.mapheld=true; + dwgfx.backgrounddrawn=false; + } + else if (game.currentmenuoption == 5) + { + music.playef(11, 10); + game.createmenu("ed_quit"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "ed_music") + { + if (game.currentmenuoption == 0) + { + ed.levmusic++; + if(ed.levmusic==5) ed.levmusic=6; + if(ed.levmusic==7) ed.levmusic=8; + if(ed.levmusic==9) ed.levmusic=10; + if(ed.levmusic==15) ed.levmusic=0; + if(ed.levmusic>0) + { + music.play(ed.levmusic); + } + else + { + music.haltdasmusik(); + } + music.playef(11, 10); + } + else if (game.currentmenuoption == 1) + { + music.playef(11, 10); + music.fadeout(); + game.createmenu("ed_settings"); + map.nexttowercolour(); + } + } + else if (game.currentmenuname == "ed_quit") + { + if (game.currentmenuoption == 0) + { + //Saving and quit + ed.saveandquit=true; + + ed.settingsmod=false; + dwgfx.backgrounddrawn=false; + map.nexttowercolour(); + + ed.savemod=true; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=ed.filename; + ed.keydelay=6; + game.mapheld=true; + dwgfx.backgrounddrawn=false; + } + else if (game.currentmenuoption == 1) + { + //Quit without saving + music.playef(11, 10); + music.fadeout(); + dwgfx.fademode = 2; + } + else if (game.currentmenuoption == 2) + { + //Go back to editor + music.playef(11, 10); + game.createmenu("ed_settings"); + map.nexttowercolour(); + } + } + } + } + } + else + { + //Shortcut keys + //TO DO: make more user friendly + if(key.keymap[SDLK_F1] && ed.keydelay==0) + { + ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset++; + dwgfx.backgrounddrawn=false; + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset>=5) ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset=0; + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset==0) + { + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol>=32) ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol=0; + } + else if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset==1) + { + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol>=8) ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol=0; + } + else + { + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol>=6) ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol=0; + } + ed.notedelay=45; + switch(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset) + { + case 0: + ed.note="Now using Space Station Tileset"; + break; + case 1: + ed.note="Now using Outside Tileset"; + break; + case 2: + ed.note="Now using Lab Tileset"; + break; + case 3: + ed.note="Now using Warp Zone Tileset"; + break; + case 4: + ed.note="Now using Ship Tileset"; + break; + case 5: + ed.note="Now using Tower Tileset"; + break; + default: + ed.note="Tileset Changed"; + break; + } + ed.updatetiles=true; + ed.keydelay=6; + } + if(key.keymap[SDLK_F2] && ed.keydelay==0) + { + ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol++; + dwgfx.backgrounddrawn=false; + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset==0) + { + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol>=32) ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol=0; + } + else if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tileset==1) + { + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol>=8) ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol=0; + } + else + { + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol>=6) ed.level[ed.levx+(ed.levy*ed.maxwidth)].tilecol=0; + } + ed.updatetiles=true; + ed.keydelay=6; + ed.notedelay=45; + ed.note="Tileset Colour Changed"; + } + if(key.keymap[SDLK_F3] && ed.keydelay==0) + { + ed.level[ed.levx+(ed.levy*ed.maxwidth)].enemytype=(ed.level[ed.levx+(ed.levy*ed.maxwidth)].enemytype+1)%10; + ed.keydelay=6; + ed.notedelay=45; + ed.note="Enemy Type Changed"; + } + if(key.keymap[SDLK_F4] && ed.keydelay==0) + { + ed.keydelay=6; + ed.boundarytype=1; + ed.boundarymod=1; + } + if(key.keymap[SDLK_F5] && ed.keydelay==0) + { + ed.keydelay=6; + ed.boundarytype=2; + ed.boundarymod=1; + } + if(key.keymap[SDLK_F10] && ed.keydelay==0) + { + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].directmode==1) + { + ed.level[ed.levx+(ed.levy*ed.maxwidth)].directmode=0; + ed.note="Direct Mode Disabled"; + } + else + { + ed.level[ed.levx+(ed.levy*ed.maxwidth)].directmode=1; + ed.note="Direct Mode Enabled"; + } + dwgfx.backgrounddrawn=false; + + ed.notedelay=45; + ed.updatetiles=true; + ed.keydelay=6; + } + if(key.keymap[SDLK_1]) ed.drawmode=0; + if(key.keymap[SDLK_2]) ed.drawmode=1; + if(key.keymap[SDLK_3]) ed.drawmode=2; + if(key.keymap[SDLK_4]) ed.drawmode=3; + if(key.keymap[SDLK_5]) ed.drawmode=4; + if(key.keymap[SDLK_6]) ed.drawmode=5; + if(key.keymap[SDLK_7]) ed.drawmode=6; + if(key.keymap[SDLK_8]) ed.drawmode=7; + if(key.keymap[SDLK_9]) ed.drawmode=8; + if(key.keymap[SDLK_0]) ed.drawmode=9; + if(key.keymap[SDLK_r]) ed.drawmode=10; + if(key.keymap[SDLK_t]) ed.drawmode=11; + if(key.keymap[SDLK_y]) ed.drawmode=12; + if(key.keymap[SDLK_u]) ed.drawmode=13; + if(key.keymap[SDLK_i]) ed.drawmode=14; + if(key.keymap[SDLK_o]) ed.drawmode=15; + if(key.keymap[SDLK_p]) ed.drawmode=16; + + if(key.keymap[SDLK_w] && ed.keydelay==0) + { + int j=0, tx=0, ty=0; + for(int i=0; i0) + { + ed.note="ERROR: Cannot have both warp types"; + ed.notedelay=45; + } + else + { + ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir=(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir+1)%4; + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir==0) + { + ed.note="Room warping disabled"; + ed.notedelay=45; + dwgfx.backgrounddrawn=false; + } + else if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir==1) + { + ed.note="Room warps horizontally"; + ed.notedelay=45; + dwgfx.backgrounddrawn=false; + } + else if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir==2) + { + ed.note="Room warps vertically"; + ed.notedelay=45; + dwgfx.backgrounddrawn=false; + } + else if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].warpdir==3) + { + ed.note="Room warps in all directions"; + ed.notedelay=45; + dwgfx.backgrounddrawn=false; + } + } + ed.keydelay=6; + } + if(key.keymap[SDLK_e] && ed.keydelay==0) + { + ed.roomnamemod=true; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=ed.level[ed.levx+(ed.levy*ed.maxwidth)].roomname; + ed.keydelay=6; + game.mapheld=true; + } + + //Save and load + if(key.keymap[SDLK_s] && ed.keydelay==0) + { + ed.savemod=true; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=ed.filename; + ed.keydelay=6; + game.mapheld=true; + dwgfx.backgrounddrawn=false; + } + + if(key.keymap[SDLK_l] && ed.keydelay==0) + { + ed.loadmod=true; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=ed.filename; + ed.keydelay=6; + game.mapheld=true; + dwgfx.backgrounddrawn=false; + } + + if(!game.press_map) game.mapheld=false; + if (!game.mapheld) + { + if(game.press_map) + { + game.mapheld=true; + + //Ok! Scan the room for the closest checkpoint + int testeditor=-1; + int startpoint=0; + //First up; is there a start point on this screen? + for(int i=0; i0) + { + ed.keydelay--; + } + else + { + if(key.keymap[SDLK_LSHIFT] || key.keymap[SDLK_RSHIFT]) + { + if(key.keymap[SDLK_UP]) + { + ed.keydelay=6; + ed.mapheight--; + } + else if(key.keymap[SDLK_DOWN]) + { + ed.keydelay=6; + ed.mapheight++; + } + + if(key.keymap[SDLK_LEFT]) + { + ed.keydelay=6; + ed.mapwidth--; + } + else if(key.keymap[SDLK_RIGHT]) + { + ed.keydelay=6; + ed.mapwidth++; + } + if(ed.keydelay==6) + { + if(ed.mapwidth<1) ed.mapwidth=1; + if(ed.mapheight<1) ed.mapheight=1; + if(ed.mapwidth>=ed.maxwidth) ed.mapwidth=ed.maxwidth; + if(ed.mapheight>=ed.maxheight) ed.mapheight=ed.maxheight; + ed.note = "Mapsize is now [" + help.String(ed.mapwidth) + "," + help.String(ed.mapheight) + "]"; + ed.notedelay=45; + } + } + else + { + if(key.keymap[SDLK_COMMA]) + { + ed.drawmode--; + ed.keydelay=6; + } + else if(key.keymap[SDLK_PERIOD]) + { + ed.drawmode++; + ed.keydelay=6; + } + + if(ed.drawmode<0) + { + ed.drawmode=16; + if(ed.spacemod) ed.spacemenu=0; + } + if(ed.drawmode>16) ed.drawmode=0; + if(ed.drawmode>9) + { + if(ed.spacemod) ed.spacemenu=1; + } + else + { + if(ed.spacemod) ed.spacemenu=0; + } + + if(key.keymap[SDLK_LCTRL] || key.keymap[SDLK_RCTRL]) + { + ed.dmtileeditor=10; + if(key.keymap[SDLK_LEFT]) + { + ed.dmtile--; + ed.keydelay=3; + if(ed.dmtile<0) ed.dmtile+=1200; + } + else if(key.keymap[SDLK_RIGHT]) + { + ed.dmtile++; + ed.keydelay=3; + + if(ed.dmtile>=1200) ed.dmtile-=1200; + } + if(key.keymap[SDLK_UP]) + { + ed.dmtile-=40; + ed.keydelay=3; + if(ed.dmtile<0) ed.dmtile+=1200; + } + else if(key.keymap[SDLK_DOWN]) + { + ed.dmtile+=40; + ed.keydelay=3; + + if(ed.dmtile>=1200) ed.dmtile-=1200; + } + } + else + { + if(key.keymap[SDLK_UP]) + { + ed.keydelay=6; + dwgfx.backgrounddrawn=false; + ed.levy--; + ed.updatetiles=true; + ed.changeroom=true; + } + else if(key.keymap[SDLK_DOWN]) + { + ed.keydelay=6; + dwgfx.backgrounddrawn=false; + ed.levy++; + ed.updatetiles=true; + ed.changeroom=true; + } + else if(key.keymap[SDLK_LEFT]) + { + ed.keydelay=6; + dwgfx.backgrounddrawn=false; + ed.levx--; + ed.updatetiles=true; + ed.changeroom=true; + } + else if(key.keymap[SDLK_RIGHT]) + { + ed.keydelay=6; + dwgfx.backgrounddrawn=false; + ed.levx++; + ed.updatetiles=true; + ed.changeroom=true; + } + } + + if(ed.levx<0) ed.levx+=ed.mapwidth; + if(ed.levx>= ed.mapwidth) ed.levx-=ed.mapwidth; + if(ed.levy<0) ed.levy+=ed.mapheight; + if(ed.levy>=ed.mapheight) ed.levy-=ed.mapheight; + } + if(key.keymap[SDLK_SPACE]) + { + ed.spacemod = !ed.spacemod; + ed.keydelay=6; + } + + if(key.keymap[SDLK_LSHIFT] || key.keymap[SDLK_RSHIFT]) + { + if(!ed.shiftkey) + { + if(ed.shiftmenu) + { + ed.shiftmenu=false; + } + else + { + ed.shiftmenu=true; + } + } + ed.shiftkey=true; + } + else + { + ed.shiftkey=false; + } + } + } + + if(!ed.settingsmod) + { + if(ed.boundarymod>0) + { + if(key.leftbutton) + { + if(ed.lclickdelay==0) + { + if(ed.boundarymod==1) + { + ed.lclickdelay=1; + ed.boundx1=(ed.tilex*8); + ed.boundy1=(ed.tiley*8); + ed.boundarymod=2; + } + else if(ed.boundarymod==2) + { + if((ed.tilex*8)+8>=ed.boundx1 || (ed.tiley*8)+8>=ed.boundy1) + { + ed.boundx2=(ed.tilex*8)+8; + ed.boundy2=(ed.tiley*8)+8; + } + else + { + ed.boundx2=ed.boundx1+8; + ed.boundy2=ed.boundy1+8; + } + if(ed.boundarytype==0) + { + //Script trigger + ed.scripttextmod=true; + ed.scripttextent=EditorData::GetInstance().numedentities; + addedentity((ed.boundx1/8)+(ed.levx*40),(ed.boundy1/8)+ (ed.levy*30),19, + (ed.boundx2-ed.boundx1)/8, (ed.boundy2-ed.boundy1)/8); + ed.lclickdelay=1; + + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=""; + ed.lclickdelay=1; + } + else if(ed.boundarytype==1) + { + //Enemy bounds + int tmp=ed.levx+(ed.levy*ed.maxwidth); + ed.level[tmp].enemyx1=ed.boundx1; + ed.level[tmp].enemyy1=ed.boundy1; + ed.level[tmp].enemyx2=ed.boundx2; + ed.level[tmp].enemyy2=ed.boundy2; + } + else if(ed.boundarytype==2) + { + //Platform bounds + int tmp=ed.levx+(ed.levy*ed.maxwidth); + ed.level[tmp].platx1=ed.boundx1; + ed.level[tmp].platy1=ed.boundy1; + ed.level[tmp].platx2=ed.boundx2; + ed.level[tmp].platy2=ed.boundy2; + } + else if(ed.boundarytype==3) + { + //Copy + } + ed.boundarymod=0; + ed.lclickdelay=1; + } + } + } + else + { + ed.lclickdelay=0; + } + if(key.rightbutton) + { + ed.boundarymod=0; + } + } + else if(ed.warpmod) + { + //Placing warp token + if(key.leftbutton) + { + if(ed.lclickdelay==0) + { + if(ed.free(ed.tilex, ed.tiley)==0) + { + edentity[ed.warpent].p1=ed.tilex+(ed.levx*40); + edentity[ed.warpent].p2=ed.tiley+(ed.levy*30); + ed.warpmod=false; + ed.warpent=-1; + ed.lclickdelay=1; + } + } + } + else + { + ed.lclickdelay=0; + } + if(key.rightbutton) + { + removeedentity(ed.warpent); + ed.warpmod=false; + ed.warpent=-1; + } + } + else + { + //Mouse input + if(key.leftbutton) + { + if(ed.lclickdelay==0) + { + //Depending on current mode, place something + if(ed.drawmode==0) + { + //place tiles + //Are we in direct mode? + if(ed.level[ed.levx+(ed.levy*ed.maxwidth)].directmode>=1) + { + if(ed.xmod) + { + for(int j=-2; j<3; j++) + { + for(int i=-2; i<3; i++) + { + ed.placetilelocal(ed.tilex+i, ed.tiley+j, ed.dmtile); + } + } + } + else if(ed.zmod) + { + for(int j=-1; j<2; j++) + { + for(int i=-1; i<2; i++) + { + ed.placetilelocal(ed.tilex+i, ed.tiley+j, ed.dmtile); + } + } + } + else + { + ed.placetilelocal(ed.tilex, ed.tiley, ed.dmtile); + } + } + else + { + if(ed.xmod) + { + for(int j=-2; j<3; j++) + { + for(int i=-2; i<3; i++) + { + ed.placetilelocal(ed.tilex+i, ed.tiley+j, 80); + } + } + } + else if(ed.zmod) + { + for(int j=-1; j<2; j++) + { + for(int i=-1; i<2; i++) + { + ed.placetilelocal(ed.tilex+i, ed.tiley+j, 80); + } + } + } + else + { + ed.placetilelocal(ed.tilex, ed.tiley, 80); + } + } + } + else if(ed.drawmode==1) + { + //place background tiles + if(ed.xmod) + { + for(int j=-2; j<3; j++) + { + for(int i=-2; i<3; i++) + { + ed.placetilelocal(ed.tilex+i, ed.tiley+j, 2); + } + } + } + else if(ed.zmod) + { + for(int j=-1; j<2; j++) + { + for(int i=-1; i<2; i++) + { + ed.placetilelocal(ed.tilex+i, ed.tiley+j, 2); + } + } + } + else + { + ed.placetilelocal(ed.tilex, ed.tiley, 2); + } + } + else if(ed.drawmode==2) + { + //place spikes + ed.placetilelocal(ed.tilex, ed.tiley, 8); + } + + int tmp=edentat(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30)); + if(tmp==-1) + { + //Room text and script triggers can be placed in walls + if(ed.drawmode==10) + { + ed.roomtextmod=true; + ed.roomtextent=EditorData::GetInstance().numedentities; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=""; + dwgfx.backgrounddrawn=false; + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),17); + ed.lclickdelay=1; + } + else if(ed.drawmode==12) //Script Trigger + { + ed.boundarytype=0; + ed.boundx1=ed.tilex*8; + ed.boundy1=ed.tiley*8; + ed.boundarymod=2; + ed.lclickdelay=1; + } + } + if(tmp==-1 && ed.free(ed.tilex,ed.tiley)==0) + { + if(ed.drawmode==3) + { + if(ed.numtrinkets<20) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),9); + ed.lclickdelay=1; + ed.numtrinkets++; + } + else + { + ed.note="ERROR: Max number of trinkets is 20"; + ed.notedelay=45; + } + } + else if(ed.drawmode==4) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),10, 1); + ed.lclickdelay=1; + } + else if(ed.drawmode==5) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),3); + ed.lclickdelay=1; + } + else if(ed.drawmode==6) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),2,5); + ed.lclickdelay=1; + } + else if(ed.drawmode==7) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),2,0); + ed.lclickdelay=1; + } + else if(ed.drawmode==8) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),1,0); + ed.lclickdelay=1; + } + else if(ed.drawmode==9) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),11,0); + ed.lclickdelay=1; + } + else if(ed.drawmode==11) + { + ed.scripttextmod=true; + ed.scripttextent=EditorData::GetInstance().numedentities; + ed.textentry=true; + key.enabletextentry(); + + addedentity(ed.tilex+(ed.levx*40),ed.tiley+ (ed.levy*30),18,0); + ed.lclickdelay=1; + } + else if(ed.drawmode==13) + { + ed.warpmod=true; + ed.warpent=EditorData::GetInstance().numedentities; + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),13); + ed.lclickdelay=1; + } + else if(ed.drawmode==14) + { + //Warp lines + if(ed.level[ed.levx+(ed.maxwidth*ed.levy)].warpdir==0) + { + if(ed.tilex==0) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),50,0); + } + else if(ed.tilex==39) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),50,1); + } + else if(ed.tiley==0) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),50,2); + } + else if(ed.tiley==29) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),50,3); + } + else + { + ed.note="ERROR: Warp lines must be on edges"; + ed.notedelay=45; + } + } + else + { + ed.note="ERROR: Cannot have both warp types"; + ed.notedelay=45; + } + ed.lclickdelay=1; + } + else if(ed.drawmode==15) //Crewmate + { + if(ed.numcrewmates<20) + { + addedentity(ed.tilex+ (ed.levx*40),ed.tiley+ (ed.levy*30),15,1 + int(fRandom() * 5)); + ed.lclickdelay=1; + ed.numcrewmates++; + } + else + { + ed.note="ERROR: Max number of crewmates is 20"; + ed.notedelay=45; + } + } + else if(ed.drawmode==16) //Start Point + { + //If there is another start point, destroy it + for(int i=0; i=5) + { + edentity[tmp].p1=(edentity[tmp].p1+1)%9; + if(edentity[tmp].p1<5) edentity[tmp].p1=5; + } + else + { + edentity[tmp].p1=(edentity[tmp].p1+1)%4; + } + ed.lclickdelay=1; + } + else if(edentity[tmp].t==10) + { + edentity[tmp].p1=(edentity[tmp].p1+1)%2; + ed.lclickdelay=1; + } + else if(edentity[tmp].t==11) + { + edentity[tmp].p1=(edentity[tmp].p1+1)%2; + ed.lclickdelay=1; + } + else if(edentity[tmp].t==15) + { + edentity[tmp].p1=(edentity[tmp].p1+1)%6; + ed.lclickdelay=1; + } + else if(edentity[tmp].t==16) + { + edentity[tmp].p1=(edentity[tmp].p1+1)%2; + ed.lclickdelay=1; + } + else if(edentity[tmp].t==17) + { + ed.roomtextmod=true; + ed.roomtextent=tmp; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=edentity[tmp].scriptname; + ed.lclickdelay=1; + } + else if(edentity[tmp].t==18) + { + ed.scripttextmod=true; + ed.scripttextent=tmp; + ed.textentry=true; + key.enabletextentry(); + key.keybuffer=edentity[tmp].scriptname; + ed.lclickdelay=1; + } + } + } + else + { + ed.lclickdelay=0; + } + + if(key.rightbutton) + { + //place tiles + if(ed.xmod) + { + for(int j=-2; j<3; j++) + { + for(int i=-2; i<3; i++) + { + ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0); + } + } + } + else if(ed.zmod) + { + for(int j=-1; j<2; j++) + { + for(int i=-1; i<2; i++) + { + ed.placetilelocal(ed.tilex+i, ed.tiley+j, 0); + } + } + } + else + { + ed.placetilelocal(ed.tilex, ed.tiley, 0); + } + for(int i=0; i=3 && ed.contents[temp]<80) + { + //Fix spikes + ed.contents[temp]=ed.spikedir(i,j); + } + else if(ed.contents[temp]==2 || ed.contents[temp]>=680) + { + //Fix background + ed.contents[temp]=ed.backedgetile(i,j)+ed.backbase(ed.levx,ed.levy); + } + else if(ed.contents[temp]>0) + { + //Fix tiles + ed.contents[temp]=ed.edgetile(i,j)+ed.base(ed.levx,ed.levy); + } + } + } + break; + case 1: //Outside + for(int j=0; j<30; j++) + { + for(int i=0; i<40; i++) + { + temp=i+(ed.levx*40) + ed.vmult[j+(ed.levy*30)]; + if(ed.contents[temp]>=3 && ed.contents[temp]<80) + { + //Fix spikes + ed.contents[temp]=ed.spikedir(i,j); + } + else if(ed.contents[temp]==2 || ed.contents[temp]>=680) + { + //Fix background + ed.contents[temp]=ed.outsideedgetile(i,j)+ed.backbase(ed.levx,ed.levy); + } + else if(ed.contents[temp]>0) + { + //Fix tiles + ed.contents[temp]=ed.edgetile(i,j)+ed.base(ed.levx,ed.levy); + } + } + } + break; + case 2: //Lab + for(int j=0; j<30; j++) + { + for(int i=0; i<40; i++) + { + temp=i+(ed.levx*40) + ed.vmult[j+(ed.levy*30)]; + if(ed.contents[temp]>=3 && ed.contents[temp]<80) + { + //Fix spikes + ed.contents[temp]=ed.labspikedir(i,j, ed.level[ed.levx + (ed.maxwidth*ed.levy)].tilecol); + } + else if(ed.contents[temp]==2 || ed.contents[temp]>=680) + { + //Fix background + ed.contents[temp]=713; + } + else if(ed.contents[temp]>0) + { + //Fix tiles + ed.contents[temp]=ed.edgetile(i,j)+ed.base(ed.levx,ed.levy); + } + } + } + break; + case 3: //Warp Zone/Intermission + for(int j=0; j<30; j++) + { + for(int i=0; i<40; i++) + { + temp=i+(ed.levx*40) + ed.vmult[j+(ed.levy*30)]; + if(ed.contents[temp]>=3 && ed.contents[temp]<80) + { + //Fix spikes + ed.contents[temp]=ed.spikedir(i,j); + } + else if(ed.contents[temp]==2 || ed.contents[temp]>=680) + { + //Fix background + ed.contents[temp]=713;//ed.backbase(ed.levx,ed.levy); + } + else if(ed.contents[temp]>0) + { + //Fix tiles + //ed.contents[temp]=ed.warpzoneedgetile(i,j)+ed.base(ed.levx,ed.levy); + ed.contents[temp]=ed.edgetile(i,j)+ed.base(ed.levx,ed.levy); + } + } + } + break; + case 4: //The ship + for(int j=0; j<30; j++) + { + for(int i=0; i<40; i++) + { + temp=i+(ed.levx*40) + ed.vmult[j+(ed.levy*30)]; + if(ed.contents[temp]>=3 && ed.contents[temp]<80) + { + //Fix spikes + ed.contents[temp]=ed.spikedir(i,j); + } + else if(ed.contents[temp]==2 || ed.contents[temp]>=680) + { + //Fix background + ed.contents[temp]=ed.backedgetile(i,j)+ed.backbase(ed.levx,ed.levy); + } + else if(ed.contents[temp]>0) + { + //Fix tiles + ed.contents[temp]=ed.edgetile(i,j)+ed.base(ed.levx,ed.levy); + } + } + } + break; + case 5: //The Tower + break; + case 6: //Custom Set 1 + break; + case 7: //Custom Set 2 + break; + case 8: //Custom Set 3 + break; + case 9: //Custom Set 4 + break; + } + } +} diff --git a/desktop_version/src/editor.h b/desktop_version/src/editor.h new file mode 100644 index 00000000..3a522e89 --- /dev/null +++ b/desktop_version/src/editor.h @@ -0,0 +1,262 @@ +#ifndef EDITOR_H +#define EDITOR_H + +#include +#include +#include "Script.h" + +class KeyPoll; class Graphics; class Game; class mapclass; class entityclass; class UtilityClass; + + +class edentities{ +public: + int x, y, t; + //parameters + int p1, p2, p3, p4, p5, p6; + std::string scriptname; +}; + + +class edlevelclass{ +public: + edlevelclass(); + int tileset, tilecol; + std::string roomname; + int warpdir; + int platx1, platy1, platx2, platy2, platv; + int enemyx1, enemyy1, enemyx2, enemyy2, enemytype; + int directmode; +}; + +struct LevelMetaData +{ + std::string title; + std::string creator; + std::string Desc1; + std::string Desc2; + std::string Desc3; + std::string website; + std::string filename; + + std::string modifier; + std::string timeCreated; + std::string timeModified; + + int version; +}; + + +extern edentities edentity[3000]; +extern scriptclass script; + +class EditorData +{ + public: + + static EditorData& GetInstance() + { + static EditorData instance; // Guaranteed to be destroyed. + // Instantiated on first use. + return instance; + } + + + int numedentities; + std::string title; + std::string creator; + + std::string modifier; + std::string timeCreated; + std::string timeModified; + +private: + + + EditorData(): + numedentities(0) + { + } + +}; + + +class editorclass{ + //Special class to handle ALL editor variables locally + public: + editorclass(); + + std::string Desc1; + std::string Desc2; + std::string Desc3; + std::string website; + + std::vector directoryList; + std::vector ListOfMetaData; + + void getDirectoryData(); + bool getLevelMetaData(std::string& filename, LevelMetaData& _data ); + + void saveconvertor(); + void reset(); + void loadlevel(int rxi, int ryi); + + void placetile(int x, int y, int t); + + void placetilelocal(int x, int y, int t); + + int getenemyframe(int t); + int base(int x, int y); + + int backbase(int x, int y); + + int at(int x, int y); + + int freewrap(int x, int y); + + int backonlyfree(int x, int y); + + int backfree(int x, int y); + + int spikefree(int x, int y); + int free(int x, int y); + int absfree(int x, int y); + + int match(int x, int y); + int warpzonematch(int x, int y); + int outsidematch(int x, int y); + + int backmatch(int x, int y); + + void load(std::string& _path); + void save(std::string& _path); + void generatecustomminimap(Graphics& dwgfx, mapclass& map); + int edgetile(int x, int y); + int warpzoneedgetile(int x, int y); + int outsideedgetile(int x, int y); + + int backedgetile(int x, int y); + + int labspikedir(int x, int y, int t); + int spikedir(int x, int y); + int findtrinket(int t); + int findcrewmate(int t); + int findwarptoken(int t); + void countstuff(); + void findstartpoint(Game& game); + void weirdloadthing(std::string t); + int getlevelcol(int t); + int getenemycol(int t); + int entcol; + + //Colouring stuff + int getwarpbackground(int rx, int ry); + + std::vector getLevelDirFileNames( ); + std::vector swapmap; + std::vector contents; + std::vector vmult; + int numtrinkets; + int numcrewmates; + edlevelclass level[400]; //Maxwidth*maxheight + + int temp; + int notedelay; + std::string note; + std::string keybuffer; + std::string filename; + + int drawmode; + int tilex, tiley; + int keydelay, lclickdelay; + bool savekey, loadkey; + int levx, levy; + int entframe, entframedelay; + + bool roomtextmod; + int roomtextent; + + bool scripttextmod; + int scripttextent; + int scripttexttype; + + bool xmod, zmod, spacemod, warpmod, roomnamemod, textentry, savemod, loadmod; + bool titlemod, creatormod, desc1mod, desc2mod, desc3mod, websitemod; + + int roomnamehide; + bool saveandquit; + bool shiftmenu, shiftkey; + int spacemenu; + bool settingsmod, settingskey; + int warpent; + bool updatetiles, changeroom; + int deletekeyheld; + + int boundarymod, boundarytype; + int boundx1, boundx2, boundy1, boundy2; + + int levmusic; + int mapwidth, mapheight; //Actual width and height of stage + int maxwidth, maxheight; //Special; the physical max the engine allows + + int version; + + //Script editor stuff + void removeline(int t); + void insertline(int t); + + bool scripteditmod; + int scripthelppage, scripthelppagedelay; + std::string sb[500]; + std::string sbscript; + int sblength; + int sbx, sby; + int pagey; + + std::string author; + std::string description; + std::string title; + + //Functions for interfacing with the script: + void addhook(std::string t); + void removehook(std::string t); + void addhooktoscript(std::string t); + void removehookfromscript(std::string t); + void loadhookineditor(std::string t); + void clearscriptbuffer(); + void gethooks(); + bool checkhook(std::string t); + std::string hooklist[500]; + int numhooks; + + int hookmenupage, hookmenu; + + //Direct Mode variables + int dmtile; + int dmtileeditor; +}; + +void addedentity(int xp, int yp, int tp, int p1=0, int p2=0, int p3=0, int p4=0, int p5=320, int p6=240); + +void naddedentity(int xp, int yp, int tp, int p1=0, int p2=0, int p3=0, int p4=0, int p5=320, int p6=240); + +void copyedentity(int a, int b); + +void removeedentity(int t); + +int edentat(int xp, int yp); + + +bool edentclear(int xp, int yp); + +void fillbox(Graphics& dwgfx, int x, int y, int x2, int y2, int c); + +void fillboxabs(Graphics& dwgfx, int x, int y, int x2, int y2, int c); + +void editorrender(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help); + +void editorlogic(KeyPoll& key, Graphics& dwgfx, Game& game, entityclass& obj, musicclass& music, mapclass& map, UtilityClass& help); + +void editorinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, + entityclass& obj, UtilityClass& help, musicclass& music); + +#endif /* EDITOR_H */ diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp new file mode 100644 index 00000000..d423223b --- /dev/null +++ b/desktop_version/src/main.cpp @@ -0,0 +1,539 @@ +#include +#include "SoundSystem.h" + +#include "UtilityClass.h" +#include "Game.h" +#include "Graphics.h" +#include "KeyPoll.h" +#include "titlerender.h" + +#include "Tower.h" +#include "WarpClass.h" +#include "Labclass.h" +#include "Finalclass.h" +#include "Map.h" + +#include "Screen.h" + +#include "Script.h" + +#include "Logic.h" + +#include "Input.h" +#include "editor.h" +#include "preloader.h" + +#include "FileSystemUtils.h" +#include "Network.h" + +#include +#include + +scriptclass script; + edentities edentity[3000]; + + editorclass ed; + +int main(int argc, char *argv[]) +{ + FILESYSTEM_init(argv[0]); + SDL_Init( + SDL_INIT_VIDEO | + SDL_INIT_AUDIO | + SDL_INIT_JOYSTICK | + SDL_INIT_GAMECONTROLLER + ); + + if (argc > 2 && strcmp(argv[1], "-renderer") == 0) + { + SDL_SetHintWithPriority(SDL_HINT_RENDER_DRIVER, argv[2], SDL_HINT_OVERRIDE); + } + + NETWORK_init(); + + Screen gameScreen; + + printf("\t\t\n"); + printf("\t\t\n"); + printf("\t\t VVVVVV\n"); + printf("\t\t\n"); + printf("\t\t\n"); + printf("\t\t 8888888888888888 \n"); + printf("\t\t88888888888888888888\n"); + printf("\t\t888888 8888 88\n"); + printf("\t\t888888 8888 88\n"); + printf("\t\t88888888888888888888\n"); + printf("\t\t88888888888888888888\n"); + printf("\t\t888888 88\n"); + printf("\t\t88888888 8888\n"); + printf("\t\t 8888888888888888 \n"); + printf("\t\t 88888888 \n"); + printf("\t\t 8888888888888888 \n"); + printf("\t\t88888888888888888888\n"); + printf("\t\t88888888888888888888\n"); + printf("\t\t88888888888888888888\n"); + printf("\t\t8888 88888888 8888\n"); + printf("\t\t8888 88888888 8888\n"); + printf("\t\t 888888888888 \n"); + printf("\t\t 8888 8888 \n"); + printf("\t\t 888888 888888 \n"); + printf("\t\t 888888 888888 \n"); + printf("\t\t 888888 888888 \n"); + printf("\t\t\n"); + printf("\t\t\n"); + + //Set up screen + + + + + UtilityClass help; + // Load Ini + + + Graphics graphics; + + + + musicclass music; + Game game; + game.infocus = true; + + graphics.MakeTileArray(); + graphics.MakeSpriteArray(); + graphics.maketelearray(); + + + graphics.images.push_back(graphics.grphx.im_image0); + graphics.images.push_back(graphics.grphx.im_image1); + graphics.images.push_back(graphics.grphx.im_image2); + graphics.images.push_back(graphics.grphx.im_image3); + graphics.images.push_back(graphics.grphx.im_image4); + graphics.images.push_back(graphics.grphx.im_image5); + graphics.images.push_back(graphics.grphx.im_image6); + + graphics.images.push_back(graphics.grphx.im_image7); + graphics.images.push_back(graphics.grphx.im_image8); + graphics.images.push_back(graphics.grphx.im_image9); + graphics.images.push_back(graphics.grphx.im_image10); + graphics.images.push_back(graphics.grphx.im_image11); + graphics.images.push_back(graphics.grphx.im_image12); + + const SDL_PixelFormat* fmt = gameScreen.GetFormat(); + graphics.backBuffer = SDL_CreateRGBSurface(SDL_SWSURFACE ,320 ,240 ,32,fmt->Rmask,fmt->Gmask,fmt->Bmask,fmt->Amask ) ; + SDL_SetSurfaceBlendMode(graphics.backBuffer, SDL_BLENDMODE_NONE); + graphics.Makebfont(); + + + graphics.forgroundBuffer = SDL_CreateRGBSurface(SDL_SWSURFACE ,320 ,240 ,fmt->BitsPerPixel,fmt->Rmask,fmt->Gmask,fmt->Bmask,fmt->Amask ); + SDL_SetSurfaceBlendMode(graphics.forgroundBuffer, SDL_BLENDMODE_NONE); + + graphics.screenbuffer = &gameScreen; + + graphics.menubuffer = SDL_CreateRGBSurface(SDL_SWSURFACE ,320 ,240 ,fmt->BitsPerPixel,fmt->Rmask,fmt->Gmask,fmt->Bmask,fmt->Amask ); + SDL_SetSurfaceBlendMode(graphics.menubuffer, SDL_BLENDMODE_NONE); + + graphics.towerbuffer = SDL_CreateRGBSurface(SDL_SWSURFACE ,320 ,240 ,fmt->BitsPerPixel,fmt->Rmask,fmt->Gmask,fmt->Bmask,fmt->Amask ); + SDL_SetSurfaceBlendMode(graphics.towerbuffer, SDL_BLENDMODE_NONE); + + graphics.tempBuffer = SDL_CreateRGBSurface(SDL_SWSURFACE ,320 ,240 ,fmt->BitsPerPixel,fmt->Rmask,fmt->Gmask,fmt->Bmask,fmt->Amask ); + SDL_SetSurfaceBlendMode(graphics.tempBuffer, SDL_BLENDMODE_NONE); + + //Make a temporary rectangle to hold the offsets + // SDL_Rect offset; + //Give the offsets to the rectangle + // offset.x = 60; + // offset.y = 80; + + //game.gamestate = TITLEMODE; + //game.gamestate=EDITORMODE; + game.gamestate = PRELOADER; //Remember to uncomment this later! + + game.menustart = false; + game.mainmenu = 0; + + KeyPoll key; + mapclass map; + + map.ypos = (700-29) * 8; + map.bypos = map.ypos / 2; + + //Moved screensetting init here from main menu V2.1 + game.loadstats(map, graphics); + if(game.usingmmmmmm==0) music.usingmmmmmm=false; + if(game.usingmmmmmm==1) music.usingmmmmmm=true; + if (game.slowdown == 0) game.slowdown = 30; + + switch(game.slowdown){ + case 30: game.gameframerate=34; break; + case 24: game.gameframerate=41; break; + case 18: game.gameframerate=55; break; + case 12: game.gameframerate=83; break; + default: game.gameframerate=34; break; + } + + //Check to see if you've already unlocked some achievements here from before the update + if (game.swnbestrank > 0){ + if(game.swnbestrank >= 1) NETWORK_unlockAchievement("vvvvvvsupgrav5"); + if(game.swnbestrank >= 2) NETWORK_unlockAchievement("vvvvvvsupgrav10"); + if(game.swnbestrank >= 3) NETWORK_unlockAchievement("vvvvvvsupgrav15"); + if(game.swnbestrank >= 4) NETWORK_unlockAchievement("vvvvvvsupgrav20"); + if(game.swnbestrank >= 5) NETWORK_unlockAchievement("vvvvvvsupgrav30"); + if(game.swnbestrank >= 6) NETWORK_unlockAchievement("vvvvvvsupgrav60"); + } + + if(game.unlock[5]) NETWORK_unlockAchievement("vvvvvvgamecomplete"); + if(game.unlock[19]) NETWORK_unlockAchievement("vvvvvvgamecompleteflip"); + if(game.unlock[20]) NETWORK_unlockAchievement("vvvvvvmaster"); + + if (game.bestgamedeaths > -1) { + if (game.bestgamedeaths <= 500) { + NETWORK_unlockAchievement("vvvvvvcomplete500"); + } + if (game.bestgamedeaths <= 250) { + NETWORK_unlockAchievement("vvvvvvcomplete250"); + } + if (game.bestgamedeaths <= 100) { + NETWORK_unlockAchievement("vvvvvvcomplete100"); + } + if (game.bestgamedeaths <= 50) { + NETWORK_unlockAchievement("vvvvvvcomplete50"); + } + } + + if(game.bestrank[0]>=3) NETWORK_unlockAchievement("vvvvvvtimetrial_station1_fixed"); + if(game.bestrank[1]>=3) NETWORK_unlockAchievement("vvvvvvtimetrial_lab_fixed"); + if(game.bestrank[2]>=3) NETWORK_unlockAchievement("vvvvvvtimetrial_tower_fixed"); + if(game.bestrank[3]>=3) NETWORK_unlockAchievement("vvvvvvtimetrial_station2_fixed"); + if(game.bestrank[4]>=3) NETWORK_unlockAchievement("vvvvvvtimetrial_warp_fixed"); + if(game.bestrank[5]>=3) NETWORK_unlockAchievement("vvvvvvtimetrial_final_fixed"); + + entityclass obj; + obj.init(); + + //Quick hack to start in final level ---- //Might be useful to leave this commented in for testing + /* + //game.gamestate=GAMEMODE; + //game.start(obj,music); + //script.startgamemode(8, key, graphics, game, map, obj, help, music); + // map.finalmode = true; //Enable final level mode + //map.finalx = 41; map.finaly = 52; //Midpoint + //map.finalstretch = true; + //map.final_colormode = true; + //map.final_mapcol = 0; + //map.final_colorframe = 0; + + //game.starttest(obj, music); + + game.savex = 5 * 8; game.savey = 15 * 8; game.saverx = 41; game.savery = 52; + game.savegc = 0; game.savedir = 1; + game.state = 0; game.deathseq = -1; game.lifeseq = 10; + //obj.createentity(game, game.savex, game.savey, 0); + map.gotoroom(game.saverx, game.savery, graphics, game, obj, music); + //music.play(1); + */ + //End hack here ---- + + volatile Uint32 time, timePrev = 0; + game.infocus = true; + key.isActive = true; + + while(!key.quitProgram) + { + //gameScreen.ClearScreen(0x00); + + time = SDL_GetTicks(); + + // Update network per frame. + NETWORK_update(); + + //framerate limit to 30 + Uint32 timetaken = time - timePrev; + if(game.gamestate==EDITORMODE) + { + if (timetaken < 24) + { + volatile Uint32 delay = 24 - timetaken; + SDL_Delay( delay ); + time = SDL_GetTicks(); + } + timePrev = time; + + }else{ + if (timetaken < game.gameframerate) + { + volatile Uint32 delay = game.gameframerate - timetaken; + SDL_Delay( delay ); + time = SDL_GetTicks(); + } + timePrev = time; + + } + + + + key.Poll(); + if(key.toggleFullscreen) + { + if(!gameScreen.isWindowed) + { + //SDL_WM_GrabInput(SDL_GRAB_ON); + SDL_ShowCursor(SDL_DISABLE); + SDL_ShowCursor(SDL_ENABLE); + } + else + { + SDL_ShowCursor(SDL_ENABLE); + } + + + if(game.gamestate == EDITORMODE) + { + SDL_ShowCursor(SDL_ENABLE); + } + + gameScreen.toggleFullScreen(); + game.fullscreen = !game.fullscreen; + key.toggleFullscreen = false; + + key.keymap.clear(); //we lost the input due to a new window. + game.press_left = false; + game.press_right = false; + game.press_action = true; + game.press_map = false; + printf("Error: failed: %s\n", SDL_GetError()); + + + + + } + /*if(key.quitProgram) + { + music.playef(2); + }*/ + + game.infocus = key.isActive; + if(!game.infocus) + { + if(game.getGlobalSoundVol()> 0) + { + game.setGlobalSoundVol(0); + } + FillRect(graphics.backBuffer, 0x00000000); + graphics.bprint(5, 110, "Game paused", 196 - help.glow, 255 - help.glow, 196 - help.glow, true); + graphics.bprint(5, 120, "[click to resume]", 196 - help.glow, 255 - help.glow, 196 - help.glow, true); + graphics.bprint(5, 230, "Press M to mute in game", 164 - help.glow, 196 - help.glow, 164 - help.glow, true); + graphics.render(); + //We are minimised, so lets put a bit of a delay to save CPU + SDL_Delay(100); + } + else + { + switch(game.gamestate) + { + case PRELOADER: + //Render + preloaderrender(graphics, game, help); + break; + case EDITORMODE: + graphics.flipmode = false; + //Input + editorinput(key, graphics, game, map, obj, help, music); + //Render + editorrender(key, graphics, game, map, obj, help); + ////Logic + editorlogic(key, graphics, game, obj, music, map, help); + break; + case TITLEMODE: + //Input + titleinput(key, graphics, map, game, obj, help, music); + //Render + titlerender(graphics, map, game, obj, help, music); + ////Logic + titlelogic(graphics, game, obj, help, music, map); + break; + case GAMEMODE: + if (map.towermode) + { + gameinput(key, graphics, game, map, obj, help, music); + + //if(game.recording==1) + //{ + // ///recordinput(key, graphics, game, map, obj, help, music); + //} + //else + //{ + //} + towerrender(graphics, game, map, obj, help); + towerlogic(graphics, game, obj, music, map, help); + + } + else + { + + if (game.recording == 1) + { + //recordinput(key, dwgfx, game, map, obj, help, music); + } + else + { + if (script.running) + { + script.run(key, graphics, game, map, obj, help, music); + } + + gameinput(key, graphics, game, map, obj, help, music); + //} + gamerender(graphics,map, game, obj, help); + gamelogic(graphics, game,obj, music, map, help); + + + } + break; + case MAPMODE: + maprender(graphics, game, map, obj, help); + if (game.recording == 1) + { + //recordinput(key, dwgfx, game, map, obj, help, music); //will implement this later if it's actually needed + } + else + { + mapinput(key, graphics, game, map, obj, help, music); + } + maplogic(graphics, game, obj ,music , map, help ); + break; + case TELEPORTERMODE: + teleporterrender(graphics, game, map, obj, help); + if (game.recording == 1) + { + //recordinput(key, graphics, game, map, obj, help, music); + } + else + { + if(game.useteleporter) + { + teleporterinput(key, graphics, game, map, obj, help, music); + } + else + { + if (script.running) + { + script.run(key, graphics, game, map, obj, help, music); + } + gameinput(key, graphics, game, map, obj, help, music); + } + } + maplogic(graphics, game, obj, music, map, help); + break; + case GAMECOMPLETE: + gamecompleterender(graphics, game, obj, help, map); + //Input + gamecompleteinput(key, graphics, game, map, obj, help, music); + //Logic + gamecompletelogic(graphics, game, obj, music, map, help); + break; + case GAMECOMPLETE2: + gamecompleterender2(graphics, game, obj, help); + //Input + gamecompleteinput2(key, graphics, game, map, obj, help, music); + //Logic + gamecompletelogic2(graphics, game, obj, music, map, help); + break; + case CLICKTOSTART: + + //dwgfx.bprint(5, 115, "[Click to start]", 196 - help.glow, 196 - help.glow, 255 - help.glow, true); + //dwgfx.drawgui(help); + //dwgfx.render(); + //dwgfx.backbuffer.unlock(); + + help.updateglow(); + // if (key.click) { + // dwgfx.textboxremove(); + // } + // if (dwgfx.ntextbox == 0) { + // //music.play(6); + // map.ypos = (700-29) * 8; + // map.bypos = map.ypos / 2; + // map.cameramode = 0; + + // game.gamestate = TITLEMODE; + // } + break; + default: + + break; + } + + } + + } + + if (game.savemystats) + { + game.savemystats = false; + game.savestats(map, graphics); + } + + //Mute button + if (key.isDown(KEYBOARD_m) && game.mutebutton<=0 && !ed.textentry) + { + game.mutebutton = 8; + if (game.muted) + { + game.muted = false; + } + else + { + game.muted = true; + } + } + if(game.mutebutton>0) + { + game.mutebutton--; + } + + if (game.muted) + { + //if (game.globalsound == 1) + //{ + game.globalsound = 0; + Mix_VolumeMusic(0) ; + Mix_Volume(-1,0); + //} + } + + if (!game.muted && game.globalsound == 0) + { + game.globalsound = 1; + Mix_VolumeMusic(MIX_MAX_VOLUME) ; + Mix_Volume(-1,MIX_MAX_VOLUME); + } + + if(key.resetWindow) + { + key.resetWindow = false; + gameScreen.ResizeScreen(-1, -1); + } + + music.processmusic(); + graphics.processfade(); + game.gameclock(); + gameScreen.FlipScreen(); + + //SDL_FillRect( SDL_GetVideoSurface(), NULL, 0 ); + } + + + //SDL_Delay(300); + + //TODO + //Free the loaded image + //SDL_FreeSurface( gameScreen ); + + //Quit SDL + NETWORK_shutdown(); + SDL_Quit(); + FILESYSTEM_deinit(); + + return 0; +} diff --git a/desktop_version/src/preloader.cpp b/desktop_version/src/preloader.cpp new file mode 100644 index 00000000..eeca24f5 --- /dev/null +++ b/desktop_version/src/preloader.cpp @@ -0,0 +1,126 @@ +#include "preloader.h" + +#include "Enums.h" + +int pre_fakepercent=0, pre_transition=30; +bool pre_startgame=false; +int pre_darkcol=0, pre_lightcol=0, pre_curcol=0, pre_coltimer=0, pre_offset=0; + +int pre_frontrectx=30, pre_frontrecty=20, pre_frontrectw=260, pre_frontrecth=200; +int pre_temprectx=0, pre_temprecty=0, pre_temprectw=320, pre_temprecth=240; + +void preloaderrender(Graphics& dwgfx, Game& game, UtilityClass& help) +{ + //TODO + //dwgfx.backbuffer.lock(); + + //Draw grid + + //pre_transition = -10; pre_fakepercent = 100; + + if (pre_transition < 30) pre_transition--; + if(pre_transition>=30){ + pre_fakepercent++; + if (pre_fakepercent >= 100) { + pre_fakepercent = 100; + pre_startgame = true; + } + + pre_offset = (pre_offset + 4 + int(fRandom() * 5.0f))%32; + pre_coltimer--; + if (pre_coltimer <= 0) { + pre_curcol = (pre_curcol + int(fRandom() * 5.0f)) % 6; + pre_coltimer = 8; + } + switch(pre_curcol) { + case 0: + pre_lightcol = dwgfx.RGBflip(0xBF,0x59,0x6F); + pre_darkcol = dwgfx.RGBflip(0x88,0x3E,0x53); + break; + case 1: + pre_lightcol = dwgfx.RGBflip(0x6C,0xBC,0x5C); + pre_darkcol = dwgfx.RGBflip(0x50,0x86,0x40); + break; + case 2: + pre_lightcol = dwgfx.RGBflip(0x5D,0x57,0xAA); + pre_darkcol = dwgfx.RGBflip(0x2F,0x2F,0x6C); + break; + case 3: + pre_lightcol = dwgfx.RGBflip(0xB7,0xBA,0x5E); + pre_darkcol = dwgfx.RGBflip(0x84,0x83,0x42); + break; + case 4: + pre_lightcol = dwgfx.RGBflip(0x57,0x90,0xAA); + pre_darkcol = dwgfx.RGBflip(0x2F,0x5B,0x6C); + break; + case 5: + pre_lightcol = dwgfx.RGBflip(0x90,0x61,0xB1); + pre_darkcol = dwgfx.RGBflip(0x58,0x3D,0x71); + break; + default: + pre_lightcol = dwgfx.RGBflip(0x00,0x00,0x00); + pre_darkcol = dwgfx.RGBflip(0x08,0x00,0x00); + break; + } + + for (int i = 0; i < 18; i++) { + pre_temprecty = (i * 16)- pre_offset; + if (i % 2 == 0) + { + FillRect(dwgfx.backBuffer, pre_temprectx, pre_temprecty, pre_temprectw,pre_temprecth, pre_lightcol); + } + else + { + FillRect(dwgfx.backBuffer, pre_temprectx, pre_temprecty, pre_temprectw,pre_temprecth, pre_darkcol); + } + } + + FillRect(dwgfx.backBuffer, pre_frontrectx, pre_frontrecty, pre_frontrectw,pre_frontrecth, dwgfx.getBGR(0x3E,0x31,0xA2)); + + if(pre_fakepercent==100){ + dwgfx.Print(282-(15*8), 204, "LOADING... " + help.String(int(pre_fakepercent))+"%", 124, 112, 218, false); + }else{ + dwgfx.Print(282-(14*8), 204, "LOADING... " + help.String(int(pre_fakepercent))+"%", 124, 112, 218, false); + } + + //Render + if (pre_startgame) { + pre_transition = 29; + } + }else if (pre_transition <= -10) { + game.gamestate=TITLEMODE; + }else if (pre_transition < 5) { + FillRect(dwgfx.backBuffer, 0, 0, 320,240, dwgfx.getBGR(0,0,0)); + }else if (pre_transition < 20) { + pre_temprecty = 0; + pre_temprecth = 240; + FillRect(dwgfx.backBuffer, pre_temprectx, pre_temprecty, pre_temprectw,pre_temprecth, 0x000000); + FillRect(dwgfx.backBuffer, pre_frontrectx, pre_frontrecty, pre_frontrectw,pre_frontrecth, dwgfx.getBGR(0x3E,0x31,0xA2)); + + dwgfx.Print(282-(15*8), 204, "LOADING... 100%", 124, 112, 218, false); + } + + if (game.test) + { + dwgfx.Print(5, 5, game.teststring, 196, 196, 255 - help.glow, false); + } + + dwgfx.drawfade(); + + if (game.flashlight > 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) + { + game.screenshake--; + dwgfx.screenshake(); + } + else + { + dwgfx.render(); + } + //dwgfx.backbuffer.unlock(); +} diff --git a/desktop_version/src/preloader.h b/desktop_version/src/preloader.h new file mode 100644 index 00000000..bddcc083 --- /dev/null +++ b/desktop_version/src/preloader.h @@ -0,0 +1,10 @@ +#ifndef PRELOADER_H +#define PRELOADER_H + +#include "Graphics.h" +#include "Game.h" +#include "UtilityClass.h" + +void preloaderrender(Graphics& dwgfx, Game& game, UtilityClass& help); + +#endif /* PRELOADER_H */ diff --git a/desktop_version/src/titlerender.cpp b/desktop_version/src/titlerender.cpp new file mode 100644 index 00000000..13e4a561 --- /dev/null +++ b/desktop_version/src/titlerender.cpp @@ -0,0 +1,3096 @@ +#include "titlerender.h" + +#include "Graphics.h" +#include "UtilityClass.h" +#include "Maths.h" +#include "Entity.h" +#include "Map.h" +#include "Script.h" +#include "FileSystemUtils.h" + +#include "MakeAndPlay.h" + +extern scriptclass script; + +Stage stage; +Stage swfStage; +int temp; + +int tr; +int tg; +int tb; + +std::string tempstring; + +void updategraphicsmode(Game& game, Graphics& dwgfx) +{ + swfStage = stage; +} + +void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, UtilityClass& help, musicclass& music) +{ + + FillRect(dwgfx.backBuffer, 0,0,dwgfx.backBuffer->w, dwgfx.backBuffer->h, 0x00000000 ); + + if (!game.menustart) + { + tr = (int)(164 - (help.glow / 2) - int(fRandom() * 4)); + tg = 164 - (help.glow / 2) - int(fRandom() * 4); + tb = 164 - (help.glow / 2) - int(fRandom() * 4); + + temp = 50; + dwgfx.drawsprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); + #if defined(MAKEANDPLAY) + dwgfx.Print(-1,temp+35," MAKE AND PLAY EDITION",tr, tg, tb, true); + #endif + + dwgfx.Print(5, 175, "[ Press ACTION to Start ]", tr, tg, tb, true); + dwgfx.Print(5, 195, "ACTION = Space, Z, or V", int(tr*0.5f), int(tg*0.5f), int(tb*0.5f), true); + + //dwgfx.Print(5, 215, "Press CTRL-F for Fullscreen", tr, tg, tb, true); + + /*dwgfx.Print(5, 5, "IGF WIP Build, 29th Oct '09", tr, tg, tb, true); + dwgfx.Print(5, 200, "Game by Terry Cavanagh", tr, tg, tb, true); + dwgfx.Print(5, 210, "Music by Magnus P~lsson", tr, tg, tb, true); + dwgfx.Print(5, 220, "Roomnames by Bennett Foddy", tr, tg, tb, true);*/ + } + else + { + if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo(map); + + tr = map.r - (help.glow / 4) - int(fRandom() * 4); + tg = map.g - (help.glow / 4) - int(fRandom() * 4); + tb = map.b - (help.glow / 4) - int(fRandom() * 4); + if (tr < 0) tr = 0; + if(tr>255) tr=255; + if (tg < 0) tg = 0; + if(tg>255) tg=255; + if (tb < 0) tb = 0; + if(tb>255) tb=255; + + temp = 50; + + if(game.currentmenuname=="mainmenu") + { + dwgfx.drawsprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); + #if defined(MAKEANDPLAY) + dwgfx.Print(-1,temp+35," MAKE AND PLAY EDITION",tr, tg, tb, true); + #endif + dwgfx.Print( 310 - (4*8), 230, "v2.2", tr/2, tg/2, tb/2); + + if(music.mmmmmm){ + dwgfx.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2); + } + } + else if (game.currentmenuname == "levellist") + { + if(ed.ListOfMetaData.size()==0){ + dwgfx.Print( -1, 100, "ERROR: No levels found.", tr, tg, tb, true); + } + int tmp=game.currentmenuoption+(game.levelpage*8); + if(tmp>=0 && tmp < (int) ed.ListOfMetaData.size()){ // FIXME: size_t/int! -flibit + //Don't show next page or return to menu options here! + if(game.nummenuoptions - game.currentmenuoption<=2){ + + }else{ + dwgfx.bigprint( -1, 15, ed.ListOfMetaData[tmp].title, tr, tg, tb, true); + dwgfx.Print( -1, 40, "by " + ed.ListOfMetaData[tmp].creator, tr, tg, tb, true); + dwgfx.Print( -1, 50, ed.ListOfMetaData[tmp].website, tr, tg, tb, true); + dwgfx.Print( -1, 70, ed.ListOfMetaData[tmp].Desc1, tr, tg, tb, true); + dwgfx.Print( -1, 80, ed.ListOfMetaData[tmp].Desc2, tr, tg, tb, true); + dwgfx.Print( -1, 90, ed.ListOfMetaData[tmp].Desc3, tr, tg, tb, true); + } + } + } + else if (game.currentmenuname == "errornostart") + { + dwgfx.Print( -1, 65, "ERROR: This level has", tr, tg, tb, true); + dwgfx.Print( -1, 75, "no start point!", tr, tg, tb, true); + } + else if (game.currentmenuname == "options") + { + + #if defined(MAKEANDPLAY) + if (game.currentmenuoption == 0) + { + dwgfx.bigprint( -1, 30, "Accessibility", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Disable screen effects, enable", tr, tg, tb, true); + dwgfx.Print( -1, 75, "slowdown modes or invincibility", tr, tg, tb, true); + } + else if (game.currentmenuoption == 1) + { + dwgfx.bigprint( -1, 30, "Game Pad Options", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Rebind your controllers buttons", tr, tg, tb, true); + dwgfx.Print( -1, 75, "and adjust sensitivity", tr, tg, tb, true); + } + else if (game.currentmenuoption == 2) + { + dwgfx.bigprint( -1, 30, "Clear Data", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Delete your save data", tr, tg, tb, true); + dwgfx.Print( -1, 75, "and unlocked play modes", tr, tg, tb, true); + }else if (game.currentmenuoption == 3){ + if(music.mmmmmm){ + dwgfx.bigprint( -1, 30, "Soundtrack", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Toggle between MMMMMM and PPPPPP", tr, tg, tb, true); + if(music.usingmmmmmm){ + dwgfx.Print( -1, 85, "Current soundtrack: MMMMMM", tr, tg, tb, true); + }else{ + dwgfx.Print( -1, 85, "Current soundtrack: PPPPPP", tr, tg, tb, true); + } + } + } + #elif !defined(MAKEANDPLAY) + if (game.currentmenuoption == 0) + { + dwgfx.bigprint( -1, 30, "Accessibility", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Disable screen effects, enable", tr, tg, tb, true); + dwgfx.Print( -1, 75, "slowdown modes or invincibility", tr, tg, tb, true); + } + else if (game.currentmenuoption == 1) + { + dwgfx.bigprint( -1, 30, "Unlock Play Modes", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Unlock parts of the game normally", tr, tg, tb, true); + dwgfx.Print( -1, 75, "unlocked as you progress", tr, tg, tb, true); + } + else if (game.currentmenuoption == 2) + { + dwgfx.bigprint( -1, 30, "Game Pad Options", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Rebind your controllers buttons", tr, tg, tb, true); + dwgfx.Print( -1, 75, "and adjust sensitivity", tr, tg, tb, true); + } + else if (game.currentmenuoption == 3) + { + dwgfx.bigprint( -1, 30, "Clear Data", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Delete your save data", tr, tg, tb, true); + dwgfx.Print( -1, 75, "and unlocked play modes", tr, tg, tb, true); + }else if (game.currentmenuoption == 4) + { + if(music.mmmmmm){ + dwgfx.bigprint( -1, 30, "Soundtrack", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Toggle between MMMMMM and PPPPPP", tr, tg, tb, true); + if(music.usingmmmmmm){ + dwgfx.Print( -1, 85, "Current soundtrack: MMMMMM", tr, tg, tb, true); + }else{ + dwgfx.Print( -1, 85, "Current soundtrack: PPPPPP", tr, tg, tb, true); + } + } + } + #endif + } + else if (game.currentmenuname == "graphicoptions") + { + if (game.currentmenuoption == 0) + { + dwgfx.bigprint( -1, 30, "Toggle Fullscreen", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Change to fullscreen/windowed mode.", tr, tg, tb, true); + + if(game.fullscreen){ + dwgfx.Print( -1, 85, "Current mode: FULLSCREEN", tr, tg, tb, true); + }else{ + dwgfx.Print( -1, 85, "Current mode: WINDOWED", tr, tg, tb, true); + } + + }else if (game.currentmenuoption == 1) + { + dwgfx.bigprint( -1, 30, "Toggle Letterbox", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Choose letterbox/stretch/integer mode.", tr, tg, tb, true); + + if(game.stretchMode == 2){ + dwgfx.Print( -1, 85, "Current mode: INTEGER", tr, tg, tb, true); + }else if (game.stretchMode == 1){ + dwgfx.Print( -1, 85, "Current mode: STRETCH", tr, tg, tb, true); + }else{ + dwgfx.Print( -1, 85, "Current mode: LETTERBOX", tr, tg, tb, true); + } + }else if (game.currentmenuoption == 2) + { + dwgfx.bigprint( -1, 30, "Toggle Filter", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Change to nearest/linear filter.", tr, tg, tb, true); + + if(game.useLinearFilter){ + dwgfx.Print( -1, 85, "Current mode: LINEAR", tr, tg, tb, true); + }else{ + dwgfx.Print( -1, 85, "Current mode: NEAREST", tr, tg, tb, true); + } + + } else if (game.currentmenuoption == 3) + { + dwgfx.bigprint( -1, 30, "Analogue Mode", tr, tg, tb, true); + dwgfx.Print( -1, 65, "There is nothing wrong with your", tr, tg, tb, true); + dwgfx.Print( -1, 75, "television set. Do not attempt to", tr, tg, tb, true); + dwgfx.Print( -1, 85, "adjust the picture.", tr, tg, tb, true); + } + } + else if (game.currentmenuname == "credits") + { + dwgfx.Print( -1, 50, "VVVVVV is a game by", tr, tg, tb, true); + dwgfx.bigprint( 40, 65, "Terry Cavanagh", tr, tg, tb, true, 2); + + dwgfx.drawimagecol(7, -1, 86, tr *0.75, tg *0.75, tb *0.75, true); + //dwgfx.Print( 40, 85, "http://www.distractionware.com", tr, tg, tb, true); + + dwgfx.Print( -1, 120, "and features music by", tr, tg, tb, true); + dwgfx.bigprint( 40, 135, "Magnus P~lsson", tr, tg, tb, true, 2); + dwgfx.drawimagecol(8, -1, 156, tr *0.75, tg *0.75, tb *0.75, true); + //dwgfx.Print( 40, 155, "http://souleye.madtracker.net", tr, tg, tb, true); + } + else if (game.currentmenuname == "credits2") + { + dwgfx.Print( -1, 50, "Roomnames are by", tr, tg, tb, true); + dwgfx.bigprint( 40, 65, "Bennett Foddy", tr, tg, tb, true); + dwgfx.drawimagecol(9, -1, 86, tr*0.75, tg *0.75, tb *0.75, true); + //dwgfx.Print( 40, 80, "http://www.distractionware.com", tr, tg, tb); + dwgfx.Print( -1, 110, "C++ version by", tr, tg, tb, true); + dwgfx.bigprint( 40, 125, "Simon Roth", tr, tg, tb, true); + dwgfx.bigprint( 40, 145, "Ethan Lee", tr, tg, tb, true); + //dwgfx.drawimagecol(11, -1, 156, tr*0.75, tg *0.75, tb *0.75, true); + } + else if (game.currentmenuname == "credits25") + { + dwgfx.Print( -1, 40, "Beta Testing by", tr, tg, tb, true); + dwgfx.bigprint( 40, 55, "Sam Kaplan", tr, tg, tb, true); + dwgfx.bigprint( 40, 75, "Pauli Kohberger", tr, tg, tb, true); + dwgfx.Print( -1, 130, "Ending Picture by", tr, tg, tb, true); + dwgfx.bigprint( 40, 145, "Pauli Kohberger", tr, tg, tb, true); + } + else if (game.currentmenuname == "credits3") + { + dwgfx.Print( -1, 20, "VVVVVV is supported by", tr, tg, tb, true); + dwgfx.Print( 40, 30, "the following patrons", tr, tg, tb, true); + + dwgfx.Print( 80-16, 40+20, "Anders Ekermo", tr, tg, tb); + dwgfx.Print( 80-12, 54+20, "Andreas K|mper", tr, tg, tb); + dwgfx.Print( 80-8, 68+20, "Anthony Burch", tr, tg, tb); + dwgfx.Print( 80-4, 82+20, "Bennett Foddy", tr, tg, tb); + dwgfx.Print( 80, 96+20, "Brendan O'Sullivan", tr, tg, tb); + dwgfx.Print( 80+4, 110+20, "Christopher Armstrong", tr, tg, tb); + dwgfx.Print( 80+8, 124+20, "Daniel Benmergui", tr, tg, tb); + dwgfx.Print( 80+12, 138+20, "David Pittman", tr, tg, tb); + dwgfx.Print( 80+16, 152+20, "Ian Bogost", tr, tg, tb); + } + else if (game.currentmenuname == "credits4") + { + dwgfx.Print( -1, 20, "VVVVVV is supported by", tr, tg, tb, true); + dwgfx.Print( 40, 30, "the following patrons", tr, tg, tb, true); + dwgfx.Print( 80-16, 20+40, "Ian Poma", tr, tg, tb); + dwgfx.Print( 80-12, 34+40, "Jaz McDougall", tr, tg, tb); + dwgfx.Print( 80-8, 48+40, "John Faulkenbury", tr, tg, tb); + dwgfx.Print( 80-4, 62+40, "Jonathan Whiting", tr, tg, tb); + dwgfx.Print( 80, 76+40, "Kyle Pulver", tr, tg, tb); + dwgfx.Print( 80+4, 90+40, "Markus Persson", tr, tg, tb); + dwgfx.Print( 80+8, 104+40, "Nathan Ostgard", tr, tg, tb); + dwgfx.Print( 80+12, 118+40, "Nick Easler", tr, tg, tb); + dwgfx.Print( 80+16, 132+40, "Stephen Lavelle", tr, tg, tb); + } + else if (game.currentmenuname == "credits5") + { + dwgfx.Print( -1, 20, "and also by", tr, tg, tb, true); + + dwgfx.Print( 80, 40,"Adam Wendt", tr, tg, tb); + dwgfx.Print( 80, 50,"Andreas J{rgensen", tr, tg, tb); + dwgfx.Print( 80, 60,"}ngel Louzao Penalva", tr, tg, tb); + dwgfx.Print( 80, 70,"Ashley Burton", tr, tg, tb); + dwgfx.Print( 80, 80,"Aubrey Hesselgren", tr, tg, tb); + dwgfx.Print( 80, 90,"Bradley Rose", tr, tg, tb); + dwgfx.Print( 80, 100,"Brendan Urquhart", tr, tg, tb); + dwgfx.Print( 80, 110,"Chris Ayotte", tr, tg, tb); + dwgfx.Print( 80, 120,"Christopher Zamanillo", tr, tg, tb); + dwgfx.Print( 80, 130,"Daniel Schuller", tr, tg, tb); + dwgfx.Print( 80, 140,"Hybrid Mind Studios", tr, tg, tb); + dwgfx.Print( 80, 150,"Emilie McGinley", tr, tg, tb); + dwgfx.Print( 80, 160,"Francisco Solares", tr, tg, tb); + dwgfx.Print( 80, 170,"Hal Helms", tr, tg, tb); + } + else if (game.currentmenuname == "credits6") + { + dwgfx.Print( -1, 20, "and also by", tr, tg, tb, true); + + dwgfx.Print( 80, 40,"Hayden Scott-Baron", tr, tg, tb); + dwgfx.Print( 80, 50,"Hermit Games", tr, tg, tb); + dwgfx.Print( 80, 60,"Ido Yehieli", tr, tg, tb); + dwgfx.Print( 80, 70,"Jade Vault Games", tr, tg, tb); + dwgfx.Print( 80, 80,"James Andrews", tr, tg, tb); + dwgfx.Print( 80, 90,"James Riley", tr, tg, tb); + dwgfx.Print( 80, 100,"James Hsieh", tr, tg, tb); + dwgfx.Print( 80, 110,"Jasper Byrne", tr, tg, tb); + dwgfx.Print( 80, 120,"Jedediah Baker", tr, tg, tb); + dwgfx.Print( 80, 130,"Jens Bergensten", tr, tg, tb); + dwgfx.Print( 80, 140,"Jeremy J. Penner", tr, tg, tb); + dwgfx.Print( 80, 150,"Jeremy Peterson", tr, tg, tb); + dwgfx.Print( 80, 160,"Jim McGinley", tr, tg, tb); + dwgfx.Print( 80, 170,"Jonathan Cartwright", tr, tg, tb); + } + else if (game.currentmenuname == "credits7") + { + dwgfx.Print( -1, 20, "and also by", tr, tg, tb, true); + + dwgfx.Print( 80, 40,"John Nesky", tr, tg, tb); + dwgfx.Print( 80, 50,"Jos Yule", tr, tg, tb); + dwgfx.Print( 80, 60,"Jose Flores", tr, tg, tb); + dwgfx.Print( 80, 70,"Josh Bizeau", tr, tg, tb); + dwgfx.Print( 80, 80,"Joshua Buergel", tr, tg, tb); + dwgfx.Print( 80, 90,"Joshua Hochner", tr, tg, tb); + dwgfx.Print( 80, 100,"Kurt Ostfeld", tr, tg, tb); + dwgfx.Print( 80, 110,"Magnus P~lsson", tr, tg, tb); + dwgfx.Print( 80, 120,"Mark Neschadimenko", tr, tg, tb); + dwgfx.Print( 80, 130,"Matt Antonellis", tr, tg, tb); + dwgfx.Print( 80, 140,"Matthew Reppert", tr, tg, tb); + dwgfx.Print( 80, 150,"Michael Falkensteiner", tr, tg, tb); + dwgfx.Print( 80, 160,"Michael Vendittelli", tr, tg, tb); + dwgfx.Print( 80, 170,"Mike Kasprzak", tr, tg, tb); + } + else if (game.currentmenuname == "credits8") + { + dwgfx.Print( -1, 20, "and also by", tr, tg, tb, true); + + dwgfx.Print( 80, 70,"Mitchel Stein", tr, tg, tb); + dwgfx.Print( 80, 80,"Sean Murray", tr, tg, tb); + dwgfx.Print( 80, 90,"Simon Michael", tr, tg, tb); + dwgfx.Print( 80, 100,"Simon Schmid", tr, tg, tb); + dwgfx.Print( 80, 110,"Stephen Maxwell", tr, tg, tb); + dwgfx.Print( 80, 120,"Swing Swing Submarine", tr, tg, tb); + dwgfx.Print( 80, 130,"Tam Toucan", tr, tg, tb); + dwgfx.Print( 80, 140,"Terry Dooher", tr, tg, tb); + dwgfx.Print( 80, 150,"Tim W.", tr, tg, tb); + dwgfx.Print( 80, 160,"Timothy Bragan", tr, tg, tb); + } + else if (game.currentmenuname == "credits9") + { + dwgfx.Print( -1, 20, "and thanks also to:", tr, tg, tb, true); + + dwgfx.bigprint(80, 60, "You!", tr, tg, tb, true); + + dwgfx.Print( 80, 100, "Your support makes it possible", tr, tg, tb,true); + dwgfx.Print( 80, 110,"for me to continue making the", tr, tg, tb,true); + dwgfx.Print( 80, 120,"games I want to make, now", tr, tg, tb,true); + dwgfx.Print( 80, 130, "and into the future.", tr, tg, tb, true); + + dwgfx.Print( 80, 150,"Thank you!", tr, tg, tb,true); + } + else if (game.currentmenuname == "setinvincibility") + { + dwgfx.Print( -1, 100, "Are you sure you want to ", tr, tg, tb, true); + dwgfx.Print( -1, 110, "enable invincibility?", tr, tg, tb, true); + } + else if (game.currentmenuname == "setslowdown1") + { + dwgfx.Print( -1, 90, "Warning! Changing the game speed", tr, tg, tb, true); + dwgfx.Print( -1, 100, "requires a game restart, and will", tr, tg, tb, true); + dwgfx.Print( -1, 110, "delete your current saves.", tr, tg, tb, true); + dwgfx.Print( -1, 120, "Is this ok?", tr, tg, tb, true); + } + else if (game.currentmenuname == "setslowdown2") + { + dwgfx.bigprint( -1, 40, "Game Speed", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Select a new game speed below.", tr, tg, tb, true); + if (game.gameframerate==34) + { + dwgfx.Print( -1, 105, "Game speed is normal.", tr/2, tg/2, tb/2, true); + } + else if (game.gameframerate==41) + { + dwgfx.Print( -1, 105, "Game speed is at 80%", tr, tg, tb, true); + } + else if (game.gameframerate==55) + { + dwgfx.Print( -1, 105, "Game speed is at 60%", tr, tg, tb, true); + } + else if (game.gameframerate==83) + { + dwgfx.Print( -1, 105, "Game speed is at 40%", tr, tg, tb, true); + } + } + else if (game.currentmenuname == "newgamewarning") + { + dwgfx.Print( -1, 100, "Are you sure? This will", tr, tg, tb, true); + dwgfx.Print( -1, 110, "delete your current saves...", tr, tg, tb, true); + } + else if (game.currentmenuname == "cleardatamenu") + { + dwgfx.Print( -1, 100, "Are you sure you want to", tr, tg, tb, true); + dwgfx.Print( -1, 110, "delete all your saved data?", tr, tg, tb, true); + } + else if (game.currentmenuname == "startnodeathmode") + { + dwgfx.Print( -1, 45, "Good luck!", tr, tg, tb, true); + dwgfx.Print( -1, 80, "You cannot save in this mode.", tr, tg, tb, true); + dwgfx.Print( -1, 100, "Would you like to disable the", tr, tg, tb, true); + dwgfx.Print( -1, 112, "cutscenes during the game?", tr, tg, tb, true); + } + else if (game.currentmenuname == "controller") + { + dwgfx.bigprint( -1, 30, "Game Pad", tr, tg, tb, true); + dwgfx.Print( -1, 55, "Change controller options.", tr, tg, tb, true); + if (game.currentmenuoption == 0) + { + switch(game.controllerSensitivity) + { + case 0: + dwgfx.Print( -1, 85, " Low Medium High", tr, tg, tb, true); + dwgfx.Print( -1, 95, "[]..................", tr, tg, tb, true); + break; + case 1: + dwgfx.Print( -1, 85, " Low Medium High", tr, tg, tb, true); + dwgfx.Print( -1, 95, ".....[].............", tr, tg, tb, true); + break; + case 2: + dwgfx.Print( -1, 85, " Low Medium High", tr, tg, tb, true); + dwgfx.Print( -1, 95, ".........[].........", tr, tg, tb, true); + break; + case 3: + dwgfx.Print( -1, 85, " Low Medium High", tr, tg, tb, true); + dwgfx.Print( -1, 95, ".............[].....", tr, tg, tb, true); + break; + case 4: + dwgfx.Print( -1, 85, " Low Medium High", tr, tg, tb, true); + dwgfx.Print( -1, 95, "..................[]", tr, tg, tb, true); + break; + } + } + if ( game.currentmenuoption == 1 || + game.currentmenuoption == 2 || + game.currentmenuoption == 3 ) + { + dwgfx.Print( -1, 85, "Flip is bound to: " + std::string(UtilityClass::GCString(game.controllerButton_flip)) , tr, tg, tb, true); + dwgfx.Print( -1, 95, "Enter is bound to: " + std::string(UtilityClass::GCString(game.controllerButton_map)), tr, tg, tb, true); + dwgfx.Print( -1, 105, "Menu is bound to: " + std::string(UtilityClass::GCString(game.controllerButton_esc)) , tr, tg, tb, true); + } + + + } + else if (game.currentmenuname == "accessibility") + { + if (game.currentmenuoption == 0) + { + dwgfx.bigprint( -1, 40, "Backgrounds", tr, tg, tb, true); + if (!game.colourblindmode) + { + dwgfx.Print( -1, 75, "Backgrounds are ON.", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 75, "Backgrounds are OFF.", tr/2, tg/2, tb/2, true); + } + } + else if (game.currentmenuoption == 1) + { + dwgfx.bigprint( -1, 40, "Screen Effects", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Disables screen shakes and flashes.", tr, tg, tb, true); + if (!game.noflashingmode) + { + dwgfx.Print( -1, 85, "Screen Effects are ON.", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 85, "Screen Effects are OFF.", tr/2, tg/2, tb/2, true); + } + } + else if (game.currentmenuoption == 2) + { + dwgfx.bigprint( -1, 40, "Invincibility", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Provided to help disabled gamers", tr, tg, tb, true); + dwgfx.Print( -1, 85, "explore the game. Can cause glitches.", tr, tg, tb, true); + if (map.invincibility) + { + dwgfx.Print( -1, 105, "Invincibility is ON.", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 105, "Invincibility is off.", tr/2, tg/2, tb/2, true); + } + } + else if (game.currentmenuoption == 3) + { + dwgfx.bigprint( -1, 40, "Game Speed", tr, tg, tb, true); + dwgfx.Print( -1, 75, "May be useful for disabled gamers", tr, tg, tb, true); + dwgfx.Print( -1, 85, "using one switch devices.", tr, tg, tb, true); + if (game.gameframerate==34) + { + dwgfx.Print( -1, 105, "Game speed is normal.", tr/2, tg/2, tb/2, true); + } + else if (game.gameframerate==41) + { + dwgfx.Print( -1, 105, "Game speed is at 80%", tr, tg, tb, true); + } + else if (game.gameframerate==55) + { + dwgfx.Print( -1, 105, "Game speed is at 60%", tr, tg, tb, true); + } + else if (game.gameframerate==83) + { + dwgfx.Print( -1, 105, "Game speed is at 40%", tr, tg, tb, true); + } + } + } + else if (game.currentmenuname == "playint1" || game.currentmenuname == "playint2") + { + dwgfx.Print( -1, 65, "Who do you want to play", tr, tg, tb, true); + dwgfx.Print( -1, 75, "the level with?", tr, tg, tb, true); + } + else if (game.currentmenuname == "playmodes") + { + if (game.currentmenuoption == 0) + { + dwgfx.bigprint( -1, 30, "Time Trials", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Replay any level in the game in", tr, tg, tb, true); + dwgfx.Print( -1, 75, "a competitive time trial mode.", tr, tg, tb, true); + + if (game.gameframerate > 34 || map.invincibility) + { + dwgfx.Print( -1, 105, "Time Trials are not available", tr, tg, tb, true); + dwgfx.Print( -1, 115, "with slowdown or invincibility.", tr, tg, tb, true); + } + } + else if (game.currentmenuoption == 1) + { + dwgfx.bigprint( -1, 30, "Intermissions", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Replay the intermission levels.", tr, tg, tb, true); + + if (!game.unlock[15] && !game.unlock[16]) + { + dwgfx.Print( -1, 95, "TO UNLOCK: Complete the", tr, tg, tb, true); + dwgfx.Print( -1, 105, "intermission levels in-game.", tr, tg, tb, true); + } + } + else if (game.currentmenuoption == 2) + { + dwgfx.bigprint( -1, 30, "No Death Mode", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Play the entire game", tr, tg, tb, true); + dwgfx.Print( -1, 75, "without dying once.", tr, tg, tb, true); + + if (game.gameframerate > 34 || map.invincibility) + { + dwgfx.Print( -1, 105, "No death mode is not available", tr, tg, tb, true); + dwgfx.Print( -1, 115, "with slowdown or invincibility.", tr, tg, tb, true); + } + else if (!game.unlock[17]) + { + dwgfx.Print( -1, 105, "TO UNLOCK: Achieve an S-rank or", tr, tg, tb, true); + dwgfx.Print( -1, 115, "above in at least 4 time trials.", tr, tg, tb, true); + } + } + else if (game.currentmenuoption == 3) + { + dwgfx.bigprint( -1, 30, "Flip Mode", tr, tg, tb, true); + dwgfx.Print( -1, 65, "Flip the entire game vertically.", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Compatible with other game modes.", tr, tg, tb, true); + + if (game.unlock[18]) + { + if (dwgfx.setflipmode) + { + dwgfx.Print( -1, 105, "Currently ENABLED!", tr, tg, tb, true); + } + else + { + dwgfx.Print( -1, 105, "Currently Disabled.", tr/2, tg/2, tb/2, true); + } + } + else + { + dwgfx.Print( -1, 105, "TO UNLOCK: Complete the game.", tr, tg, tb, true); + } + } + } + else if (game.currentmenuname == "youwannaquit") + { + dwgfx.Print( -1, 75, "Are you sure you want to quit?", tr, tg, tb, true); + } + else if (game.currentmenuname == "continue") + { + dwgfx.crewframedelay--; + if (dwgfx.crewframedelay <= 0) + { + dwgfx.crewframedelay = 8; + dwgfx.crewframe = (dwgfx.crewframe + 1) % 2; + } + if (game.currentmenuoption == 0) + { + //Show teleporter save info + dwgfx.drawpixeltextbox(25, 65-20, 270, 90, 34,12, 65, 185, 207,0,4); + + dwgfx.bigprint(-1, 20, "Tele Save", tr, tg, tb, true); + dwgfx.Print(0, 80-20, game.tele_currentarea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + for (int i = 0; i < 6; i++) + { + dwgfx.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.tele_crewstats[i], help, true); + } + dwgfx.Print(160 - 84, 132-20, game.tele_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.Print(160 + 40, 132-20, help.number(game.tele_trinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 126-20, 50, 18, help); + dwgfx.drawspritesetcol(175, 126-20, 22, 18, help); + } + else if (game.currentmenuoption == 1) + { + //Show quick save info + dwgfx.drawpixeltextbox(25, 65-20, 270, 90, 34,12, 65, 185, 207,0,4); + + dwgfx.bigprint(-1, 20, "Quick Save", tr, tg, tb, true); + dwgfx.Print(0, 80-20, game.quick_currentarea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + for (int i = 0; i < 6; i++) + { + dwgfx.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.quick_crewstats[i], help, true); + } + dwgfx.Print(160 - 84, 132-20, game.quick_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.Print(160 + 40, 132-20, help.number(game.quick_trinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 126-20, 50, 18, help); + dwgfx.drawspritesetcol(175, 126-20, 22, 18, help); + } + } + else if (game.currentmenuname == "gameover" || game.currentmenuname == "gameover2") + { + dwgfx.bigprint( -1, 25, "GAME OVER", tr, tg, tb, true, 3); + + dwgfx.crewframedelay--; + if (dwgfx.crewframedelay <= 0) + { + dwgfx.crewframedelay = 8; + dwgfx.crewframe = (dwgfx.crewframe + 1) % 2; + } + for (int i = 0; i < 6; i++) + { + dwgfx.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], help, true); + } + tempstring = "You rescued " + help.number(game.crewrescued()) + " crewmates"; + dwgfx.Print(0, 100, tempstring, tr, tg, tb, true); + + tempstring = "and found " + help.number(game.trinkets) + " trinkets."; + dwgfx.Print(0, 110, tempstring, tr, tg, tb, true); + + tempstring = "You managed to reach:"; + dwgfx.Print(0, 145, tempstring, tr, tg, tb, true); + dwgfx.Print(0, 155, game.hardestroom, tr, tg, tb, true); + + if (game.crewrescued() == 1) + { + tempstring = "Keep trying! You'll get there!"; + } + else if (game.crewrescued() == 2) + { + tempstring = "Nice one!"; + } + else if (game.crewrescued() == 3) + { + tempstring = "Wow! Congratulations!"; + } + else if (game.crewrescued() == 4) + { + tempstring = "Incredible!"; + } + else if (game.crewrescued() == 5) + { + tempstring = "Unbelievable! Well done!"; + } + else if (game.crewrescued() == 6) + { + tempstring = "Er, how did you do that?"; + } + + dwgfx.Print(0, 190, tempstring, tr, tg, tb, true); + } + else if (game.currentmenuname == "nodeathmodecomplete" || game.currentmenuname == "nodeathmodecomplete2") + { + dwgfx.bigprint( -1, 8, "WOW", tr, tg, tb, true, 4); + + dwgfx.crewframedelay--; + if (dwgfx.crewframedelay <= 0) + { + dwgfx.crewframedelay = 8; + dwgfx.crewframe = (dwgfx.crewframe + 1) % 2; + } + for (int i = 0; i < 6; i++) + { + dwgfx.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], help, true); + } + tempstring = "You rescued all the crewmates!"; + dwgfx.Print(0, 100, tempstring, tr, tg, tb, true); + + tempstring = "And you found " + help.number(game.trinkets) + " trinkets."; + dwgfx.Print(0, 110, tempstring, tr, tg, tb, true); + + dwgfx.Print(0, 160, "A new trophy has been awarded and", tr, tg, tb, true); + dwgfx.Print(0, 170, "placed in the secret lab to", tr, tg, tb, true); + dwgfx.Print(0, 180, "acknowledge your achievement!", tr, tg, tb, true); + } + else if (game.currentmenuname == "timetrialcomplete" || game.currentmenuname == "timetrialcomplete2" + || game.currentmenuname == "timetrialcomplete3" || game.currentmenuname == "timetrialcomplete4") + { + dwgfx.bigprint( -1, 20, "Results", tr, tg, tb, true, 3); + + tempstring = game.resulttimestring(help) + " / " + game.partimestring(help); + + dwgfx.drawspritesetcol(30, 80-15, 50, 22, help); + dwgfx.Print(65, 80-15, "TIME TAKEN:", 255, 255, 255); + dwgfx.Print(65, 90-15, tempstring, tr, tg, tb); + if (game.timetrialresulttime <= game.timetrialpar) + { + dwgfx.Print(220, 85-15, "+1 Rank!", 255, 255, 255); + } + + tempstring = help.String(game.deathcounts); + dwgfx.drawspritesetcol(30-4, 80+20-4, 12, 22, help); + dwgfx.Print(65, 80+20, "NUMBER OF DEATHS:", 255, 255, 255); + dwgfx.Print(65, 90+20, tempstring, tr, tg, tb); + if (game.deathcounts == 0) + { + dwgfx.Print(220, 85+20, "+1 Rank!", 255, 255, 255); + } + + tempstring = help.String(game.trinkets) + " of " + help.String(game.timetrialshinytarget); + dwgfx.drawspritesetcol(30, 80+55, 22, 22, help); + dwgfx.Print(65, 80+55, "SHINY TRINKETS:", 255, 255, 255); + dwgfx.Print(65, 90+55, tempstring, tr, tg, tb); + if (game.trinkets >= game.timetrialshinytarget) + { + dwgfx.Print(220, 85+55, "+1 Rank!", 255, 255, 255); + } + + if (game.currentmenuname == "timetrialcomplete2" || game.currentmenuname == "timetrialcomplete3") + { + dwgfx.bigprint( 100, 175, "Rank:", tr, tg, tb, false, 2); + } + + if (game.currentmenuname == "timetrialcomplete3") + { + switch(game.timetrialrank) + { + case 0: + dwgfx.bigprint( 195, 165, "B", 255, 255, 255, false, 4); + break; + case 1: + dwgfx.bigprint( 195, 165, "A", 255, 255, 255, false, 4); + break; + case 2: + dwgfx.bigprint( 195, 165, "S", 255, 255, 255, false, 4); + break; + case 3: + dwgfx.bigprint( 195, 165, "V", 255, 255, 255, false, 4); + break; + } + } + } + else if (game.currentmenuname == "unlockmenutrials") + { + dwgfx.bigprint( -1, 30, "Unlock Time Trials", tr, tg, tb, true); + dwgfx.Print( -1, 65, "You can unlock each time", tr, tg, tb, true); + dwgfx.Print( -1, 75, "trial seperately.", tr, tg, tb, true); + } + else if (game.currentmenuname == "timetrials") + { + if (game.currentmenuoption == 0) + { + if(game.unlock[9]) + { + dwgfx.bigprint( -1, 30, "Space Station 1", tr, tg, tb, true); + if (game.besttimes[0] == -1) + { + dwgfx.Print( -1, 75, "Not yet attempted", tr, tg, tb, true); + } + else + { + dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[0], help), tr, tg, tb); + dwgfx.Print( 110, 75, help.String(game.besttrinkets[0])+"/2", tr, tg, tb); + dwgfx.Print( 110, 85,help.String(game.bestlives[0]), tr, tg, tb); + + + dwgfx.Print( 170, 65, "PAR TIME 1:15", tr, tg, tb); + dwgfx.Print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[0]) + { + case 0: + dwgfx.bigprint( 275, 82, "B", 225, 225, 225); + break; + case 1: + dwgfx.bigprint( 275, 82, "A", 225, 225, 225); + break; + case 2: + dwgfx.bigprint( 275, 82, "S", 225, 225, 225); + break; + case 3: + dwgfx.bigprint( 275, 82, "V", 225, 225, 225); + break; + } + } + + } + else + { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.Print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Rescue Violet", tr, tg, tb, true); + dwgfx.Print( -1, 85, "Find three trinkets", tr, tg, tb, true); + } + } + else if (game.currentmenuoption == 1) + { + if(game.unlock[10]) + { + dwgfx.bigprint( -1, 30, "The Laboratory", tr, tg, tb, true); + if (game.besttimes[1] == -1) + { + dwgfx.Print( -1, 75, "Not yet attempted", tr, tg, tb, true); + } + else + { + dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[1], help), tr, tg, tb); + dwgfx.Print( 110, 75, help.String(game.besttrinkets[1])+"/4", tr, tg, tb); + dwgfx.Print( 110, 85, help.String(game.bestlives[1]), tr, tg, tb); + + + dwgfx.Print( 170, 65, "PAR TIME 2:45", tr, tg, tb); + dwgfx.Print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[1]) + { + case 0: + dwgfx.bigprint( 275, 82, "B", 225, 225, 225); + break; + case 1: + dwgfx.bigprint( 275, 82, "A", 225, 225, 225); + break; + case 2: + dwgfx.bigprint( 275, 82, "S", 225, 225, 225); + break; + case 3: + dwgfx.bigprint( 275, 82, "V", 225, 225, 225); + break; + } + } + + } + else + { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.Print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Rescue Victoria", tr, tg, tb, true); + dwgfx.Print( -1, 85, "Find six trinkets", tr, tg, tb, true); + } + } + else if (game.currentmenuoption == 2) + { + if(game.unlock[11]) + { + dwgfx.bigprint( -1, 30, "The Tower", tr, tg, tb, true); + if (game.besttimes[2] == -1) + { + dwgfx.Print( -1, 75, "Not yet attempted", tr, tg, tb, true); + } + else + { + dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[2], help), tr, tg, tb); + dwgfx.Print( 110, 75, help.String(game.besttrinkets[2])+"/2", tr, tg, tb); + dwgfx.Print( 110, 85, help.String(game.bestlives[2]), tr, tg, tb); + + + dwgfx.Print( 170, 65, "PAR TIME 1:45", tr, tg, tb); + dwgfx.Print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[2]) + { + case 0: + dwgfx.bigprint( 275, 82, "B", 225, 225, 225); + break; + case 1: + dwgfx.bigprint( 275, 82, "A", 225, 225, 225); + break; + case 2: + dwgfx.bigprint( 275, 82, "S", 225, 225, 225); + break; + case 3: + dwgfx.bigprint( 275, 82, "V", 225, 225, 225); + break; + } + } + + } + else + { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.Print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Rescue Vermilion", tr, tg, tb, true); + dwgfx.Print( -1, 85, "Find nine trinkets", tr, tg, tb, true); + } + } + else if (game.currentmenuoption == 3) + { + if(game.unlock[12]) + { + dwgfx.bigprint( -1, 30, "Space Station 2", tr, tg, tb, true); + if (game.besttimes[3] == -1) + { + dwgfx.Print( -1, 75, "Not yet attempted", tr, tg, tb, true); + } + else + { + dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[3], help), tr, tg, tb); + dwgfx.Print( 110, 75, help.String(game.besttrinkets[3])+"/5", tr, tg, tb); + dwgfx.Print( 110, 85, help.String(game.bestlives[3]), tr, tg, tb); + + + dwgfx.Print( 170, 65, "PAR TIME 3:20", tr, tg, tb); + dwgfx.Print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[3]) + { + case 0: + dwgfx.bigprint( 275, 82, "B", 225, 225, 225); + break; + case 1: + dwgfx.bigprint( 275, 82, "A", 225, 225, 225); + break; + case 2: + dwgfx.bigprint( 275, 82, "S", 225, 225, 225); + break; + case 3: + dwgfx.bigprint( 275, 82, "V", 225, 225, 225); + break; + } + } + + } + else + { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.Print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Rescue Vitellary", tr, tg, tb, true); + dwgfx.Print( -1, 85, "Find twelve trinkets", tr, tg, tb, true); + } + } + else if (game.currentmenuoption == 4) + { + if(game.unlock[13]) + { + dwgfx.bigprint( -1, 30, "The Warp Zone", tr, tg, tb, true); + if (game.besttimes[4] == -1) + { + dwgfx.Print( -1, 75, "Not yet attempted", tr, tg, tb, true); + } + else + { + dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[4], help), tr, tg, tb); + dwgfx.Print( 110, 75, help.String(game.besttrinkets[4])+"/1", tr, tg, tb); + dwgfx.Print( 110, 85, help.String(game.bestlives[4]), tr, tg, tb); + + + dwgfx.Print( 170, 65, "PAR TIME 2:00", tr, tg, tb); + dwgfx.Print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[4]) + { + case 0: + dwgfx.bigprint( 275, 82, "B", 225, 225, 225); + break; + case 1: + dwgfx.bigprint( 275, 82, "A", 225, 225, 225); + break; + case 2: + dwgfx.bigprint( 275, 82, "S", 225, 225, 225); + break; + case 3: + dwgfx.bigprint( 275, 82, "V", 225, 225, 225); + break; + } + } + + } + else + { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.Print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Rescue Verdigris", tr, tg, tb, true); + dwgfx.Print( -1, 85, "Find fifteen trinkets", tr, tg, tb, true); + } + } + else if (game.currentmenuoption == 5) + { + if(game.unlock[14]) + { + dwgfx.bigprint( -1, 30, "The Final Level", tr, tg, tb, true); + if (game.besttimes[5] == -1) + { + dwgfx.Print( -1, 75, "Not yet attempted", tr, tg, tb, true); + } + else + { + dwgfx.Print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.Print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.Print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.Print( 110, 65, game.timetstring(game.besttimes[5], help), tr, tg, tb); + dwgfx.Print( 110, 75, help.String(game.besttrinkets[5])+"/1", tr, tg, tb); + dwgfx.Print( 110, 85, help.String(game.bestlives[5]), tr, tg, tb); + + + dwgfx.Print( 170, 65, "PAR TIME 2:15", tr, tg, tb); + dwgfx.Print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[5]) + { + case 0: + dwgfx.bigprint( 275, 82, "B", 225, 225, 225); + break; + case 1: + dwgfx.bigprint( 275, 82, "A", 225, 225, 225); + break; + case 2: + dwgfx.bigprint( 275, 82, "S", 225, 225, 225); + break; + case 3: + dwgfx.bigprint( 275, 82, "V", 225, 225, 225); + break; + } + } + + } + else + { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.Print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.Print( -1, 75, "Complete the game", tr, tg, tb, true); + dwgfx.Print( -1, 85, "Find eighteen trinkets", tr, tg, tb, true); + } + } + } + else if (game.currentmenuname == "gamecompletecontinue") + { + dwgfx.bigprint( -1, 25, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.Print( -1, 45, "Your save files have been updated.", tr, tg, tb, true); + + dwgfx.Print( -1, 110, "If you want to keep exploring", tr, tg, tb, true); + dwgfx.Print( -1, 120, "the game, select CONTINUE", tr, tg, tb, true); + dwgfx.Print( -1, 130, "from the play menu.", tr, tg, tb, true); + } + else if (game.currentmenuname == "unlockmenu") + { + dwgfx.bigprint( -1, 25, "Unlock Play Modes", tr, tg, tb, true, 2); + + dwgfx.Print( -1, 55, "From here, you may unlock parts", tr, tg, tb, true); + dwgfx.Print( -1, 65, "of the game that are normally", tr, tg, tb, true); + dwgfx.Print( -1, 75, "unlocked as you play.", tr, tg, tb, true); + } + else if (game.currentmenuname == "unlocktimetrial") + { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.Print( -1, 125, "Your have unlocked", tr, tg, tb, true); + dwgfx.Print( -1, 135, "a new Time Trial.", tr, tg, tb, true); + } + else if (game.currentmenuname == "unlocktimetrials") + { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.Print( -1, 125, "Your have unlocked some", tr, tg, tb, true); + dwgfx.Print( -1, 135, "new Time Trials.", tr, tg, tb, true); + } + else if (game.currentmenuname == "unlocknodeathmode") + { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.Print( -1, 125, "Your have unlocked", tr, tg, tb, true); + dwgfx.Print( -1, 135, "No Death Mode.", tr, tg, tb, true); + } + else if (game.currentmenuname == "unlockflipmode") + { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.Print( -1, 125, "Your have unlocked", tr, tg, tb, true); + dwgfx.Print( -1, 135, "Flip Mode.", tr, tg, tb, true); + } + else if (game.currentmenuname == "unlockintermission") + { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.Print( -1, 125, "Your have unlocked", tr, tg, tb, true); + dwgfx.Print( -1, 135, "the intermission levels.", tr, tg, tb, true); + }else if (game.currentmenuname == "playerworlds") + { + dwgfx.tempstring = FILESYSTEM_getUserLevelDirectory(); + if(dwgfx.tempstring.length()>80){ + dwgfx.Print( -1, 160, "To install new player levels, copy", tr, tg, tb, true); + dwgfx.Print( -1, 170, "the .vvvvvv files to this folder:", tr, tg, tb, true); + dwgfx.Print( 320-((dwgfx.tempstring.length()-80)*8), 190, dwgfx.tempstring.substr(0,dwgfx.tempstring.length()-80), tr, tg, tb); + dwgfx.Print( 0, 200, dwgfx.tempstring.substr(dwgfx.tempstring.length()-80,40), tr, tg, tb); + dwgfx.Print( 0, 210, dwgfx.tempstring.substr(dwgfx.tempstring.length()-40,40), tr, tg, tb); + }else if(dwgfx.tempstring.length()>40){ + dwgfx.Print( -1, 170, "To install new player levels, copy", tr, tg, tb, true); + dwgfx.Print( -1, 180, "the .vvvvvv files to this folder:", tr, tg, tb, true); + dwgfx.Print( 320-((dwgfx.tempstring.length()-40)*8), 200, dwgfx.tempstring.substr(0,dwgfx.tempstring.length()-40), tr, tg, tb); + dwgfx.Print( 0, 210, dwgfx.tempstring.substr(dwgfx.tempstring.length()-40,40), tr, tg, tb); + }else{ + dwgfx.Print( -1, 180, "To install new player levels, copy", tr, tg, tb, true); + dwgfx.Print( -1, 190, "the .vvvvvv files to this folder:", tr, tg, tb, true); + dwgfx.Print( 320-(dwgfx.tempstring.length()*8), 210, dwgfx.tempstring, tr, tg, tb); + } + } + + /* + switch(game.mainmenu) { + case 0: + dwgfx.Print(5, 115, "[ NEW GAME ]", tr, tg, tb, true); + break; + case 1: + if (game.telesummary == "") { + dwgfx.Print(5, 115, "[ no teleporter save ]", tr/3, tg/3, tb/3, true); + }else { + dwgfx.Print(5, 115, "[ RESTORE FROM LAST TELEPORTER ]", tr, tg, tb, true); + dwgfx.Print(5, 125, game.telesummary, tr, tg, tb, true); + } + break; + case 2: + if (game.quicksummary == "") { + dwgfx.Print(5, 115, "[ no quicksave ]", tr/3, tg/3, tb/3, true); + }else { + dwgfx.Print(5, 115, "[ RESTORE FROM LAST QUICKSAVE ]", tr, tg, tb, true); + dwgfx.Print(5, 125, game.quicksummary, tr, tg, tb, true); + } + break; + } + */ + + tr = int(tr * .8f); + tg = int(tg * .8f); + tb = int(tb * .8f); + if (tr < 0) tr = 0; + if(tr>255) tr=255; + if (tg < 0) tg = 0; + if(tg>255) tg=255; + if (tb < 0) tb = 0; + if(tb>255) tb=255; + if (game.currentmenuname == "timetrials" || game.currentmenuname == "unlockmenutrials") + { + dwgfx.drawmenu(game, tr, tg, tb, 15); + } + else if (game.currentmenuname == "unlockmenu") + { + dwgfx.drawmenu(game, tr, tg, tb, 15); + } + else if (game.currentmenuname == "playmodes") + { + dwgfx.drawmenu(game, tr, tg, tb, 20); + } + else if (game.currentmenuname == "mainmenu") + { + dwgfx.drawmenu(game, tr, tg, tb, 15); + } + else if (game.currentmenuname == "playerworlds") + { + dwgfx.drawmenu(game, tr, tg, tb, 15); + } + else if (game.currentmenuname == "levellist") + { + dwgfx.drawlevelmenu(game, tr, tg, tb, 5); + } + else + { + dwgfx.drawmenu(game, tr, tg, tb); + } + + //dwgfx.Print(5, 228, "Left/Right to Choose, V to Select", tr, tg, tb, true); + } + + if (game.test) + { + dwgfx.Print(5, 5, game.teststring, 196, 196, 255, false); + } + + dwgfx.drawfade(); + + if (game.flashlight > 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) + { + game.screenshake--; + dwgfx.screenshake(); + } + else + { + dwgfx.render(); + } + //dwgfx.backbuffer.unlock(); +} + +void gamecompleterender(Graphics& dwgfx, Game& game, entityclass& obj, UtilityClass& help, mapclass& map) +{ + //dwgfx.backbuffer.lock(); + FillRect(dwgfx.backBuffer, 0x000000); + + if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo(map); + //dwgfx.drawtowermap(map); + + for (int i = 0; i < 6; i++) + { + //dwgfx.drawsprite((160-96)+ i * 32, 10, 23, 96+(i*10)+(random()*16), 196-(help.glow)-(random()*16), 255 - (help.glow*2)); + } + + tr = map.r - (help.glow / 4) - fRandom() * 4; + tg = map.g - (help.glow / 4) - fRandom() * 4; + tb = map.b - (help.glow / 4) - fRandom() * 4; + if (tr < 0) tr = 0; + if(tr>255) tr=255; + if (tg < 0) tg = 0; + if(tg>255) tg=255; + if (tb < 0) tb = 0; + if(tb>255) tb=255; + + + //rendering starts... here! + + if (dwgfx.onscreen(220 + game.creditposition)) + { + temp = 220 + game.creditposition; + dwgfx.drawsprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); + } + + if (dwgfx.onscreen(290 + game.creditposition)) dwgfx.bigprint( -1, 290 + game.creditposition, "Starring", tr, tg, tb, true, 2); + + if (dwgfx.onscreen(320 + game.creditposition)) + { + dwgfx.drawcrewman(70, 320 + game.creditposition, 0, true, help); + dwgfx.Print(100, 330 + game.creditposition, "Captain Viridian", tr, tg, tb); + } + if (dwgfx.onscreen(350 + game.creditposition)) + { + dwgfx.drawcrewman(70, 350 + game.creditposition, 1, true, help); + dwgfx.Print(100, 360 + game.creditposition, "Doctor Violet", tr, tg, tb); + } + if (dwgfx.onscreen(380 + game.creditposition)) + { + dwgfx.drawcrewman(70, 380 + game.creditposition, 2, true, help); + dwgfx.Print(100, 390 + game.creditposition, "Professor Vitellary", tr, tg, tb); + } + if (dwgfx.onscreen(410 + game.creditposition)) + { + dwgfx.drawcrewman(70, 410 + game.creditposition, 3, true, help); + dwgfx.Print(100, 420 + game.creditposition, "Officer Vermilion", tr, tg, tb); + } + if (dwgfx.onscreen(440 + game.creditposition)) + { + dwgfx.drawcrewman(70, 440 + game.creditposition, 4, true, help); + dwgfx.Print(100, 450 + game.creditposition, "Chief Verdigris", tr, tg, tb); + } + if (dwgfx.onscreen(470 + game.creditposition)) + { + dwgfx.drawcrewman(70, 470 + game.creditposition, 5, true, help); + dwgfx.Print(100, 480 + game.creditposition, "Doctor Victoria", tr, tg, tb); + } + + if (dwgfx.onscreen(520 + game.creditposition)) dwgfx.bigprint( -1, 520 + game.creditposition, "Credits", tr, tg, tb, true, 3); + + if (dwgfx.onscreen(560 + game.creditposition)) + { + dwgfx.Print(40, 560 + game.creditposition, "Created by", tr, tg, tb); + dwgfx.bigprint(60, 570 + game.creditposition, "Terry Cavanagh", tr, tg, tb); + } + + if (dwgfx.onscreen(600 + game.creditposition)) + { + dwgfx.Print(40, 600 + game.creditposition, "With Music by", tr, tg, tb); + dwgfx.bigprint(60, 610 + game.creditposition, "Magnus P~lsson", tr, tg, tb); + } + + if (dwgfx.onscreen(640 + game.creditposition)) + { + dwgfx.Print(40, 640 + game.creditposition, "Rooms Named by", tr, tg, tb); + dwgfx.bigprint(60, 650 + game.creditposition, "Bennett Foddy", tr, tg, tb); + } + + if (dwgfx.onscreen(680 + game.creditposition)) + { + dwgfx.Print(40, 680 + game.creditposition, "C++ Port by", tr, tg, tb); + dwgfx.bigprint(60, 690 + game.creditposition, "Simon Roth", tr, tg, tb); + } + + + if (dwgfx.onscreen(720 + game.creditposition)) + { + dwgfx.Print(40, 720 + game.creditposition, "Beta Testing by", tr, tg, tb); + dwgfx.bigprint(60, 730 + game.creditposition, "Sam Kaplan", tr, tg, tb); + dwgfx.bigprint(60, 750 + game.creditposition, "Pauli Kohberger", tr, tg, tb); + } + + if (dwgfx.onscreen(780 + game.creditposition)) + { + dwgfx.Print(40, 780 + game.creditposition, "Ending Picture by", tr, tg, tb); + dwgfx.bigprint(60, 790 + game.creditposition, "Pauli Kohberger", tr, tg, tb); + } + + if (dwgfx.onscreen(870 + game.creditposition)) dwgfx.bigprint( -1, 870 + game.creditposition, "Patrons", tr, tg, tb, true, 3); + + if (dwgfx.onscreen(910 + game.creditposition)) dwgfx.Print(-1, 910 + game.creditposition,"Anders Ekermo", tr, tg, tb, true); + if (dwgfx.onscreen(920 + game.creditposition)) dwgfx.Print(-1, 920 + game.creditposition,"Andreas K|mper", tr, tg, tb, true); + if (dwgfx.onscreen(930 + game.creditposition)) dwgfx.Print(-1, 930 + game.creditposition,"Anthony Burch", tr, tg, tb, true); + if (dwgfx.onscreen(940 + game.creditposition)) dwgfx.Print(-1, 940 + game.creditposition,"Bennett Foddy", tr, tg, tb, true); + if (dwgfx.onscreen(950 + game.creditposition)) dwgfx.Print(-1, 950 + game.creditposition,"Brendan O'Sullivan", tr, tg, tb, true); + if (dwgfx.onscreen(960 + game.creditposition)) dwgfx.Print(-1, 960 + game.creditposition,"Christopher Armstrong", tr, tg, tb, true); + if (dwgfx.onscreen(970 + game.creditposition)) dwgfx.Print(-1, 970 + game.creditposition,"Daniel Benmergui", tr, tg, tb, true); + if (dwgfx.onscreen(980 + game.creditposition)) dwgfx.Print(-1, 980 + game.creditposition,"David Pittman", tr, tg, tb, true); + if (dwgfx.onscreen(990 + game.creditposition)) dwgfx.Print(-1, 990 + game.creditposition,"Ian Bogost", tr, tg, tb, true); + if (dwgfx.onscreen(1000 + game.creditposition)) dwgfx.Print(-1, 1000 + game.creditposition,"Jaz McDougall", tr, tg, tb, true); + if (dwgfx.onscreen(1010 + game.creditposition)) dwgfx.Print(-1, 1010 + game.creditposition,"John Faulkenbury", tr, tg, tb, true); + if (dwgfx.onscreen(1020 + game.creditposition)) dwgfx.Print(-1, 1020 + game.creditposition,"Jonathan Whiting", tr, tg, tb, true); + if (dwgfx.onscreen(1030 + game.creditposition)) dwgfx.Print(-1, 1030 + game.creditposition,"Kyle Pulver", tr, tg, tb, true); + if (dwgfx.onscreen(1040 + game.creditposition)) dwgfx.Print(-1, 1040 + game.creditposition,"Markus Persson", tr, tg, tb, true); + if (dwgfx.onscreen(1050 + game.creditposition)) dwgfx.Print(-1, 1050 + game.creditposition,"Nathan Ostgard", tr, tg, tb, true); + if (dwgfx.onscreen(1060 + game.creditposition)) dwgfx.Print(-1, 1060 + game.creditposition,"Nick Easler", tr, tg, tb, true); + if (dwgfx.onscreen(1070 + game.creditposition)) dwgfx.Print(-1, 1070 + game.creditposition,"Stephen Lavelle", tr, tg, tb, true); + + if (dwgfx.onscreen(1090 + game.creditposition)) dwgfx.Print( -1, 1090 + game.creditposition, "and", tr, tg, tb, true); + + if (dwgfx.onscreen(1110 + game.creditposition)) dwgfx.Print(-1, 1110 + game.creditposition,"Adam Wendt", tr, tg, tb, true); + if (dwgfx.onscreen(1110 + game.creditposition)) dwgfx.Print(-1, 1120 + game.creditposition,"Andreas J{rgensen", tr, tg, tb, true); + if (dwgfx.onscreen(1120 + game.creditposition)) dwgfx.Print(-1, 1130 + game.creditposition,"}ngel Louzao Penalva", tr, tg, tb, true); + if (dwgfx.onscreen(1130 + game.creditposition)) dwgfx.Print(-1, 1140 + game.creditposition,"Ashley Burton", tr, tg, tb, true); + if (dwgfx.onscreen(1140 + game.creditposition)) dwgfx.Print(-1, 1150 + game.creditposition,"Aubrey Hesselgren", tr, tg, tb, true); + if (dwgfx.onscreen(1150 + game.creditposition)) dwgfx.Print(-1, 1160 + game.creditposition,"Bradley Rose", tr, tg, tb, true); + if (dwgfx.onscreen(1160 + game.creditposition)) dwgfx.Print(-1, 1170 + game.creditposition,"Brendan Urquhart", tr, tg, tb, true); + if (dwgfx.onscreen(1170 + game.creditposition)) dwgfx.Print(-1, 1180 + game.creditposition,"Chris Ayotte", tr, tg, tb, true); + if (dwgfx.onscreen(1180 + game.creditposition)) dwgfx.Print(-1, 1190 + game.creditposition,"Christopher Zamanillo", tr, tg, tb, true); + if (dwgfx.onscreen(1190 + game.creditposition)) dwgfx.Print(-1, 1200 + game.creditposition,"Daniel Schuller", tr, tg, tb, true); + if (dwgfx.onscreen(1200 + game.creditposition)) dwgfx.Print(-1, 1210 + game.creditposition,"Hybrid Mind Studios", tr, tg, tb, true); + if (dwgfx.onscreen(1210 + game.creditposition)) dwgfx.Print(-1, 1220 + game.creditposition,"Emilie McGinley", tr, tg, tb, true); + if (dwgfx.onscreen(1220 + game.creditposition)) dwgfx.Print(-1, 1230 + game.creditposition,"Francisco Solares", tr, tg, tb, true); + if (dwgfx.onscreen(1230 + game.creditposition)) dwgfx.Print(-1, 1240 + game.creditposition,"Hal Helms", tr, tg, tb, true); + if (dwgfx.onscreen(1240 + game.creditposition)) dwgfx.Print(-1, 1250 + game.creditposition,"Hayden Scott-Baron", tr, tg, tb, true); + if (dwgfx.onscreen(1250 + game.creditposition)) dwgfx.Print(-1, 1260 + game.creditposition,"Hermit Games", tr, tg, tb, true); + if (dwgfx.onscreen(1260 + game.creditposition)) dwgfx.Print(-1, 1270 + game.creditposition,"Ido Yehieli", tr, tg, tb, true); + if (dwgfx.onscreen(1270 + game.creditposition)) dwgfx.Print(-1, 1280 + game.creditposition,"Jade Vault Games", tr, tg, tb, true); + if (dwgfx.onscreen(1280 + game.creditposition)) dwgfx.Print(-1, 1290 + game.creditposition,"James Andrews", tr, tg, tb, true); + if (dwgfx.onscreen(1290 + game.creditposition)) dwgfx.Print(-1, 1300 + game.creditposition,"James Riley", tr, tg, tb, true); + if (dwgfx.onscreen(1300 + game.creditposition)) dwgfx.Print(-1, 1310 + game.creditposition,"James Hsieh", tr, tg, tb, true); + if (dwgfx.onscreen(1310 + game.creditposition)) dwgfx.Print(-1, 1320 + game.creditposition,"Jasper Byrne", tr, tg, tb, true); + if (dwgfx.onscreen(1320 + game.creditposition)) dwgfx.Print(-1, 1330 + game.creditposition,"Jedediah Baker", tr, tg, tb, true); + if (dwgfx.onscreen(1330 + game.creditposition)) dwgfx.Print(-1, 1340 + game.creditposition,"Jens Bergensten", tr, tg, tb, true); + if (dwgfx.onscreen(1340 + game.creditposition)) dwgfx.Print(-1, 1350 + game.creditposition,"Jeremy J. Penner", tr, tg, tb, true); + if (dwgfx.onscreen(1350 + game.creditposition)) dwgfx.Print(-1, 1360 + game.creditposition,"Jeremy Peterson", tr, tg, tb, true); + if (dwgfx.onscreen(1360 + game.creditposition)) dwgfx.Print(-1, 1370 + game.creditposition,"Jim McGinley", tr, tg, tb, true); + if (dwgfx.onscreen(1370 + game.creditposition)) dwgfx.Print(-1, 1380 + game.creditposition,"Jonathan Cartwright", tr, tg, tb, true); + if (dwgfx.onscreen(1380 + game.creditposition)) dwgfx.Print(-1, 1390 + game.creditposition,"John Nesky", tr, tg, tb, true); + if (dwgfx.onscreen(1390 + game.creditposition)) dwgfx.Print(-1, 1400 + game.creditposition,"Jos Yule", tr, tg, tb, true); + if (dwgfx.onscreen(1400 + game.creditposition)) dwgfx.Print(-1, 1410 + game.creditposition,"Jose Flores", tr, tg, tb, true); + if (dwgfx.onscreen(1410 + game.creditposition)) dwgfx.Print(-1, 1420 + game.creditposition,"Josh Bizeau", tr, tg, tb, true); + if (dwgfx.onscreen(1420 + game.creditposition)) dwgfx.Print(-1, 1430 + game.creditposition,"Joshua Buergel", tr, tg, tb, true); + if (dwgfx.onscreen(1430 + game.creditposition)) dwgfx.Print(-1, 1440 + game.creditposition,"Joshua Hochner", tr, tg, tb, true); + if (dwgfx.onscreen(1440 + game.creditposition)) dwgfx.Print(-1, 1450 + game.creditposition,"Kurt Ostfeld", tr, tg, tb, true); + if (dwgfx.onscreen(1450 + game.creditposition)) dwgfx.Print(-1, 1460 + game.creditposition, "Magnus P~lsson", tr, tg, tb, true); + if (dwgfx.onscreen(1460 + game.creditposition)) dwgfx.Print(-1, 1470 + game.creditposition,"Mark Neschadimenko", tr, tg, tb, true); + if (dwgfx.onscreen(1470 + game.creditposition)) dwgfx.Print(-1, 1480 + game.creditposition,"Matt Antonellis", tr, tg, tb, true); + if (dwgfx.onscreen(1480 + game.creditposition)) dwgfx.Print(-1, 1490 + game.creditposition,"Matthew Reppert", tr, tg, tb, true); + if (dwgfx.onscreen(1490 + game.creditposition)) dwgfx.Print(-1, 1500 + game.creditposition,"Michael Falkensteiner", tr, tg, tb, true); + if (dwgfx.onscreen(1500 + game.creditposition)) dwgfx.Print(-1, 1510 + game.creditposition,"Michael Vendittelli", tr, tg, tb, true); + if (dwgfx.onscreen(1510 + game.creditposition)) dwgfx.Print(-1, 1520 + game.creditposition,"Mike Kasprzak", tr, tg, tb, true); + if (dwgfx.onscreen(1520 + game.creditposition)) dwgfx.Print(-1, 1530 + game.creditposition,"Mitchel Stein", tr, tg, tb, true); + if (dwgfx.onscreen(1530 + game.creditposition)) dwgfx.Print(-1, 1540 + game.creditposition,"Sean Murray", tr, tg, tb, true); + if (dwgfx.onscreen(1540 + game.creditposition)) dwgfx.Print(-1, 1550 + game.creditposition,"Simon Michael", tr, tg, tb, true); + if (dwgfx.onscreen(1550 + game.creditposition)) dwgfx.Print(-1, 1560 + game.creditposition,"Simon Schmid", tr, tg, tb, true); + if (dwgfx.onscreen(1560 + game.creditposition)) dwgfx.Print(-1, 1570 + game.creditposition,"Stephen Maxwell", tr, tg, tb, true); + if (dwgfx.onscreen(1570 + game.creditposition)) dwgfx.Print(-1, 1580 + game.creditposition,"Swing Swing Submarine", tr, tg, tb, true); + if (dwgfx.onscreen(1580 + game.creditposition)) dwgfx.Print(-1, 1590 + game.creditposition,"Tam Toucan", tr, tg, tb, true); + if (dwgfx.onscreen(1590 + game.creditposition)) dwgfx.Print(-1, 1600 + game.creditposition,"Terry Dooher", tr, tg, tb, true); + if (dwgfx.onscreen(1600 + game.creditposition)) dwgfx.Print(-1, 1610 + game.creditposition,"Tim W.", tr, tg, tb, true); + if (dwgfx.onscreen(1610 + game.creditposition)) dwgfx.Print( -1, 1620 + game.creditposition, "Timothy Bragan", tr, tg, tb, true); + + if (dwgfx.onscreen(1760 + game.creditposition)) dwgfx.bigprint( -1, 1760 + game.creditposition, "Thanks for playing!", tr, tg, tb, true, 2); + + if (game.test) + { + dwgfx.Print(5, 5, game.teststring, 196, 196, 255, false); + } + + dwgfx.drawfade(); + + if (game.flashlight > 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) + { + game.screenshake--; + dwgfx.screenshake(); + } + else + { + dwgfx.render(); + } + //dwgfx.backbuffer.unlock(); +} + +void gamecompleterender2(Graphics& dwgfx, Game& game, entityclass& obj, UtilityClass& help) +{ + //dwgfx.backbuffer.lock(); + FillRect(dwgfx.backBuffer, 0x000000); + + dwgfx.drawimage(10, 0, 0); + + for (int j = 0; j < 30; j++) + { + for (int i = 0; i < 40; i++) + { + if (j == game.creditposy) + { + if (i > game.creditposx) + { + FillRect(dwgfx.backBuffer, i * 8, j * 8, 8, 8, 0, 0, 0); + } + } + + if (j > game.creditposy) + { + FillRect(dwgfx.backBuffer, i * 8, j * 8, 8, 8, 0, 0, 0); + } + } + } + + if (game.test) + { + dwgfx.Print(5, 5, game.teststring, 196, 196, 255, false); + } + + dwgfx.drawfade(); + + if (game.flashlight > 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) + { + game.screenshake--; + dwgfx.screenshake(); + } + else + { + dwgfx.render(); + } + //dwgfx.backbuffer.unlock(); +} + +void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, UtilityClass& help) +{ + + + + if(!game.blackout) + { + + if(!game.colourblindmode) + { + dwgfx.drawbackground(map.background, map); + } + else + { + FillRect(dwgfx.backBuffer,0x00000); + } + if (map.final_colormode) + { + dwgfx.drawfinalmap(map); + } + else + { + dwgfx.drawmap(map); + } + + + if(!game.completestop) + { + for (int i = 0; i < obj.nentity; i++) + { + //Is this entity on the ground? (needed for jumping) + if (obj.entitycollidefloor(map, i)) + { + obj.entities[i].onground = 2; + } + else + { + obj.entities[i].onground--; + } + + if (obj.entitycollideroof(map, i)) + { + obj.entities[i].onroof = 2; + } + else + { + obj.entities[i].onroof--; + } + + //Animate the entities + obj.animateentities(i, game, help); + } + } + + dwgfx.drawentities(map, obj, help); + } + + /*for(int i=0; i 100 && !game.advancetext && game.hascontrol && !script.running && !game.intimetrial) + { + if(dwgfx.flipmode) + { + dwgfx.bprint(5, 20, "- Press ENTER to Teleport -", game.readytotele - 20 - (help.glow / 2), game.readytotele - 20 - (help.glow / 2), game.readytotele, true); + } + else + { + dwgfx.bprint(5, 210, "- Press ENTER to Teleport -", game.readytotele - 20 - (help.glow / 2), game.readytotele - 20 - (help.glow / 2), game.readytotele, true); + } + } + + if (game.swnmode) + { + if (game.swngame == 0) + { + tempstring = help.timestring(game.swntimer); + dwgfx.bigprint( -1, 20, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + } + else if (game.swngame == 1) + { + if (game.swnmessage == 0) + { + tempstring = help.timestring(game.swntimer); + dwgfx.Print( 10, 10, "Current Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigprint( 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + tempstring = help.timestring(game.swnrecord); + dwgfx.Print( 240, 10, "Best Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigrprint( 300, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + + switch(game.swnbestrank) + { + case 0: + dwgfx.Print( -1, 204, "Next Trophy at 5 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + break; + case 1: + dwgfx.Print( -1, 204, "Next Trophy at 10 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + break; + case 2: + dwgfx.Print( -1, 204, "Next Trophy at 15 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + break; + case 3: + dwgfx.Print( -1, 204, "Next Trophy at 20 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + break; + case 4: + dwgfx.Print( -1, 204, "Next Trophy at 30 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + break; + case 5: + dwgfx.Print( -1, 204, "Next Trophy at 1 minute", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + break; + case 6: + dwgfx.Print( -1, 204, "All Trophies collected!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + break; + } + } + else if (game.swnmessage == 1) + { + tempstring = help.timestring(game.swntimer); + dwgfx.Print( 10, 10, "Current Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigprint( 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + tempstring = help.timestring(game.swnrecord); + if (int(game.deathseq / 5) % 2 == 1) + { + dwgfx.Print( 240, 10, "Best Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigrprint( 300, 24, tempstring, 128 - (help.glow), 220 - (help.glow), 128 - (help.glow / 2), false, 2); + + dwgfx.bigprint( -1, 200, "New Record!", 128 - (help.glow), 220 - (help.glow), 128 - (help.glow / 2), true, 2); + } + } + else if (game.swnmessage >= 2) + { + game.swnmessage--; + if (game.swnmessage == 2) game.swnmessage = 0; + tempstring = help.timestring(game.swntimer); + dwgfx.Print( 10, 10, "Current Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigprint( 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + tempstring = help.timestring(game.swnrecord); + dwgfx.Print( 240, 10, "Best Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigrprint( 300, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + + if (int(game.swnmessage / 5) % 2 == 1) + { + dwgfx.bigprint( -1, 200, "New Trophy!", 220 - (help.glow), 128 - (help.glow), 128 - (help.glow / 2), true, 2); + } + } + + dwgfx.Print( 20, 228, "[Press ENTER to stop]", 160 - (help.glow/2), 160 - (help.glow/2), 160 - (help.glow/2), true); + } + else if(game.swngame==2) + { + if (int(game.swndelay / 15) % 2 == 1 || game.swndelay >= 120) + { + if (dwgfx.flipmode) + { + dwgfx.bigprint( -1, 30, "Survive for", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + dwgfx.bigprint( -1, 10, "60 seconds!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + } + else + { + dwgfx.bigprint( -1, 10, "Survive for", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + dwgfx.bigprint( -1, 30, "60 seconds!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + } + } + } + else if(game.swngame==7) + { + if (game.swndelay >= 60) + { + dwgfx.bigprint( -1, 20, "SUPER GRAVITRON", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + + tempstring = help.timestring(game.swnrecord); + dwgfx.Print( 240, 190, "Best Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + dwgfx.bigrprint( 300, 205, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + } + else if (int(game.swndelay / 10) % 2 == 1) + { + dwgfx.bigprint( -1, 20, "SUPER GRAVITRON", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + dwgfx.bigprint( -1, 200, "GO!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 3); + } + } + } + + if (game.intimetrial && dwgfx.fademode==0) + { + //Draw countdown! + if (game.timetrialcountdown > 0) + { + if (game.timetrialcountdown < 30) + { + game.resetgameclock(); + if (int(game.timetrialcountdown / 4) % 2 == 0) dwgfx.bigprint( -1, 100, "Go!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + else if (game.timetrialcountdown < 60) + { + dwgfx.bigprint( -1, 100, "1", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + else if (game.timetrialcountdown < 90) + { + dwgfx.bigprint( -1, 100, "2", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + else if (game.timetrialcountdown < 120) + { + dwgfx.bigprint( -1, 100, "3", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + } + else + { + //Draw OSD stuff + dwgfx.bprint(6, 18, "TIME :", 255,255,255); + dwgfx.bprint(6, 30, "DEATH:", 255, 255, 255); + dwgfx.bprint(6, 42, "SHINY:", 255,255,255); + + if(game.timetrialparlost) + { + dwgfx.bprint(56, 18, game.timestring(help), 196, 80, 80); + } + else + { + dwgfx.bprint(56, 18, game.timestring(help), 196, 196, 196); + } + if(game.deathcounts>0) + { + dwgfx.bprint(56, 30,help.String(game.deathcounts), 196, 80, 80); + } + else + { + dwgfx.bprint(56, 30,help.String(game.deathcounts), 196, 196, 196); + } + if(game.trinkets -1) + { + //dwgfx.backbuffer.fillRect(new Rectangle(0, 0, 320, 18), 0x000000); + game.activity_lastprompt = obj.blocks[game.activeactivity].prompt; + game.activity_r = obj.blocks[game.activeactivity].r; + game.activity_g = obj.blocks[game.activeactivity].g; + game.activity_b = obj.blocks[game.activeactivity].b; + if(game.act_fade<5) game.act_fade=5; + if(game.act_fade<10) + { + game.act_fade++; + } + dwgfx.drawtextbox(16, 4, 36, 3, game.activity_r*(game.act_fade/10.0f), game.activity_g*(game.act_fade/10.0f), game.activity_b*(game.act_fade/10.0f)); + dwgfx.Print(5, 12, game.activity_lastprompt, game.activity_r*(game.act_fade/10.0f), game.activity_g*(game.act_fade/10.0f), game.activity_b*(game.act_fade/10.0f), true); + } + else + { + if(game.act_fade>5) + { + dwgfx.drawtextbox(16, 4, 36, 3, game.activity_r*(game.act_fade/10.0f), game.activity_g*(game.act_fade/10.0f), game.activity_b*(game.act_fade/10.0f)); + dwgfx.Print(5, 12, game.activity_lastprompt, game.activity_r*(game.act_fade/10.0f), game.activity_g*(game.act_fade/10.0f), game.activity_b*(game.act_fade/10.0f), true); + game.act_fade--; + } + } + + if (obj.trophytext > 0) + { + dwgfx.drawtrophytext(obj, help); + obj.trophytext--; + } + + //dwgfx.rprint(5, 231,help.String(game.coins), 255 - help.glow/2, 255 - help.glow/2, 196, true); + //dwgfx.drawhuetile(311, 230, 48, 1); + + //Level complete image + //if (game.state >= 3007) { + // dwgfx.drawimage(0, 0, 12, true); + //} + + //state changes + + /* + game.test = true; + if (game.teststring !=help.String(game.state)) trace(game.state); + game.teststring =help.String(game.state); + */ + + //Detail entity info for debuging + /* + for (int i = 0; i < obj.nentity; i++) { + game.tempstring =help.String(obj.entities[i].type) +", (" +help.String(obj.entities[i].xp) + "," +help.String(obj.entities[i].yp) + ")"; + game.tempstring += " state:" +obj.entities[i].state + ", delay:" + obj.entities[i].statedelay; + dwgfx.Print(5, 5 + i * 8, game.tempstring, 255, 255, 255); + } + */ + + /* + game.test = true; + game.teststring =help.String(int(obj.entities[obj.getplayer()].xp)) + "," +help.String(int(obj.entities[obj.getplayer()].yp)); + game.teststring += " [" +help.String(game.roomx) + "," +help.String(game.roomy) + "]"; + */ + + //game.test = true; + //game.teststring = "Current room deaths: " +help.String(game.currentroomdeaths); + + //Special thing for loading: + /* + if(dwgfx.fademode==1){ + if(game.mainmenu==22){ + dwgfx.Print(5, 225, "Loading...", 196, 196, 255 - help.glow, false); + } + } + */ + + + if (game.test) + { + dwgfx.Print(5, 5, game.teststring, 196, 196, 255, false); + } + + if (game.flashlight > 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) + { + game.screenshake--; + dwgfx.screenshake(); + } + else + { + dwgfx.render(); + } + + //dwgfx.backbuffer.unlock(); +} + +void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help) +{ + //dwgfx.backbuffer.lock(); + + + dwgfx.drawgui(help); + + //draw screen alliteration + //Roomname: + //CRASH + temp = map.area(game.roomx, game.roomy); + if (temp < 2 && !map.custommode && dwgfx.fademode==0) + { + if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) + { + dwgfx.Print(5, 2, "The Ship", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(5, 2, "Dimension VVVVVV", 196, 196, 255 - help.glow, true); + } + } + else + { + if (map.finalmode){ + map.glitchname = map.getglitchname(game.roomx, game.roomy); + dwgfx.Print(5, 2, map.glitchname, 196, 196, 255 - help.glow, true); + }else{ + dwgfx.Print(5, 2, map.roomname, 196, 196, 255 - help.glow, true); + } + } + + //Background color + //dwgfx.drawfillrect(0, 12, 320, 240, 10, 24, 26); + FillRect(dwgfx.backBuffer,0, 12, 320, 240, 10, 24, 26 ); + + dwgfx.crewframedelay--; + if (dwgfx.crewframedelay <= 0) + { + dwgfx.crewframedelay = 8; + dwgfx.crewframe = (dwgfx.crewframe + 1) % 2; + } + + + + //Menubar: + dwgfx.drawtextbox( -10, 212, 42, 3, 65, 185, 207); + switch(game.menupage) + { + case 0: + dwgfx.Print(30 - 8, 220, "[MAP]", 196, 196, 255 - help.glow); + if (game.insecretlab) + { + dwgfx.Print(103, 220, "GRAV", 64, 64, 64); + } + else if (obj.flags[67] == 1 && !map.custommode) + { + dwgfx.Print(103, 220, "SHIP", 64,64,64); + } + else + { + dwgfx.Print(103, 220, "CREW", 64,64,64); + } + dwgfx.Print(185-4, 220, "STATS", 64,64,64); + dwgfx.Print(258, 220, "SAVE", 64,64,64); + + if (map.finalmode || (map.custommode&&!map.customshowmm)) + { + //draw the map image + dwgfx.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + dwgfx.drawimage(1, 40, 21, false); + for (int j = 0; j < 20; j++) + { + for (int i = 0; i < 20; i++) + { + dwgfx.drawimage(2, 40 + (i * 12), 21 + (j * 9), false); + } + } + dwgfx.Print(-1, 105, "NO SIGNAL", 245, 245, 245, true); + } + else if(map.custommode) + { + //draw the map image + dwgfx.drawcustompixeltextbox(35+map.custommmxoff, 16+map.custommmyoff, map.custommmxsize+10, map.custommmysize+10, (map.custommmxsize+10)/8, (map.custommmysize+10)/8, 65, 185, 207,4,0); + dwgfx.drawpartimage(12, 40+map.custommmxoff, 21+map.custommmyoff, map.custommmxsize,map.custommmysize); + + //Black out here + if(map.customzoom==4){ + for (int j = 0; j < map.customheight; j++){ + for (int i = 0; i < map.customwidth; i++){ + if(map.explored[i+(j*20)]==0){ + //Draw the fog of war on the map + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48), map.custommmyoff+21 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48), map.custommmyoff+21 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48), map.custommmyoff+21 + 9 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48), map.custommmyoff+21 + 9+ (j * 36), false); + + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48) + 24, map.custommmyoff+21 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48) + 24, map.custommmyoff+21 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48) + 24, map.custommmyoff+ 21 + 9 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48) + 24, map.custommmyoff+21 + 9+ (j * 36), false); + + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48), map.custommmyoff+21 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48), map.custommmyoff+21 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48), map.custommmyoff+21 + 9 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48), map.custommmyoff+21 + 9+ (j * 36)+18, false); + + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48) + 24, map.custommmyoff+21 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48) + 24, map.custommmyoff+21 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48) + 24, map.custommmyoff+21 + 9 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48) + 24, map.custommmyoff+21 + 9+ (j * 36)+18, false); + } + } + } + }else if(map.customzoom==2){ + for (int j = 0; j < map.customheight; j++){ + for (int i = 0; i < map.customwidth; i++){ + if(map.explored[i+(j*20)]==0){ + //Draw the fog of war on the map + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 24), map.custommmyoff+21 + (j * 18), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 24), map.custommmyoff+21 + (j * 18), false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 24), map.custommmyoff+21 + 9 + (j * 18), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 24), map.custommmyoff+21 + 9+ (j * 18), false); + } + } + } + }else{ + for (int j = 0; j < map.customheight; j++){ + for (int i = 0; i < map.customwidth; i++){ + if(map.explored[i+(j*20)]==0){ + //Draw the fog of war on the map + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 12), map.custommmyoff+21 + (j * 9), false); + } + } + } + } + + if (map.cursorstate == 0){ + map.cursordelay++; + if (map.cursordelay > 10){ + map.cursorstate = 1; + map.cursordelay = 0; + } + }else if (map.cursorstate == 1){ + map.cursordelay++; + if (map.cursordelay > 30) map.cursorstate = 2; + }else if (map.cursorstate == 2){ + map.cursordelay++; + } + + //normal size maps + if(map.customzoom==4){ + if(map.cursorstate==1){ + if (int(map.cursordelay / 4) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 48) +map.custommmxoff, 21 + ((game.roomy - 100) * 36)+map.custommmyoff , 48 , 36 , 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 48) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 36) + 2+map.custommmyoff, 48 - 4, 36 - 4, 255,255,255); + } + }else if (map.cursorstate == 2){ + if (int(map.cursordelay / 15) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 48) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 36) + 2+map.custommmyoff, 48 - 4, 36 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + } + } + }else if(map.customzoom==2){ + if(map.cursorstate==1){ + if (int(map.cursordelay / 4) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 24)+map.custommmxoff , 21 + ((game.roomy - 100) * 18)+map.custommmyoff , 24 , 18 , 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 24) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 18) + 2+map.custommmyoff, 24 - 4, 18 - 4, 255,255,255); + } + }else if (map.cursorstate == 2){ + if (int(map.cursordelay / 15) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 24) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 18) + 2+map.custommmyoff, 24 - 4, 18 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + } + } + }else{ + if(map.cursorstate==1){ + if (int(map.cursordelay / 4) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 12)+map.custommmxoff , 21 + ((game.roomy - 100) * 9)+map.custommmyoff , 12 , 9 , 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 9) + 2+map.custommmyoff, 12 - 4, 9 - 4, 255,255,255); + } + }else if (map.cursorstate == 2){ + if (int(map.cursordelay / 15) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 9) + 2+map.custommmyoff, 12 - 4, 9 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + } + } + } + } + else + { + //draw the map image + dwgfx.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + dwgfx.drawimage(1, 40, 21, false); + + //black out areas we can't see yet + for (int j = 0; j < 20; j++) + { + for (int i = 0; i < 20; i++) + { + if(map.explored[i+(j*20)]==0) + { + //Draw the fog of war on the map + dwgfx.drawimage(2, 40 + (i * 12), 21 + (j * 9), false); + } + } + } + //draw the coordinates + if (game.roomx == 109) + { + //tower!instead of room y, scale map.ypos + /*if (map.ypos > (0.57 * (680 * 8))) { + i = int(map.ypos - (0.57 * (680 * 8))); + i = int((i / (0.43 * (680 * 8)))*9); + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + i + 2, 12 - 4, 9 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); + }*/ + if (map.cursorstate == 0) + { + map.cursordelay++; + if (map.cursordelay > 10) + { + map.cursorstate = 1; + map.cursordelay = 0; + } + } + else if (map.cursorstate == 1) + { + map.cursordelay++; + if (int(map.cursordelay / 4) % 2 == 0) + { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) , 21 , 12, 180, 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2 , 21 + 2, 12 - 4, 180 - 4, 255,255,255); + } + if (map.cursordelay > 30) map.cursorstate = 2; + } + else if (map.cursorstate == 2) + { + map.cursordelay++; + if (int(map.cursordelay / 15) % 2 == 0) + { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2 , 21 + 2, 12 - 4, 180 - 4,16, 245 - (help.glow), 245 - (help.glow)); + } + } + } + else + { + if (map.cursorstate == 0) + { + map.cursordelay++; + if (map.cursordelay > 10) + { + map.cursorstate = 1; + map.cursordelay = 0; + } + } + else if (map.cursorstate == 1) + { + map.cursordelay++; + if (int(map.cursordelay / 4) % 2 == 0) + { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) , 21 + ((game.roomy - 100) * 9) , 12 , 9 , 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + ((game.roomy - 100) * 9) + 2, 12 - 4, 9 - 4, 255,255,255); + } + if (map.cursordelay > 30) map.cursorstate = 2; + } + else if (map.cursorstate == 2) + { + map.cursordelay++; + if (int(map.cursordelay / 15) % 2 == 0) + { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + ((game.roomy - 100) * 9) + 2, 12 - 4, 9 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + } + } + } + + //draw legend details + for (int i = 0; i < map.numteleporters; i++) + { + if (map.showteleporters && map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)] > 0) + { + temp = 1126 + map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)]; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), temp); + } + else if(map.showtargets && map.explored[map.teleporters[i].x+(20*map.teleporters[i].y)]==0) + { + temp = 1126 + map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)]; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), temp); + } + //dwgfx.drawtile(40+3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), 1086); //for shiny trinkets, do later + } + + if (map.showtrinkets) + { + for (int i = 0; i < map.numshinytrinkets; i++) + { + if (obj.collect[i] == 0) + { + temp = 1086; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.shinytrinkets[i].x * 12), 22 + (map.shinytrinkets[i].y * 9), temp); + } + } + } + } + break; + case 1: + if (game.insecretlab) + { + dwgfx.Print(30, 220, "MAP", 64,64,64); + dwgfx.Print(103-8, 220, "[GRAV]", 196, 196, 255 - help.glow); + dwgfx.Print(185-4, 220, "STATS", 64,64,64); + dwgfx.Print(258, 220, "SAVE", 64, 64, 64); + + if (dwgfx.flipmode) + { + dwgfx.Print(0, 174, "SUPER GRAVITRON HIGHSCORE", 196, 196, 255 - help.glow, true); + + tempstring = help.timestring(game.swnrecord); + dwgfx.Print( 240, 124, "Best Time", 196, 196, 255 - help.glow, true); + dwgfx.bigrprint( 300, 94, tempstring, 196, 196, 255 - help.glow, true, 2); + + switch(game.swnbestrank) + { + case 0: + dwgfx.Print( -1, 40, "Next Trophy at 5 seconds", 196, 196, 255 - help.glow, true); + break; + case 1: + dwgfx.Print( -1, 40, "Next Trophy at 10 seconds", 196, 196, 255 - help.glow, true); + break; + case 2: + dwgfx.Print( -1, 40, "Next Trophy at 15 seconds", 196, 196, 255 - help.glow, true); + break; + case 3: + dwgfx.Print( -1, 40, "Next Trophy at 20 seconds", 196, 196, 255 - help.glow, true); + break; + case 4: + dwgfx.Print( -1, 40, "Next Trophy at 30 seconds", 196, 196, 255 - help.glow, true); + break; + case 5: + dwgfx.Print( -1, 40, "Next Trophy at 1 minute", 196, 196, 255 - help.glow, true); + break; + case 6: + dwgfx.Print( -1, 40, "All Trophies collected!", 196, 196, 255 - help.glow, true); + break; + } + } + else + { + dwgfx.Print(0, 40, "SUPER GRAVITRON HIGHSCORE", 196, 196, 255 - help.glow, true); + + tempstring = help.timestring(game.swnrecord); + dwgfx.Print( 240, 90, "Best Time", 196, 196, 255 - help.glow, true); + dwgfx.bigrprint( 300, 104, tempstring, 196, 196, 255 - help.glow, true, 2); + + switch(game.swnbestrank) + { + case 0: + dwgfx.Print( -1, 174, "Next Trophy at 5 seconds", 196, 196, 255 - help.glow, true); + break; + case 1: + dwgfx.Print( -1, 174, "Next Trophy at 10 seconds", 196, 196, 255 - help.glow, true); + break; + case 2: + dwgfx.Print( -1, 174, "Next Trophy at 15 seconds", 196, 196, 255 - help.glow, true); + break; + case 3: + dwgfx.Print( -1, 174, "Next Trophy at 20 seconds", 196, 196, 255 - help.glow, true); + break; + case 4: + dwgfx.Print( -1, 174, "Next Trophy at 30 seconds", 196, 196, 255 - help.glow, true); + break; + case 5: + dwgfx.Print( -1, 174, "Next Trophy at 1 minute", 196, 196, 255 - help.glow, true); + break; + case 6: + dwgfx.Print( -1, 174, "All Trophies collected!", 196, 196, 255 - help.glow, true); + break; + } + } + } + else if (obj.flags[67] == 1 && !map.custommode) + { + dwgfx.Print(30, 220, "MAP", 64,64,64); + dwgfx.Print(103-8, 220, "[SHIP]", 196, 196, 255 - help.glow); + dwgfx.Print(185-4, 220, "STATS", 64,64,64); + dwgfx.Print(258, 220, "SAVE", 64, 64, 64); + + dwgfx.Print(0, 105, "Press ACTION to warp to the ship.", 196, 196, 255 - help.glow, true); + } + else if(map.custommode){ + dwgfx.Print(30, 220, "MAP", 64,64,64); + dwgfx.Print(103-8, 220, "[CREW]", 196, 196, 255 - help.glow); + dwgfx.Print(185-4, 220, "STATS", 64,64,64); + dwgfx.Print(258, 220, "SAVE", 64, 64, 64); + + if (dwgfx.flipmode) + { + dwgfx.bigprint( -1, 220-45, ed.ListOfMetaData[game.playcustomlevel].title, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 220-70, "by " + ed.ListOfMetaData[game.playcustomlevel].creator, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 220-80, ed.ListOfMetaData[game.playcustomlevel].website, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 220-100, ed.ListOfMetaData[game.playcustomlevel].Desc1, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 220-110, ed.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 220-120, ed.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true); + + if(map.customcrewmates-game.crewmates==1){ + dwgfx.Print(1,220-165, help.number(int(map.customcrewmates-game.crewmates))+ " crewmate remains", 196, 196, 255 - help.glow, true); + }else if(map.customcrewmates-game.crewmates>0){ + dwgfx.Print(1,220-165, help.number(int(map.customcrewmates-game.crewmates))+ " crewmates remain", 196, 196, 255 - help.glow, true); + } + } + else + { + dwgfx.bigprint( -1, 45, ed.ListOfMetaData[game.playcustomlevel].title, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 70, "by " + ed.ListOfMetaData[game.playcustomlevel].creator, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 80, ed.ListOfMetaData[game.playcustomlevel].website, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 100, ed.ListOfMetaData[game.playcustomlevel].Desc1, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 110, ed.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true); + dwgfx.Print( -1, 120, ed.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true); + + if(map.customcrewmates-game.crewmates==1){ + dwgfx.Print(1,165, help.number(int(map.customcrewmates-game.crewmates))+ " crewmate remains", 196, 196, 255 - help.glow, true); + }else if(map.customcrewmates-game.crewmates>0){ + dwgfx.Print(1,165, help.number(int(map.customcrewmates-game.crewmates))+ " crewmates remain", 196, 196, 255 - help.glow, true); + } + } + } + else + { + dwgfx.Print(30, 220, "MAP", 64,64,64); + dwgfx.Print(103-8, 220, "[CREW]", 196, 196, 255 - help.glow); + dwgfx.Print(185-4, 220, "STATS", 64,64,64); + dwgfx.Print(258, 220, "SAVE", 64, 64, 64); + + if (dwgfx.flipmode) + { + for (int i = 0; i < 3; i++) + { + dwgfx.drawcrewman(16, 32 + (i * 64), 2-i, game.crewstats[2-i], help); + if (game.crewstats[(2-i)]) + { + dwgfx.printcrewname(44, 32 + (i * 64)+4+10, 2-i); + dwgfx.printcrewnamestatus(44, 32 + (i * 64)+4, 2-i); + } + else + { + dwgfx.printcrewnamedark(44, 32 + (i * 64)+4+10, 2-i); + dwgfx.Print(44, 32 + (i * 64) + 4, "Missing...", 64,64,64); + } + + dwgfx.drawcrewman(16+160, 32 + (i * 64), (2-i)+3, game.crewstats[(2-i)+3], help); + if (game.crewstats[(2-i)+3]) + { + dwgfx.printcrewname(44+160, 32 + (i * 64)+4+10, (2-i)+3); + dwgfx.printcrewnamestatus(44+160, 32 + (i * 64)+4, (2-i)+3); + } + else + { + dwgfx.printcrewnamedark(44+160, 32 + (i * 64)+4+10, (2-i)+3); + dwgfx.Print(44+160, 32 + (i * 64) + 4, "Missing...", 64,64,64); + } + } + } + else + { + for (int i = 0; i < 3; i++) + { + dwgfx.drawcrewman(16, 32 + (i * 64), i, game.crewstats[i], help); + if (game.crewstats[i]) + { + dwgfx.printcrewname(44, 32 + (i * 64)+4, i); + dwgfx.printcrewnamestatus(44, 32 + (i * 64)+4+10, i); + } + else + { + dwgfx.printcrewnamedark(44, 32 + (i * 64)+4, i); + dwgfx.Print(44, 32 + (i * 64) + 4 + 10, "Missing...", 64,64,64); + } + + dwgfx.drawcrewman(16+160, 32 + (i * 64), i+3, game.crewstats[i+3], help); + if (game.crewstats[i+3]) + { + dwgfx.printcrewname(44+160, 32 + (i * 64)+4, i+3); + dwgfx.printcrewnamestatus(44+160, 32 + (i * 64)+4+10, i+3); + } + else + { + dwgfx.printcrewnamedark(44+160, 32 + (i * 64)+4, i+3); + dwgfx.Print(44+160, 32 + (i * 64) + 4 + 10, "Missing...", 64,64,64); + } + } + } + } + break; + case 2: + dwgfx.Print(30, 220, "MAP", 64,64,64); + if (game.insecretlab) + { + dwgfx.Print(103, 220, "GRAV", 64, 64, 64); + } + else if (obj.flags[67] == 1 && !map.custommode) + { + dwgfx.Print(103, 220, "SHIP", 64,64,64); + } + else + { + dwgfx.Print(103, 220, "CREW", 64,64,64); + } + dwgfx.Print(185-12, 220, "[STATS]", 196, 196, 255 - help.glow); + dwgfx.Print(258, 220, "SAVE", 64, 64, 64); + + if(map.custommode){ + if (dwgfx.flipmode) + { + dwgfx.Print(0, 164, "[Trinkets found]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 152, help.number(game.trinkets) + " out of " + help.number(map.customtrinkets), 96,96,96, true); + + dwgfx.Print(0, 114, "[Number of Deaths]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 102,help.String(game.deathcounts), 96,96,96, true); + + dwgfx.Print(0, 64, "[Time Taken]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 52, game.timestring(help), 96, 96, 96, true); + } + else + { + dwgfx.Print(0, 52, "[Trinkets found]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 64, help.number(game.trinkets) + " out of "+help.number(map.customtrinkets), 96,96,96, true); + + dwgfx.Print(0, 102, "[Number of Deaths]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 114,help.String(game.deathcounts), 96,96,96, true); + + dwgfx.Print(0, 152, "[Time Taken]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 164, game.timestring(help), 96, 96, 96, true); + } + }else{ + if (dwgfx.flipmode) + { + dwgfx.Print(0, 164, "[Trinkets found]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 152, help.number(game.trinkets) + " out of Twenty", 96,96,96, true); + + dwgfx.Print(0, 114, "[Number of Deaths]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 102,help.String(game.deathcounts), 96,96,96, true); + + dwgfx.Print(0, 64, "[Time Taken]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 52, game.timestring(help), 96, 96, 96, true); + } + else + { + dwgfx.Print(0, 52, "[Trinkets found]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 64, help.number(game.trinkets) + " out of Twenty", 96,96,96, true); + + dwgfx.Print(0, 102, "[Number of Deaths]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 114,help.String(game.deathcounts), 96,96,96, true); + + dwgfx.Print(0, 152, "[Time Taken]", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 164, game.timestring(help), 96, 96, 96, true); + } + } + break; + case 3: + dwgfx.Print(30, 220, "MAP", 64,64,64); + if (game.insecretlab) + { + dwgfx.Print(103, 220, "GRAV", 64, 64, 64); + } + else if (obj.flags[67] == 1 && !map.custommode) + { + dwgfx.Print(103, 220, "SHIP", 64,64,64); + } + else + { + dwgfx.Print(103, 220, "CREW", 64,64,64); + } + dwgfx.Print(185-4, 220, "STATS", 64,64,64); + dwgfx.Print(258 - 8, 220, "[SAVE]", 196, 196, 255 - help.glow); + + if (game.inintermission) + { + dwgfx.Print(0, 115, "Cannot Save in Level Replay", 146, 146, 180, true); + } + else if (game.nodeathmode) + { + dwgfx.Print(0, 115, "Cannot Save in No Death Mode", 146, 146, 180, true); + } + else if (game.intimetrial) + { + dwgfx.Print(0, 115, "Cannot Save in Time Trial", 146, 146, 180, true); + } + else if (game.insecretlab) + { + dwgfx.Print(0, 115, "Cannot Save in Secret Lab", 146, 146, 180, true); + } + else if (map.custommode) + { + if (game.gamesaved) + { + dwgfx.Print(0, 36, "Game saved ok!", 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2), true); + + dwgfx.drawpixeltextbox(25, 65, 270, 90, 34,12, 65, 185, 207,0,4); + + if (dwgfx.flipmode) + { + dwgfx.Print(0, 122, game.customleveltitle, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + dwgfx.Print(160 - 84, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.Print(160 + 40, 78, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 74, 50, 18, help); + dwgfx.drawspritesetcol(175, 74, 22, 18, help); + } + else + { + dwgfx.Print(0, 90, game.customleveltitle, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + dwgfx.Print(160 - 84, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.Print(160 + 40, 132, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 126, 50, 18, help); + dwgfx.drawspritesetcol(175, 126, 22, 18, help); + } + } + else + { + dwgfx.Print(0, 80, "[Press ACTION to save your game]", 255 - (help.glow * 2), 255 - (help.glow * 2), 255 - help.glow, true); + } + } + else + { + if (dwgfx.flipmode) + { + dwgfx.Print(0, 186, "(Note: The game is autosaved", 146, 146, 180, true); + dwgfx.Print(0, 174, "at every teleporter.)", 146, 146, 180, true); + } + else + { + dwgfx.Print(0, 174, "(Note: The game is autosaved", 146, 146, 180, true); + dwgfx.Print(0, 186, "at every teleporter.)", 146, 146, 180, true); + } + + if (game.gamesaved) + { + dwgfx.Print(0, 36, "Game saved ok!", 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2), true); + + dwgfx.drawpixeltextbox(25, 65, 270, 90, 34,12, 65, 185, 207,0,4); + + if (dwgfx.flipmode) + { + dwgfx.Print(0, 132, game.savearea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + for (int i = 0; i < 6; i++) + { + dwgfx.drawcrewman(169-(3*42)+(i*42), 98, i, game.crewstats[i], help, true); + } + dwgfx.Print(160 - 84, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.Print(160 + 40, 78, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 74, 50, 18, help); + dwgfx.drawspritesetcol(175, 74, 22, 18, help); + } + else + { + dwgfx.Print(0, 80, game.savearea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + for (int i = 0; i < 6; i++) + { + dwgfx.drawcrewman(169-(3*42)+(i*42), 95, i, game.crewstats[i], help, true); + } + dwgfx.Print(160 - 84, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.Print(160 + 40, 132, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 126, 50, 18, help); + dwgfx.drawspritesetcol(175, 126, 22, 18, help); + } + } + else + { + dwgfx.Print(0, 80, "[Press ACTION to save your game]", 255 - (help.glow * 2), 255 - (help.glow * 2), 255 - help.glow, true); + + if (game.quicksummary != "") + { + if (dwgfx.flipmode) + { + dwgfx.Print(0, 110, "Last Save:", 164 - (help.glow / 4), 164 - (help.glow / 4), 164, true); + dwgfx.Print(0, 100, game.quicksummary, 164 - (help.glow / 4), 164 - (help.glow / 4), 164, true); + } + else + { + dwgfx.Print(0, 100, "Last Save:", 164 - (help.glow / 4), 164 - (help.glow / 4), 164, true); + dwgfx.Print(0, 110, game.quicksummary, 164 - (help.glow / 4), 164 - (help.glow / 4), 164, true); + } + } + } + } + break; + case 10: + dwgfx.Print(128, 220, "[ QUIT ]", 196, 196, 255 - help.glow); + + if (dwgfx.flipmode) + { + if (game.intimetrial || game.insecretlab || game.nodeathmode || game.menukludge) + { + dwgfx.Print(0, 135, "Return to main menu?", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(0, 142, "Do you want to quit? You will", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 130, "lose any unsaved progress.", 196, 196, 255 - help.glow, true); + } + + dwgfx.Print(80-16, 88, "[ NO, KEEP PLAYING ]", 196, 196, 255 - help.glow); + dwgfx.Print(80 + 32, 76, "yes, quit to menu", 96, 96, 96); + } + else + { + + if (game.intimetrial || game.insecretlab || game.nodeathmode || game.menukludge) + { + dwgfx.Print(0, 80, "Return to main menu?", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(0, 76, "Do you want to quit? You will", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 88, "lose any unsaved progress.", 196, 196, 255 - help.glow, true); + } + + dwgfx.Print(80-16, 130, "[ NO, KEEP PLAYING ]", 196, 196, 255 - help.glow); + dwgfx.Print(80 + 32, 142, "yes, quit to menu", 96, 96, 96); + + } + break; + case 11: + dwgfx.Print(128, 220, "[ QUIT ]", 196, 196, 255 - help.glow); + + if (dwgfx.flipmode) + { + if (game.intimetrial || game.insecretlab || game.nodeathmode || game.menukludge) + { + dwgfx.Print(0, 135, "Return to main menu?", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(0, 142, "Do you want to quit? You will", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 130, "lose any unsaved progress.", 196, 196, 255 - help.glow, true); + } + + dwgfx.Print(80, 88, "no, keep playing", 96,96,96); + dwgfx.Print(80+32-16, 76, "[ YES, QUIT TO MENU ]", 196, 196, 255 - help.glow); + } + else + { + if (game.intimetrial || game.insecretlab || game.nodeathmode || game.menukludge) + { + dwgfx.Print(0, 80, "Return to main menu?", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(0, 76, "Do you want to quit? You will", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 88, "lose any unsaved progress.", 196, 196, 255 - help.glow, true); + } + + dwgfx.Print(80, 130, "no, keep playing", 96,96,96); + dwgfx.Print(80+32-16, 142, "[ YES, QUIT TO MENU ]", 196, 196, 255 - help.glow); + } + break; + case 20: + dwgfx.Print(128, 220, "[ GRAVITRON ]", 196, 196, 255 - help.glow, true); + + if (dwgfx.flipmode) + { + dwgfx.Print(0, 76, "the secret laboratory?", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 88, "Do you want to return to", 196, 196, 255 - help.glow, true); + dwgfx.Print(80-16, 142, "[ NO, KEEP PLAYING ]", 196, 196, 255 - help.glow); + dwgfx.Print(80 + 32, 130, "yes, return", 96, 96, 96); + } + else + { + dwgfx.Print(0, 76, "Do you want to return to", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 88, "the secret laboratory?", 196, 196, 255 - help.glow, true); + dwgfx.Print(80-16, 130, "[ NO, KEEP PLAYING ]", 196, 196, 255 - help.glow); + dwgfx.Print(80 + 32, 142, "yes, return", 96, 96, 96); + } + + break; + case 21: + dwgfx.Print(128, 220, "[ GRAVITRON ]", 196, 196, 255 - help.glow, true); + + if (dwgfx.flipmode) + { + dwgfx.Print(0, 76, "the secret laboratory?", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 88, "Do you want to return to", 196, 196, 255 - help.glow, true); + dwgfx.Print(80, 142, "no, keep playing", 96, 96, 96); + dwgfx.Print(80 + 32-16, 130, "[ YES, RETURN ]", 196, 196, 255 - help.glow); + } + else + { + dwgfx.Print(0, 76, "Do you want to return to", 196, 196, 255 - help.glow, true); + dwgfx.Print(0, 88, "the secret laboratory?", 196, 196, 255 - help.glow, true); + dwgfx.Print(80, 130, "no, keep playing", 96, 96, 96); + dwgfx.Print(80 + 32-16, 142, "[ YES, RETURN ]", 196, 196, 255 - help.glow); + } + + } + + + + + dwgfx.drawfade(); + + if (game.test) + { + dwgfx.Print(5, 5, game.teststring, 196, 196, 255, false); + } + + if (game.flashlight > 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + if (dwgfx.resumegamemode) + { + dwgfx.menuoffset += 25; + if (map.extrarow) + { + if (dwgfx.menuoffset >= 230) + { + dwgfx.menuoffset = 230; + //go back to gamemode! + game.mapheld = true; + game.gamestate = GAMEMODE; + } + } + else + { + if (dwgfx.menuoffset >= 240) + { + dwgfx.menuoffset = 240; + //go back to gamemode! + game.mapheld = true; + game.gamestate = GAMEMODE; + } + } + dwgfx.menuoffrender(); + } + else if (dwgfx.menuoffset > 0) + { + dwgfx.menuoffset -= 25; + if (dwgfx.menuoffset < 0) dwgfx.menuoffset = 0; + dwgfx.menuoffrender(); + } + else + { + if (game.screenshake > 0 && !game.noflashingmode) + { + game.screenshake--; + dwgfx.screenshake(); + } + else + { + dwgfx.render(); + } + } + + //dwgfx.backbuffer.unlock(); +} + +void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help) +{ + + FillRect(dwgfx.backBuffer, 0x000000); + + if (!game.colourblindmode) + { + dwgfx.drawtowerbackground(map); + dwgfx.drawtowermap(map); + } + else + { + dwgfx.drawtowermap_nobackground(map); + } + + if(!game.completestop) + { + for (int i = 0; i < obj.nentity; i++) + { + //Is this entity on the ground? (needed for jumping) + if (obj.entitycollidefloor(map, i)) + { + obj.entities[i].onground = 2; + } + else + { + obj.entities[i].onground--; + } + + if (obj.entitycollideroof(map, i)) + { + obj.entities[i].onroof = 2; + } + else + { + obj.entities[i].onroof--; + } + + //Animate the entities + obj.animateentities(i, game, help); + } + } + + dwgfx.drawtowerentities(map, obj, help); + + dwgfx.drawtowerspikes(map); + + + /*for(int i=0; i 0) + { + if (game.timetrialcountdown < 30) + { + game.resetgameclock(); + if (int(game.timetrialcountdown / 4) % 2 == 0) dwgfx.bigprint( -1, 100, "Go!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + else if (game.timetrialcountdown < 60) + { + dwgfx.bigprint( -1, 100, "1", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + else if (game.timetrialcountdown < 90) + { + dwgfx.bigprint( -1, 100, "2", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + else if (game.timetrialcountdown < 120) + { + dwgfx.bigprint( -1, 100, "3", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + } + else + { + //Draw OSD stuff + dwgfx.bprint(6, 18, "TIME :", 255,255,255); + dwgfx.bprint(6, 30, "DEATH:", 255, 255, 255); + dwgfx.bprint(6, 42, "SHINY:", 255,255,255); + + if(game.timetrialparlost) + { + dwgfx.bprint(56, 18, game.timestring(help), 196, 80, 80); + } + else + { + dwgfx.bprint(56, 18, game.timestring(help), 196, 196, 196); + } + if(game.deathcounts>0) + { + dwgfx.bprint(56, 30,help.String(game.deathcounts), 196, 80, 80); + } + else + { + dwgfx.bprint(56, 30,help.String(game.deathcounts), 196, 196, 196); + } + if(game.trinkets 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + dwgfx.render(); +} + +void teleporterrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help) +{ + //dwgfx.backbuffer.lock(); + int tempx; + int tempy; + //draw screen alliteration + //Roomname: + temp = map.area(game.roomx, game.roomy); + if (temp < 2 && !map.custommode && dwgfx.fademode==0) + { + if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) + { + dwgfx.Print(5, 2, "The Ship", 196, 196, 255 - help.glow, true); + } + else + { + dwgfx.Print(5, 2, "Dimension VVVVVV", 196, 196, 255 - help.glow, true); + } + } + else + { + dwgfx.Print(5, 2, map.roomname, 196, 196, 255 - help.glow, true); + } + + //Background color + FillRect(dwgfx.backBuffer, 0, 12, 320, 240, 10, 24, 26); + + //draw the map image + dwgfx.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + dwgfx.drawimage(1, 40, 21, false); + //black out areas we can't see yet + for (int j = 0; j < 20; j++) + { + for (int i = 0; i < 20; i++) + { + if(map.explored[i+(j*20)]==0) + { + //dwgfx.drawfillrect(10 + (i * 12), 21 + (j * 9), 12, 9, 16, 16, 16); + dwgfx.drawimage(2, 40 + (i * 12), 21 + (j * 9), false); + } + } + } + + //draw the coordinates //current + if (game.roomx == 109) + { + //tower!instead of room y, scale map.ypos + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + 2, 12 - 4, 180 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); + } + else + { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + ((game.roomy - 100) * 9) + 2, 12 - 4, 9 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); + } + + if (game.useteleporter) + { + //Draw the chosen destination coordinate! + //TODO + //draw the coordinates //destination + int tempx = map.teleporters[game.teleport_to_teleporter].x; + int tempy = map.teleporters[game.teleport_to_teleporter].y; + dwgfx.drawrect(40 + (tempx * 12) + 1, 21 + (tempy * 9) + 1, 12 - 2, 9 - 2, 245 - (help.glow * 2), 16, 16); + dwgfx.drawrect(40 + (tempx * 12) + 3, 21 + (tempy * 9) + 3, 12 - 6, 9 - 6, 245 - (help.glow * 2), 16, 16); + } + + //draw legend details + for (int i = 0; i < map.numteleporters; i++) + { + if (map.showteleporters && map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)] > 0) + { + temp = 1126 + map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)]; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), temp); + } + else if(map.showtargets && map.explored[map.teleporters[i].x+(20*map.teleporters[i].y)]==0) + { + temp = 1126 + map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)]; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), temp); + } + //dwgfx.drawtile(40+3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), 1086); //for shiny trinkets, do later + } + + if (map.showtrinkets) + { + for (int i = 0; i < map.numshinytrinkets; i++) + { + if (obj.collect[i] == 0) + { + temp = 1086; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.shinytrinkets[i].x * 12), 22 + (map.shinytrinkets[i].y * 9), temp); + } + } + } + + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + if (game.useteleporter && ((help.slowsine%16)>8)) + { + //colour in the legend + temp = 1128; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (tempx * 12), 22 + (tempy * 9), temp); + } + + dwgfx.cutscenebars(); + + + if (game.useteleporter) + { + //Instructions! + dwgfx.Print(5, 210, "Press Left/Right to choose a Teleporter", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + dwgfx.Print(5, 225, "Press ENTER to Teleport", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + } + + dwgfx.drawgui(help); + + if (dwgfx.flipmode) + { + if (game.advancetext) dwgfx.bprint(5, 228, "- Press ACTION to advance text -", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + } + else + { + if (game.advancetext) dwgfx.bprint(5, 5, "- Press ACTION to advance text -", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + } + + + if (game.test) + { + dwgfx.Print(5, 5, game.teststring, 196, 196, 255, false); + } + + if (game.flashlight > 0 && !game.noflashingmode) + { + game.flashlight--; + dwgfx.flashlight(); + } + + if (dwgfx.resumegamemode) + { + dwgfx.menuoffset += 25; + if (map.extrarow) + { + if (dwgfx.menuoffset >= 230) + { + dwgfx.menuoffset = 230; + //go back to gamemode! + game.mapheld = true; + game.gamestate = GAMEMODE; + } + } + else + { + if (dwgfx.menuoffset >= 240) + { + dwgfx.menuoffset = 240; + //go back to gamemode! + game.mapheld = true; + game.gamestate = GAMEMODE; + } + } + dwgfx.menuoffrender(); + } + else if (dwgfx.menuoffset > 0) + { + dwgfx.menuoffset -= 25; + if (dwgfx.menuoffset < 0) dwgfx.menuoffset = 0; + dwgfx.menuoffrender(); + } + else + { + if (game.screenshake > 0 && !game.noflashingmode) + { + game.screenshake--; + dwgfx.screenshake(); + } + else + { + dwgfx.render(); + } + } + + //dwgfx.backbuffer.unlock(); +} diff --git a/desktop_version/src/titlerender.h b/desktop_version/src/titlerender.h new file mode 100644 index 00000000..0cf8f481 --- /dev/null +++ b/desktop_version/src/titlerender.h @@ -0,0 +1,35 @@ +#ifndef TITLERENDERER_H +#define TITLERENDERER_H + +#include "Graphics.h" +#include "UtilityClass.h" +#include "Maths.h" +#include "Entity.h" +#include "Map.h" +#include "Script.h" + +class Stage +{ +public: + int frameRate; +}; + +extern Stage stage; +extern Stage swfStage; +extern int temp; + +void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, UtilityClass& help, musicclass& music); + +void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help); + +void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, UtilityClass& help); + +void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help); + +void teleporterrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help); + +void gamecompleterender(Graphics& dwgfx, Game& game, entityclass& obj, UtilityClass& help, mapclass& map); + +void gamecompleterender2(Graphics& dwgfx, Game& game, entityclass& obj, UtilityClass& help); + +#endif /* TITLERENDERER_H */ diff --git a/desktop_version/tinyxml/readme.txt b/desktop_version/tinyxml/readme.txt new file mode 100644 index 00000000..89d9e8d3 --- /dev/null +++ b/desktop_version/tinyxml/readme.txt @@ -0,0 +1,530 @@ +/** @mainpage + +

TinyXML

+ +TinyXML is a simple, small, C++ XML parser that can be easily +integrated into other programs. + +

What it does.

+ +In brief, TinyXML parses an XML document, and builds from that a +Document Object Model (DOM) that can be read, modified, and saved. + +XML stands for "eXtensible Markup Language." It allows you to create +your own document markups. Where HTML does a very good job of marking +documents for browsers, XML allows you to define any kind of document +markup, for example a document that describes a "to do" list for an +organizer application. XML is a very structured and convenient format. +All those random file formats created to store application data can +all be replaced with XML. One parser for everything. + +The best place for the complete, correct, and quite frankly hard to +read spec is at +http://www.w3.org/TR/2004/REC-xml-20040204/. An intro to XML +(that I really like) can be found at +http://skew.org/xml/tutorial. + +There are different ways to access and interact with XML data. +TinyXML uses a Document Object Model (DOM), meaning the XML data is parsed +into a C++ objects that can be browsed and manipulated, and then +written to disk or another output stream. You can also construct an XML document +from scratch with C++ objects and write this to disk or another output +stream. + +TinyXML is designed to be easy and fast to learn. It is two headers +and four cpp files. Simply add these to your project and off you go. +There is an example file - xmltest.cpp - to get you started. + +TinyXML is released under the ZLib license, +so you can use it in open source or commercial code. The details +of the license are at the top of every source file. + +TinyXML attempts to be a flexible parser, but with truly correct and +compliant XML output. TinyXML should compile on any reasonably C++ +compliant system. It does not rely on exceptions or RTTI. It can be +compiled with or without STL support. TinyXML fully supports +the UTF-8 encoding, and the first 64k character entities. + + +

What it doesn't do.

+ +TinyXML doesn't parse or use DTDs (Document Type Definitions) or XSLs +(eXtensible Stylesheet Language.) There are other parsers out there +(check out www.sourceforge.org, search for XML) that are much more fully +featured. But they are also much bigger, take longer to set up in +your project, have a higher learning curve, and often have a more +restrictive license. If you are working with browsers or have more +complete XML needs, TinyXML is not the parser for you. + +The following DTD syntax will not parse at this time in TinyXML: + +@verbatim + + ]> +@endverbatim + +because TinyXML sees this as a !DOCTYPE node with an illegally +embedded !ELEMENT node. This may be addressed in the future. + +

Tutorials.

+ +For the impatient, here is a tutorial to get you going. A great way to get started, +but it is worth your time to read this (very short) manual completely. + +- @subpage tutorial0 + +

Code Status.

+ +TinyXML is mature, tested code. It is very stable. If you find +bugs, please file a bug report on the sourceforge web site +(www.sourceforge.net/projects/tinyxml). We'll get them straightened +out as soon as possible. + +There are some areas of improvement; please check sourceforge if you are +interested in working on TinyXML. + +

Related Projects

+ +TinyXML projects you may find useful! (Descriptions provided by the projects.) + +
    +
  • TinyXPath (http://tinyxpath.sourceforge.net). TinyXPath is a small footprint + XPath syntax decoder, written in C++.
  • +
  • TinyXML++ (http://code.google.com/p/ticpp/). TinyXML++ is a completely new + interface to TinyXML that uses MANY of the C++ strengths. Templates, + exceptions, and much better error handling.
  • +
+ +

Features

+ +

Using STL

+ +TinyXML can be compiled to use or not use STL. When using STL, TinyXML +uses the std::string class, and fully supports std::istream, std::ostream, +operator<<, and operator>>. Many API methods have both 'const char*' and +'const std::string&' forms. + +When STL support is compiled out, no STL files are included whatsoever. All +the string classes are implemented by TinyXML itself. API methods +all use the 'const char*' form for input. + +Use the compile time #define: + + TIXML_USE_STL + +to compile one version or the other. This can be passed by the compiler, +or set as the first line of "tinyxml.h". + +Note: If compiling the test code in Linux, setting the environment +variable TINYXML_USE_STL=YES/NO will control STL compilation. In the +Windows project file, STL and non STL targets are provided. In your project, +It's probably easiest to add the line "#define TIXML_USE_STL" as the first +line of tinyxml.h. + +

UTF-8

+ +TinyXML supports UTF-8 allowing to manipulate XML files in any language. TinyXML +also supports "legacy mode" - the encoding used before UTF-8 support and +probably best described as "extended ascii". + +Normally, TinyXML will try to detect the correct encoding and use it. However, +by setting the value of TIXML_DEFAULT_ENCODING in the header file, TinyXML +can be forced to always use one encoding. + +TinyXML will assume Legacy Mode until one of the following occurs: +
    +
  1. If the non-standard but common "UTF-8 lead bytes" (0xef 0xbb 0xbf) + begin the file or data stream, TinyXML will read it as UTF-8.
  2. +
  3. If the declaration tag is read, and it has an encoding="UTF-8", then + TinyXML will read it as UTF-8.
  4. +
  5. If the declaration tag is read, and it has no encoding specified, then TinyXML will + read it as UTF-8.
  6. +
  7. If the declaration tag is read, and it has an encoding="something else", then TinyXML + will read it as Legacy Mode. In legacy mode, TinyXML will work as it did before. It's + not clear what that mode does exactly, but old content should keep working.
  8. +
  9. Until one of the above criteria is met, TinyXML runs in Legacy Mode.
  10. +
+ +What happens if the encoding is incorrectly set or detected? TinyXML will try +to read and pass through text seen as improperly encoded. You may get some strange results or +mangled characters. You may want to force TinyXML to the correct mode. + +You may force TinyXML to Legacy Mode by using LoadFile( TIXML_ENCODING_LEGACY ) or +LoadFile( filename, TIXML_ENCODING_LEGACY ). You may force it to use legacy mode all +the time by setting TIXML_DEFAULT_ENCODING = TIXML_ENCODING_LEGACY. Likewise, you may +force it to TIXML_ENCODING_UTF8 with the same technique. + +For English users, using English XML, UTF-8 is the same as low-ASCII. You +don't need to be aware of UTF-8 or change your code in any way. You can think +of UTF-8 as a "superset" of ASCII. + +UTF-8 is not a double byte format - but it is a standard encoding of Unicode! +TinyXML does not use or directly support wchar, TCHAR, or Microsoft's _UNICODE at this time. +It is common to see the term "Unicode" improperly refer to UTF-16, a wide byte encoding +of unicode. This is a source of confusion. + +For "high-ascii" languages - everything not English, pretty much - TinyXML can +handle all languages, at the same time, as long as the XML is encoded +in UTF-8. That can be a little tricky, older programs and operating systems +tend to use the "default" or "traditional" code page. Many apps (and almost all +modern ones) can output UTF-8, but older or stubborn (or just broken) ones +still output text in the default code page. + +For example, Japanese systems traditionally use SHIFT-JIS encoding. +Text encoded as SHIFT-JIS can not be read by TinyXML. +A good text editor can import SHIFT-JIS and then save as UTF-8. + +The Skew.org link does a great +job covering the encoding issue. + +The test file "utf8test.xml" is an XML containing English, Spanish, Russian, +and Simplified Chinese. (Hopefully they are translated correctly). The file +"utf8test.gif" is a screen capture of the XML file, rendered in IE. Note that +if you don't have the correct fonts (Simplified Chinese or Russian) on your +system, you won't see output that matches the GIF file even if you can parse +it correctly. Also note that (at least on my Windows machine) console output +is in a Western code page, so that Print() or printf() cannot correctly display +the file. This is not a bug in TinyXML - just an OS issue. No data is lost or +destroyed by TinyXML. The console just doesn't render UTF-8. + + +

Entities

+TinyXML recognizes the pre-defined "character entities", meaning special +characters. Namely: + +@verbatim + & & + < < + > > + " " + ' ' +@endverbatim + +These are recognized when the XML document is read, and translated to there +UTF-8 equivalents. For instance, text with the XML of: + +@verbatim + Far & Away +@endverbatim + +will have the Value() of "Far & Away" when queried from the TiXmlText object, +and will be written back to the XML stream/file as an ampersand. Older versions +of TinyXML "preserved" character entities, but the newer versions will translate +them into characters. + +Additionally, any character can be specified by its Unicode code point: +The syntax " " or " " are both to the non-breaking space characher. + +

Printing

+TinyXML can print output in several different ways that all have strengths and limitations. + +- Print( FILE* ). Output to a std-C stream, which includes all C files as well as stdout. + - "Pretty prints", but you don't have control over printing options. + - The output is streamed directly to the FILE object, so there is no memory overhead + in the TinyXML code. + - used by Print() and SaveFile() + +- operator<<. Output to a c++ stream. + - Integrates with standart C++ iostreams. + - Outputs in "network printing" mode without line breaks. Good for network transmission + and moving XML between C++ objects, but hard for a human to read. + +- TiXmlPrinter. Output to a std::string or memory buffer. + - API is less concise + - Future printing options will be put here. + - Printing may change slightly in future versions as it is refined and expanded. + +

Streams

+With TIXML_USE_STL on TinyXML supports C++ streams (operator <<,>>) streams as well +as C (FILE*) streams. There are some differences that you may need to be aware of. + +C style output: + - based on FILE* + - the Print() and SaveFile() methods + + Generates formatted output, with plenty of white space, intended to be as + human-readable as possible. They are very fast, and tolerant of ill formed + XML documents. For example, an XML document that contains 2 root elements + and 2 declarations, will still print. + +C style input: + - based on FILE* + - the Parse() and LoadFile() methods + + A fast, tolerant read. Use whenever you don't need the C++ streams. + +C++ style output: + - based on std::ostream + - operator<< + + Generates condensed output, intended for network transmission rather than + readability. Depending on your system's implementation of the ostream class, + these may be somewhat slower. (Or may not.) Not tolerant of ill formed XML: + a document should contain the correct one root element. Additional root level + elements will not be streamed out. + +C++ style input: + - based on std::istream + - operator>> + + Reads XML from a stream, making it useful for network transmission. The tricky + part is knowing when the XML document is complete, since there will almost + certainly be other data in the stream. TinyXML will assume the XML data is + complete after it reads the root element. Put another way, documents that + are ill-constructed with more than one root element will not read correctly. + Also note that operator>> is somewhat slower than Parse, due to both + implementation of the STL and limitations of TinyXML. + +

White space

+The world simply does not agree on whether white space should be kept, or condensed. +For example, pretend the '_' is a space, and look at "Hello____world". HTML, and +at least some XML parsers, will interpret this as "Hello_world". They condense white +space. Some XML parsers do not, and will leave it as "Hello____world". (Remember +to keep pretending the _ is a space.) Others suggest that __Hello___world__ should become +Hello___world. + +It's an issue that hasn't been resolved to my satisfaction. TinyXML supports the +first 2 approaches. Call TiXmlBase::SetCondenseWhiteSpace( bool ) to set the desired behavior. +The default is to condense white space. + +If you change the default, you should call TiXmlBase::SetCondenseWhiteSpace( bool ) +before making any calls to Parse XML data, and I don't recommend changing it after +it has been set. + + +

Handles

+ +Where browsing an XML document in a robust way, it is important to check +for null returns from method calls. An error safe implementation can +generate a lot of code like: + +@verbatim +TiXmlElement* root = document.FirstChildElement( "Document" ); +if ( root ) +{ + TiXmlElement* element = root->FirstChildElement( "Element" ); + if ( element ) + { + TiXmlElement* child = element->FirstChildElement( "Child" ); + if ( child ) + { + TiXmlElement* child2 = child->NextSiblingElement( "Child" ); + if ( child2 ) + { + // Finally do something useful. +@endverbatim + +Handles have been introduced to clean this up. Using the TiXmlHandle class, +the previous code reduces to: + +@verbatim +TiXmlHandle docHandle( &document ); +TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); +if ( child2 ) +{ + // do something useful +@endverbatim + +Which is much easier to deal with. See TiXmlHandle for more information. + + +

Row and Column tracking

+Being able to track nodes and attributes back to their origin location +in source files can be very important for some applications. Additionally, +knowing where parsing errors occured in the original source can be very +time saving. + +TinyXML can tracks the row and column origin of all nodes and attributes +in a text file. The TiXmlBase::Row() and TiXmlBase::Column() methods return +the origin of the node in the source text. The correct tabs can be +configured in TiXmlDocument::SetTabSize(). + + +

Using and Installing

+ +To Compile and Run xmltest: + +A Linux Makefile and a Windows Visual C++ .dsw file is provided. +Simply compile and run. It will write the file demotest.xml to your +disk and generate output on the screen. It also tests walking the +DOM by printing out the number of nodes found using different +techniques. + +The Linux makefile is very generic and runs on many systems - it +is currently tested on mingw and +MacOSX. You do not need to run 'make depend'. The dependecies have been +hard coded. + +

Windows project file for VC6

+
    +
  • tinyxml: tinyxml library, non-STL
  • +
  • tinyxmlSTL: tinyxml library, STL
  • +
  • tinyXmlTest: test app, non-STL
  • +
  • tinyXmlTestSTL: test app, STL
  • +
+ +

Makefile

+At the top of the makefile you can set: + +PROFILE, DEBUG, and TINYXML_USE_STL. Details (such that they are) are in +the makefile. + +In the tinyxml directory, type "make clean" then "make". The executable +file 'xmltest' will be created. + + + +

To Use in an Application:

+ +Add tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, tinyxmlparser.cpp, tinystr.cpp, and tinystr.h to your +project or make file. That's it! It should compile on any reasonably +compliant C++ system. You do not need to enable exceptions or +RTTI for TinyXML. + + +

How TinyXML works.

+ +An example is probably the best way to go. Take: +@verbatim + + + + Go to the Toy store! + Do bills + +@endverbatim + +Its not much of a To Do list, but it will do. To read this file +(say "demo.xml") you would create a document, and parse it in: +@verbatim + TiXmlDocument doc( "demo.xml" ); + doc.LoadFile(); +@endverbatim + +And its ready to go. Now lets look at some lines and how they +relate to the DOM. + +@verbatim + +@endverbatim + + The first line is a declaration, and gets turned into the + TiXmlDeclaration class. It will be the first child of the + document node. + + This is the only directive/special tag parsed by TinyXML. + Generally directive tags are stored in TiXmlUnknown so the + commands wont be lost when it is saved back to disk. + +@verbatim + +@endverbatim + + A comment. Will become a TiXmlComment object. + +@verbatim + +@endverbatim + + The "ToDo" tag defines a TiXmlElement object. This one does not have + any attributes, but does contain 2 other elements. + +@verbatim + +@endverbatim + + Creates another TiXmlElement which is a child of the "ToDo" element. + This element has 1 attribute, with the name "priority" and the value + "1". + +@verbatim +Go to the +@endverbatim + + A TiXmlText. This is a leaf node and cannot contain other nodes. + It is a child of the "Item" TiXmlElement. + +@verbatim + +@endverbatim + + + Another TiXmlElement, this one a child of the "Item" element. + +Etc. + +Looking at the entire object tree, you end up with: +@verbatim +TiXmlDocument "demo.xml" + TiXmlDeclaration "version='1.0'" "standalone=no" + TiXmlComment " Our to do list data" + TiXmlElement "ToDo" + TiXmlElement "Item" Attribtutes: priority = 1 + TiXmlText "Go to the " + TiXmlElement "bold" + TiXmlText "Toy store!" + TiXmlElement "Item" Attributes: priority=2 + TiXmlText "Do bills" +@endverbatim + +

Documentation

+ +The documentation is build with Doxygen, using the 'dox' +configuration file. + +

License

+ +TinyXML is released under the zlib license: + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. + +

References

+ +The World Wide Web Consortium is the definitive standard body for +XML, and their web pages contain huge amounts of information. + +The definitive spec: +http://www.w3.org/TR/2004/REC-xml-20040204/ + +I also recommend "XML Pocket Reference" by Robert Eckstein and published by +OReilly...the book that got the whole thing started. + +

Contributors, Contacts, and a Brief History

+ +Thanks very much to everyone who sends suggestions, bugs, ideas, and +encouragement. It all helps, and makes this project fun. A special thanks +to the contributors on the web pages that keep it lively. + +So many people have sent in bugs and ideas, that rather than list here +we try to give credit due in the "changes.txt" file. + +TinyXML was originally written by Lee Thomason. (Often the "I" still +in the documentation.) Lee reviews changes and releases new versions, +with the help of Yves Berquin, Andrew Ellerton, and the tinyXml community. + +We appreciate your suggestions, and would love to know if you +use TinyXML. Hopefully you will enjoy it and find it useful. +Please post questions, comments, file bugs, or contact us at: + +www.sourceforge.net/projects/tinyxml + +Lee Thomason, Yves Berquin, Andrew Ellerton +*/ diff --git a/desktop_version/tinyxml/tinystr.cpp b/desktop_version/tinyxml/tinystr.cpp new file mode 100644 index 00000000..06657682 --- /dev/null +++ b/desktop_version/tinyxml/tinystr.cpp @@ -0,0 +1,111 @@ +/* +www.sourceforge.net/projects/tinyxml + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TIXML_USE_STL + +#include "tinystr.h" + +// Error value for find primitive +const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1); + + +// Null rep. +TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } }; + + +void TiXmlString::reserve (size_type cap) +{ + if (cap > capacity()) + { + TiXmlString tmp; + tmp.init(length(), cap); + memcpy(tmp.start(), data(), length()); + swap(tmp); + } +} + + +TiXmlString& TiXmlString::assign(const char* str, size_type len) +{ + size_type cap = capacity(); + if (len > cap || cap > 3*(len + 8)) + { + TiXmlString tmp; + tmp.init(len); + memcpy(tmp.start(), str, len); + swap(tmp); + } + else + { + memmove(start(), str, len); + set_size(len); + } + return *this; +} + + +TiXmlString& TiXmlString::append(const char* str, size_type len) +{ + size_type newsize = length() + len; + if (newsize > capacity()) + { + reserve (newsize + capacity()); + } + memmove(finish(), str, len); + set_size(newsize); + return *this; +} + + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b) +{ + TiXmlString tmp; + tmp.reserve(a.length() + b.length()); + tmp += a; + tmp += b; + return tmp; +} + +TiXmlString operator + (const TiXmlString & a, const char* b) +{ + TiXmlString tmp; + TiXmlString::size_type b_len = static_cast( strlen(b) ); + tmp.reserve(a.length() + b_len); + tmp += a; + tmp.append(b, b_len); + return tmp; +} + +TiXmlString operator + (const char* a, const TiXmlString & b) +{ + TiXmlString tmp; + TiXmlString::size_type a_len = static_cast( strlen(a) ); + tmp.reserve(a_len + b.length()); + tmp.append(a, a_len); + tmp += b; + return tmp; +} + + +#endif // TIXML_USE_STL diff --git a/desktop_version/tinyxml/tinystr.h b/desktop_version/tinyxml/tinystr.h new file mode 100644 index 00000000..89cca334 --- /dev/null +++ b/desktop_version/tinyxml/tinystr.h @@ -0,0 +1,305 @@ +/* +www.sourceforge.net/projects/tinyxml + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TIXML_USE_STL + +#ifndef TIXML_STRING_INCLUDED +#define TIXML_STRING_INCLUDED + +#include +#include + +/* The support for explicit isn't that universal, and it isn't really + required - it is used to check that the TiXmlString class isn't incorrectly + used. Be nice to old compilers and macro it here: +*/ +#if defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + #define TIXML_EXPLICIT explicit +#elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + #define TIXML_EXPLICIT explicit +#else + #define TIXML_EXPLICIT +#endif + + +/* + TiXmlString is an emulation of a subset of the std::string template. + Its purpose is to allow compiling TinyXML on compilers with no or poor STL support. + Only the member functions relevant to the TinyXML project have been implemented. + The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase + a string and there's no more room, we allocate a buffer twice as big as we need. +*/ +class TiXmlString +{ + public : + // The size type used + typedef size_t size_type; + + // Error value for find primitive + static const size_type npos; // = -1; + + + // TiXmlString empty constructor + TiXmlString () : rep_(&nullrep_) + { + } + + // TiXmlString copy constructor + TiXmlString ( const TiXmlString & copy) : rep_(0) + { + init(copy.length()); + memcpy(start(), copy.data(), length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0) + { + init( static_cast( strlen(copy) )); + memcpy(start(), copy, length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0) + { + init(len); + memcpy(start(), str, len); + } + + // TiXmlString destructor + ~TiXmlString () + { + quit(); + } + + TiXmlString& operator = (const char * copy) + { + return assign( copy, (size_type)strlen(copy)); + } + + TiXmlString& operator = (const TiXmlString & copy) + { + return assign(copy.start(), copy.length()); + } + + + // += operator. Maps to append + TiXmlString& operator += (const char * suffix) + { + return append(suffix, static_cast( strlen(suffix) )); + } + + // += operator. Maps to append + TiXmlString& operator += (char single) + { + return append(&single, 1); + } + + // += operator. Maps to append + TiXmlString& operator += (const TiXmlString & suffix) + { + return append(suffix.data(), suffix.length()); + } + + + // Convert a TiXmlString into a null-terminated char * + const char * c_str () const { return rep_->str; } + + // Convert a TiXmlString into a char * (need not be null terminated). + const char * data () const { return rep_->str; } + + // Return the length of a TiXmlString + size_type length () const { return rep_->size; } + + // Alias for length() + size_type size () const { return rep_->size; } + + // Checks if a TiXmlString is empty + bool empty () const { return rep_->size == 0; } + + // Return capacity of string + size_type capacity () const { return rep_->capacity; } + + + // single char extraction + const char& at (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // [] operator + char& operator [] (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // find a char in a string. Return TiXmlString::npos if not found + size_type find (char lookup) const + { + return find(lookup, 0); + } + + // find a char in a string from an offset. Return TiXmlString::npos if not found + size_type find (char tofind, size_type offset) const + { + if (offset >= length()) return npos; + + for (const char* p = c_str() + offset; *p != '\0'; ++p) + { + if (*p == tofind) return static_cast< size_type >( p - c_str() ); + } + return npos; + } + + void clear () + { + //Lee: + //The original was just too strange, though correct: + // TiXmlString().swap(*this); + //Instead use the quit & re-init: + quit(); + init(0,0); + } + + /* Function to reserve a big amount of data when we know we'll need it. Be aware that this + function DOES NOT clear the content of the TiXmlString if any exists. + */ + void reserve (size_type cap); + + TiXmlString& assign (const char* str, size_type len); + + TiXmlString& append (const char* str, size_type len); + + void swap (TiXmlString& other) + { + Rep* r = rep_; + rep_ = other.rep_; + other.rep_ = r; + } + + private: + + void init(size_type sz) { init(sz, sz); } + void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; } + char* start() const { return rep_->str; } + char* finish() const { return rep_->str + rep_->size; } + + struct Rep + { + size_type size, capacity; + char str[1]; + }; + + void init(size_type sz, size_type cap) + { + if (cap) + { + // Lee: the original form: + // rep_ = static_cast(operator new(sizeof(Rep) + cap)); + // doesn't work in some cases of new being overloaded. Switching + // to the normal allocation, although use an 'int' for systems + // that are overly picky about structure alignment. + const size_type bytesNeeded = sizeof(Rep) + cap; + const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); + rep_ = reinterpret_cast( new int[ intsNeeded ] ); + + rep_->str[ rep_->size = sz ] = '\0'; + rep_->capacity = cap; + } + else + { + rep_ = &nullrep_; + } + } + + void quit() + { + if (rep_ != &nullrep_) + { + // The rep_ is really an array of ints. (see the allocator, above). + // Cast it back before delete, so the compiler won't incorrectly call destructors. + delete [] ( reinterpret_cast( rep_ ) ); + } + } + + Rep * rep_; + static Rep nullrep_; + +} ; + + +inline bool operator == (const TiXmlString & a, const TiXmlString & b) +{ + return ( a.length() == b.length() ) // optimization on some platforms + && ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare +} +inline bool operator < (const TiXmlString & a, const TiXmlString & b) +{ + return strcmp(a.c_str(), b.c_str()) < 0; +} + +inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); } +inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; } +inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); } +inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); } + +inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; } +inline bool operator == (const char* a, const TiXmlString & b) { return b == a; } +inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); } +inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); } + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b); +TiXmlString operator + (const TiXmlString & a, const char* b); +TiXmlString operator + (const char* a, const TiXmlString & b); + + +/* + TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString. + Only the operators that we need for TinyXML have been developped. +*/ +class TiXmlOutStream : public TiXmlString +{ +public : + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const TiXmlString & in) + { + *this += in; + return *this; + } + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const char * in) + { + *this += in; + return *this; + } + +} ; + +#endif // TIXML_STRING_INCLUDED +#endif // TIXML_USE_STL diff --git a/desktop_version/tinyxml/tinyxml.cpp b/desktop_version/tinyxml/tinyxml.cpp new file mode 100644 index 00000000..9c161dfc --- /dev/null +++ b/desktop_version/tinyxml/tinyxml.cpp @@ -0,0 +1,1886 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include + +#ifdef TIXML_USE_STL +#include +#include +#endif + +#include "tinyxml.h" + +FILE* TiXmlFOpen( const char* filename, const char* mode ); + +bool TiXmlBase::condenseWhiteSpace = true; + +// Microsoft compiler security +FILE* TiXmlFOpen( const char* filename, const char* mode ) +{ + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + FILE* fp = 0; + errno_t err = fopen_s( &fp, filename, mode ); + if ( !err && fp ) + return fp; + return 0; + #else + return fopen( filename, mode ); + #endif +} + +void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString ) +{ + int i=0; + + while( i<(int)str.length() ) + { + unsigned char c = (unsigned char) str[i]; + + if ( c == '&' + && i < ( (int)str.length() - 2 ) + && str[i+1] == '#' + && str[i+2] == 'x' ) + { + // Hexadecimal character reference. + // Pass through unchanged. + // © -- copyright symbol, for example. + // + // The -1 is a bug fix from Rob Laveaux. It keeps + // an overflow from happening if there is no ';'. + // There are actually 2 ways to exit this loop - + // while fails (error case) and break (semicolon found). + // However, there is no mechanism (currently) for + // this function to return an error. + while ( i<(int)str.length()-1 ) + { + outString->append( str.c_str() + i, 1 ); + ++i; + if ( str[i] == ';' ) + break; + } + } + else if ( c == '&' ) + { + outString->append( entity[0].str, entity[0].strLength ); + ++i; + } + else if ( c == '<' ) + { + outString->append( entity[1].str, entity[1].strLength ); + ++i; + } + else if ( c == '>' ) + { + outString->append( entity[2].str, entity[2].strLength ); + ++i; + } + else if ( c == '\"' ) + { + outString->append( entity[3].str, entity[3].strLength ); + ++i; + } + else if ( c == '\'' ) + { + outString->append( entity[4].str, entity[4].strLength ); + ++i; + } + else if ( c < 32 ) + { + // Easy pass at non-alpha/numeric/symbol + // Below 32 is symbolic. + char buf[ 32 ]; + + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) ); + #else + sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) ); + #endif + + //*ME: warning C4267: convert 'size_t' to 'int' + //*ME: Int-Cast to make compiler happy ... + outString->append( buf, (int)strlen( buf ) ); + ++i; + } + else + { + //char realc = (char) c; + //outString->append( &realc, 1 ); + *outString += (char) c; // somewhat more efficient function call. + ++i; + } + } +} + + +TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase() +{ + parent = 0; + type = _type; + firstChild = 0; + lastChild = 0; + prev = 0; + next = 0; +} + + +TiXmlNode::~TiXmlNode() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } +} + + +void TiXmlNode::CopyTo( TiXmlNode* target ) const +{ + target->SetValue (value.c_str() ); + target->userData = userData; + target->location = location; +} + + +void TiXmlNode::Clear() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } + + firstChild = 0; + lastChild = 0; +} + + +TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node ) +{ + assert( node->parent == 0 || node->parent == this ); + assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() ); + + if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + delete node; + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + node->parent = this; + + node->prev = lastChild; + node->next = 0; + + if ( lastChild ) + lastChild->next = node; + else + firstChild = node; // it was an empty list. + + lastChild = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis ) +{ + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + + return LinkEndChild( node ); +} + + +TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ) +{ + if ( !beforeThis || beforeThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->next = beforeThis; + node->prev = beforeThis->prev; + if ( beforeThis->prev ) + { + beforeThis->prev->next = node; + } + else + { + assert( firstChild == beforeThis ); + firstChild = node; + } + beforeThis->prev = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ) +{ + if ( !afterThis || afterThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->prev = afterThis; + node->next = afterThis->next; + if ( afterThis->next ) + { + afterThis->next->prev = node; + } + else + { + assert( lastChild == afterThis ); + lastChild = node; + } + afterThis->next = node; + return node; +} + + +TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ) +{ + if ( !replaceThis ) + return 0; + + if ( replaceThis->parent != this ) + return 0; + + if ( withThis.ToDocument() ) { + // A document can never be a child. Thanks to Noam. + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = withThis.Clone(); + if ( !node ) + return 0; + + node->next = replaceThis->next; + node->prev = replaceThis->prev; + + if ( replaceThis->next ) + replaceThis->next->prev = node; + else + lastChild = node; + + if ( replaceThis->prev ) + replaceThis->prev->next = node; + else + firstChild = node; + + delete replaceThis; + node->parent = this; + return node; +} + + +bool TiXmlNode::RemoveChild( TiXmlNode* removeThis ) +{ + if ( !removeThis ) { + return false; + } + + if ( removeThis->parent != this ) + { + assert( 0 ); + return false; + } + + if ( removeThis->next ) + removeThis->next->prev = removeThis->prev; + else + lastChild = removeThis->prev; + + if ( removeThis->prev ) + removeThis->prev->next = removeThis->next; + else + firstChild = removeThis->next; + + delete removeThis; + return true; +} + +const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = firstChild; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = lastChild; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild(); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling(); + } +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild( val ); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling( val ); + } +} + + +const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = next; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = prev; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +void TiXmlElement::RemoveAttribute( const char * name ) +{ + #ifdef TIXML_USE_STL + TIXML_STRING str( name ); + TiXmlAttribute* node = attributeSet.Find( str ); + #else + TiXmlAttribute* node = attributeSet.Find( name ); + #endif + if ( node ) + { + attributeSet.Remove( node ); + delete node; + } +} + +const TiXmlElement* TiXmlNode::FirstChildElement() const +{ + const TiXmlNode* node; + + for ( node = FirstChild(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = FirstChild( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement() const +{ + const TiXmlNode* node; + + for ( node = NextSibling(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = NextSibling( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlDocument* TiXmlNode::GetDocument() const +{ + const TiXmlNode* node; + + for( node = this; node; node = node->parent ) + { + if ( node->ToDocument() ) + return node->ToDocument(); + } + return 0; +} + + +TiXmlElement::TiXmlElement (const char * _value) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} + + +#ifdef TIXML_USE_STL +TiXmlElement::TiXmlElement( const std::string& _value ) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} +#endif + + +TiXmlElement::TiXmlElement( const TiXmlElement& copy) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + copy.CopyTo( this ); +} + + +TiXmlElement& TiXmlElement::operator=( const TiXmlElement& base ) +{ + ClearThis(); + base.CopyTo( this ); + return *this; +} + + +TiXmlElement::~TiXmlElement() +{ + ClearThis(); +} + + +void TiXmlElement::ClearThis() +{ + Clear(); + while( attributeSet.First() ) + { + TiXmlAttribute* node = attributeSet.First(); + attributeSet.Remove( node ); + delete node; + } +} + + +const char* TiXmlElement::Attribute( const char* name ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( node ) + return node->Value(); + return 0; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( attrib ) + return &attrib->ValueStr(); + return 0; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} +#endif + + +int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} + + +int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* value ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + int ival = 0; + int result = node->QueryIntValue( &ival ); + *value = (unsigned)ival; + return result; +} + + +int TiXmlElement::QueryBoolAttribute( const char* name, bool* bval ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + int result = TIXML_WRONG_TYPE; + if ( StringEqual( node->Value(), "true", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "yes", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "1", true, TIXML_ENCODING_UNKNOWN ) ) + { + *bval = true; + result = TIXML_SUCCESS; + } + else if ( StringEqual( node->Value(), "false", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "no", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "0", true, TIXML_ENCODING_UNKNOWN ) ) + { + *bval = false; + result = TIXML_SUCCESS; + } + return result; +} + + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} +#endif + + +int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} +#endif + + +void TiXmlElement::SetAttribute( const char * name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} +#endif + + +void TiXmlElement::SetDoubleAttribute( const char * name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetDoubleAttribute( const std::string& name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} +#endif + + +void TiXmlElement::SetAttribute( const char * cname, const char * cvalue ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( cname ); + if ( attrib ) { + attrib->SetValue( cvalue ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& _name, const std::string& _value ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( _name ); + if ( attrib ) { + attrib->SetValue( _value ); + } +} +#endif + + +void TiXmlElement::Print( FILE* cfile, int depth ) const +{ + int i; + assert( cfile ); + for ( i=0; iNext() ) + { + fprintf( cfile, " " ); + attrib->Print( cfile, depth ); + } + + // There are 3 different formatting approaches: + // 1) An element without children is printed as a node + // 2) An element with only a text child is printed as text + // 3) An element with children is printed on multiple lines. + TiXmlNode* node; + if ( !firstChild ) + { + fprintf( cfile, " />" ); + } + else if ( firstChild == lastChild && firstChild->ToText() ) + { + fprintf( cfile, ">" ); + firstChild->Print( cfile, depth + 1 ); + fprintf( cfile, "", value.c_str() ); + } + else + { + fprintf( cfile, ">" ); + + for ( node = firstChild; node; node=node->NextSibling() ) + { + if ( !node->ToText() ) + { + fprintf( cfile, "\n" ); + } + node->Print( cfile, depth+1 ); + } + fprintf( cfile, "\n" ); + for( i=0; i", value.c_str() ); + } +} + + +void TiXmlElement::CopyTo( TiXmlElement* target ) const +{ + // superclass: + TiXmlNode::CopyTo( target ); + + // Element class: + // Clone the attributes, then clone the children. + const TiXmlAttribute* attribute = 0; + for( attribute = attributeSet.First(); + attribute; + attribute = attribute->Next() ) + { + target->SetAttribute( attribute->Name(), attribute->Value() ); + } + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + +bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this, attributeSet.First() ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +TiXmlNode* TiXmlElement::Clone() const +{ + TiXmlElement* clone = new TiXmlElement( Value() ); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +const char* TiXmlElement::GetText() const +{ + const TiXmlNode* child = this->FirstChild(); + if ( child ) { + const TiXmlText* childText = child->ToText(); + if ( childText ) { + return childText->Value(); + } + } + return 0; +} + + +TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + ClearError(); +} + +TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} + + +#ifdef TIXML_USE_STL +TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} +#endif + + +TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + copy.CopyTo( this ); +} + + +TiXmlDocument& TiXmlDocument::operator=( const TiXmlDocument& copy ) +{ + Clear(); + copy.CopyTo( this ); + return *this; +} + + +bool TiXmlDocument::LoadFile( TiXmlEncoding encoding ) +{ + return LoadFile( Value(), encoding ); +} + + +bool TiXmlDocument::SaveFile() const +{ + return SaveFile( Value() ); +} + +bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding ) +{ + TIXML_STRING filename( _filename ); + value = filename; + + // reading in binary mode so that tinyxml can normalize the EOL + FILE* file = TiXmlFOpen( value.c_str (), "rb" ); + + if ( file ) + { + bool result = LoadFile( file, encoding ); + fclose( file ); + return result; + } + else + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } +} + +bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding ) +{ + if ( !file ) + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Delete the existing data: + Clear(); + location.Clear(); + + // Get the file size, so we can pre-allocate the string. HUGE speed impact. + long length = 0; + fseek( file, 0, SEEK_END ); + length = ftell( file ); + fseek( file, 0, SEEK_SET ); + + // Strange case, but good to handle up front. + if ( length <= 0 ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Subtle bug here. TinyXml did use fgets. But from the XML spec: + // 2.11 End-of-Line Handling + // + // + // ...the XML processor MUST behave as if it normalized all line breaks in external + // parsed entities (including the document entity) on input, before parsing, by translating + // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to + // a single #xA character. + // + // + // It is not clear fgets does that, and certainly isn't clear it works cross platform. + // Generally, you expect fgets to translate from the convention of the OS to the c/unix + // convention, and not work generally. + + /* + while( fgets( buf, sizeof(buf), file ) ) + { + data += buf; + } + */ + + char* buf = new char[ length+1 ]; + buf[0] = 0; + + if ( fread( buf, length, 1, file ) != 1 ) { + delete [] buf; + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Process the buffer in place to normalize new lines. (See comment above.) + // Copies from the 'p' to 'q' pointer, where p can advance faster if + // a newline-carriage return is hit. + // + // Wikipedia: + // Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or + // CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)... + // * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others + // * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS + // * CR: Commodore 8-bit machines, Apple II family, Mac OS up to version 9 and OS-9 + + const char* p = buf; // the read head + char* q = buf; // the write head + const char CR = 0x0d; + const char LF = 0x0a; + + buf[length] = 0; + while( *p ) { + assert( p < (buf+length) ); + assert( q <= (buf+length) ); + assert( q <= p ); + + if ( *p == CR ) { + *q++ = LF; + p++; + if ( *p == LF ) { // check for CR+LF (and skip LF) + p++; + } + } + else { + *q++ = *p++; + } + } + assert( q <= (buf+length) ); + *q = 0; + + Parse( buf, 0, encoding ); + + delete [] buf; + return !Error(); +} + + +bool TiXmlDocument::SaveFile( const char * filename ) const +{ + // The old c stuff lives on... + FILE* fp = TiXmlFOpen( filename, "w" ); + if ( fp ) + { + bool result = SaveFile( fp ); + fclose( fp ); + return result; + } + return false; +} + + +bool TiXmlDocument::SaveFile( FILE* fp ) const +{ + if ( useMicrosoftBOM ) + { + const unsigned char TIXML_UTF_LEAD_0 = 0xefU; + const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; + const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + + fputc( TIXML_UTF_LEAD_0, fp ); + fputc( TIXML_UTF_LEAD_1, fp ); + fputc( TIXML_UTF_LEAD_2, fp ); + } + Print( fp, 0 ); + return (ferror(fp) == 0); +} + + +void TiXmlDocument::CopyTo( TiXmlDocument* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->error = error; + target->errorId = errorId; + target->errorDesc = errorDesc; + target->tabsize = tabsize; + target->errorLocation = errorLocation; + target->useMicrosoftBOM = useMicrosoftBOM; + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + + +TiXmlNode* TiXmlDocument::Clone() const +{ + TiXmlDocument* clone = new TiXmlDocument(); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlDocument::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + node->Print( cfile, depth ); + fprintf( cfile, "\n" ); + } +} + + +bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +const TiXmlAttribute* TiXmlAttribute::Next() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} + +/* +TiXmlAttribute* TiXmlAttribute::Next() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} +*/ + +const TiXmlAttribute* TiXmlAttribute::Previous() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} + +/* +TiXmlAttribute* TiXmlAttribute::Previous() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} +*/ + +void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + TIXML_STRING n, v; + + EncodeString( name, &n ); + EncodeString( value, &v ); + + if (value.find ('\"') == TIXML_STRING::npos) { + if ( cfile ) { + fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\""; + } + } + else { + if ( cfile ) { + fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "='"; (*str) += v; (*str) += "'"; + } + } +} + + +int TiXmlAttribute::QueryIntValue( int* ival ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +int TiXmlAttribute::QueryDoubleValue( double* dval ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +void TiXmlAttribute::SetIntValue( int _value ) +{ + char buf [64]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value); + #else + sprintf (buf, "%d", _value); + #endif + SetValue (buf); +} + +void TiXmlAttribute::SetDoubleValue( double _value ) +{ + char buf [256]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value); + #else + sprintf (buf, "%g", _value); + #endif + SetValue (buf); +} + +int TiXmlAttribute::IntValue() const +{ + return atoi (value.c_str ()); +} + +double TiXmlAttribute::DoubleValue() const +{ + return atof (value.c_str ()); +} + + +TiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) +{ + copy.CopyTo( this ); +} + + +TiXmlComment& TiXmlComment::operator=( const TiXmlComment& base ) +{ + Clear(); + base.CopyTo( this ); + return *this; +} + + +void TiXmlComment::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlComment::CopyTo( TiXmlComment* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlComment::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlComment::Clone() const +{ + TiXmlComment* clone = new TiXmlComment(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlText::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + if ( cdata ) + { + int i; + fprintf( cfile, "\n" ); + for ( i=0; i\n", value.c_str() ); // unformatted output + } + else + { + TIXML_STRING buffer; + EncodeString( value, &buffer ); + fprintf( cfile, "%s", buffer.c_str() ); + } +} + + +void TiXmlText::CopyTo( TiXmlText* target ) const +{ + TiXmlNode::CopyTo( target ); + target->cdata = cdata; +} + + +bool TiXmlText::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlText::Clone() const +{ + TiXmlText* clone = 0; + clone = new TiXmlText( "" ); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlDeclaration::TiXmlDeclaration( const char * _version, + const char * _encoding, + const char * _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} + + +#ifdef TIXML_USE_STL +TiXmlDeclaration::TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} +#endif + + +TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + copy.CopyTo( this ); +} + + +TiXmlDeclaration& TiXmlDeclaration::operator=( const TiXmlDeclaration& copy ) +{ + Clear(); + copy.CopyTo( this ); + return *this; +} + + +void TiXmlDeclaration::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + if ( cfile ) fprintf( cfile, "" ); + if ( str ) (*str) += "?>"; +} + + +void TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->version = version; + target->encoding = encoding; + target->standalone = standalone; +} + + +bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlDeclaration::Clone() const +{ + TiXmlDeclaration* clone = new TiXmlDeclaration(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlUnknown::Print( FILE* cfile, int depth ) const +{ + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlUnknown::Clone() const +{ + TiXmlUnknown* clone = new TiXmlUnknown(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlAttributeSet::TiXmlAttributeSet() +{ + sentinel.next = &sentinel; + sentinel.prev = &sentinel; +} + + +TiXmlAttributeSet::~TiXmlAttributeSet() +{ + assert( sentinel.next == &sentinel ); + assert( sentinel.prev == &sentinel ); +} + + +void TiXmlAttributeSet::Add( TiXmlAttribute* addMe ) +{ + #ifdef TIXML_USE_STL + assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set. + #else + assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set. + #endif + + addMe->next = &sentinel; + addMe->prev = sentinel.prev; + + sentinel.prev->next = addMe; + sentinel.prev = addMe; +} + +void TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe ) +{ + TiXmlAttribute* node; + + for( node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node == removeMe ) + { + node->prev->next = node->next; + node->next->prev = node->prev; + node->next = 0; + node->prev = 0; + return; + } + } + assert( 0 ); // we tried to remove a non-linked attribute. +} + + +#ifdef TIXML_USE_STL +TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node->name == name ) + return node; + } + return 0; +} + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const std::string& _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} +#endif + + +TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( strcmp( node->name.c_str(), name ) == 0 ) + return node; + } + return 0; +} + + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} + + +#ifdef TIXML_USE_STL +std::istream& operator>> (std::istream & in, TiXmlNode & base) +{ + TIXML_STRING tag; + tag.reserve( 8 * 1000 ); + base.StreamIn( &in, &tag ); + + base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING ); + return in; +} +#endif + + +#ifdef TIXML_USE_STL +std::ostream& operator<< (std::ostream & out, const TiXmlNode & base) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out << printer.Str(); + + return out; +} + + +std::string& operator<< (std::string& out, const TiXmlNode& base ) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out.append( printer.Str() ); + + return out; +} +#endif + + +TiXmlHandle TiXmlHandle::FirstChild() const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChild( const char * value ) const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement() const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild(); + for ( i=0; + child && iNextSibling(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild( value ); + for ( i=0; + child && iNextSibling( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement(); + for ( i=0; + child && iNextSiblingElement(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement( value ); + for ( i=0; + child && iNextSiblingElement( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +bool TiXmlPrinter::VisitEnter( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitExit( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ) +{ + DoIndent(); + buffer += "<"; + buffer += element.Value(); + + for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() ) + { + buffer += " "; + attrib->Print( 0, 0, &buffer ); + } + + if ( !element.FirstChild() ) + { + buffer += " />"; + DoLineBreak(); + } + else + { + buffer += ">"; + if ( element.FirstChild()->ToText() + && element.LastChild() == element.FirstChild() + && element.FirstChild()->ToText()->CDATA() == false ) + { + simpleTextPrint = true; + // no DoLineBreak()! + } + else + { + DoLineBreak(); + } + } + ++depth; + return true; +} + + +bool TiXmlPrinter::VisitExit( const TiXmlElement& element ) +{ + --depth; + if ( !element.FirstChild() ) + { + // nothing. + } + else + { + if ( simpleTextPrint ) + { + simpleTextPrint = false; + } + else + { + DoIndent(); + } + buffer += ""; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlText& text ) +{ + if ( text.CDATA() ) + { + DoIndent(); + buffer += ""; + DoLineBreak(); + } + else if ( simpleTextPrint ) + { + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + } + else + { + DoIndent(); + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration ) +{ + DoIndent(); + declaration.Print( 0, 0, &buffer ); + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlComment& comment ) +{ + DoIndent(); + buffer += ""; + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown ) +{ + DoIndent(); + buffer += "<"; + buffer += unknown.Value(); + buffer += ">"; + DoLineBreak(); + return true; +} + diff --git a/desktop_version/tinyxml/tinyxml.h b/desktop_version/tinyxml/tinyxml.h new file mode 100644 index 00000000..a3589e5b --- /dev/null +++ b/desktop_version/tinyxml/tinyxml.h @@ -0,0 +1,1805 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TINYXML_INCLUDED +#define TINYXML_INCLUDED + +#ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4530 ) +#pragma warning( disable : 4786 ) +#endif + +#include +#include +#include +#include +#include + +// Help out windows: +#if defined( _DEBUG ) && !defined( DEBUG ) +#define DEBUG +#endif + +#ifdef TIXML_USE_STL + #include + #include + #include + #define TIXML_STRING std::string +#else + #include "tinystr.h" + #define TIXML_STRING TiXmlString +#endif + +// Deprecated library function hell. Compilers want to use the +// new safe versions. This probably doesn't fully address the problem, +// but it gets closer. There are too many compilers for me to fully +// test. If you get compilation troubles, undefine TIXML_SAFE +#define TIXML_SAFE + +#ifdef TIXML_SAFE + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + // Microsoft visual studio, version 2005 and higher. + #define TIXML_SNPRINTF _snprintf_s + #define TIXML_SSCANF sscanf_s + #elif defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + //#pragma message( "Using _sn* functions." ) + #define TIXML_SNPRINTF _snprintf + #define TIXML_SSCANF sscanf + #elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + //#warning( "Using sn* functions." ) + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #else + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #endif +#endif + +class TiXmlDocument; +class TiXmlElement; +class TiXmlComment; +class TiXmlUnknown; +class TiXmlAttribute; +class TiXmlText; +class TiXmlDeclaration; +class TiXmlParsingData; + +const int TIXML_MAJOR_VERSION = 2; +const int TIXML_MINOR_VERSION = 6; +const int TIXML_PATCH_VERSION = 2; + +/* Internal structure for tracking location of items + in the XML file. +*/ +struct TiXmlCursor +{ + TiXmlCursor() { Clear(); } + void Clear() { row = col = -1; } + + int row; // 0 based. + int col; // 0 based. +}; + + +/** + Implements the interface to the "Visitor pattern" (see the Accept() method.) + If you call the Accept() method, it requires being passed a TiXmlVisitor + class to handle callbacks. For nodes that contain other nodes (Document, Element) + you will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves + are simply called with Visit(). + + If you return 'true' from a Visit method, recursive parsing will continue. If you return + false, no children of this node or its sibilings will be Visited. + + All flavors of Visit methods have a default implementation that returns 'true' (continue + visiting). You need to only override methods that are interesting to you. + + Generally Accept() is called on the TiXmlDocument, although all nodes suppert Visiting. + + You should never change the document from a callback. + + @sa TiXmlNode::Accept() +*/ +class TiXmlVisitor +{ +public: + virtual ~TiXmlVisitor() {} + + /// Visit a document. + virtual bool VisitEnter( const TiXmlDocument& /*doc*/ ) { return true; } + /// Visit a document. + virtual bool VisitExit( const TiXmlDocument& /*doc*/ ) { return true; } + + /// Visit an element. + virtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ ) { return true; } + /// Visit an element. + virtual bool VisitExit( const TiXmlElement& /*element*/ ) { return true; } + + /// Visit a declaration + virtual bool Visit( const TiXmlDeclaration& /*declaration*/ ) { return true; } + /// Visit a text node + virtual bool Visit( const TiXmlText& /*text*/ ) { return true; } + /// Visit a comment node + virtual bool Visit( const TiXmlComment& /*comment*/ ) { return true; } + /// Visit an unknown node + virtual bool Visit( const TiXmlUnknown& /*unknown*/ ) { return true; } +}; + +// Only used by Attribute::Query functions +enum +{ + TIXML_SUCCESS, + TIXML_NO_ATTRIBUTE, + TIXML_WRONG_TYPE +}; + + +// Used by the parsing routines. +enum TiXmlEncoding +{ + TIXML_ENCODING_UNKNOWN, + TIXML_ENCODING_UTF8, + TIXML_ENCODING_LEGACY +}; + +const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN; + +/** TiXmlBase is a base class for every class in TinyXml. + It does little except to establish that TinyXml classes + can be printed and provide some utility functions. + + In XML, the document and elements can contain + other elements and other types of nodes. + + @verbatim + A Document can contain: Element (container or leaf) + Comment (leaf) + Unknown (leaf) + Declaration( leaf ) + + An Element can contain: Element (container or leaf) + Text (leaf) + Attributes (not on tree) + Comment (leaf) + Unknown (leaf) + + A Decleration contains: Attributes (not on tree) + @endverbatim +*/ +class TiXmlBase +{ + friend class TiXmlNode; + friend class TiXmlElement; + friend class TiXmlDocument; + +public: + TiXmlBase() : userData(0) {} + virtual ~TiXmlBase() {} + + /** All TinyXml classes can print themselves to a filestream + or the string class (TiXmlString in non-STL mode, std::string + in STL mode.) Either or both cfile and str can be null. + + This is a formatted print, and will insert + tabs and newlines. + + (For an unformatted stream, use the << operator.) + */ + virtual void Print( FILE* cfile, int depth ) const = 0; + + /** The world does not agree on whether white space should be kept or + not. In order to make everyone happy, these global, static functions + are provided to set whether or not TinyXml will condense all white space + into a single space or not. The default is to condense. Note changing this + value is not thread safe. + */ + static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; } + + /// Return the current white space setting. + static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; } + + /** Return the position, in the original source file, of this node or attribute. + The row and column are 1-based. (That is the first row and first column is + 1,1). If the returns values are 0 or less, then the parser does not have + a row and column value. + + Generally, the row and column value will be set when the TiXmlDocument::Load(), + TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set + when the DOM was created from operator>>. + + The values reflect the initial load. Once the DOM is modified programmatically + (by adding or changing nodes and attributes) the new values will NOT update to + reflect changes in the document. + + There is a minor performance cost to computing the row and column. Computation + can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value. + + @sa TiXmlDocument::SetTabSize() + */ + int Row() const { return location.row + 1; } + int Column() const { return location.col + 1; } ///< See Row() + + void SetUserData( void* user ) { userData = user; } ///< Set a pointer to arbitrary user data. + void* GetUserData() { return userData; } ///< Get a pointer to arbitrary user data. + const void* GetUserData() const { return userData; } ///< Get a pointer to arbitrary user data. + + // Table that returs, for a given lead byte, the total number of bytes + // in the UTF-8 sequence. + static const int utf8ByteTable[256]; + + virtual const char* Parse( const char* p, + TiXmlParsingData* data, + TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0; + + /** Expands entities in a string. Note this should not contian the tag's '<', '>', etc, + or they will be transformed into entities! + */ + static void EncodeString( const TIXML_STRING& str, TIXML_STRING* out ); + + enum + { + TIXML_NO_ERROR = 0, + TIXML_ERROR, + TIXML_ERROR_OPENING_FILE, + TIXML_ERROR_PARSING_ELEMENT, + TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, + TIXML_ERROR_READING_ELEMENT_VALUE, + TIXML_ERROR_READING_ATTRIBUTES, + TIXML_ERROR_PARSING_EMPTY, + TIXML_ERROR_READING_END_TAG, + TIXML_ERROR_PARSING_UNKNOWN, + TIXML_ERROR_PARSING_COMMENT, + TIXML_ERROR_PARSING_DECLARATION, + TIXML_ERROR_DOCUMENT_EMPTY, + TIXML_ERROR_EMBEDDED_NULL, + TIXML_ERROR_PARSING_CDATA, + TIXML_ERROR_DOCUMENT_TOP_ONLY, + + TIXML_ERROR_STRING_COUNT + }; + +protected: + + static const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding ); + + inline static bool IsWhiteSpace( char c ) + { + return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' ); + } + inline static bool IsWhiteSpace( int c ) + { + if ( c < 256 ) + return IsWhiteSpace( (char) c ); + return false; // Again, only truly correct for English/Latin...but usually works. + } + + #ifdef TIXML_USE_STL + static bool StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ); + static bool StreamTo( std::istream * in, int character, TIXML_STRING * tag ); + #endif + + /* Reads an XML name into the string provided. Returns + a pointer just past the last character of the name, + or 0 if the function has an error. + */ + static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding ); + + /* Reads text. Returns a pointer past the given end tag. + Wickedly complex options, but it keeps the (sensitive) code in one place. + */ + static const char* ReadText( const char* in, // where to start + TIXML_STRING* text, // the string read + bool ignoreWhiteSpace, // whether to keep the white space + const char* endTag, // what ends this text + bool ignoreCase, // whether to ignore case in the end tag + TiXmlEncoding encoding ); // the current encoding + + // If an entity has been found, transform it into a character. + static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding ); + + // Get a character, while interpreting entities. + // The length can be from 0 to 4 bytes. + inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding ) + { + assert( p ); + if ( encoding == TIXML_ENCODING_UTF8 ) + { + *length = utf8ByteTable[ *((const unsigned char*)p) ]; + assert( *length >= 0 && *length < 5 ); + } + else + { + *length = 1; + } + + if ( *length == 1 ) + { + if ( *p == '&' ) + return GetEntity( p, _value, length, encoding ); + *_value = *p; + return p+1; + } + else if ( *length ) + { + //strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe), + // and the null terminator isn't needed + for( int i=0; p[i] && i<*length; ++i ) { + _value[i] = p[i]; + } + return p + (*length); + } + else + { + // Not valid text. + return 0; + } + } + + // Return true if the next characters in the stream are any of the endTag sequences. + // Ignore case only works for english, and should only be relied on when comparing + // to English words: StringEqual( p, "version", true ) is fine. + static bool StringEqual( const char* p, + const char* endTag, + bool ignoreCase, + TiXmlEncoding encoding ); + + static const char* errorString[ TIXML_ERROR_STRING_COUNT ]; + + TiXmlCursor location; + + /// Field containing a generic user pointer + void* userData; + + // None of these methods are reliable for any language except English. + // Good for approximation, not great for accuracy. + static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding ); + static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding ); + inline static int ToLower( int v, TiXmlEncoding encoding ) + { + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( v < 128 ) return tolower( v ); + return v; + } + else + { + return tolower( v ); + } + } + static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ); + +private: + TiXmlBase( const TiXmlBase& ); // not implemented. + void operator=( const TiXmlBase& base ); // not allowed. + + struct Entity + { + const char* str; + unsigned int strLength; + char chr; + }; + enum + { + NUM_ENTITY = 5, + MAX_ENTITY_LENGTH = 6 + + }; + static Entity entity[ NUM_ENTITY ]; + static bool condenseWhiteSpace; +}; + + +/** The parent class for everything in the Document Object Model. + (Except for attributes). + Nodes have siblings, a parent, and children. A node can be + in a document, or stand on its own. The type of a TiXmlNode + can be queried, and it can be cast to its more defined type. +*/ +class TiXmlNode : public TiXmlBase +{ + friend class TiXmlDocument; + friend class TiXmlElement; + +public: + #ifdef TIXML_USE_STL + + /** An input stream operator, for every class. Tolerant of newlines and + formatting, but doesn't expect them. + */ + friend std::istream& operator >> (std::istream& in, TiXmlNode& base); + + /** An output stream operator, for every class. Note that this outputs + without any newlines or formatting, as opposed to Print(), which + includes tabs and new lines. + + The operator<< and operator>> are not completely symmetric. Writing + a node to a stream is very well defined. You'll get a nice stream + of output, without any extra whitespace or newlines. + + But reading is not as well defined. (As it always is.) If you create + a TiXmlElement (for example) and read that from an input stream, + the text needs to define an element or junk will result. This is + true of all input streams, but it's worth keeping in mind. + + A TiXmlDocument will read nodes until it reads a root element, and + all the children of that root element. + */ + friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base); + + /// Appends the XML node or attribute to a std::string. + friend std::string& operator<< (std::string& out, const TiXmlNode& base ); + + #endif + + /** The types of XML nodes supported by TinyXml. (All the + unsupported types are picked up by UNKNOWN.) + */ + enum NodeType + { + TINYXML_DOCUMENT, + TINYXML_ELEMENT, + TINYXML_COMMENT, + TINYXML_UNKNOWN, + TINYXML_TEXT, + TINYXML_DECLARATION, + TINYXML_TYPECOUNT + }; + + virtual ~TiXmlNode(); + + /** The meaning of 'value' changes for the specific type of + TiXmlNode. + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + + The subclasses will wrap this function. + */ + const char *Value() const { return value.c_str (); } + + #ifdef TIXML_USE_STL + /** Return Value() as a std::string. If you only use STL, + this is more efficient than calling Value(). + Only available in STL mode. + */ + const std::string& ValueStr() const { return value; } + #endif + + const TIXML_STRING& ValueTStr() const { return value; } + + /** Changes the value of the node. Defined as: + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + */ + void SetValue(const char * _value) { value = _value;} + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Delete all the children of this node. Does not affect 'this'. + void Clear(); + + /// One step up the DOM. + TiXmlNode* Parent() { return parent; } + const TiXmlNode* Parent() const { return parent; } + + const TiXmlNode* FirstChild() const { return firstChild; } ///< The first child of this node. Will be null if there are no children. + TiXmlNode* FirstChild() { return firstChild; } + const TiXmlNode* FirstChild( const char * value ) const; ///< The first child of this node with the matching 'value'. Will be null if none found. + /// The first child of this node with the matching 'value'. Will be null if none found. + TiXmlNode* FirstChild( const char * _value ) { + // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe) + // call the method, cast the return back to non-const. + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value )); + } + const TiXmlNode* LastChild() const { return lastChild; } /// The last child of this node. Will be null if there are no children. + TiXmlNode* LastChild() { return lastChild; } + + const TiXmlNode* LastChild( const char * value ) const; /// The last child of this node matching 'value'. Will be null if there are no children. + TiXmlNode* LastChild( const char * _value ) { + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value )); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* FirstChild( const std::string& _value ) { return FirstChild (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* LastChild( const std::string& _value ) { return LastChild (_value.c_str ()); } ///< STL std::string form. + #endif + + /** An alternate way to walk the children of a node. + One way to iterate over nodes is: + @verbatim + for( child = parent->FirstChild(); child; child = child->NextSibling() ) + @endverbatim + + IterateChildren does the same thing with the syntax: + @verbatim + child = 0; + while( child = parent->IterateChildren( child ) ) + @endverbatim + + IterateChildren takes the previous child as input and finds + the next one. If the previous child is null, it returns the + first. IterateChildren will return null when done. + */ + const TiXmlNode* IterateChildren( const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) ); + } + + /// This flavor of IterateChildren searches for children with a particular 'value' + const TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + #endif + + /** Add a new node related to this. Adds a child past the LastChild. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertEndChild( const TiXmlNode& addThis ); + + + /** Add a new node related to this. Adds a child past the LastChild. + + NOTE: the node to be added is passed by pointer, and will be + henceforth owned (and deleted) by tinyXml. This method is efficient + and avoids an extra copy, but should be used with care as it + uses a different memory model than the other insert functions. + + @sa InsertEndChild + */ + TiXmlNode* LinkEndChild( TiXmlNode* addThis ); + + /** Add a new node related to this. Adds a child before the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ); + + /** Add a new node related to this. Adds a child after the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ); + + /** Replace a child of this node. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ); + + /// Delete a child of this node. + bool RemoveChild( TiXmlNode* removeThis ); + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling() const { return prev; } + TiXmlNode* PreviousSibling() { return prev; } + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling( const char * ) const; + TiXmlNode* PreviousSibling( const char *_prev ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* NextSibling( const std::string& _value) { return NextSibling (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Navigate to a sibling node. + const TiXmlNode* NextSibling() const { return next; } + TiXmlNode* NextSibling() { return next; } + + /// Navigate to a sibling node with the given 'value'. + const TiXmlNode* NextSibling( const char * ) const; + TiXmlNode* NextSibling( const char* _next ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement() const; + TiXmlElement* NextSiblingElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement( const char * ) const; + TiXmlElement* NextSiblingElement( const char *_next ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement() const; + TiXmlElement* FirstChildElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() ); + } + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement( const char * _value ) const; + TiXmlElement* FirstChildElement( const char * _value ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /** Query the type (as an enumerated value, above) of this node. + The possible types are: TINYXML_DOCUMENT, TINYXML_ELEMENT, TINYXML_COMMENT, + TINYXML_UNKNOWN, TINYXML_TEXT, and TINYXML_DECLARATION. + */ + int Type() const { return type; } + + /** Return a pointer to the Document this node lives in. + Returns null if not in a document. + */ + const TiXmlDocument* GetDocument() const; + TiXmlDocument* GetDocument() { + return const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() ); + } + + /// Returns true if this node has no children. + bool NoChildren() const { return !firstChild; } + + virtual const TiXmlDocument* ToDocument() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlElement* ToElement() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlComment* ToComment() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlUnknown* ToUnknown() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlText* ToText() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlDeclaration* ToDeclaration() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + virtual TiXmlDocument* ToDocument() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlElement* ToElement() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlComment* ToComment() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlText* ToText() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + /** Create an exact duplicate of this node and return it. The memory must be deleted + by the caller. + */ + virtual TiXmlNode* Clone() const = 0; + + /** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the + XML tree will be conditionally visited and the host will be called back + via the TiXmlVisitor interface. + + This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse + the XML for the callbacks, so the performance of TinyXML is unchanged by using this + interface versus any other.) + + The interface has been based on ideas from: + + - http://www.saxproject.org/ + - http://c2.com/cgi/wiki?HierarchicalVisitorPattern + + Which are both good references for "visiting". + + An example of using Accept(): + @verbatim + TiXmlPrinter printer; + tinyxmlDoc.Accept( &printer ); + const char* xmlcstr = printer.CStr(); + @endverbatim + */ + virtual bool Accept( TiXmlVisitor* visitor ) const = 0; + +protected: + TiXmlNode( NodeType _type ); + + // Copy to the allocated object. Shared functionality between Clone, Copy constructor, + // and the assignment operator. + void CopyTo( TiXmlNode* target ) const; + + #ifdef TIXML_USE_STL + // The real work of the input operator. + virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0; + #endif + + // Figure out what is at *p, and parse it. Returns null if it is not an xml node. + TiXmlNode* Identify( const char* start, TiXmlEncoding encoding ); + + TiXmlNode* parent; + NodeType type; + + TiXmlNode* firstChild; + TiXmlNode* lastChild; + + TIXML_STRING value; + + TiXmlNode* prev; + TiXmlNode* next; + +private: + TiXmlNode( const TiXmlNode& ); // not implemented. + void operator=( const TiXmlNode& base ); // not allowed. +}; + + +/** An attribute is a name-value pair. Elements have an arbitrary + number of attributes, each with a unique name. + + @note The attributes are not TiXmlNodes, since they are not + part of the tinyXML document object model. There are other + suggested ways to look at this problem. +*/ +class TiXmlAttribute : public TiXmlBase +{ + friend class TiXmlAttributeSet; + +public: + /// Construct an empty attribute. + TiXmlAttribute() : TiXmlBase() + { + document = 0; + prev = next = 0; + } + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlAttribute( const std::string& _name, const std::string& _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + #endif + + /// Construct an attribute with a name and value. + TiXmlAttribute( const char * _name, const char * _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + + const char* Name() const { return name.c_str(); } ///< Return the name of this attribute. + const char* Value() const { return value.c_str(); } ///< Return the value of this attribute. + #ifdef TIXML_USE_STL + const std::string& ValueStr() const { return value; } ///< Return the value of this attribute. + #endif + int IntValue() const; ///< Return the value of this attribute, converted to an integer. + double DoubleValue() const; ///< Return the value of this attribute, converted to a double. + + // Get the tinyxml string representation + const TIXML_STRING& NameTStr() const { return name; } + + /** QueryIntValue examines the value string. It is an alternative to the + IntValue() method with richer error checking. + If the value is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. + + A specialized but useful call. Note that for success it returns 0, + which is the opposite of almost all other TinyXml calls. + */ + int QueryIntValue( int* _value ) const; + /// QueryDoubleValue examines the value string. See QueryIntValue(). + int QueryDoubleValue( double* _value ) const; + + void SetName( const char* _name ) { name = _name; } ///< Set the name of this attribute. + void SetValue( const char* _value ) { value = _value; } ///< Set the value. + + void SetIntValue( int _value ); ///< Set the value from an integer. + void SetDoubleValue( double _value ); ///< Set the value from a double. + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetName( const std::string& _name ) { name = _name; } + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Get the next sibling attribute in the DOM. Returns null at end. + const TiXmlAttribute* Next() const; + TiXmlAttribute* Next() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() ); + } + + /// Get the previous sibling attribute in the DOM. Returns null at beginning. + const TiXmlAttribute* Previous() const; + TiXmlAttribute* Previous() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() ); + } + + bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; } + bool operator<( const TiXmlAttribute& rhs ) const { return name < rhs.name; } + bool operator>( const TiXmlAttribute& rhs ) const { return name > rhs.name; } + + /* Attribute parsing starts: first letter of the name + returns: the next char after the value end quote + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + // Prints this Attribute to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + + // [internal use] + // Set the document pointer so the attribute can report errors. + void SetDocument( TiXmlDocument* doc ) { document = doc; } + +private: + TiXmlAttribute( const TiXmlAttribute& ); // not implemented. + void operator=( const TiXmlAttribute& base ); // not allowed. + + TiXmlDocument* document; // A pointer back to a document, for error reporting. + TIXML_STRING name; + TIXML_STRING value; + TiXmlAttribute* prev; + TiXmlAttribute* next; +}; + + +/* A class used to manage a group of attributes. + It is only used internally, both by the ELEMENT and the DECLARATION. + + The set can be changed transparent to the Element and Declaration + classes that use it, but NOT transparent to the Attribute + which has to implement a next() and previous() method. Which makes + it a bit problematic and prevents the use of STL. + + This version is implemented with circular lists because: + - I like circular lists + - it demonstrates some independence from the (typical) doubly linked list. +*/ +class TiXmlAttributeSet +{ +public: + TiXmlAttributeSet(); + ~TiXmlAttributeSet(); + + void Add( TiXmlAttribute* attribute ); + void Remove( TiXmlAttribute* attribute ); + + const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + TiXmlAttribute* First() { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + TiXmlAttribute* Last() { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + + TiXmlAttribute* Find( const char* _name ) const; + TiXmlAttribute* FindOrCreate( const char* _name ); + +# ifdef TIXML_USE_STL + TiXmlAttribute* Find( const std::string& _name ) const; + TiXmlAttribute* FindOrCreate( const std::string& _name ); +# endif + + +private: + //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element), + //*ME: this class must be also use a hidden/disabled copy-constructor !!! + TiXmlAttributeSet( const TiXmlAttributeSet& ); // not allowed + void operator=( const TiXmlAttributeSet& ); // not allowed (as TiXmlAttribute) + + TiXmlAttribute sentinel; +}; + + +/** The element is a container class. It has a value, the element name, + and can contain other elements, text, comments, and unknowns. + Elements also contain an arbitrary number of attributes. +*/ +class TiXmlElement : public TiXmlNode +{ +public: + /// Construct an element. + TiXmlElement (const char * in_value); + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlElement( const std::string& _value ); + #endif + + TiXmlElement( const TiXmlElement& ); + + TiXmlElement& operator=( const TiXmlElement& base ); + + virtual ~TiXmlElement(); + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + */ + const char* Attribute( const char* name ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an integer, + the integer value will be put in the return 'i', if 'i' + is non-null. + */ + const char* Attribute( const char* name, int* i ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an double, + the double value will be put in the return 'd', if 'd' + is non-null. + */ + const char* Attribute( const char* name, double* d ) const; + + /** QueryIntAttribute examines the attribute - it is an alternative to the + Attribute() method with richer error checking. + If the attribute is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. If the attribute + does not exist, then TIXML_NO_ATTRIBUTE is returned. + */ + int QueryIntAttribute( const char* name, int* _value ) const; + /// QueryUnsignedAttribute examines the attribute - see QueryIntAttribute(). + int QueryUnsignedAttribute( const char* name, unsigned* _value ) const; + /** QueryBoolAttribute examines the attribute - see QueryIntAttribute(). + Note that '1', 'true', or 'yes' are considered true, while '0', 'false' + and 'no' are considered false. + */ + int QueryBoolAttribute( const char* name, bool* _value ) const; + /// QueryDoubleAttribute examines the attribute - see QueryIntAttribute(). + int QueryDoubleAttribute( const char* name, double* _value ) const; + /// QueryFloatAttribute examines the attribute - see QueryIntAttribute(). + int QueryFloatAttribute( const char* name, float* _value ) const { + double d; + int result = QueryDoubleAttribute( name, &d ); + if ( result == TIXML_SUCCESS ) { + *_value = (float)d; + } + return result; + } + + #ifdef TIXML_USE_STL + /// QueryStringAttribute examines the attribute - see QueryIntAttribute(). + int QueryStringAttribute( const char* name, std::string* _value ) const { + const char* cstr = Attribute( name ); + if ( cstr ) { + *_value = std::string( cstr ); + return TIXML_SUCCESS; + } + return TIXML_NO_ATTRIBUTE; + } + + /** Template form of the attribute query which will try to read the + attribute into the specified type. Very easy, very powerful, but + be careful to make sure to call this with the correct type. + + NOTE: This method doesn't work correctly for 'string' types that contain spaces. + + @return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE + */ + template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + std::stringstream sstream( node->ValueStr() ); + sstream >> *outValue; + if ( !sstream.fail() ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; + } + + int QueryValueAttribute( const std::string& name, std::string* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + *outValue = node->ValueStr(); + return TIXML_SUCCESS; + } + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char* name, const char * _value ); + + #ifdef TIXML_USE_STL + const std::string* Attribute( const std::string& name ) const; + const std::string* Attribute( const std::string& name, int* i ) const; + const std::string* Attribute( const std::string& name, double* d ) const; + int QueryIntAttribute( const std::string& name, int* _value ) const; + int QueryDoubleAttribute( const std::string& name, double* _value ) const; + + /// STL std::string form. + void SetAttribute( const std::string& name, const std::string& _value ); + ///< STL std::string form. + void SetAttribute( const std::string& name, int _value ); + ///< STL std::string form. + void SetDoubleAttribute( const std::string& name, double value ); + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char * name, int value ); + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetDoubleAttribute( const char * name, double value ); + + /** Deletes an attribute with the given name. + */ + void RemoveAttribute( const char * name ); + #ifdef TIXML_USE_STL + void RemoveAttribute( const std::string& name ) { RemoveAttribute (name.c_str ()); } ///< STL std::string form. + #endif + + const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); } ///< Access the first attribute in this element. + TiXmlAttribute* FirstAttribute() { return attributeSet.First(); } + const TiXmlAttribute* LastAttribute() const { return attributeSet.Last(); } ///< Access the last attribute in this element. + TiXmlAttribute* LastAttribute() { return attributeSet.Last(); } + + /** Convenience function for easy access to the text inside an element. Although easy + and concise, GetText() is limited compared to getting the TiXmlText child + and accessing it directly. + + If the first child of 'this' is a TiXmlText, the GetText() + returns the character string of the Text node, else null is returned. + + This is a convenient method for getting the text of simple contained text: + @verbatim + This is text + const char* str = fooElement->GetText(); + @endverbatim + + 'str' will be a pointer to "This is text". + + Note that this function can be misleading. If the element foo was created from + this XML: + @verbatim + This is text + @endverbatim + + then the value of str would be null. The first child node isn't a text node, it is + another element. From this XML: + @verbatim + This is text + @endverbatim + GetText() will return "This is ". + + WARNING: GetText() accesses a child node - don't become confused with the + similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are + safe type casts on the referenced node. + */ + const char* GetText() const; + + /// Creates a new Element and returns it - the returned element is a copy. + virtual TiXmlNode* Clone() const; + // Print the Element to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: next char past '<' + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlElement* ToElement() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlElement* ToElement() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + + void CopyTo( TiXmlElement* target ) const; + void ClearThis(); // like clear, but initializes 'this' object as well + + // Used to be public [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + /* [internal use] + Reads the "value" of the element -- another element, or text. + This should terminate with the current end tag. + */ + const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + +private: + TiXmlAttributeSet attributeSet; +}; + + +/** An XML comment. +*/ +class TiXmlComment : public TiXmlNode +{ +public: + /// Constructs an empty comment. + TiXmlComment() : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {} + /// Construct a comment from text. + TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) { + SetValue( _value ); + } + TiXmlComment( const TiXmlComment& ); + TiXmlComment& operator=( const TiXmlComment& base ); + + virtual ~TiXmlComment() {} + + /// Returns a copy of this Comment. + virtual TiXmlNode* Clone() const; + // Write this Comment to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: at the ! of the !-- + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlComment* target ) const; + + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif +// virtual void StreamOut( TIXML_OSTREAM * out ) const; + +private: + +}; + + +/** XML text. A text node can have 2 ways to output the next. "normal" output + and CDATA. It will default to the mode it was parsed from the XML file and + you generally want to leave it alone, but you can change the output mode with + SetCDATA() and query it with CDATA(). +*/ +class TiXmlText : public TiXmlNode +{ + friend class TiXmlElement; +public: + /** Constructor for text element. By default, it is treated as + normal, encoded text. If you want it be output as a CDATA text + element, set the parameter _cdata to 'true' + */ + TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + virtual ~TiXmlText() {} + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + #endif + + TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); } + TiXmlText& operator=( const TiXmlText& base ) { base.CopyTo( this ); return *this; } + + // Write this text object to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /// Queries whether this represents text using a CDATA section. + bool CDATA() const { return cdata; } + /// Turns on or off a CDATA representation of text. + void SetCDATA( bool _cdata ) { cdata = _cdata; } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlText* ToText() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + /// [internal use] Creates a new Element and returns it. + virtual TiXmlNode* Clone() const; + void CopyTo( TiXmlText* target ) const; + + bool Blank() const; // returns true if all white space and new lines + // [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + bool cdata; // true if this should be input and output as a CDATA style text element +}; + + +/** In correct XML the declaration is the first entry in the file. + @verbatim + + @endverbatim + + TinyXml will happily read or write files without a declaration, + however. There are 3 possible attributes to the declaration: + version, encoding, and standalone. + + Note: In this version of the code, the attributes are + handled as special cases, not generic attributes, simply + because there can only be at most 3 and they are always the same. +*/ +class TiXmlDeclaration : public TiXmlNode +{ +public: + /// Construct an empty declaration. + TiXmlDeclaration() : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) {} + +#ifdef TIXML_USE_STL + /// Constructor. + TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ); +#endif + + /// Construct. + TiXmlDeclaration( const char* _version, + const char* _encoding, + const char* _standalone ); + + TiXmlDeclaration( const TiXmlDeclaration& copy ); + TiXmlDeclaration& operator=( const TiXmlDeclaration& copy ); + + virtual ~TiXmlDeclaration() {} + + /// Version. Will return an empty string if none was found. + const char *Version() const { return version.c_str (); } + /// Encoding. Will return an empty string if none was found. + const char *Encoding() const { return encoding.c_str (); } + /// Is this a standalone document? + const char *Standalone() const { return standalone.c_str (); } + + /// Creates a copy of this Declaration and returns it. + virtual TiXmlNode* Clone() const; + // Print this declaration to a FILE stream. + virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlDeclaration* target ) const; + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + + TIXML_STRING version; + TIXML_STRING encoding; + TIXML_STRING standalone; +}; + + +/** Any tag that tinyXml doesn't recognize is saved as an + unknown. It is a tag of text, but should not be modified. + It will be written back to the XML, unchanged, when the file + is saved. + + DTD tags get thrown into TiXmlUnknowns. +*/ +class TiXmlUnknown : public TiXmlNode +{ +public: + TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) {} + virtual ~TiXmlUnknown() {} + + TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); } + TiXmlUnknown& operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); return *this; } + + /// Creates a copy of this Unknown and returns it. + virtual TiXmlNode* Clone() const; + // Print this Unknown to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected: + void CopyTo( TiXmlUnknown* target ) const; + + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + +}; + + +/** Always the top level node. A document binds together all the + XML pieces. It can be saved, loaded, and printed to the screen. + The 'value' of a document node is the xml file name. +*/ +class TiXmlDocument : public TiXmlNode +{ +public: + /// Create an empty document, that has no name. + TiXmlDocument(); + /// Create a document with a name. The name of the document is also the filename of the xml. + TiXmlDocument( const char * documentName ); + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlDocument( const std::string& documentName ); + #endif + + TiXmlDocument( const TiXmlDocument& copy ); + TiXmlDocument& operator=( const TiXmlDocument& copy ); + + virtual ~TiXmlDocument() {} + + /** Load a file using the current document value. + Returns true if successful. Will delete any existing + document data before loading. + */ + bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the current document value. Returns true if successful. + bool SaveFile() const; + /// Load a file using the given filename. Returns true if successful. + bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given filename. Returns true if successful. + bool SaveFile( const char * filename ) const; + /** Load a file using the given FILE*. Returns true if successful. Note that this method + doesn't stream - the entire object pointed at by the FILE* + will be interpreted as an XML file. TinyXML doesn't stream in XML from the current + file location. Streaming may be added in the future. + */ + bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given FILE*. Returns true if successful. + bool SaveFile( FILE* ) const; + + #ifdef TIXML_USE_STL + bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) ///< STL std::string version. + { + return LoadFile( filename.c_str(), encoding ); + } + bool SaveFile( const std::string& filename ) const ///< STL std::string version. + { + return SaveFile( filename.c_str() ); + } + #endif + + /** Parse the given null terminated block of xml data. Passing in an encoding to this + method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml + to use that encoding, regardless of what TinyXml might otherwise try to detect. + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + + /** Get the root element -- the only top level element -- of the document. + In well formed XML, there should only be one. TinyXml is tolerant of + multiple elements at the document level. + */ + const TiXmlElement* RootElement() const { return FirstChildElement(); } + TiXmlElement* RootElement() { return FirstChildElement(); } + + /** If an error occurs, Error will be set to true. Also, + - The ErrorId() will contain the integer identifier of the error (not generally useful) + - The ErrorDesc() method will return the name of the error. (very useful) + - The ErrorRow() and ErrorCol() will return the location of the error (if known) + */ + bool Error() const { return error; } + + /// Contains a textual (english) description of the error if one occurs. + const char * ErrorDesc() const { return errorDesc.c_str (); } + + /** Generally, you probably want the error string ( ErrorDesc() ). But if you + prefer the ErrorId, this function will fetch it. + */ + int ErrorId() const { return errorId; } + + /** Returns the location (if known) of the error. The first column is column 1, + and the first row is row 1. A value of 0 means the row and column wasn't applicable + (memory errors, for example, have no row/column) or the parser lost the error. (An + error in the error reporting, in that case.) + + @sa SetTabSize, Row, Column + */ + int ErrorRow() const { return errorLocation.row+1; } + int ErrorCol() const { return errorLocation.col+1; } ///< The column where the error occured. See ErrorRow() + + /** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) + to report the correct values for row and column. It does not change the output + or input in any way. + + By calling this method, with a tab size + greater than 0, the row and column of each node and attribute is stored + when the file is loaded. Very useful for tracking the DOM back in to + the source file. + + The tab size is required for calculating the location of nodes. If not + set, the default of 4 is used. The tabsize is set per document. Setting + the tabsize to 0 disables row/column tracking. + + Note that row and column tracking is not supported when using operator>>. + + The tab size needs to be enabled before the parse or load. Correct usage: + @verbatim + TiXmlDocument doc; + doc.SetTabSize( 8 ); + doc.Load( "myfile.xml" ); + @endverbatim + + @sa Row, Column + */ + void SetTabSize( int _tabsize ) { tabsize = _tabsize; } + + int TabSize() const { return tabsize; } + + /** If you have handled the error, it can be reset with this call. The error + state is automatically cleared if you Parse a new XML block. + */ + void ClearError() { error = false; + errorId = 0; + errorDesc = ""; + errorLocation.row = errorLocation.col = 0; + //errorLocation.last = 0; + } + + /** Write the document to standard out using formatted printing ("pretty print"). */ + void Print() const { Print( stdout, 0 ); } + + /* Write the document to a string using formatted printing ("pretty print"). This + will allocate a character array (new char[]) and return it as a pointer. The + calling code pust call delete[] on the return char* to avoid a memory leak. + */ + //char* PrintToMemory() const; + + /// Print this Document to a FILE stream. + virtual void Print( FILE* cfile, int depth = 0 ) const; + // [internal use] + void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + + virtual const TiXmlDocument* ToDocument() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDocument* ToDocument() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + // [internal use] + virtual TiXmlNode* Clone() const; + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + void CopyTo( TiXmlDocument* target ) const; + + bool error; + int errorId; + TIXML_STRING errorDesc; + int tabsize; + TiXmlCursor errorLocation; + bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write. +}; + + +/** + A TiXmlHandle is a class that wraps a node pointer with null checks; this is + an incredibly useful thing. Note that TiXmlHandle is not part of the TinyXml + DOM structure. It is a separate utility class. + + Take an example: + @verbatim + + + + + + + @endverbatim + + Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very + easy to write a *lot* of code that looks like: + + @verbatim + TiXmlElement* root = document.FirstChildElement( "Document" ); + if ( root ) + { + TiXmlElement* element = root->FirstChildElement( "Element" ); + if ( element ) + { + TiXmlElement* child = element->FirstChildElement( "Child" ); + if ( child ) + { + TiXmlElement* child2 = child->NextSiblingElement( "Child" ); + if ( child2 ) + { + // Finally do something useful. + @endverbatim + + And that doesn't even cover "else" cases. TiXmlHandle addresses the verbosity + of such code. A TiXmlHandle checks for null pointers so it is perfectly safe + and correct to use: + + @verbatim + TiXmlHandle docHandle( &document ); + TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); + if ( child2 ) + { + // do something useful + @endverbatim + + Which is MUCH more concise and useful. + + It is also safe to copy handles - internally they are nothing more than node pointers. + @verbatim + TiXmlHandle handleCopy = handle; + @endverbatim + + What they should not be used for is iteration: + + @verbatim + int i=0; + while ( true ) + { + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).ToElement(); + if ( !child ) + break; + // do something + ++i; + } + @endverbatim + + It seems reasonable, but it is in fact two embedded while loops. The Child method is + a linear walk to find the element, so this code would iterate much more than it needs + to. Instead, prefer: + + @verbatim + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).ToElement(); + + for( child; child; child=child->NextSiblingElement() ) + { + // do something + } + @endverbatim +*/ +class TiXmlHandle +{ +public: + /// Create a handle from any node (at any depth of the tree.) This can be a null pointer. + TiXmlHandle( TiXmlNode* _node ) { this->node = _node; } + /// Copy constructor + TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; } + TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; } + + /// Return a handle to the first child node. + TiXmlHandle FirstChild() const; + /// Return a handle to the first child node with the given name. + TiXmlHandle FirstChild( const char * value ) const; + /// Return a handle to the first child element. + TiXmlHandle FirstChildElement() const; + /// Return a handle to the first child element with the given name. + TiXmlHandle FirstChildElement( const char * value ) const; + + /** Return a handle to the "index" child with the given name. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( const char* value, int index ) const; + /** Return a handle to the "index" child. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( int index ) const; + /** Return a handle to the "index" child element with the given name. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( const char* value, int index ) const; + /** Return a handle to the "index" child element. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( int index ) const; + + #ifdef TIXML_USE_STL + TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); } + TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); } + + TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); } + TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); } + #endif + + /** Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* ToNode() const { return node; } + /** Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); } + /** Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* ToText() const { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); } + /** Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); } + + /** @deprecated use ToNode. + Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* Node() const { return ToNode(); } + /** @deprecated use ToElement. + Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* Element() const { return ToElement(); } + /** @deprecated use ToText() + Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* Text() const { return ToText(); } + /** @deprecated use ToUnknown() + Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* Unknown() const { return ToUnknown(); } + +private: + TiXmlNode* node; +}; + + +/** Print to memory functionality. The TiXmlPrinter is useful when you need to: + + -# Print to memory (especially in non-STL mode) + -# Control formatting (line endings, etc.) + + When constructed, the TiXmlPrinter is in its default "pretty printing" mode. + Before calling Accept() you can call methods to control the printing + of the XML document. After TiXmlNode::Accept() is called, the printed document can + be accessed via the CStr(), Str(), and Size() methods. + + TiXmlPrinter uses the Visitor API. + @verbatim + TiXmlPrinter printer; + printer.SetIndent( "\t" ); + + doc.Accept( &printer ); + fprintf( stdout, "%s", printer.CStr() ); + @endverbatim +*/ +class TiXmlPrinter : public TiXmlVisitor +{ +public: + TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ), + buffer(), indent( " " ), lineBreak( "\n" ) {} + + virtual bool VisitEnter( const TiXmlDocument& doc ); + virtual bool VisitExit( const TiXmlDocument& doc ); + + virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ); + virtual bool VisitExit( const TiXmlElement& element ); + + virtual bool Visit( const TiXmlDeclaration& declaration ); + virtual bool Visit( const TiXmlText& text ); + virtual bool Visit( const TiXmlComment& comment ); + virtual bool Visit( const TiXmlUnknown& unknown ); + + /** Set the indent characters for printing. By default 4 spaces + but tab (\t) is also useful, or null/empty string for no indentation. + */ + void SetIndent( const char* _indent ) { indent = _indent ? _indent : "" ; } + /// Query the indention string. + const char* Indent() { return indent.c_str(); } + /** Set the line breaking string. By default set to newline (\n). + Some operating systems prefer other characters, or can be + set to the null/empty string for no indenation. + */ + void SetLineBreak( const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : ""; } + /// Query the current line breaking string. + const char* LineBreak() { return lineBreak.c_str(); } + + /** Switch over to "stream printing" which is the most dense formatting without + linebreaks. Common when the XML is needed for network transmission. + */ + void SetStreamPrinting() { indent = ""; + lineBreak = ""; + } + /// Return the result. + const char* CStr() { return buffer.c_str(); } + /// Return the length of the result string. + size_t Size() { return buffer.size(); } + + #ifdef TIXML_USE_STL + /// Return the result. + const std::string& Str() { return buffer; } + #endif + +private: + void DoIndent() { + for( int i=0; i +#include + +#include "tinyxml.h" + +//#define DEBUG_PARSER +#if defined( DEBUG_PARSER ) +# if defined( DEBUG ) && defined( _MSC_VER ) +# include +# define TIXML_LOG OutputDebugString +# else +# define TIXML_LOG printf +# endif +#endif + +// Note tha "PutString" hardcodes the same list. This +// is less flexible than it appears. Changing the entries +// or order will break putstring. +TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] = +{ + { "&", 5, '&' }, + { "<", 4, '<' }, + { ">", 4, '>' }, + { """, 6, '\"' }, + { "'", 6, '\'' } +}; + +// Bunch of unicode info at: +// http://www.unicode.org/faq/utf_bom.html +// Including the basic of this table, which determines the #bytes in the +// sequence from the lead byte. 1 placed for invalid sequences -- +// although the result will be junk, pass it through as much as possible. +// Beware of the non-characters in UTF-8: +// ef bb bf (Microsoft "lead bytes") +// ef bf be +// ef bf bf + +const unsigned char TIXML_UTF_LEAD_0 = 0xefU; +const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; +const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + +const int TiXmlBase::utf8ByteTable[256] = +{ + // 0 1 2 3 4 5 6 7 8 9 a b c d e f + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 + 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid +}; + + +void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ) +{ + const unsigned long BYTE_MASK = 0xBF; + const unsigned long BYTE_MARK = 0x80; + const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + + if (input < 0x80) + *length = 1; + else if ( input < 0x800 ) + *length = 2; + else if ( input < 0x10000 ) + *length = 3; + else if ( input < 0x200000 ) + *length = 4; + else + { *length = 0; return; } // This code won't covert this correctly anyway. + + output += *length; + + // Scary scary fall throughs. + switch (*length) + { + case 4: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 3: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 2: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 1: + --output; + *output = (char)(input | FIRST_BYTE_MARK[*length]); + } +} + + +/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalpha( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalpha( anyByte ); +// } +} + + +/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalnum( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalnum( anyByte ); +// } +} + + +class TiXmlParsingData +{ + friend class TiXmlDocument; + public: + void Stamp( const char* now, TiXmlEncoding encoding ); + + const TiXmlCursor& Cursor() const { return cursor; } + + private: + // Only used by the document! + TiXmlParsingData( const char* start, int _tabsize, int row, int col ) + { + assert( start ); + stamp = start; + tabsize = _tabsize; + cursor.row = row; + cursor.col = col; + } + + TiXmlCursor cursor; + const char* stamp; + int tabsize; +}; + + +void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) +{ + assert( now ); + + // Do nothing if the tabsize is 0. + if ( tabsize < 1 ) + { + return; + } + + // Get the current row, column. + int row = cursor.row; + int col = cursor.col; + const char* p = stamp; + assert( p ); + + while ( p < now ) + { + // Treat p as unsigned, so we have a happy compiler. + const unsigned char* pU = (const unsigned char*)p; + + // Code contributed by Fletcher Dunn: (modified by lee) + switch (*pU) { + case 0: + // We *should* never get here, but in case we do, don't + // advance past the terminating null character, ever + return; + + case '\r': + // bump down to the next line + ++row; + col = 0; + // Eat the character + ++p; + + // Check for \r\n sequence, and treat this as a single character + if (*p == '\n') { + ++p; + } + break; + + case '\n': + // bump down to the next line + ++row; + col = 0; + + // Eat the character + ++p; + + // Check for \n\r sequence, and treat this as a single + // character. (Yes, this bizarre thing does occur still + // on some arcane platforms...) + if (*p == '\r') { + ++p; + } + break; + + case '\t': + // Eat the character + ++p; + + // Skip to next tab stop + col = (col / tabsize + 1) * tabsize; + break; + + case TIXML_UTF_LEAD_0: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( *(p+1) && *(p+2) ) + { + // In these cases, don't advance the column. These are + // 0-width spaces. + if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU ) + p += 3; + else + { p +=3; ++col; } // A normal character. + } + } + else + { + ++p; + ++col; + } + break; + + default: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // Eat the 1 to 4 byte utf8 character. + int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)]; + if ( step == 0 ) + step = 1; // Error case from bad encoding, but handle gracefully. + p += step; + + // Just advance one column, of course. + ++col; + } + else + { + ++p; + ++col; + } + break; + } + } + cursor.row = row; + cursor.col = col; + assert( cursor.row >= -1 ); + assert( cursor.col >= -1 ); + stamp = p; + assert( stamp ); +} + + +const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) +{ + if ( !p || !*p ) + { + return 0; + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + while ( *p ) + { + const unsigned char* pU = (const unsigned char*)p; + + // Skip the stupid Microsoft UTF-8 Byte order marks + if ( *(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==TIXML_UTF_LEAD_1 + && *(pU+2)==TIXML_UTF_LEAD_2 ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbeU ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbfU ) + { + p += 3; + continue; + } + + if ( IsWhiteSpace( *p ) ) // Still using old rules for white space. + ++p; + else + break; + } + } + else + { + while ( *p && IsWhiteSpace( *p ) ) + ++p; + } + + return p; +} + +#ifdef TIXML_USE_STL +/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ) +{ + for( ;; ) + { + if ( !in->good() ) return false; + + int c = in->peek(); + // At this scope, we can't get to a document. So fail silently. + if ( !IsWhiteSpace( c ) || c <= 0 ) + return true; + + *tag += (char) in->get(); + } +} + +/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag ) +{ + //assert( character > 0 && character < 128 ); // else it won't work in utf-8 + while ( in->good() ) + { + int c = in->peek(); + if ( c == character ) + return true; + if ( c <= 0 ) // Silent failure: can't get document at this scope + return false; + + in->get(); + *tag += (char) c; + } + return false; +} +#endif + +// One of TinyXML's more performance demanding functions. Try to keep the memory overhead down. The +// "assign" optimization removes over 10% of the execution time. +// +const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) +{ + // Oddly, not supported on some comilers, + //name->clear(); + // So use this: + *name = ""; + assert( p ); + + // Names start with letters or underscores. + // Of course, in unicode, tinyxml has no idea what a letter *is*. The + // algorithm is generous. + // + // After that, they can be letters, underscores, numbers, + // hyphens, or colons. (Colons are valid ony for namespaces, + // but tinyxml can't tell namespaces from names.) + if ( p && *p + && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) + { + const char* start = p; + while( p && *p + && ( IsAlphaNum( (unsigned char ) *p, encoding ) + || *p == '_' + || *p == '-' + || *p == '.' + || *p == ':' ) ) + { + //(*name) += *p; // expensive + ++p; + } + if ( p-start > 0 ) { + name->assign( start, p-start ); + } + return p; + } + return 0; +} + +const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) +{ + // Presume an entity, and pull it out. + TIXML_STRING ent; + int i; + *length = 0; + + if ( *(p+1) && *(p+1) == '#' && *(p+2) ) + { + unsigned long ucs = 0; + ptrdiff_t delta = 0; + unsigned mult = 1; + + if ( *(p+2) == 'x' ) + { + // Hexadecimal. + if ( !*(p+3) ) return 0; + + const char* q = p+3; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != 'x' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else if ( *q >= 'a' && *q <= 'f' ) + ucs += mult * (*q - 'a' + 10); + else if ( *q >= 'A' && *q <= 'F' ) + ucs += mult * (*q - 'A' + 10 ); + else + return 0; + mult *= 16; + --q; + } + } + else + { + // Decimal. + if ( !*(p+2) ) return 0; + + const char* q = p+2; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != '#' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else + return 0; + mult *= 10; + --q; + } + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // convert the UCS to UTF-8 + ConvertUTF32ToUTF8( ucs, value, length ); + } + else + { + *value = (char)ucs; + *length = 1; + } + return p + delta + 1; + } + + // Now try to match it. + for( i=0; iappend( cArr, len ); + } + } + else + { + bool whitespace = false; + + // Remove leading white space: + p = SkipWhiteSpace( p, encoding ); + while ( p && *p + && !StringEqual( p, endTag, caseInsensitive, encoding ) ) + { + if ( *p == '\r' || *p == '\n' ) + { + whitespace = true; + ++p; + } + else if ( IsWhiteSpace( *p ) ) + { + whitespace = true; + ++p; + } + else + { + // If we've found whitespace, add it before the + // new character. Any whitespace just becomes a space. + if ( whitespace ) + { + (*text) += ' '; + whitespace = false; + } + int len; + char cArr[4] = { 0, 0, 0, 0 }; + p = GetChar( p, cArr, &len, encoding ); + if ( len == 1 ) + (*text) += cArr[0]; // more efficient + else + text->append( cArr, len ); + } + } + } + if ( p && *p ) + p += strlen( endTag ); + return ( p && *p ) ? p : 0; +} + +#ifdef TIXML_USE_STL + +void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + // The basic issue with a document is that we don't know what we're + // streaming. Read something presumed to be a tag (and hope), then + // identify it, and call the appropriate stream method on the tag. + // + // This "pre-streaming" will never read the closing ">" so the + // sub-tag can orient itself. + + if ( !StreamTo( in, '<', tag ) ) + { + SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + while ( in->good() ) + { + int tagIndex = (int) tag->length(); + while ( in->good() && in->peek() != '>' ) + { + int c = in->get(); + if ( c <= 0 ) + { + SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + break; + } + (*tag) += (char) c; + } + + if ( in->good() ) + { + // We now have something we presume to be a node of + // some sort. Identify it, and call the node to + // continue streaming. + TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING ); + + if ( node ) + { + node->StreamIn( in, tag ); + bool isElement = node->ToElement() != 0; + delete node; + node = 0; + + // If this is the root element, we're done. Parsing will be + // done by the >> operator. + if ( isElement ) + { + return; + } + } + else + { + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + } + } + // We should have returned sooner. + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); +} + +#endif + +const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding ) +{ + ClearError(); + + // Parse away, at the document level. Since a document + // contains nothing but other tags, most of what happens + // here is skipping white space. + if ( !p || !*p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + // Note that, for a document, this needs to come + // before the while space skip, so that parsing + // starts from the pointer we are given. + location.Clear(); + if ( prevData ) + { + location.row = prevData->cursor.row; + location.col = prevData->cursor.col; + } + else + { + location.row = 0; + location.col = 0; + } + TiXmlParsingData data( p, TabSize(), location.row, location.col ); + location = data.Cursor(); + + if ( encoding == TIXML_ENCODING_UNKNOWN ) + { + // Check for the Microsoft UTF-8 lead bytes. + const unsigned char* pU = (const unsigned char*)p; + if ( *(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0 + && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1 + && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 ) + { + encoding = TIXML_ENCODING_UTF8; + useMicrosoftBOM = true; + } + } + + p = SkipWhiteSpace( p, encoding ); + if ( !p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + while ( p && *p ) + { + TiXmlNode* node = Identify( p, encoding ); + if ( node ) + { + p = node->Parse( p, &data, encoding ); + LinkEndChild( node ); + } + else + { + break; + } + + // Did we get encoding info? + if ( encoding == TIXML_ENCODING_UNKNOWN + && node->ToDeclaration() ) + { + TiXmlDeclaration* dec = node->ToDeclaration(); + const char* enc = dec->Encoding(); + assert( enc ); + + if ( *enc == 0 ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice + else + encoding = TIXML_ENCODING_LEGACY; + } + + p = SkipWhiteSpace( p, encoding ); + } + + // Was this empty? + if ( !firstChild ) { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding ); + return 0; + } + + // All is well. + return p; +} + +void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + // The first error in a chain is more accurate - don't set again! + if ( error ) + return; + + assert( err > 0 && err < TIXML_ERROR_STRING_COUNT ); + error = true; + errorId = err; + errorDesc = errorString[ errorId ]; + + errorLocation.Clear(); + if ( pError && data ) + { + data->Stamp( pError, encoding ); + errorLocation = data->Cursor(); + } +} + + +TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) +{ + TiXmlNode* returnNode = 0; + + p = SkipWhiteSpace( p, encoding ); + if( !p || !*p || *p != '<' ) + { + return 0; + } + + p = SkipWhiteSpace( p, encoding ); + + if ( !p || !*p ) + { + return 0; + } + + // What is this thing? + // - Elements start with a letter or underscore, but xml is reserved. + // - Comments: "; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + if ( document ) + document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // [ 1475201 ] TinyXML parses entities in comments + // Oops - ReadText doesn't work, because we don't want to parse the entities. + // p = ReadText( p, &value, false, endTag, false, encoding ); + // + // from the XML spec: + /* + [Definition: Comments may appear anywhere in a document outside other markup; in addition, + they may appear within the document type declaration at places allowed by the grammar. + They are not part of the document's character data; an XML processor MAY, but need not, + make it possible for an application to retrieve the text of comments. For compatibility, + the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity + references MUST NOT be recognized within comments. + + An example of a comment: + + + */ + + value = ""; + // Keep all the white space. + while ( p && *p && !StringEqual( p, endTag, false, encoding ) ) + { + value.append( p, 1 ); + ++p; + } + if ( p && *p ) + p += strlen( endTag ); + + return p; +} + + +const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) return 0; + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + // Read the name, the '=' and the value. + const char* pErr = p; + p = ReadName( p, &name, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding ); + return 0; + } + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p || *p != '=' ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + ++p; // skip '=' + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + const char* end; + const char SINGLE_QUOTE = '\''; + const char DOUBLE_QUOTE = '\"'; + + if ( *p == SINGLE_QUOTE ) + { + ++p; + end = "\'"; // single quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else if ( *p == DOUBLE_QUOTE ) + { + ++p; + end = "\""; // double quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else + { + // All attribute values should be in single or double quotes. + // But this is such a common error that the parser will try + // its best, even without them. + value = ""; + while ( p && *p // existence + && !IsWhiteSpace( *p ) // whitespace + && *p != '/' && *p != '>' ) // tag end + { + if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) { + // [ 1451649 ] Attribute values with trailing quotes not handled correctly + // We did not have an opening quote but seem to have a + // closing one. Give up and throw an error. + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + value += *p; + ++p; + } + } + return p; +} + +#ifdef TIXML_USE_STL +void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->peek(); + if ( !cdata && (c == '<' ) ) + { + return; + } + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + (*tag) += (char) c; + in->get(); // "commits" the peek made above + + if ( cdata && c == '>' && tag->size() >= 3 ) { + size_t len = tag->size(); + if ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' ) { + // terminator of cdata. + return; + } + } + } +} +#endif + +const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + value = ""; + TiXmlDocument* document = GetDocument(); + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + + const char* const startTag = ""; + + if ( cdata || StringEqual( p, startTag, false, encoding ) ) + { + cdata = true; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + if ( document ) + document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // Keep all the white space, ignore the encoding, etc. + while ( p && *p + && !StringEqual( p, endTag, false, encoding ) + ) + { + value += *p; + ++p; + } + + TIXML_STRING dummy; + p = ReadText( p, &dummy, false, endTag, false, encoding ); + return p; + } + else + { + bool ignoreWhite = true; + + const char* end = "<"; + p = ReadText( p, &value, ignoreWhite, end, false, encoding ); + if ( p && *p ) + return p-1; // don't truncate the '<' + return 0; + } +} + +#ifdef TIXML_USE_STL +void TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->get(); + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + (*tag) += (char) c; + + if ( c == '>' ) + { + // All is well. + return; + } + } +} +#endif + +const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding ) +{ + p = SkipWhiteSpace( p, _encoding ); + // Find the beginning, find the end, and look for + // the stuff in-between. + TiXmlDocument* document = GetDocument(); + if ( !p || !*p || !StringEqual( p, "SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding ); + return 0; + } + if ( data ) + { + data->Stamp( p, _encoding ); + location = data->Cursor(); + } + p += 5; + + version = ""; + encoding = ""; + standalone = ""; + + while ( p && *p ) + { + if ( *p == '>' ) + { + ++p; + return p; + } + + p = SkipWhiteSpace( p, _encoding ); + if ( StringEqual( p, "version", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + version = attrib.Value(); + } + else if ( StringEqual( p, "encoding", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + encoding = attrib.Value(); + } + else if ( StringEqual( p, "standalone", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + standalone = attrib.Value(); + } + else + { + // Read over whatever it is. + while( p && *p && *p != '>' && !IsWhiteSpace( *p ) ) + ++p; + } + } + return 0; +} + +bool TiXmlText::Blank() const +{ + for ( unsigned i=0; i + + com.distractionware.vvvvvvmobile + 1.02 + mobileDevice + VVVVVV + VVVVVV + + + + + +]]> + + + UIStatusBarStyle +UIStatusBarStyleBlackOpaque +UIRequiresPersistentWiFi +NO +UIPrerenderedIcon + +UIApplicationExitsOnSuspend + +UIDeviceFamily + + + 1 + + 2 +]]> + standard + + + VVVVVV + vvvvvv.swf + true + landscape + gpu + standard + true + true + + + icons/icon_48.png + icons/icon_57.png + icons/icon_72.png + icons/icon_76.png + icons/icon_96.png + icons/icon_114.png + icons/icon_120.png + icons/icon_144.png + icons/icon_152.png + icons/icon_512.png + icons/icon_1024.png + + + + com.milkmangames.extensions.GameCenter + + + \ No newline at end of file diff --git a/mobile_version/levels/eurogamer fork/eurogamerotherlevelclass.as b/mobile_version/levels/eurogamer fork/eurogamerotherlevelclass.as new file mode 100644 index 00000000..a5fb955c --- /dev/null +++ b/mobile_version/levels/eurogamer fork/eurogamerotherlevelclass.as @@ -0,0 +1,7792 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class otherlevelclass extends Sprite { + static public var BLOCK:Number = 0; + static public var TRIGGER:Number = 1; + static public var DAMAGE:Number = 2; + static public var DIRECTIONAL:Number = 3; + static public var SAFE:Number = 4; + static public var ACTIVITY:Number = 5; + + public function otherlevelclass():void { + for (i = 0; i < 50; i++) { + roomtext.push(new String()); + } + } + + public function addline(t:String):void { + roomtext[roomtextnumlines] = t; + roomtextnumlines++; + } + + public function rn(rx:int, ry:int):int { + return rx + (ry * 100); + } + + public function loadlevel(rx:int, ry:int, game:gameclass, obj:entityclass):void { + var t:int; + roomtileset = 1; + + rx -= 100; ry -= 100; + t = rx + (ry * 100); + + roomname = ""; + + roomtextnumlines = 0; roomtextx = 0; roomtexty = 0; roomtexton = false; + + switch(t) { + +case rn(0,0): + +tmap.push("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,240,241,241,241,241,241,241,241,241,241,241,241,241,241,242,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,240,241,241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,160,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,121,161,161,161,161,122,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,200,80,80,80,80,80,80,80,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,241,241,241,241,241,241,241,241,242,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,160,162,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,240,242,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,688,687,687,687,688,687,687,687,687,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,240,241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,160,161,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,160,161,161,161,161,161,161,161,161,161,161,161,161,161,162,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,160,161,162,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("161,161,161,162,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,160,161,161,162,0,0,0,606,486,486,486,486,486,486"); +tmap.push("80,80,80,202,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,240,241,241,242,0,0,0,606,486,486,486,486,486,486"); +tmap.push("241,241,241,242,240,241,241,242,240,241,241,241,241,241,241,241,241,241,241,241,241,241,242,240,241,242,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + +obj.createentity(game, 72, 32, 14); //Teleporter! +obj.createentity(game, 216, 144, 10, 1, 0); // (savepoint) +break; + +case rn(0,1): + +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +break; + +case rn(0,2): + +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,692,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(0,3): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,642,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,481,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641"); +tmap.push("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,4): + +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,496,657,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,5): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,6,6,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("6,6,6,6,6,6,6,6,6,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(0,6): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,560,561,561,561,561,562,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,602,681,681,681,681,640,641"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,640,641,641,641,641,642,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +break; + +case rn(0,7): + +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,663,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,663,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,8): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,699,699,699,699,699,699,699,699,699,699,699"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +break; + +case rn(0,9): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); +tmap.push("641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,521,562,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,521,562,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,640,641,641,482,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,600,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,642,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 152, 144, 10, 1, 9000); // (savepoint) +break; + +case rn(0,10): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,484,644,644,644,644,645,7,7,7,7,7,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,605,7,7,7,7,7,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644"); +tmap.push("644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,7,7,7"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483,483,484,644,645,7,7,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,7,7,7,7,7,603,483,483,483,483,483,483,605,7,7,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,645,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,603,605,6,6,6,6,6,6,6,6,6,603,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,603,524,564,564,564,564,564,564,564,564,564,525,605,6,6,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564"); +tmap.push("6,6,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483,524,564,565,6,6,6,6,6,6,6,6,6,6,6,6,603,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 224, 96, 10, 0, 10000); // (savepoint) +break; + +case rn(0,11): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,602,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,680,0,560,561,561,562,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,602,0,680,0,0,0,0,0,0,0,0,680,0,600,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,560,561,561,522,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,560,561,561,522,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,600,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,481,641,641,642,0,0,0,0,0,0,0,680,0,560,561,561,522,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); +tmap.push("480,480,480,602,0,680,0,0,0,0,0,0,0,0,680,0,600,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("641,641,641,642,0,680,0,0,0,0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,640,641,641,641,641,641,641"); +tmap.push("0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 56, 32, 13); //Warp Token + +break; + +case rn(0,12): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,692,0,0,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,692,0,0,0,0,0,692,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,692,0,0,0,0,0,692,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("573,573,573,574,0,0,0,692,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,533,573,574,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,533,574,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,533,574,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,533,574,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,493,653,653,654,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,652,653,494,492,492,493,653,653,654,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,692,0,652,653,653,654,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,693,693,693,694,693,693,693,693,693,693,694,693,693,693,693,693,693,693,694,693,693,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,493,653,654,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,493,653,653,653,653,654,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("653,654,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,525,483,524,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(0,14): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +break; + +case rn(0,15): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,660,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,499,659,660,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,499,660,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,620,699,699,699,699,699,700,699,699,699,699,699,699,699,699,699,699,699,699,700,699,699,699,699,699,699,699,699,699,699,699,699"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,16): + +tmap.push("480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,481,642,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,481,642,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,481,642,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,481,642,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,560,561,561,561,561"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,560,561,561,561,561,522,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,640,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 120, 40, 14); //Teleporter! +break; + +case rn(0,17): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(1,2): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,496,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,496,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,496,657,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,536,576,576,577,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,617,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,536,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(1,3): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,490,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,490,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(1,4): + +tmap.push("0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 144, 136, 10, 1, 4010); // (savepoint) +break; + +case rn(1,5): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,641,641"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,680,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + +case rn(1,6): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,490,650,651,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,611,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,611,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489"); +tmap.push("489,489,489,611,0,0,0,0,0,569,570,570,570,570,570,570,570,571,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,649,650,650,491,489,489,489"); +tmap.push("489,489,489,611,0,0,0,569,570,531,489,489,489,489,489,489,489,530,570,571,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,649,650,650,650"); +tmap.push("489,489,489,611,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); +tmap.push("650,650,650,651,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); +tmap.push("0,0,0,0,0,0,0,649,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,689,0,0,0,0,0,689,0,0"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,569,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,649,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(1,8): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(1,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,485,483,483,484,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,643,644,644,645,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,684,685,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,196,197,197,197,197,198,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,563,565,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,563,564,525,605,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,525,483,483,605,236,116,116,116,116,157,197,198,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,157,197,198,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,276,277,118,116,116,116,116,116,116,157,197,197,197,197,197,197,197,197,197"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + +obj.createentity(game, 152, 64, 10, 0, 9010); // (savepoint) +break; + +case rn(1,10): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("7,7,7,7,7,7,7,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,652,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,572,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,572,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +obj.createentity(game, 208, 120, 9, 0); // (shiny trinket) +break; + +case rn(1,11): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,494,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492"); +tmap.push("492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,653,653,653,653,653,653,494,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); +tmap.push("492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,533,573,573,573,573,573,574,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492"); +tmap.push("653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,612,492,492"); +tmap.push("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); +tmap.push("573,573,573,573,573,573,573,573,534,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +obj.createentity(game, 40, 192, 13); //Warp Token +obj.createentity(game, 168, 136, 13); //Warp Token +obj.createentity(game, 224, 136, 13); //Warp Token + + + +obj.createentity(game, 96, 80, 13); //Warp Token + +break; + +case rn(1,12): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,230,110,110,110,110,110,110"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,270,271,271,271,271,271,271"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,649,650,650,650,650,650,491,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(1,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,562,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,522,480,521,562,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,481,642,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,642,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 112, 152, 10, 1, 13010); // (savepoint) +break; + +case rn(1,14): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +break; + +case rn(1,15): + +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("693,693,693,693,693,693,693,693,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(1,16): + +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,496,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,375,376,376,376,376,376,376,376,376,376,376"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,537,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,617,455,456,456,456,456,456,456,456,456,456,456"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,575,576,576,537,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,575,576,576,576,576,537,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,575,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,575,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,375,376,376,376,376,376"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,657,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,657,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,415,295,295,295,295,295"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,415,295,295,295,295,295"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,415,295,295,295,295,295"); + +obj.createentity(game, 280, 120, 10, 1, 16010); // (savepoint) +break; + +case rn(2,2): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 56, 32, 10, 1, 2020); // (savepoint) +break; + +case rn(2,3): + +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(2,5): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,643,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644,644,644"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,484,644,644,644,644,645,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,524,564,564,565,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,563,564,565,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,643,644,645,0,0,0,0,0,563,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(2,6): + +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,487,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 40, 88, 10, 1, 6020); // (savepoint) +break; + +case rn(2,8): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +break; + +case rn(2,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,562,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,193,194,195,0,0,0,193,194,195,0,0,0,193,194,195,0,0,0,193,194,194"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,235,0,0,0,233,113,235,0,0,0,233,113,154,194,194,194,155,113,113"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,235,0,0,0,233,113,154,194,194,194,155,113,113,113,113,113,113,113,113"); +tmap.push("194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,155,113,154,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +break; + +case rn(2,10): + +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,114,274,274,274,274,274"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,235,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,235,753,753,753,753,753"); +tmap.push("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,0,0,0,273,274,274,274,275,753,753,753,753,753"); +tmap.push("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); +tmap.push("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + +obj.createentity(game, 40, 32, 9, 1); // (shiny trinket) +obj.createentity(game, 64, 32, 9, 2); // (shiny trinket) +obj.createentity(game, 88, 32, 9, 3); // (shiny trinket) +obj.createentity(game, 40, 80, 9, 4); // (shiny trinket) +obj.createentity(game, 64, 80, 9, 5); // (shiny trinket) +obj.createentity(game, 88, 80, 9, 6); // (shiny trinket) +obj.createentity(game, 112, 80, 9, 7); // (shiny trinket) +obj.createentity(game, 40, 128, 9, 8); // (shiny trinket) +obj.createentity(game, 64, 128, 9, 9); // (shiny trinket) +obj.createentity(game, 88, 128, 9, 10); // (shiny trinket) +obj.createentity(game, 112, 128, 9, 11); // (shiny trinket) +obj.createentity(game, 136, 128, 9, 12); // (shiny trinket) +obj.createentity(game, 40, 176, 9, 13); // (shiny trinket) +obj.createentity(game, 64, 176, 9, 14); // (shiny trinket) +obj.createentity(game, 88, 176, 9, 15); // (shiny trinket) +obj.createentity(game, 112, 176, 9, 16); // (shiny trinket) +obj.createentity(game, 136, 176, 9, 17); // (shiny trinket) +obj.createentity(game, 112, 32, 9, 18); // (shiny trinket) +obj.createentity(game, 136, 80, 9, 19); // (shiny trinket) +obj.createentity(game, 136, 32, 9, 20); // (shiny trinket) +break; + +case rn(2,11): + +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,105,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,746,744,745,905,746,744,745,905,746,744,745,905,746,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,786,744,785,825,786,744,785,825,786,744,785,825,786,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,905,905,905,905,905,905,905,905,905,905,905,905,746,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,825,825,825,825,825,825,825,825,825,825,825,825,786,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,746,744,745,905,746,744,745,905,746,744,745,905,746,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,786,744,785,825,786,744,785,825,786,744,785,825,786,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); +tmap.push("104,104,104,104,145,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,186,744,744,744,744"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,744,744,744,744"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,744,744,744,744"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,145,185,185,185,185"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + +obj.createentity(game, 64, 64, 14); //Teleporter! +break; + +case rn(2,12): + +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("265,265,265,265,106,105,265,265,265,265,265,265,265,106,104,105,265,265,265,265,265,265,265,106,105,265,265,265,265,265,265,265,106,104,105,265,265,265,265,265"); +tmap.push("567,567,567,568,224,226,566,567,567,567,567,567,568,224,105,266,566,567,567,567,567,567,568,224,226,566,567,567,567,567,567,568,264,106,226,566,567,567,567,567"); +tmap.push("486,486,608,184,146,266,606,486,486,486,487,647,648,224,226,566,528,486,486,486,487,647,648,224,226,606,486,486,486,486,486,527,568,224,226,606,486,486,486,486"); +tmap.push("486,486,608,264,266,566,528,486,486,486,608,184,185,146,266,606,486,486,486,487,648,184,185,146,266,606,486,486,486,486,487,647,648,224,226,606,486,486,486,486"); +tmap.push("486,486,527,567,567,528,486,486,486,486,608,264,265,266,566,528,486,486,486,608,184,146,105,266,566,528,486,486,486,486,608,184,185,146,266,606,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,608,264,265,266,566,528,486,486,486,486,486,608,264,265,266,566,528,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,648,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("486,487,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("647,648,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,568,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,566,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,648,0,0,0,0,0,566,567,568,0,0,0,0"); +tmap.push("0,0,0,646,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,648,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(2,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,615,495,617,696,696,696,696,696,696,696,696,696,696,696,697,696,696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,696,696,697,696,696,696,696,615,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,697,696,696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(2,14): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(2,15): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,571,6,6,6,6,6,6"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 240, 96, 10, 0, 15020); // (savepoint) +break; + +case rn(3,2): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,499,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,500,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,499,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,500"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,539,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,540"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,499,660,0,0,0,0,658,500,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,539,580,0,0,0,0,578,540,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,539,579,579,579,579,540,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,499,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,500"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,539,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,540"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,539,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + +obj.createentity(game, 152, 96, 9, 21); // (shiny trinket) +break; + +case rn(3,3): + +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,662,662,662,662,662,663,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,662,662,662,662,662,662,663,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,502,663,0,0,0,0,0,0,0,0,0,581,582,582,582,582,582,582,582,582,582,582,582,582,582,543,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,502,662,662,662,662,662,663,702,702,702,702,702,702,702,702,702,581,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("662,662,662,662,662,662,663,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + +obj.createentity(game, 24, 192, 10, 1, 3030); // (savepoint) +break; + +case rn(3,5): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,640,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641"); +tmap.push("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,681,682,681,681,681,681,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,560,561,561,561,561,561,562,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,640,641,641,641,641,641,642,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(3,6): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,693,693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(3,7): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,690,690,690,691,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(3,8): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(3,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,183,0,0,181,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,182,143,142,182,182,143,142,182,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,261,262,103,102,262,262,103,102,262,263,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,182,143,223,0,0,221,142,182,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,261,262,103,223,0,0,221,102,262,263,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,143,142,182,182,143,142,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + +obj.createentity(game, 248, 168, 10, 1, 9030); // (savepoint) +break; + +case rn(3,10): + +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,742,902,902,902,902,743,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,782,822,822,822,822,783,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,261,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,263,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,742,902,902,902,902,902,902,743,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); +tmap.push("741,741,741,742,902,902,902,902,902,902,902,902,902,743,741,741,863,0,0,0,0,0,0,861,741,741,742,902,902,902,902,902,902,902,902,902,743,741,741,741"); +tmap.push("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); +tmap.push("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); +tmap.push("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); +tmap.push("741,741,741,782,822,822,822,822,822,822,822,822,822,783,741,741,863,0,0,0,0,0,0,861,741,741,782,822,822,822,822,822,822,822,822,822,783,741,741,741"); +tmap.push("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,782,822,822,822,822,822,822,783,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); +tmap.push("182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,741,741,741,741,741,741,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + +obj.createentity(game, 216, 80, 20, 1); +obj.createentity(game, 176, 80, 20, 1); +obj.createentity(game, 88, 80, 20, 1); +obj.createentity(game, 128, 80, 20, 1); +break; + +case rn(3,11): + +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,748,908,908,749,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,788,828,828,789,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,747,747,747,747,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("268,268,268,268,268,268,268,268,268,268,268,109,107,107,107,107,229,747,748,908,908,749,747,227,107,107,107,107,108,268,268,268,268,268,268,268,268,268,268,268"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,788,828,828,789,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,267,268,268,268,268,269,747,747,747,747,747,747,267,268,268,268,268,269,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,748,908,908,749,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,747,747,747,748,908,908,749,869,0,0,867,748,908,908,749,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,748,908,908,749,869,0,0,867,869,0,0,867,869,0,0,867,748,908,908,749,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,869,0,0,867,869,0,0,867,788,828,828,789,869,0,0,867,869,0,0,867,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,869,0,0,867,788,828,828,789,747,747,747,747,788,828,828,789,869,0,0,867,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,788,828,828,789,747,747,747,747,747,747,747,747,747,747,747,747,788,828,828,789,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,189,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,267,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,269,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,748,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,749,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,869,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,867,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,869,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,867,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,788,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,789,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +break; + +case rn(3,12): + +tmap.push("107,107,107,107,107,107,107,107,108,268,268,109,108,268,268,109,108,268,268,109,108,268,268,268,109,108,268,268,268,268,109,107,108,268,268,268,109,107,107,107"); +tmap.push("268,268,268,268,268,268,268,268,269,572,574,227,229,572,574,267,269,572,574,267,269,572,573,574,227,229,572,573,573,574,267,268,269,572,573,574,267,268,268,268"); +tmap.push("573,573,573,573,573,573,573,573,573,534,614,227,229,612,533,573,573,534,533,573,573,534,492,614,227,229,612,492,492,533,573,573,573,534,492,614,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,227,229,612,492,492,492,492,492,492,492,493,653,654,227,229,612,492,492,492,492,492,492,492,492,614,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,227,229,612,492,492,492,492,492,492,492,614,187,188,149,269,612,492,492,492,492,492,492,492,493,654,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,267,269,612,492,492,492,492,492,492,492,614,267,268,269,572,534,492,492,492,492,492,493,653,654,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,533,573,573,534,492,492,492,492,492,492,492,533,573,573,573,534,492,492,492,492,492,493,654,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,654,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,654,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0"); +tmap.push("0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0"); +tmap.push("0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693"); +tmap.push("0,0,0,0,0,652,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,653,653,654,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 128, 160, 10, 1, 12030); // (savepoint) +break; + +case rn(3,13): + +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684"); +tmap.push("0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564"); +tmap.push("564,564,564,565,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483"); +tmap.push("483,483,483,524,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(3,15): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,645,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,563,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,603,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,563,564,525,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,563,525,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,605,683,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,605,683,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,643,485,483,483,483,483,483,484,645,683,0,0,0,0,0,563,525,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,603,483,483,483,483,483,605,0,683,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,643,485,483,483,483,483,605,0,683,0,0,0,0,563,525,483,483,483,483,483"); +tmap.push("6,6,6,6,6,6,6,6,6,563,564,564,565,0,0,0,0,683,0,0,0,643,644,644,644,644,645,0,683,0,0,0,0,603,483,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,525,483,483,524,565,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,563,525,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,524,565,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,565,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,563,564,564,564,525,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(4,5): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,499,659,659,659,660,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,658,659,659,659,659,500,498,498,498,498,498"); +tmap.push("498,498,498,498,498,499,659,660,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,658,500,498,498,498,498"); +tmap.push("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,658,659,659,659,659"); +tmap.push("659,659,659,659,659,660,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,578,579,579,579,579,580,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,580,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,578,579,540,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,539,579,579,580,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,499,660,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,578,579,579,540,498,498,498,498,498,620,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,618,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,658,500,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,499,659,660,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,658,500,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,499,660,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,618,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,658,659,500,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,658,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,660,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(4,6): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,563,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,643,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +roomtexton = true; roomtextx = 18; roomtexty = 7; +addline("HELLO EUROGAMER EXPO"); +addline(""); +addline(""); +addline(""); +addline(" Welcome to..."); +addline(" DIMENSION VVVVVV!"); +addline(""); +addline(""); +addline(""); +addline(" Press the arrow"); +addline(" keys to move."); + +break; + +case rn(4,7): + +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +roomtexton = true; roomtextx = 2; roomtexty = 22; +addline("VVVVVV is a work in progress!"); +addline(""); +addline(" This hub world will show you"); +addline(" the game so far."); + +break; + +case rn(4,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,190,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,270,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,190,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,270,272,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,192,0,0,0,190,191,191,191,191,191,191,192,0,0,190,191,191,191,191,191,191,191,191,191,191"); +tmap.push("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,232,0,0,0,230,110,110,110,110,110,110,232,0,0,230,110,111,271,271,271,112,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,232,0,0,0,230,110,110,110,110,110,110,151,191,191,152,110,232,0,0,0,230,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,151,191,191,191,152,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,151,191,191,191,152,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,151,191,191,191,152,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +break; + +case rn(4,10): + +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("271,271,271,271,271,271,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,750,750,750,750,750,750,750,270,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,750,750,750,750,750,750,750,750,750,750,270,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,751,911,911,911,911,911,911,752,750,750,750,750,750,270,271,271,271,271,271,271,271,271,271,271,271,271,271,112,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,270,271,271,271,271,112,110,110,110,110,110,110"); +tmap.push("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,750,750,750,750,751,911,911,752,750,750,750,750,872,0,0,0,270,271,112,110,110,110,110"); +tmap.push("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,751,911,911,752,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,791,831,831,831,831,831,831,792,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,750,750,750,750,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,190,191,191,191,191,191,191,152,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,190,152,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,190,152,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,270,271,271,271,271,271,271,271,271,112,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,152,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + +obj.createentity(game, 256, 120, 20,1); +obj.createentity(game, 256, 184, 20,1 ); +obj.createentity(game, 232, 184, 20,1); +obj.createentity(game, 208, 184, 20,1); +break; + +case rn(4,11): + +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,118,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,757,917,917,917,917,758,756,756,757,917,917,917,917,758,756,756,757,917,917,917,917,758,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,797,837,837,837,837,798,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,756,756,756,756,756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,756,756,756,756,756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,196,197,197,197,197,198,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,797,837,837,837,837,798,756,756,236,116,116,116,116,238,756,756,797,837,837,837,837,798,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,238,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,238,917,917,758,756,756,756,756,757,917,917,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("197,197,197,197,197,197,197,197,197,197,197,197,158,116,116,116,116,238,0,0,876,756,756,756,756,878,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,916,917,917,917,917,918,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +break; + +case rn(4,12): + +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,118,116,238,0,0,0,0,0,0,0,0,0,0,236,116,117,277,277,277,277,277,277,277,277,277"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,276,277,278,0,0,0,0,0,0,0,0,0,0,276,277,278,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,643,644,485,483,483,483,484,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,643,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(4,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("690,690,690,690,690,690,690,690,690,690,691,690,690,690,690,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,690,690,690,690,690,690,690,690,690,690,690"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 152, 128, 10, 1, 13040); // (savepoint) +break; + +case rn(4,14): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,493,653,653,654,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,493,653,654,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,652,653,653,653,653,653,653,653"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,493,654,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,0,0,0,572,573,573,573,573,574,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,0,572,573,534,492,492,492,492,533,573,574,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,533,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,533,573,574,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,574,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,574,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,692,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,574,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,652,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573"); +tmap.push("492,492,492,492,492,533,574,0,0,0,0,692,0,0,0,0,692,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,533,574,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,533,573,574,0,692,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,574,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(4,15): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,602,0,0,0,0,0,560,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,680,640,641,482,480,480,480,481,641,642,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,680,0,0,640,641,641,641,642,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("561,561,561,561,562,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,0,0,560,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,521,561,562,0,0,680,0,0,0,680,0,0,0,680,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,521,562,0,680,0,0,0,680,0,0,0,680,0,0,0,560,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,521,561,562,0,0,0,680,0,0,0,680,0,560,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 16, 40, 10, 1, 15040); // (savepoint) +break; + +case rn(5,2): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644,644"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,7,7,7,7,7,7,7,7"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,7,7,7,603,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,3): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,612,492,614,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,572,573,573,574,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,693,694,693,693,693,694,693,693,694,693,612,492,492,614,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,652,653,653,654,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,572,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,652,653,654,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,612,492,614,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 272, 128, 10, 0, 3050); // (savepoint) +break; + +case rn(5,4): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,490,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,5): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,646,647,488,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,646,488,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,646,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,6): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,7): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 40, 136, 10, 1, 7050); // (savepoint) + + +roomtexton = true; roomtextx = 8; roomtexty = 5; +addline("Press ACTION to flip gravity."); +break; + +case rn(5,8): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(5,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,184,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,264,266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,580,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,539,579,579,579,579"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,184,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,499,659,659,659,659,659"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,224,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,264,265,266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,539,579,579,579,579,579"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("185,185,185,185,185,185,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,145,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,10): + +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,534,492,492"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,612,492,493,653,653,653,653,653,653,653"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,766,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,806,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,806,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,846,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,568,0,0,0,612,492,614,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,766,767,768,612,492,614,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,648,0,0,0,612,492,614,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,766,0,0,0,0,612,492,533,573,573,573,573,573,573,573"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,0,0,0,0,652,653,653,653,653,653,653,653,653,653"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,846,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,11): + +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,154,194,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,12): + +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693"); +tmap.push("0,0,0,0,0,0,612,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,652,653,653,653,654,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("693,693,693,693,693,693,693,693,694,693,693,693,693,693,693,693,693,693,693,693,694,693,693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,574,0,0,0,0"); +tmap.push("573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +obj.createentity(game, 184, 176, 10, 1, 13050); // (savepoint) +break; + +case rn(5,14): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(5,15): + +tmap.push("486,486,486,486,486,486,486,487,647,647,647,647,488,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,487,647,647,648,0,0,0,0,606,486,486,487,647,648,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486"); +tmap.push("486,487,647,647,648,686,0,0,0,0,0,0,606,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,608,0,0,0,686,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,566,528,487,647,647,647,647"); +tmap.push("486,608,0,0,0,686,0,0,0,0,0,0,606,486,608,687,687,687,687,687,566,567,567,567,567,567,568,687,687,606,486,608,0,606,486,608,0,0,686,0"); +tmap.push("486,608,0,0,0,686,0,0,0,0,0,0,646,488,608,0,0,0,0,0,606,486,486,486,487,647,648,0,0,646,647,648,0,606,486,608,0,0,566,567"); +tmap.push("486,608,0,0,0,686,0,0,0,566,568,0,0,646,648,0,0,0,0,566,528,486,486,486,608,0,0,0,0,0,686,0,0,606,486,608,0,0,606,486"); +tmap.push("486,608,0,0,0,566,568,0,0,606,527,568,0,0,686,0,0,0,0,646,647,647,488,486,527,568,0,0,0,0,686,0,0,606,486,608,0,0,646,647"); +tmap.push("486,608,687,687,687,606,527,567,567,528,486,608,0,0,686,0,0,0,0,0,0,0,646,647,488,527,568,0,0,0,686,0,0,606,486,608,0,0,0,0"); +tmap.push("486,608,0,0,0,646,488,486,486,486,487,648,0,0,686,0,0,0,0,0,0,0,686,0,606,487,648,0,0,0,686,0,566,528,486,608,0,0,0,0"); +tmap.push("486,608,0,0,0,0,646,488,486,486,608,0,0,0,686,0,0,0,0,0,0,0,686,0,646,648,0,0,0,0,686,0,606,486,487,648,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,646,647,647,648,0,566,567,567,567,568,0,0,0,566,567,568,0,0,0,0,0,0,566,567,567,528,486,608,0,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,686,0,0,0,566,528,486,486,486,608,0,0,566,528,486,608,687,687,687,687,687,687,606,486,487,647,647,648,0,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,686,0,0,566,528,486,486,487,647,648,0,0,606,486,487,648,0,0,0,0,0,0,606,486,608,0,0,686,0,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,686,0,0,606,486,486,487,648,0,0,0,0,646,647,648,0,0,0,0,0,0,566,528,486,608,0,0,686,0,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,686,0,0,646,488,486,608,0,0,0,0,0,0,686,0,0,0,0,566,567,567,528,487,647,648,0,0,686,0,0,0,0,0"); +tmap.push("486,608,0,0,0,566,567,568,0,0,0,646,488,608,0,0,0,0,0,0,686,0,0,0,0,606,486,487,647,648,0,0,0,0,686,0,0,0,0,0"); +tmap.push("486,527,567,568,0,606,486,608,0,0,0,0,606,527,568,0,0,0,0,566,568,0,0,0,0,646,488,608,0,0,0,0,0,0,566,567,568,0,0,0"); +tmap.push("486,486,486,608,0,646,647,648,0,0,0,0,606,486,608,0,0,566,567,528,608,0,0,0,0,0,646,648,0,0,0,0,0,0,606,486,608,0,0,0"); +tmap.push("486,486,486,527,568,0,0,686,0,0,0,0,606,487,648,687,687,606,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,606,487,648,0,0,0"); +tmap.push("486,486,486,486,608,0,0,686,0,0,0,0,606,608,0,0,0,606,486,486,608,0,0,0,0,0,0,566,567,567,568,0,0,566,528,608,0,0,0,0"); +tmap.push("486,486,486,486,608,0,0,566,567,568,0,0,606,608,0,0,0,606,486,486,527,567,567,568,687,687,687,606,486,486,608,0,0,606,486,608,0,0,0,0"); +tmap.push("486,486,486,486,608,0,566,528,486,608,0,0,606,608,0,0,0,606,486,486,486,486,486,608,0,0,0,646,647,647,648,0,0,646,647,648,0,0,0,0"); +tmap.push("486,486,486,486,608,0,606,486,487,648,0,0,646,648,0,0,0,606,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("486,486,486,486,608,0,606,486,608,0,0,0,0,686,0,0,566,528,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0"); +tmap.push("486,486,486,486,527,567,528,486,608,0,0,0,0,686,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,608,0,0,0,0,686,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,527,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,527,567,568,0,0,686,0,0,606,486,486,486,486,486,486,486,527,568,0,0,0,0,0,566,567,528,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,528,486,486,486,486,486,486,486,486,527,567,567,567,567,567,528,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 72, 16, 9, 22); // (shiny trinket) +break; + +case rn(5,18): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,690,690,690,690,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 224, 160, 13); //Warp Token + +break; + +case rn(5,19): + +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,693,693,693,693,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,533,573,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,693,693,693,693,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,652,653,653,494,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,533,573,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,693,693,693,693,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,652,653,653,494,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(6,2): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,7,7,7,7,7,7,7,7,640,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,7,7,0,0,0,0,0,0,0,0,7,7,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,602,7,680,7,0,0,0,0,0,0,0,0,0,0,0,0,7,680,7,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,640,641,641,482,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,602,7,7,7,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,7,7,7,600,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,641,482,480,480,480,480"); +tmap.push("480,480,480,480,602,7,7,7,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,7,7,7,600,480,480,480,480"); +tmap.push("641,641,641,641,642,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,640,641,641,641,641"); +tmap.push("7,7,7,7,7,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,7,7,7,7,7"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 152, 152, 10, 0, 2060); // (savepoint) +break; + +case rn(6,4): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,565,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,565,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,524,564,565,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,524,564,565,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,524,564,565,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 128, 120, 10, 1, 4060); // (savepoint) +break; + +case rn(6,5): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(6,6): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,687,687,688,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,648,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(6,7): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,7,7,7,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,615,495,495,495,495,495,495,495,495,617,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 152, 152, 10, 1, 7060); // (savepoint) +break; + +case rn(6,8): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 208, 152, 10, 1, 8060); // (savepoint) + +obj.createblock(1, 0, 0, 20, 240, 90); + + +roomtexton = true; roomtextx = 3; roomtexty = 2; +addline("[ Space Station ]"); +addline(""); +addline("DIFFICULTY: Easy"); +addline(""); +addline(" <--"); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(" |"); +addline(" | Other Levels "); +addline(" V"); +break; + +case rn(6,9): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("579,579,579,579,579,579,579,579,579,580,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,580,0,0,0,578,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,580,0,0,0,0,578,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + +obj.createentity(game, 152, 136, 10, 1, 9060); // (savepoint) + +obj.createblock(1, 0, 0, 20, 240, 91); + +obj.createblock(1, 290, 0, 40, 240, 93); + +roomtexton = true; roomtextx = 1; roomtexty = 2; +addline("[ Laboratory ] [ The Tower ]"); +addline(""); +addline(" Medium Medium"); +addline(""); +addline(" <-- -->"); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(" |"); +addline(" | More "); +addline(" V"); +break; + +case rn(6,10): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("573,573,573,573,573,573,573,573,573,573,574,0,0,0,572,573,573,573,573,573,573,573,573,573,573,574,0,0,0,572,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,0,0,0,652,653,653,653,653,653,653,653,653,653,653,654,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,573,574,0,0,0,0,572,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + + +obj.createblock(1, 0, 0, 20, 240, 92); +obj.createblock(1, 290, 0, 40, 240, 94); + +roomtexton = true; roomtextx = 1; roomtexty = 24; +addline(" [ Warp Zone ] [ Station Two ]"); +addline(""); +addline(" <-- Hard Hard -->"); +break; + +case rn(6,11): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(6,12): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + + +obj.createblock(1, 290, 0, 40, 240, 95); + +roomtexton = true; roomtextx = 1; roomtexty = 20; +addline(" [ Final Level ] "); +addline(""); +addline(" Very Hard"); +addline(""); +addline(" -->"); +addline(""); +addline(""); +addline(" Not recommended unless you've"); +addline(" completed all the other levels!"); + +break; + +case rn(6,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,688,687,687,687,687,687,687,687,687,687,687,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(6,14): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,481,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,481,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + +case rn(6,15): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,490,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,491,489,611,0,0,0,0,0,609,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("0,689,0,0,0,0,609,489,611,0,0,0,0,0,649,650,651,0,0,0,0,0,689,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); +tmap.push("570,570,571,690,690,690,609,489,611,0,0,0,0,0,0,689,0,0,0,0,569,570,570,571,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); +tmap.push("489,489,611,0,0,0,649,650,651,0,0,0,0,0,569,570,570,570,571,690,609,489,489,611,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); +tmap.push("650,650,651,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,611,0,649,650,650,651,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,609,489,489,490,650,650,650,651,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,569,570,570"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,649,650,650,651,0,0,689,0,0,0,0,0,0,0,0,569,531,489,611,0,0,0,0,0,0,569,531,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,569,570,571,0,0,0,0,0,0,0,609,489,490,651,0,0,0,0,0,0,609,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,609,489,611,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,569,531,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,649,491,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489"); +tmap.push("0,0,0,0,0,569,570,571,0,0,0,0,609,489,611,0,0,609,489,489,611,0,0,0,0,0,0,0,569,570,571,0,0,569,531,489,489,489,489,489"); +tmap.push("0,0,0,0,569,531,489,530,571,0,0,0,649,650,651,0,0,609,489,490,651,0,0,0,0,0,0,0,609,489,611,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,569,570,570,570,531,490,651,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,609,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,569,570,571,690,690,649,650,650,491,489,611,0,0,0,649,650,491,489,489,489,489"); +tmap.push("0,0,0,0,649,650,491,489,611,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,609,490,651,0,0,0,0,0,609,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,611,0,0,0,0,569,570,570,571,0,0,609,489,611,0,0,0,0,569,531,611,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,530,570,571,0,0,609,489,489,530,570,570,531,489,611,0,0,0,0,609,489,611,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,489,489,611,690,690,649,650,491,489,490,650,650,650,651,0,0,0,0,609,489,611,0,0,0,0,569,570,531,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,490,650,651,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,609,489,530,571,0,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,569,570,531,489,611,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,609,489,489,611,690,690,690,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,611,0,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,491,489,611,0,0,0,649,650,491,489,489,489,489"); +tmap.push("570,570,570,570,531,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,611,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,530,570,570,570,570,570,570,571,0,0,0,0,0,0,609,489,530,570,570,570,570,531,489,530,570,570,570,570,570,531,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 96, 48, 10, 1, 15060); // (savepoint) +break; + +case rn(6,18): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483"); +tmap.push("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,563,564,564,565,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +break; + +case rn(6,19): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,687,687,687,687,606,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,646,647,647,648,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(7,1): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 192, 104, 13); //Warp Token + +break; + +case rn(7,2): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,653,653,653,494,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,493,653,653,653,653,653"); +tmap.push("7,7,7,7,7,7,7,7,7,7,612,492,492,492,614,7,7,7,7,7,7,7,7,7,7,7,612,492,492,492,492,492,492,493,654,7,7,7,7,7"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,614,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,493,654,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,652,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,493,654,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,493,654,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 88, 136, 10, 0, 2070); // (savepoint) +break; + +case rn(7,3): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,496,656,656,656,656,497,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,496,657,0,0,0,0,655,497,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,496,657,0,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,0,575,577,0,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,575,537,536,577,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,615,495,495,617,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,655,497,496,657,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,0,655,657,0,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,575,537,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,575,537,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,536,576,576,576,576,537,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(7,4): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,568,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,568,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,568,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 208, 128, 10, 1, 4070); // (savepoint) +break; + +case rn(7,5): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,680,0,640,641,482,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,640,641,482,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,680,0,0,0,0,680,600,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,680,640,482,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,680,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,560,561,562,0,0,0,680,0,640,482,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,602,0,0,0,680,0,0,600,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,521,562,0,0,680,0,0,640,482,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,602,0,0,680,0,0,0,600,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,521,562,0,680,0,0,0,640,641,482,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,602,0,680,0,0,0,680,0,640,641,641"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,521,561,562,0,0,0,680,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,602,0,0,0,680,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,600,480,480,480,480,480,602,0,0,0,680,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,521,561,562,0,680,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,600,480,480,480,480,480,480,480,521,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + +case rn(7,6): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,654,0,692,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,654,0,0,692,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(7,7): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,574,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("6,6,6,6,6,6,6,6,6,612,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +break; + +case rn(7,8): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,481,641,641,641,641,641,641,641,641,641,641,641,641,641"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,602,0,0,0,560,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,640,641,642,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +roomtexton = true; roomtextx = 0; roomtexty = 2; +addline(" Play Levels Credits"); +addline(" <-- -->"); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(""); +addline(" You can press BACKSPACE at any time"); +addline(" to return to this point in the hub."); +break; + +case rn(7,9): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(7,10): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("653,653,653,653,653,653,494,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("573,573,573,573,573,573,534,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,493,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(7,11): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,648,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,566,567,567,567,567,567,567,567,567,528,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486,486,486,486,486,487,647,647,647,647"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,487,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(7,12): + +tmap.push("484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,605,0,0,0,0,603,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("524,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,485,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,564,564,525,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,564"); +tmap.push("483,483,483,483,484,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563"); +tmap.push("484,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603"); +tmap.push("524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525"); +break; + +case rn(7,14): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,605,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 48, 192, 10, 1, 14070); // (savepoint) +break; + +case rn(8,0): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,6,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,6,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +break; + +case rn(8,1): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(8,2): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,7,7,7,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,487,647,647,647,647,648,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,487,647,647,647,648,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,648,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +break; + +case rn(8,3): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,684,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,603,483,483,483"); +tmap.push("0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +break; + +case rn(8,4): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,543,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,582,582,543,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,582,582,583,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,581,582,582,582,582,582,543,501,501,501,542,582,583,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,581,582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,581,543,501,501,501,501,501,501,501,501,501"); +tmap.push("582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,542,583,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,581,543,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +break; + +case rn(8,5): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,497,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,496,656,657,0,0,0,695,0,0,0,0,0,655,497,495,495,495,536,577,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,655,497,495,495,495,617,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,496,657,0,0,0,0,0,695,0,0,0,0,0,0,0,655,497,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,575,576,576,577,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,575,537,495,495,536,577,0,0,0,0,0,0,655,497,495,495,617,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,696,696,696,655,497,495,495,495,536,577,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,615,495,495,495,495,536,577,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,655,497,495,495,495,495,617,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,655,656,497,495,495,617,696,696,696,696,696,696,615,495,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495"); +tmap.push("495,495,495,495,536,576,577,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,615,495,495,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,655,497,495,495,495,536,577,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,536,577,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,615,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,655,497,495,495,617,696,696,696,696,696,615,495,495,495,495,536,577,0,0,0,0,655,497,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,536,577,0,0,0,0,0,615,495,495,617,0,0,0,0,0,615,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,617,0,0,0,0,0,655,497,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,615,495,495,495,495,617,696,696,696,696,696,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,496,656,657,0,0,0,0,0,615,495,495,536,577,0,0,0,0,0,655,497,495,495,496,657,0,0,0,0,0,615,495,495,495,495"); +tmap.push("656,656,656,656,656,656,657,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,655,656,656,657,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,575,537,495,495,495,495"); +tmap.push("0,0,0,695,0,0,0,0,0,0,0,0,0,575,537,495,495,495,536,577,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("0,0,0,695,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("0,0,0,695,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,536,577,0,0,0,0,0,0,695,0,0,0,0,575,576,537,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 80, 40, 10, 1, 5080); // (savepoint) +break; + +case rn(8,6): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,490,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,490,650,651,0,0,0,0,689,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,569,570,570,571,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,690,690,690,609,489,489,611,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,530,571,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,530,571,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 96, 72, 13); //Warp Token + +break; + +case rn(8,7): + +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,614,693,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,652,653,653,653,653,654,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +break; + +case rn(8,8): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + + +roomtexton = true; roomtextx = 3; roomtexty = 15; +addline("VVVVVV is a game by"); +addline(" TERRY CAVANAGH"); +addline(" http://www.distractionware.com"); +addline(""); +addline(""); +addline("and features music by"); +addline(" MAGNUS PALSSON"); +addline(" http://souleye.madtracker.net/"); +addline(""); +addline(""); +addline("Roomnames are by"); +addline(" BENNETT FODDY"); +addline(" http://www.foddy.net/"); +break; + +case rn(8,10): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,493,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,494,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +break; + +case rn(8,11): + +tmap.push("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,643,644,644,644,644,644,644,485,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,524,564,564,564,564,564,564,565,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,484,644,644,644,645,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,525,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + +obj.createentity(game, 176, 40, 14); //Teleporter! +obj.createentity(game, 120, 128, 10, 1, 11080); // (savepoint) +break; + +case rn(8,12): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +break; + +case rn(8,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,560,561,561,561,562,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,481,642,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,560,561,561,561,562,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,560,522,480,480,602,681,681,681,681,681,600,480,480,480,480,602,681,681,681,681,681,600,480,480,480,602,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,600,480,480,481,642,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,560,522,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,560,561,522,480,480,480,602,681,681,681,681,681,681,600,480,480"); +tmap.push("0,0,0,0,560,522,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,560,561,522,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +break; + +case rn(8,14): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,493,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,493,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + +obj.createentity(game, 40, 152, 10, 1, 14080); // (savepoint) +break; + +case rn(8,15): + +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +break; + +case rn(8,16): + +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,690,690,690,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,649,650,491,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,7,7,649,650,650,651,7,7,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + +obj.createentity(game, 152, 80, 10, 1, 16080); // (savepoint) +break; + +case rn(8,17): + +tmap.push("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,499,659,659,500,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,499,659,660,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,618,498,498,499,659,660,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,499,659,660,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,660,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +break; + +case rn(8,18): + +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,528,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); +break; + +case rn(8,19): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(10,0): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(10,1): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(10,2): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(10,3): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(10,8): + +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,296,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,296,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,375,376,376,376,376,376,337,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,417,698,698,698,698,375,376,377,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,455,456,456,456,456,456,456,456,456,457,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,296,456,456,456,456,456,456,456,456,456,456,456,457,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + +obj.createentity(game, 80, 40, 9, 23); // (shiny trinket) +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,9): + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,443,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,10): + +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,444,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,317,477,478,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,317,477,478,0,0,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,0,815,363,364,364,364,364,364,364"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,0,815,403,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,363,364,325,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,363,364,325,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,11): + +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,198,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,198,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,197,197,198,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,197,198,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,572,573,573,534,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,12): + +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,517,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,518,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,590,591,591,591,591,591,591,591,591,591,591,591,592,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,670,671,671,671,671,671,671,671,671,671,512,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,676,677,677,678,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,557,597,597,597,597,597,597,597,597,598,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,517,677,677,677,677,677,677,677,677,678,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,551,591,591,591,591,591,591,591,591,591,591,552,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,590,591,591,591,591,591,591,591,591,591,552,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); + +obj.createentity(game, 184, 176, 10, 1, 12100); // (savepoint) +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,13): + +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,514,675,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,554,595,0,0,264,106,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,514,675,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,554,595,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,264,106,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,14): + +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,443,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,0,0,0,0,403,283,284,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,284,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,0,0,0,0,443,444,445,0,0,0,0,403,283,405,0,0,0,0,403,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,357,398,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,357,398,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,15): + +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,536,577,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(10,16): + +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 216, 72, 10, 1, 16100); // (savepoint) +break; + +case rn(10,17): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(10,18): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(10,19): + +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,0,0,701,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,502,662,663,0,701,0,0,0,0,0,701,0,0,0,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,502,662,663,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,502,662,663,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,661,662,662,503,501,501,501,501,501,501"); +tmap.push("501,501,501,502,663,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,661,662,662,662,662,662,662"); +tmap.push("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,702,702,702,702,703,702,702,702,703,702,702,702,702,702,703,702,702,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,702,702,702,702,703,702,702,702,703,702,702,702,702,702,703,702,702,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,542,583,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,581,582,582,582,582,582,582"); +tmap.push("501,501,501,501,542,582,583,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,581,582,582,543,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,542,582,583,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,581,582,582,543,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,542,582,583,0,701,0,0,0,0,0,701,0,0,0,0,0,581,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,542,582,583,0,0,0,0,0,701,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,542,582,583,0,0,0,701,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,542,582,582,582,583,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + +obj.createentity(game, 40, 112, 9, 24); // (shiny trinket) +break; + +case rn(11,0): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(11,1): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(11,2): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,577,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,577,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,657,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(11,3): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,569,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(11,8): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(11,9): + +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,390,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391"); +tmap.push("471,471,472,0,0,0,0,470,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391"); +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(11,10): + +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253,253,94,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,172,173,173,173,173,173,173,174,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92,92,92,92,214,683,683,683,252,253,253,253,253,253,253,253,253,253,253"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,173,173"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(11,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,571,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,531,489,489,611,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,569,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0"); +tmap.push("570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(11,17): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,680,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,562,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + +case rn(11,18): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(11,19): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(12,0): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,490,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,166,167,167,167,168,609,489,489,489,489,489,489,489,489,489,490,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,166,167,168,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,206,86,208,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,246,247,248,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,246,247,247,247,248,609,489,489,489,489,489,489,489,489,489,530,570,570,570,531,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,530,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,166,167,167,167,168,166,167,167,167,167,167,167"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,86,86,86,86,86"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,87,247,247,247,247"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,611,246,247,247,247,248,206,86,208,207,207,207,207"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,571,206,86,208,207,207,207,207"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,208,207,207,207,207"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,127,167,167,167,167"); +tmap.push("489,489,489,489,489,489,489,489,489,489,490,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,86,86,86"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,166,167,168,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,246,247,247,247,247,247,247"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,206,86,208,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,246,247,248,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,530,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(12,1): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("579,579,579,579,579,579,579,579,579,580,0,0,0,0,0,698,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(12,2): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(12,8): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,373,374,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + +obj.createentity(game, 240, 72, 10, 1, 8120); // (savepoint) +roomtileset = 0; // (Use space station tileset) +break; + +case rn(12,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,137,95,95,217,689,689,689,215,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,689,689,689,215,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,689,689,689,215,95,95,95"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(12,10): + +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,266,704,704,704,224,104,104,104"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); +tmap.push("185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,146,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(12,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(12,17): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("570,570,570,570,570,570,570,570,570,571,0,0,0,0,0,689,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(12,18): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(12,19): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,649,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,0,0,689,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(13,1): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,136,176,176,176,176,176,176,176,176,176,176,176"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,255,256,256,256,256,256,256,256,256,256,256,256,256,256"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,175,176,176,176,176,176,176,176,176"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,96,256,256,256,256,256,256"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("576,576,576,576,576,576,576,576,576,577,175,176,176,176,177,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,696,696,696,696,696,696,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,255,256,256,256,257,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,617,255,256,256,256,257,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,536,576,576,576,576,577,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,615,495,495,495,617,696,696,696,696,696,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +break; + +case rn(13,2): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,600,480,480,480,602,681,681,681,681,681,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,481,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,681,681,681,681,681,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,130,170,170,170,170,170,170"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,249,250,250,250,250,250,250,250,250"); +tmap.push("480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 48, 96, 14); //Teleporter! +break; + +case rn(13,14): + +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,90,250,250,250,250,250,250,250,250,250,250,250,250,250,91,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,90,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,131,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,775,776,776,776,776,776,776,776,776,776,776,776,776,776,776,777,0,0,0,209,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,249,250,250,250,250,250,250"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,169,170,170,170,170,170,170,171,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("89,89,89,89,89,89,89,89,90,250,250,250,251,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("89,89,89,89,89,89,89,89,211,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("89,89,89,89,89,89,89,89,211,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("250,250,250,250,250,250,250,250,251,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,396,397,397,397,397,397,397,397,397,397,397,397,398,856,856,856,856,856,856,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,476,477,477,477,477,477,477,477,477,477,477,477,478,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 280, 32, 10, 1, 14130); // (savepoint) +roomtileset = 0; // (Use space station tileset) +break; + +case rn(13,15): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,583,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,623,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,661,662,663,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,583,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,623,702,702,702,703,702,702,702,702,702,702,702,702,702,703,702,702,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,661,662,663,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,581,582,583,0,0,581,582,583,0,0,0,701,0,0,0,0,701,0,0,0,581,582,583,0,0,581,582,583,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,621,501,623,702,702,621,501,623,702,702,702,703,702,702,702,702,703,702,702,702,621,501,623,702,702,621,501,623,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,661,662,663,0,0,661,662,663,0,0,0,701,0,0,0,0,701,0,0,0,661,662,663,0,0,661,662,663,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,581,582,583,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,702,702,703,702,702,702,702,702,702,702,702,702,703,702,702,702,621,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,661,662,663,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,581,582,583,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,621,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,661,662,663,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(13,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,575,576,576,537,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,575,576,576,537,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,655,656,656,497,495,495,495,495,496,656,656,656,656,497,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,655,656,656,656,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 80, 104, 10, 1, 16130); // (savepoint) +break; + +case rn(13,17): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 240, 128, 10, 1, 17130); // (savepoint) +break; + +case rn(13,18): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(13,19): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,164,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,244,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(14,14): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,293,453,453,453,294,292,292,292,292,292,292,292,292,293,453,453,453,294,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,9,9,9,412,292,292,292,292,292,292,292,292,414,9,9,9,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,782,782,782,412,292,292,292,292,292,292,292,292,414,782,782,782,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("453,453,453,453,453,453,453,453,453,453,453,454,701,701,701,452,453,453,453,453,453,453,453,453,454,701,701,701,452,453,453,453,453,453,453,453,453,453,453,453"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("373,373,373,373,373,373,374,701,701,701,372,373,373,373,373,373,373,374,701,701,701,701,372,373,373,373,373,373,373,374,701,701,701,372,373,373,373,373,373,373"); +tmap.push("292,292,292,292,292,292,414,701,701,701,412,292,292,292,292,292,292,414,701,701,701,701,412,292,292,292,292,292,292,414,701,701,701,412,292,292,292,292,292,292"); +tmap.push("453,453,453,453,453,294,414,862,862,862,412,292,292,292,292,292,292,414,862,862,862,862,412,292,292,292,292,292,292,414,862,862,862,412,293,453,453,453,453,453"); +tmap.push("0,0,0,0,0,412,414,0,0,0,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,0,0,0,412,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,412,414,0,0,0,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,0,0,0,412,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,412,414,8,8,8,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,8,8,8,412,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,412,333,373,373,373,334,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,333,373,373,373,334,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,452,453,453,453,453,453,453,453,453,453,294,292,414,8,8,8,8,412,292,293,453,453,453,453,453,453,453,453,453,454,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,333,373,373,373,373,334,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,452,453,453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(14,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("573,573,573,573,573,573,573,573,573,573,573,573,574,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(14,17): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,698,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("659,659,659,659,659,659,659,659,659,659,659,659,659,660,699,700,699,699,699,699,699,699,699,699,700,699,658,500,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("579,579,579,579,579,579,579,579,579,579,579,579,579,580,699,700,699,699,699,699,699,699,699,699,700,699,578,540,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,698,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(14,18): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,499,659,659,660,0,698,0,0,0,658,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,499,659,659,660,0,0,0,0,698,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,658,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,578,579,579,579,579"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(14,19): + +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495"); +tmap.push("495,495,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,536,577,0,0,0,0,0,0,0,0,655,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,536,576,576,577,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 176, 72, 14); //Teleporter! +obj.createentity(game, 88, 160, 10, 1, 19140); // (savepoint) +break; + +case rn(15,14): + +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,705,865,865,706,704,705,865,865,706,704,705,865,865,706,704,704,704"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,186,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,106,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,745,785,785,746,704,745,785,785,746,704,745,785,785,746,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,145,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,264,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(15,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(15,17): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(15,18): + +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,568,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,527,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 88, 96, 10, 0, 18150); // (savepoint) +break; + +case rn(15,19): + +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(16,4): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,484,644,644,644,485,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,605,163,164,165,643,644,644,644,644,644,644,644,644,645,163,164,165,603,483,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("483,605,203,83,205,163,164,164,164,164,164,164,164,164,165,203,83,205,603,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,605,243,244,245,243,244,244,244,244,244,244,244,244,245,243,244,245,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,524,565,163,165,0,0,0,0,0,0,0,0,0,0,163,165,563,525,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,243,245,643,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,163,165,563,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,484,645,243,245,0,0,0,0,0,0,0,0,0,0,243,245,643,485,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,605,163,164,165,163,164,164,164,164,164,164,164,164,165,163,164,165,603,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,605,203,83,205,243,244,244,244,244,244,244,244,244,245,203,83,205,603,483,483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0"); +tmap.push("483,605,243,244,245,563,564,564,564,564,564,564,564,564,565,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,524,564,564,564,525,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 72, 120, 13); //Warp Token + +break; + +case rn(16,14): + +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,690,850,850,691,689,690,850,850,691,689,690,850,850,691,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,268,268,268,268,268,268,268"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); +tmap.push("689,730,770,770,731,689,730,770,770,731,689,730,770,770,731,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); +tmap.push("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,187,188,189,689,811,0,0,0"); +tmap.push("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,227,107,229,689,811,0,0,0"); +tmap.push("188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,149,107,229,850,851,0,0,0"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,0"); +tmap.push("268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,269,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +obj.createentity(game, 176, 152, 10, 1, 14160); // (savepoint) +break; + +case rn(16,17): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(16,19): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(17,4): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,499,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,499,659,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("579,579,579,579,579,579,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,580,6,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); +break; + +case rn(17,5): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,6,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,562,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,6,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,562,6,6,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,562,6,6,6,6"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + +case rn(17,12): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,760,761,761,761,761,761,761,761,761,761,761,761,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,577,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + +obj.createentity(game, 40, 40, 14); //Teleporter! +obj.createentity(game, 192, 120, 10, 1, 12170); // (savepoint) +roomtileset = 0; // (Use space station tileset) +break; + +case rn(17,13): + +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,684,844,844,844,844,685,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(17,14): + +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,169,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(17,15): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,837,837,837,837,837,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(17,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(17,17): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,571,0,0,0,0,0,0,0,0,569,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,490,650,650,650,651,0,0,0,0,0,0,0,0,649,650,650,650,491,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,530,570,570,570,571,0,0,0,0,0,0,0,0,569,570,570,570,531,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 112, 72, 14); //Teleporter! +break; + +case rn(17,18): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(17,19): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,567,567,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,687,687,687,687,687,687,687,687,606,486,486,608,687,687,687,687,687,687,687,687,566,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,646,647,647,648,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 152, 152, 10, 0, 19170); // (savepoint) +break; + +case rn(18,4): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,7,7,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,615,495,495,495,496,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,615,495,495,495,617,7,7,7,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,496,656,656,656,497,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,615,495,495,495,617,7,7,7,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(18,5): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,611,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,611,0,0,0,569,570,571,0,0,0,0,0,6,569,570,571,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,609,611,6,0,0,649,650,651,0,0,0,0,0,569,531,489,611,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,530,571,0,0,0,689,0,0,0,0,0,0,609,489,489,611,6,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,611,0,0,0,689,0,0,0,0,0,0,609,489,489,530,571,0,0,0,0,0,0,0"); +tmap.push("6,6,6,6,0,0,0,0,0,0,0,0,0,6,609,489,489,611,6,0,0,689,0,0,0,0,0,6,609,489,489,489,611,6,6,0,0,0,0,0"); +tmap.push("570,570,570,571,6,0,0,0,0,0,6,6,0,569,531,489,489,530,571,0,0,689,0,0,0,0,0,569,531,489,489,489,530,570,571,0,0,0,0,0"); +tmap.push("489,489,489,530,571,0,0,0,0,6,569,571,0,609,489,489,489,489,611,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,611,0,0,6,6,6"); +tmap.push("489,489,489,489,611,0,0,0,0,569,531,611,0,609,489,489,489,489,611,0,0,569,571,0,0,0,0,609,489,489,489,489,489,489,611,6,0,569,570,570"); +tmap.push("489,489,489,489,611,6,0,0,0,609,489,611,0,609,489,489,489,489,611,0,6,609,611,0,0,0,0,609,489,489,489,489,489,489,530,571,6,609,489,489"); +tmap.push("489,489,489,489,530,571,6,6,6,609,489,611,6,609,489,489,489,489,611,6,569,531,611,0,0,0,6,609,489,489,489,489,489,489,489,530,570,531,489,489"); +tmap.push("489,489,489,489,489,530,570,570,570,531,489,530,570,531,489,489,489,489,530,570,531,489,611,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,6,6,6,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(18,15): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,514,674,674,674,515,513,513,513,513,513,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,635,369,370,371,633,513,513,513,513,513,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,635,409,289,411,633,513,514,674,674,515,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,450,450,450,451,633,513,513,635,449,450,451,633,513,635,369,371,633,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,593,594,594,594,555,513,513,554,594,594,594,555,513,635,449,451,633,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,450,450,451,633,513,513,513,513,513,513,513,513,513,513,513,513,554,594,594,555,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,593,594,594,555,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); +tmap.push("450,450,450,450,450,450,450,450,450,450,450,450,450,450,451,633,513,513,514,674,674,515,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,635,369,371,633,513,514,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,635,449,451,633,513,635,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,554,594,594,555,513,635,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,673,674,674,674,674,674,674,674,675,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,593,594,594,594,594,594,594,595,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,673,674,674,674,674,674,674,675,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,593,594,595,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,633,513,635,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,673,674,675,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +obj.createentity(game, 104, 152, 10, 1, 15180); // (savepoint) +break; + +case rn(18,17): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,522,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,522,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,482,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,482,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(18,19): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,525,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(19,4): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,7,7,7,7,7,603,483,483,483,483,483,483,605,7,7,7,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,645,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,684,684,685,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,685,684,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,563,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,643,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 192, 176, 10, 1, 4190); // (savepoint) +break; + +case rn(19,5): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,575,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,615,617,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,615,617,0,0,0,0,0,575,577,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,615,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,575,577,0,0,0,0,0,0,0,0,575,577,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,615,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("6,6,6,6,6,615,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("576,576,576,576,576,537,617,6,6,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,536,576,577,6,6,6,615,617,6,6,6,6,6,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,536,576,576,576,537,536,576,576,576,576,577,6,6,615,617,6,6,6,6,6,6,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,537,536,576,576,576,576,576,577,6,6,615,617,6,6,6,6,6,6,6"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,537,536,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(19,9): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,497,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,496,656,656,656,656"); +tmap.push("495,495,495,495,495,495,496,656,656,656,657,7,7,7,7,7,7,7,615,495,617,7,7,7,7,7,7,7,7,7,7,7,7,615,495,617,0,0,0,0"); +tmap.push("495,495,495,496,656,656,657,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,615,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,575,576,576,576,576,576,576,537,495,536,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(19,10): + +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,500,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,7,7,618,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,7,7,0,0,618,498,498,498,498,498,498"); +tmap.push("498,498,620,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,7,7,7,0,0,0,0,618,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,620,7,7,7,0,0,0,0,0,0,0,658,659,659,659,659,659,659"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,499,659,659,500,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,658,500,498,498,498,499,659,660,7,7,618,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,658,659,659,659,660,0,0,0,0,618,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,658,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,539,579,579,579,580,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,539,580,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,539,579,579,579,579,580,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,580,0,0,0,0,0,0,0,0,0,578,580,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,580,6,6,6,6,6,6,618,620,6,6,6,6,6,6,6,6,6,6,6,6,6"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,540,539,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + +obj.createentity(game, 32, 152, 10, 1, 10190); // (savepoint) +break; + +case rn(19,11): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,615,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,655,656,656,497,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,615,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,575,576,576,576,577,0,0,0,0,695,0,0,0,0,655,656,656,497,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,617,0,0,0,0,695,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,696,696,696,696,615,495,495,495,536,576,576,577,0,695,0,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,617,0,695,0,0,0,0,0,0,0,0,695,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,536,576,576,577,0,0,0,0,0,0,0,695,0,655,656,656,497,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,695,0,0,0,0,655,656,656,497,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,695,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,695,0,0,0,0,0,0,0,655,656,656,497,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,695,0,0,0,0,0,0,0,0,695,0,615,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,0,0,0,695,0,655,656,656,656"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,695,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,695,0,0,0,0,0"); +tmap.push("495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,695,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,695,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,536,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(19,12): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,578,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,578,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(19,13): + +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,522,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +break; + +case rn(19,14): + +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,689,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,690,691,690,690,691,690,690,690,690,690,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,569,570,571,0,0,0,0,0,0,0,649,650,651,0,689,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,691,690,609,489,611,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,649,650,651,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,569,571,0,0,0,0,0,609,489,611,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,691,690,609,611,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,649,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 80, 144, 10, 1, 14190); // (savepoint) +break; + +case rn(19,15): + +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492"); +tmap.push("492,492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); +tmap.push("492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); +tmap.push("492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,534,492,492,492"); +tmap.push("653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,653,494,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,494,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,534,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,494,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,494,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,534,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(19,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,684,684,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,683,0,0,0,0,0,0,0,0,563,564,564,564,564,525,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,684,685,684,684,685,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,563,564,565,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,563,564,564,564,564,525,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(19,17): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 168, 88, 10, 1, 17190); // (savepoint) +break; + +case rn(19,18): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(19,19): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,521,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + + + + default: + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + //obj.fatal_bottom(); + break; + } + } + + public var roomname:String; + public var roomtileset:int, i:int; + + //roomtext thing in other level + public var roomtexton:Boolean, roomtextx:int, roomtexty:int, roomtextnumlines:int; + public var roomtext:Array = new Array(); + } +} \ No newline at end of file diff --git a/mobile_version/levels/finalclass.as b/mobile_version/levels/finalclass.as new file mode 100644 index 00000000..1b402969 --- /dev/null +++ b/mobile_version/levels/finalclass.as @@ -0,0 +1,2300 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class finalclass extends Sprite { + public function rn(rx:int, ry:int):int { + return rx + (ry * 100); + } + + public function loadlevel(rx:int, ry:int, game:gameclass, obj:entityclass):void { + var t:int; + + t = rx + (ry * 100); + tmap.reset(); + coin = 0; rcol = 0; + warpx = false; warpy = false; + + roomname = "Untitled room ["+String(rx) + "," + String(ry)+"]"; + + switch(t) { +case rn(50,52): +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,258,259,259,259"); +tmap.push("7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98"); + +obj.createentity(game, 163, 32, 12, 168); // (vertical gravity line) +obj.createentity(game, 99, 32, 12, 168); // (vertical gravity line) +obj.createentity(game, 227, 32, 12, 168); // (vertical gravity line) +obj.createentity(game, 35, 32, 12, 168); // (vertical gravity line) +obj.createentity(game, 291, 32, 12, 168); // (vertical gravity line) + +warpx = true; +roomname = "1954 World Cup Vinyl"; +break; + +case rn(50,51): + +tmap.push("0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,258,259,259,260,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,180,218,98,220,740"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,220,218,98,220,740"); +tmap.push("0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,260,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,178,179,179,180,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,218,98,220,740"); +tmap.push("0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,218,98,220,740"); + +obj.createentity(game, -8, 116, 11, 40); // (horizontal gravity line) +obj.createentity(game, 48, 116, 11, 184); // (horizontal gravity line) +obj.createentity(game, 32, 88, 10, 1, 51500); // (savepoint) +obj.createentity(game, 32, 128, 10, 0, 51501); // (savepoint) +obj.createentity(game, 256, 88, 10, 1, 51502); // (savepoint) +obj.createentity(game, 256, 128, 10, 0, 51503); // (savepoint) +warpy = true; +roomname = "The V Stooges"; +break; + + +case rn(49,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,50,218,98,98,220,49,0,0,0,0,0,0,0,0,50,218,98,98,220,49,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,50,258,259,259,260,49,0,0,0,0,0,0,0,0,50,258,259,259,260,49,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0"); +tmap.push("0,0,0,0,178,179,180,49,0,0,0,0,0,0,0,0,50,178,179,179,179,179,180,49,0,0,0,0,0,0,0,0,50,178,179,180,0,0,0,0"); +tmap.push("0,0,0,0,218,98,220,49,0,0,0,0,0,0,0,0,50,218,98,98,98,98,220,49,0,0,0,0,0,0,0,0,50,218,98,220,0,0,0,0"); +tmap.push("0,0,0,0,258,259,260,49,0,0,0,0,0,0,0,0,50,258,259,259,259,259,260,49,0,0,0,0,0,0,0,0,50,258,259,260,0,0,0,0"); +tmap.push("0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,50,178,179,179,180,49,0,0,0,0,0,0,0,0,50,178,179,179,180,49,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,50,218,98,98,220,49,0,0,0,0,0,0,0,0,50,218,98,98,220,49,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 116, 11, 40); // (horizontal gravity line) +obj.createentity(game, 288, 116, 11, 32); // (horizontal gravity line) +obj.createentity(game, 64, 116, 11, 64); // (horizontal gravity line) +obj.createentity(game, 192, 116, 11, 64); // (horizontal gravity line) + +warpy = true; +roomname = "glitch"; +break; + +case rn(48,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); +tmap.push("0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); +tmap.push("0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 116, 11, 40); // (horizontal gravity line) +obj.createentity(game, 48, 116, 11, 224); // (horizontal gravity line) +obj.createentity(game, 288, 116, 11, 32); // (horizontal gravity line) +obj.createentity(game, 56, 88, 1, 3, 10); // Enemy +obj.createentity(game, 248-16, 128, 1, 2, 10); // Enemy +obj.createentity(game, 272, 168, 10, 0, 51480); // (savepoint) +obj.createentity(game, 32, 48, 10, 1, 51481); // (savepoint) + +warpy = true; +roomname = "glitch"; +break; + +case rn(47,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 148, 11, 104); // (horizontal gravity line) +obj.createentity(game, -8, 84, 11, 80); // (horizontal gravity line) +obj.createentity(game, 176, 116, 11, 144); // (horizontal gravity line) +obj.createentity(game, 128, 96, 10, 0, 51470); // (savepoint) +obj.createentity(game, 128, 56, 10, 1, 51471); // (savepoint) + +warpy = true; +roomname = "change"; +break; + +case rn(46,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 84, 11, 328); // (horizontal gravity line) +obj.createentity(game, -8, 148, 11, 328); // (horizontal gravity line) +obj.createentity(game, 96, 120, 1, 2, 4); // Enemy +obj.createentity(game, 144, 96, 1, 2, 4); // Enemy +obj.createentity(game, 192, 120, 1, 2, 4); // Enemy +obj.createentity(game, 240, 96, 1, 2, 4); // Enemy +obj.createentity(game, 288, 120, 1, 2, 4); // Enemy + +warpy = true; +roomname = "change"; +break; + +case rn(45,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 248, 84, 11, 72); // (horizontal gravity line) +obj.createentity(game, 224, 148, 11, 96); // (horizontal gravity line) +obj.createentity(game, 176, 56, 10, 1, 51450); // (savepoint) +obj.createentity(game, 176, 96, 10, 0, 51451); // (savepoint) + +warpy = true; +roomname = "change"; +break; + + +case rn(44,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 64+32-8, 32-16, 1, 0, 7, 0, -48, 320, 312); // Enemy, bounded +obj.createentity(game, 96+32-8, 32-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded +obj.createentity(game, 128+32-8, 32-16, 1, 0, 7, 0, -40, 320, 320); // Enemy, bounded +obj.createentity(game, 160+32-8, 32-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded +obj.createentity(game, 192+32-8, 32-16, 1, 0, 7, 0, -64, 320, 336); // Enemy, bounded +obj.createentity(game, 64+32-8, 64-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded +obj.createentity(game, 64+32-8, 96-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded +obj.createentity(game, 64+32-8, 128-16, 1, 0, 7, 0, -64, 320, 320); // Enemy, bounded +obj.createentity(game, 64+32-8, 160-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded +obj.createentity(game, 192+32-8, 128-16+8, 1, 0, 7, 0, -64, 320, 320); // Enemy, bounded +obj.createentity(game, 192+32-8, 160-16+8, 1, 0, 7, 0, -80, 320, 320); // Enemy, bounded +obj.createentity(game, 192+32-8, 192-16+8, 1, 0, 7, 0, -80, 320, 304); // Enemy, bounded +obj.createentity(game, 192+32-8, 192+24, 1, 0, 7, 0, -80, 320, 304); // Enemy, bounded + +warpy = true; +roomname = "Vertigo"; +break; + +case rn(43,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 155, 24, 12, 184); // (vertical gravity line) +obj.createentity(game, 120, 152, 1, 1, 8, 0, -56, 320, 296); // Enemy, bounded +obj.createentity(game, 104, 136, 1, 1, 8, 0, -64, 320, 296); // Enemy, bounded +obj.createentity(game, 88, 120, 1, 1, 8, 0, -56, 320, 312); // Enemy, bounded +obj.createentity(game, 72, 104, 1, 1, 8, 0, -56, 320, 296); // Enemy, bounded +obj.createentity(game, 56, 88, 1, 1, 8, 0, -48, 320, 328); // Enemy, bounded +obj.createentity(game, 176, 56, 1, 0, 8, 0, -64, 320, 288); // Enemy, bounded +obj.createentity(game, 192, 72, 1, 0, 8, 0, -48, 320, 296); // Enemy, bounded +obj.createentity(game, 208, 88, 1, 0, 8, 0, -72, 320, 296); // Enemy, bounded +obj.createentity(game, 224, 104, 1, 0, 8, 0, -56, 320, 296); // Enemy, bounded +obj.createentity(game, 240, 120, 1, 0, 8, 0, -48, 320, 296); // Enemy, bounded + +warpy = true; +roomname = "The Voon Show"; +break; + +case rn(42,51): + +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,180,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,178,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,260,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 168, 72, 10, 0, 51420); // (savepoint) +obj.createentity(game, 24, 60, 11, 120); // (horizontal gravity line) +obj.createentity(game, 24, 148, 11, 120); // (horizontal gravity line) + +warpy = true; +roomname = "glitch"; +break; + + +case rn(41,51): + +tmap.push("740,740,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,220,218,98,220,740,740,740,740,740,740"); +tmap.push("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); +tmap.push("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); +tmap.push("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); +tmap.push("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); +tmap.push("740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740"); +tmap.push("179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,139,179,179,179,179,179,179"); +tmap.push("98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,260,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,218,220,258,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,178,180,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,218,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,258,260,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,180,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,178,179,179,179,179"); +tmap.push("98,98,98,98,220,0,0,0,0,0,218,220,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,98,98,98"); +tmap.push("98,98,98,98,220,0,0,0,0,0,218,220,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,0,218,98,98,98,98"); +tmap.push("98,98,98,98,220,0,0,0,0,0,218,220,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,218,98,98,98,98"); +tmap.push("259,259,100,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,220,178,179,179,179,179,179,179,179,179,179,180,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + +obj.createentity(game, 280, 120, 10, 1, 51410); // (savepoint) +obj.createentity(game, 40, 28, 11, 192); // (horizontal gravity line) +obj.createentity(game, 96, 204, 11, 88); // (horizontal gravity line) +obj.createentity(game, 144, 156, 11, 88); // (horizontal gravity line) +obj.createentity(game, 96, 92, 11, 88); // (horizontal gravity line) + +warpx = true; +roomname = "1950 Silverstone Grand V"; +break; + + +case rn(41,52): + +tmap.push("740,740,218,98,220,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("179,179,140,98,220,0,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,220,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,260,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,740,740,740,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,740,740,740,740,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,180,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,220,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,100,98,220,0,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,218,98,220,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + +obj.createentity(game, 264, 168, 10, 1, 52410); // (savepoint) +obj.createentity(game, 152, 112, 20, 1); // (terminal) + +if(obj.flags[72] == 0) { + if (game.intimetrial || game.nocutscenes) { + obj.createblock(1, 152 - 4, 112, 20, 16, 85); + }else{ + obj.createblock(5, 152 - 4, 112, 20, 16, 13); + } +} + +warpx = true; warpy = true; +roomname = "DIY V Repair"; +break; + +case rn(42,52): + +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,100,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,99,259,259,259,259,259,259,259,259,259,259"); +tmap.push("740,740,740,740,740,740,740,740,740,740,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,218,98,220,218,98,99,259,259,259,259,259,259,259,259,100,98,220,218,98,220,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,218,98,220,218,98,220,740,740,740,740,740,740,740,740,218,98,220,218,98,220,740,740,740,740,740,740,740,740,740,740"); +roomname = "Party Time!"; +break; + + +case rn(43,52): + +tmap.push("218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,258,259,259,260,218,98,98,220,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,218,98,98,220,218,98,98,220,258,259,259,260,218,98,98,220,258,259,259,260,0,0,0,0,258,259,259,260,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,218,98,98,220,258,259,259,260,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,258,259,259,260,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("258,259,259,260,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,218,98,98,220,218,98,98,220"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,258,259,259,260"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,178,179,179,180,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("178,179,179,180,218,98,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,178,179,179,180,0,0,0,0,0,0,0,0"); +tmap.push("218,98,98,220,218,98,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220,178,179,179,180,0,0,0,0"); +tmap.push("218,98,98,220,218,98,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220,218,98,98,220,178,179,179,180"); +tmap.push("218,98,98,220,218,98,98,220,218,98,98,220,178,179,179,180,0,0,0,0,178,179,179,180,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,178,179,179,180,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220"); +tmap.push("218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220"); + +obj.createentity(game, 264, 176, 10, 1, 52430); // (savepoint) +obj.createentity(game, 96, 180, 11, 96); // (horizontal gravity line) +obj.createentity(game, 160, 52, 11, 96); // (horizontal gravity line) +obj.createentity(game, 240, 136, 1, 2, 8); // Enemy +obj.createentity(game, 96, 88, 1, 3, 8); // Enemy +obj.createentity(game, 72, 32, 10, 0, 52431); // (savepoint) +roomname = "Upstairs, Downstairs"; +break; + + +case rn(44,52): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,258,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,178,179,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,218,98,98"); +tmap.push("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("179,179,179,179,179,179,180,218,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,98"); +tmap.push("98,98,98,98,98,98,220,218,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98"); +tmap.push("98,98,98,98,98,98,220,218,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98"); +tmap.push("98,98,98,98,98,98,220,218,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98"); + +obj.createentity(game, 64, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 192, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 32, 112, 2, 9, 4); //Threadmill, <<< + +obj.createentity(game, 0, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 104, 2, 8, 4); //Threadmill, >>> + +obj.createentity(game, 80+8, 128, 1, 0, 5, 0, 120, 320, 200); // Enemy, bounded +obj.createentity(game, 128+16, 168, 1, 1, 5, 0, 120, 320, 200); // Enemy, bounded +obj.createentity(game, 176+24, 128, 1, 0, 5, 0, 120, 320, 200); // Enemy, bounded +//obj.createentity(game, 224, 168, 1, 1, 5, 0, 120, 320, 200); // Enemy, bounded +obj.createentity(game, 24, 184, 10, 1, 52440); // (savepoint) +roomname = "Timeslip"; +break; + +case rn(45,52): + +tmap.push("98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,218,98,98,98,220,218,98,220,740,740,740,740,740,740"); +tmap.push("98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,218,98,98,98,220,218,98,220,740,740,740,740,740,740"); +tmap.push("259,259,259,259,259,259,259,260,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,258,259,259,259,260,218,98,139,179,179,179,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,7,7,7,7,7,218,98,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179"); +tmap.push("0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("179,179,179,180,0,0,0,0,218,98,139,179,179,179,179,179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("98,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("259,100,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,178,179,179,180,740,740,6,6,740,740,6,6,740,740,6,6,178,179,179,179,179,180,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,258,259,259,260,7,7,740,740,7,7,740,740,7,7,740,740,258,259,259,259,259,260,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259"); +tmap.push("740,218,98,220,178,179,179,179,179,179,179,180,0,0,0,0,0,740,0,0,0,0,0,0,740,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179"); +tmap.push("740,218,98,220,218,98,98,98,98,98,98,220,6,6,6,6,6,740,6,6,6,6,6,6,740,6,6,6,6,6,218,98,98,98,98,98,98,98,98,98"); +tmap.push("740,218,98,220,218,98,99,259,259,100,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,99,259,259,259,259,259,259,259"); +tmap.push("740,218,98,220,218,98,220,740,740,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,218,98,220,740,740,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740"); + +obj.createentity(game, 40, 176, 10, 1, 52450); // (savepoint) +obj.createentity(game, 80, 156, 11, 176); // (horizontal gravity line) +obj.createentity(game, 128, 88, 10, 1, 52451); // (savepoint) +obj.createentity(game, 160, 76, 11, 96); // (horizontal gravity line) +roomname = "Three's Company"; +break; + +case rn(47,52): + +tmap.push("740,218,98,220,218,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,258,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,7,7,7,7,7,7,7,7,7,7,7,7,7,178,179,179"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259"); +tmap.push("740,218,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7"); +tmap.push("740,218,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,218,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,218,98,220,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,6,6,6,6,6,6,6,6,6,218,220,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,178,179,179,179,179,179,179,179,180,218,220,178,179,179,179,179,179,179,179,179,179,179,179,180,218,98,220,740,740,740,740,740,740,740,740,740"); +tmap.push("740,218,98,220,218,98,98,98,98,98,98,98,220,218,220,218,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740"); + +obj.createentity(game, 68-4, 56, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 132-4, 56, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 44, 192, 3); //Disappearing Platform +obj.createentity(game, 92, 104, 3); //Disappearing Platform +obj.createentity(game, 120, 192, 2, 3, 6); // Platform +obj.createentity(game, 264, 48, 2, 2, 6); // Platform +roomname = "Cosmic Creepers"; +break; + +case rn(48,52): + +tmap.push("98,98,220,218,98,98,98,98,98,98,98,98,98,220,218,98,220,218,98,98,98,98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,98,98,98"); +tmap.push("98,98,220,258,259,259,259,259,259,259,259,259,259,260,218,98,220,258,259,259,259,259,259,259,259,259,259,259,260,218,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,260,7,7,7,7,7,7,7,7,7,7,7,258,259,260,7,7,7,7,7,7,7,7,7,7,7,7,258,259,259,259,259,259,259,259,259,259,259"); +tmap.push("179,180,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,178,179,179,179,179,179,179,179,179,179"); +tmap.push("98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98"); +tmap.push("98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,99,259,259,259,259,259,259,259"); +tmap.push("98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,740,740,740,740,740,740,740"); +tmap.push("259,260,49,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,740,740,740,740,740,740,740"); +tmap.push("7,7,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,139,179,179,179,179,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,258,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,6,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,7,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,180,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,259,259,259,259,100,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6"); +tmap.push("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,178,179"); +tmap.push("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98"); +tmap.push("740,740,740,740,740,740,218,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98"); +tmap.push("179,179,179,179,179,179,140,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98"); +tmap.push("98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98"); +tmap.push("259,259,259,259,259,259,259,259,260,49,0,0,0,0,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,0,0,50,258,259"); +tmap.push("179,179,179,179,179,179,179,179,179,180,6,6,6,6,6,6,6,6,6,6,6,6,178,179,180,6,6,6,6,6,6,6,6,6,6,6,6,178,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,220,178,179,179,179,179,179,179,179,179,179,179,180,218,98,220,178,179,179,179,179,179,179,179,179,179,179,180,218,98,98"); + +obj.createentity(game, 16, 112, 10, 1, 52480); // (savepoint) +obj.createentity(game, 67, 24, 12, 96); // (vertical gravity line) +obj.createentity(game, 243, 112, 12, 104); // (vertical gravity line) +obj.createentity(game, 288, 104, 10, 0, 52481); // (savepoint) +obj.createentity(game, 187, 24, 12, 80); // (vertical gravity line) +obj.createentity(game, 123, 128, 12, 88); // (vertical gravity line) + +roomname = "The Villi People"; +break; + +case rn(50,53): + +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,220,218,98,220,740,740,740,740,740,740,740"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,220,218,98,139,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,220,218,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,218,220,258,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0"); +tmap.push("6,6,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,0,0,0,6,6,6,6,6,6,6"); +tmap.push("179,180,0,0,0,218,220,0,0,0,178,179,179,179,179,179,179,179,179,179,180,178,179,179,179,179,179,179,179,180,0,0,0,178,179,179,179,179,179,179"); +tmap.push("98,220,0,0,0,218,220,0,0,0,218,98,98,98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,220,0,0,0,218,98,98,98,98,98,98"); +tmap.push("98,220,0,0,0,218,220,0,0,0,218,98,98,98,98,98,98,98,98,98,220,258,259,259,259,259,259,259,259,260,0,0,0,218,98,98,98,98,98,98"); +tmap.push("259,260,0,0,0,218,220,0,0,0,218,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,178,180,0,0,0,258,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,218,220,0,0,0,218,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,218,220,0,0,0,178,180,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,220,0,0,0,258,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,258,260,0,0,0,218,220,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0"); +tmap.push("179,179,179,179,180,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,178,179"); +tmap.push("98,98,98,98,220,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,218,98"); +tmap.push("259,259,259,259,260,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,258,259"); +tmap.push("0,0,0,0,0,178,179,179,179,179,180,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,220,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,98,98,98,98,220,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,220,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,98,98,98,98,220,0,0,0,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259,100,98,220,218,220,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,98,98,98,98,220,178,179,179,179,179,179,180,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,218,220,0,0,0,0,0"); +tmap.push("0,0,0,0,0,218,98,98,98,98,220,218,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,258,260,0,0,0,0,0"); +tmap.push("179,180,0,0,0,218,98,98,98,98,220,218,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,178,179,179,179,179,179,179"); +tmap.push("98,220,0,0,0,218,98,98,98,98,220,218,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,218,98,98,98,98,98,98"); +tmap.push("98,220,0,0,0,218,98,98,98,98,220,218,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,218,98,220,218,98,98,98,98,98,98"); + +obj.createentity(game, 192, 56, 10, 1, 53500); // (savepoint) +obj.createentity(game, 288, 104, 10, 0, 53501); // (savepoint) + +obj.createentity(game, 168, 96, 1, 0, 5); // Enemy +obj.createentity(game, 184+2, 104, 1, 0, 5); // Enemy +obj.createentity(game, 200+4, 112, 1, 0, 5); // Enemy + +obj.createentity(game, 88, 176-4, 1, 1, 5); // Enemy +obj.createentity(game, 104+2, 168-4, 1, 1, 5); // Enemy +obj.createentity(game, 120 + 4, 160 - 4, 1, 1, 5); // Enemy + +warpx = true; +roomname = "change"; +break; + +case rn(50,54): + +tmap.push("98,220,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("98,220,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,100,98"); +tmap.push("98,220,0,0,0,740,740,7,7,7,7,7,7,7,740,740,740,740,7,7,7,7,7,7,740,740,740,740,7,7,7,7,7,7,7,7,7,7,218,98"); +tmap.push("98,220,0,0,0,740,740,0,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,220,0,0,0,740,740,0,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,220,0,0,0,740,740,0,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,220,0,0,0,7,7,0,0,0,0,0,0,0,50,740,740,49,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,7,740,49,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,50,740,49,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,218,98"); +tmap.push("179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,740,0,0,0,0,218,98"); +tmap.push("98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,740,740,0,0,0,0,218,98"); +tmap.push("259,259,259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,218,98"); +tmap.push("740,740,740,740,740,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,218,98"); +tmap.push("740,740,740,740,740,218,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,740,740,740,0,0,0,0,218,98"); +tmap.push("179,179,179,179,179,140,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98"); +tmap.push("98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98"); +tmap.push("259,259,259,259,259,259,259,260,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,258,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,260,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + +obj.createentity(game, 24, 88, 10, 1, 54500); // (savepoint) +obj.createentity(game, 280, 184, 10, 1, 54501); // (savepoint) +obj.createentity(game, 56, 44, 11, 56); // (horizontal gravity line) +obj.createentity(game, 131, 72, 12, 64); // (vertical gravity line) +obj.createentity(game, 144, 36, 11, 48); // (horizontal gravity line) +obj.createentity(game, 211, 80, 12, 56); // (vertical gravity line) +obj.createentity(game, 224, 52, 11, 80); // (horizontal gravity line) + +warpx = true; +roomname = "change"; +break; + + +case rn(52,53): + +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,7,7,7,7,7,7,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,7,7,7,0,0,0,0,0,0,7,7,7,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,0,0,0,0,0,0,7,740,740,740,740,740,740,740,740,7,7,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,740,740,740,740,740,740,740,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,6,6,6,6,6,6,6,0,0,0,0,0,6,6,6,6,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,6,6,6,6,6,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + +obj.createentity(game, 16, 48, 10, 1, 53520); // (savepoint) +obj.createentity(game, 96, 144, 3); //Disappearing Platform +obj.createentity(game, 128, 144, 3); //Disappearing Platform +obj.createentity(game, 160, 144, 3); //Disappearing Platform +obj.createentity(game, 208, 80, 3); //Disappearing Platform +obj.createentity(game, 240, 80, 3); //Disappearing Platform +obj.createentity(game, 272, 80, 3); //Disappearing Platform +obj.createentity(game, 304, 80, 3); //Disappearing Platform +roomname = "The Last Straw"; +break; + +case rn(53,53): + +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,7,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,7,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,7,0,7,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,7,0,7,740,740,740,740,740,740,740,740,740,740,740,7,740,740,740,740,740,740,740,740,740,7,0,0,0,7,740,740,740,740,740,740"); +tmap.push("740,740,740,740,7,0,0,0,7,740,740,740,740,740,740,740,740,740,7,0,7,740,740,740,740,740,740,740,7,0,0,0,0,0,7,740,740,740,740,740"); +tmap.push("740,740,740,7,0,0,0,0,0,7,740,740,740,740,740,740,740,7,0,0,0,7,740,740,740,740,740,7,0,0,0,0,0,0,0,7,740,740,740,740"); +tmap.push("740,740,7,0,0,0,0,0,0,0,7,740,740,740,740,740,7,0,0,0,0,0,7,740,740,740,7,0,0,0,0,0,0,0,0,0,7,740,740,740"); +tmap.push("740,7,0,0,0,0,0,0,0,0,0,7,740,740,740,7,0,0,0,0,0,0,0,7,740,7,0,0,0,0,0,0,0,0,0,0,0,7,740,740"); +tmap.push("7,0,0,0,0,0,0,0,0,0,0,0,7,740,7,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,6,740,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,6,740,740,740,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("6,6,740,740,740,740,740,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6"); +tmap.push("740,740,740,740,740,740,740,740,6,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,6,740"); +tmap.push("740,740,740,740,740,740,740,740,740,6,0,0,0,0,0,0,0,6,740,6,0,0,0,0,0,0,0,0,0,6,740,6,0,0,0,0,0,6,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,6,0,0,0,0,0,6,740,740,740,6,0,0,0,0,0,0,0,6,740,740,740,6,0,0,0,6,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,6,0,0,0,6,740,740,740,740,740,6,0,0,0,0,0,6,740,740,740,740,740,6,0,6,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,6,0,6,740,740,740,740,740,740,740,6,0,0,0,6,740,740,740,740,740,740,740,6,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,6,740,740,740,740,740,740,740,740,740,6,0,6,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,6,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + +obj.createentity(game, 0, 80, 3); //Disappearing Platform +obj.createentity(game, 288, 88, 3); //Disappearing Platform +obj.createentity(game, 32, 80, 3); //Disappearing Platform +obj.createentity(game, 64, 136, 3); //Disappearing Platform +obj.createentity(game, 96, 136, 3); //Disappearing Platform +obj.createentity(game, 224, 144, 3); //Disappearing Platform +obj.createentity(game, 192, 144, 3); //Disappearing Platform +obj.createentity(game, 256, 88, 3); //Disappearing Platform +obj.createentity(game, 128, 88, 3); //Disappearing Platform +obj.createentity(game, 160, 88, 3); //Disappearing Platform +roomname = "W"; +break; + +case rn(54,53): + +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("7,7,7,7,7,7,7,7,7,7,7,7,7,7,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("6,6,6,6,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,6,6,6,6,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,6,6,6,6,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); + +obj.createentity(game, 0, 88, 3); //Disappearing Platform +obj.createentity(game, 32, 88, 3); //Disappearing Platform +obj.createentity(game, 64, 88, 3); //Disappearing Platform +obj.createentity(game, 120, 128, 9, 19); // (shiny trinket) + +roomname="V"; +break; + + +case rn(54,52): + +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +roomname = "VV"; +break; + + +case rn(54,51): + +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +roomname = "VVV"; +break; + + +case rn(54,50): + +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740,740,740,740"); +roomname = "VVVV"; +break; + +case rn(54,49): + +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); +tmap.push("740,740,740,740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740,740,740,740"); + +roomname = "VVVVV"; +break; + +case rn(54,48): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740"); +tmap.push("740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740"); +tmap.push("740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740"); +tmap.push("740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); +tmap.push("740,740,740,740,740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,740,740,740,740"); + +obj.createblock(0, 0, 0, 5, 240); +obj.createblock(0, 315, 0, 5, 240); + + +if(game.intimetrial) { + obj.createblock(1, 0, 0, 320, 120, 82); +}else{ + obj.createblock(1, 0, 0, 320, 120, 3500); //Game complete +} +roomname = "VVVVVV"; +break; + + +case rn(46,54): + +tmap.push("98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,178,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,258,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,178,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,258,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,178,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,218,220,0,258,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,178,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,218,220,0,258,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,258,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,178,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,258,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +rcol = 6; +warpy = true; +roomname = "Temporary Fault..."; +break; + +case rn(47,54): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +warpy = true; +roomname = "Do Not Adjust the V-hold"; +break; + +case rn(48,54): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,99,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,218,98,220,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,218,98,220,218,98,220,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,180,218,98,220,218,98,220,218,98,220,218,98,220,218,98,220,740,740,740,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,218,98,220,218,98,220,218,98,220,218,98,220,218,98,220,740,740,740,740,740,740"); + +obj.createentity(game, 264, 32, 10, 0, 54480); // (savepoint) + +/*if(!game.nocutscenes && obj.flags[71]==0){ + obj.createblock(1, 72, 0, 320, 240, 49); +}*/ + +warpy = true; +roomname = "Regular Service Will Return Shortly"; +break; + +case rn(49,54): + +tmap.push("98,98,98,98,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,220,740,740,740"); +tmap.push("98,98,98,98,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,220,740,740,740"); +tmap.push("98,98,98,98,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,258,259,260,0,0,218,220,0,0,218,98,220,740,740,740"); +tmap.push("259,259,259,259,259,260,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,218,98,220,740,740,740"); +tmap.push("0,0,0,0,0,0,0,0,258,260,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,258,260,0,0,218,98,220,740,740,740"); +tmap.push("179,179,179,179,179,179,179,179,179,180,0,0,218,98,220,0,0,0,0,258,260,0,0,0,0,178,179,179,179,179,179,180,0,0,218,98,220,740,740,740"); +tmap.push("98,98,98,98,98,98,98,98,98,220,0,0,218,98,220,0,0,0,0,7,7,0,0,0,0,218,98,98,98,98,98,220,0,0,218,98,220,740,740,740"); +tmap.push("98,98,98,98,98,98,98,98,98,220,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,220,0,0,218,98,220,740,740,740"); +tmap.push("259,259,259,259,259,259,259,259,259,260,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,260,0,0,218,98,220,740,740,740"); +tmap.push("179,179,179,179,179,180,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,178,179,180,0,0,0,0,0,0,218,98,220,740,740,740"); +tmap.push("98,98,98,98,98,220,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,218,98,220,740,740,740"); +tmap.push("259,259,259,100,98,220,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,218,98,139,179,179,179"); +tmap.push("740,740,740,218,98,220,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,218,98,98,98,98,98"); +tmap.push("740,740,740,218,98,220,0,0,0,0,0,0,258,259,260,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,0,0,0,0,258,259,259,259,259,259"); +tmap.push("740,740,740,218,98,220,0,0,178,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,178,179,179,179,179,179,179,179,179,179"); +tmap.push("740,740,740,218,98,220,0,0,218,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,218,98,220,0,0,218,98,98,98,98,98,98,98,98,98"); +tmap.push("740,740,740,218,98,220,0,0,218,98,98,98,98,98,220,0,0,0,0,6,6,0,0,0,0,218,98,220,0,0,218,98,98,98,98,98,98,98,98,98"); +tmap.push("740,740,740,218,98,220,0,0,258,259,259,259,259,259,260,0,0,0,0,178,180,0,0,0,0,218,98,220,0,0,258,259,259,259,259,259,259,259,259,259"); +tmap.push("740,740,740,218,98,220,0,0,178,180,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,178,180,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0"); +tmap.push("740,740,740,218,98,220,0,0,218,220,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,178,179,179,179,179,179"); +tmap.push("740,740,740,218,98,220,0,0,218,220,0,0,178,179,180,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,98,98,98,98"); +tmap.push("740,740,740,218,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,98,98,98,98"); +tmap.push("740,740,740,218,98,220,0,0,218,220,0,0,218,98,220,0,0,0,0,218,220,0,0,0,0,218,98,220,0,0,218,220,0,0,218,98,98,98,98,98"); + +obj.createentity(game, 120, 116, 11, 80); // (horizontal gravity line) +warpy = true; +roomname = "Origami Room"; +break; + + +//Tower Hallways from here +case rn(108,109): + +tmap.push("12,12,12,12,13,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,21,7,7,9,7,7,7,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,21,28,28,0,28,28,28,20,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,21,28,28,0,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,21,28,28,0,28,28,28,20,21,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,14,12,12,12,12,12,12"); +tmap.push("12,12,12,12,21,28,28,0,28,28,28,20,21,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12"); +tmap.push("12,12,12,12,21,28,28,0,28,28,28,20,21,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,23,23,23,23,23,23"); +tmap.push("23,23,23,23,24,28,28,0,28,28,28,20,21,28,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,28,28,28,28"); +tmap.push("0,0,0,28,28,28,28,0,28,28,28,20,21,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,0,28,28,28,28"); +tmap.push("0,0,0,28,28,28,28,0,28,28,28,20,21,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,0,28,28,28,28"); +tmap.push("0,0,0,28,28,28,28,0,28,28,28,20,21,28,0,28,28,0,28,28,0,0,0,0,0,0,0,0,0,0,28,28,0,28,28,0,28,28,28,28"); +tmap.push("0,0,0,28,28,28,28,0,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,0,28,28,0,28,28,0,28,28,28,28"); +tmap.push("0,0,0,28,17,18,18,19,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,0,28,28,0,28,28,0,28,28,28,28"); +tmap.push("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,0,0,0,0,28,28,0,28,28,0,28,28,17,18,18,18,18"); +tmap.push("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,22,14,12,12,12"); +tmap.push("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,28,28,0,20,12,12,12"); +tmap.push("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,0,0,0,0,28,28,0,28,28,0,28,28,0,22,14,12,12"); +tmap.push("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,0,28,28,0,28,28,0,28,20,12,12"); +tmap.push("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,0,28,28,0,28,28,0,28,22,14,12"); +tmap.push("0,0,0,28,20,12,12,21,28,28,28,20,21,28,0,28,28,0,28,28,0,0,0,0,0,0,0,0,0,0,28,28,0,28,28,0,28,28,20,12"); +tmap.push("0,0,0,28,20,12,12,21,28,28,28,22,24,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,0,28,28,20,12"); +tmap.push("18,18,18,18,16,12,12,21,28,28,28,0,28,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,0,28,28,20,12"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,0,28,28,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,28,28,20,12"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,20,12"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,0,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,28,28,20,12"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12"); +tmap.push("12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + +obj.createentity(game, 40, 80, 10, 1, 50500); // (savepoint) + +roomname = "Teleporter Divot"; +break; + +case rn(110,104): + +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("18,18,18,18,18,18,18,19,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); +tmap.push("12,12,12,12,12,12,12,21,28,28,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,0,0"); +tmap.push("12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + +obj.createentity(game, 16, 112, 10, 1, 50520); // (savepoint) +roomname = "Seeing Red"; + +if(!game.intimetrial){ + if(game.companion==0 && obj.flags[8]==0 && !game.crewstats[3]){ //also need to check if he's rescued in a previous game + obj.createentity(game, 264, 185, 18, 15, 1, 17, 0); + obj.createblock(1, 26*8, 0, 32, 240, 36); + } +} +break; + +case rn(111,104): + +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +tmap.push("18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +tmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + +obj.createentity(game, 128-16, 80-32, 14); //Teleporter! +roomname = "Building Apport"; + +if(game.intimetrial) { + obj.createblock(1, 40, 0, 32, 240, 82); +} +break; + +//Intermission level 2 +case rn(53,48): + +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,178,179,179,179,179,180,178,180,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,258,259,259,259,259,260,218,220,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,178,180,0,0,0,0,218,220,0,0,0,0,0,178,179,179,180,178,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,258,260,0,0,0,0,258,260,0,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,258,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,178,179,180,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,180,178,179,179,180,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,178,179,179"); +tmap.push("98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98"); +tmap.push("259,259,259,259,259,260,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,258,259,259"); +tmap.push("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0"); +tmap.push("179,179,180,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,178,179,179,179,179,179,179"); +tmap.push("98,98,220,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98"); +tmap.push("259,259,260,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,258,259,259,260,258,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,258,259,259,260,0,0,0,0,218,98,98,220,0,0,0,0,258,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); + +roomname = "Whee Sports"; +warpx = true; +break; + +case rn(53,49): + +tmap.push("98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,100,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,180,178,179,179"); +tmap.push("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98"); +tmap.push("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,98"); +tmap.push("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,178,179,180,178,179,179,179,179,179,179,180,178,179,180,0,218,98,98"); +tmap.push("219,219,219,219,219,219,219,218,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,218,98,98,98,98,98,98,220,218,98,220,0,218,98,98"); +tmap.push("179,179,179,179,179,179,179,140,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,258,259,259,259,259,259,259,260,218,98,220,0,218,98,98"); +tmap.push("98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,258,259,260,0,218,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,260,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,178,179,179,180,0,0,0,0,0,0,0,258,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,178,180,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,220,0,218,220,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,220,0,0,0,0,218,98,220,0,258,260,0,0,0,0,0,178,179,180,0,178,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,220,0,0,0,0,0,0,0,0,218,98,220,0,218,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,100,98,220,218,98,98,220,0,0,0,0,218,98,220,178,179,179,179,179,179,179,180,218,98,220,0,218,98,98"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,0,0,0,0,218,98,220,218,98,98,98,98,98,98,220,218,98,220,0,218,98,98"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,0,0,0,0,258,259,260,258,259,259,259,259,259,259,260,258,259,260,0,218,98,98"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259,260,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomname = "Whizz Down The Shaft"; +warpx = true; +break; + +case rn(53, 50): +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + +//obj.createentity(game, -8, 84-32, 11, 328); // (horizontal gravity line) +obj.createentity(game, -8, 148 + 32, 11, 328); // (horizontal gravity line) + +obj.createblock(1, -10, 84 - 16, 340, 32, 10); //create the second line! + +roomname = "The Gravitron"; +warpx = true; //warpy = true; +break; + +case rn(53,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,178,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,98,98"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,99,259"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,220,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,218,98,220,219"); +tmap.push("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259"); +tmap.push("219,218,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("219,218,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,218,98,220,0,0,0,0,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +obj.createentity(game, 264, 176, 10, 1, 51530); // (savepoint) + +if(game.companion==0){ //also need to check if he's rescued in a previous game + if (game.lastsaved == 2) { + obj.createentity(game, 112, 169, 18, 14, 0, 17, 1); + obj.createblock(1, 22 * 8, 16*8, 32, 240, 37); + }else if (game.lastsaved ==3) { + obj.createentity(game, 112, 169, 18, 15, 0, 17, 1); + obj.createblock(1, 22 * 8, 16*8, 32, 240, 38); + }else if (game.lastsaved == 4) { + obj.createentity(game, 112, 169, 18, 13, 0, 17, 1); + obj.createblock(1, 22 * 8, 16*8, 32, 240, 39); + }else { + obj.createentity(game, 112, 169, 18, 16, 1, 17, 1); + obj.createblock(1, 22 * 8, 16*8, 32, 240, 40); + } +} + +roomname = "Tunnel of Terror"; +warpx = true; + +game.swnmode = false; +break; + + +case rn(53,52): + +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("219,218,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,218,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,218,98,220,0,0,0,0,178,179,180,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,219,219,219,219,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("219,218,98,220,0,0,0,0,218,98,220,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("219,218,98,220,0,0,0,0,258,259,260,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219"); +tmap.push("179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219"); +tmap.push("259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,180,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,220,219,219,219,219,219,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,219,219,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,100,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +obj.createentity(game, (22 * 8)+4, (9 * 8) + 4, 14); //Teleporter! + +roomname = "House of Mirrors"; +warpx = true; +break; + +//Intermission 1 + +case rn(41,56): + +tmap.push("259,259,259,259,259,259,259,259,259,260,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,180,178,180,0,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,260,218,220,0,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,218,220,0,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,139,179,179,179,179,179"); +tmap.push("179,179,180,178,179,180,0,218,220,0,258,259,260,0,218,98,98,220,0,258,259,259,259,260,0,218,98,98,98,98,220,0,218,98,98,98,98,98,98,98"); +tmap.push("98,98,220,258,259,260,0,258,260,0,0,0,0,0,258,259,259,260,0,7,7,7,7,7,0,218,98,98,98,98,220,0,258,259,259,259,259,259,259,259"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,260,0,7,7,7,7,7,7,7,7"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,220,178,179,180,0,178,179,179,179,179,180,0,6,6,6,6,0,178,179,179,179,180,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179"); +tmap.push("259,259,260,258,259,260,0,218,98,98,98,98,220,0,178,179,179,180,0,218,98,98,98,220,0,6,6,6,6,6,6,0,218,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,258,259,259,259,259,260,0,258,259,259,260,0,258,259,259,259,260,0,178,179,179,179,179,180,0,258,259,259,259,259,259,259,259"); +tmap.push("179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,260,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,180,0,178,179,179,180,0,178,179,179,179,180,0,178,179,179,179,179,180,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,178,179,179,179,179,179,179,179"); +tmap.push("259,259,259,259,259,259,259,259,259,259,100,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,98,98,98,98,98,98"); +tmap.push("219,219,219,219,219,219,219,219,219,219,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,99,259,259,259,259,259"); +tmap.push("219,219,219,219,219,219,219,219,219,219,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,218,98,220,0,218,98,98,220,0,218,98,98,98,220,0,218,98,98,98,98,220,0,218,98,220,219,219,219,219,219"); + +//obj.createentity(game, 164, 96, 10, 1, 56410); // (savepoint) + +warpy = true; +roomname = "Now Take My Lead"; +break; + + +case rn(42,56): + +tmap.push("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,139,179,179,179"); +tmap.push("179,179,179,179,179,140,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,98,98,98"); +tmap.push("98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,258,259,259,259,259,259"); +tmap.push("259,259,259,259,259,259,259,260,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,7,7,7,7,7,7"); +tmap.push("7,7,7,7,7,7,7,7,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,180,178,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,220,218,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,260,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,98,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,258,259,260,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("259,100,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,218,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +if(!game.nodeathmode){ + obj.createblock(1, 0, 0, 32, 240, 41); //scene 2 + obj.createblock(1, 280, 0, 32, 240, 12); //scene 2 +} + +roomname = "What Are You Waiting For?"; +warpy = true; +break; + +case rn(43,56): + +tmap.push("219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,0,0,0,0,178,179,179,180,0,0,0,0,178,179,179,180,0,0,0,0,178,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,6,6,6,6,218,98,98,220,6,6,6,6,218,98,98,220,6,6,6,6,218,98,98,220,6,6,6,6,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,178,179,179,180,218,98,98,220,178,179,179,180,218,98,98,220,178,179,179,180,218,98,98,220,178,179,179,180,218,98,99,259"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,220,219"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,98,220,218,98,220,219"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,258,259,259,260,218,98,98,220,258,259,259,260,218,98,98,220,258,259,259,260,218,98,98,220,218,98,220,219"); +tmap.push("179,179,179,179,179,179,179,180,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,218,98,220,219"); +tmap.push("98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,218,98,220,219"); +tmap.push("98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,218,98,139,179"); +tmap.push("98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,218,98,98,98"); +tmap.push("259,259,259,259,259,259,259,260,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,258,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,220,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,258,259,259,260,0,0,0,0,258,259,259,260,0,0,0,0,258,259,259,260,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +if(!game.nodeathmode){ + obj.createblock(1, 20, 0, 32, 240, 13); //scene 2 +} +obj.createentity(game, 104, 120, 1, 0, 3); // Enemy +obj.createentity(game, 168, 176, 1, 1, 3); // Enemy +obj.createentity(game, 232, 120, 1, 0, 3); // Enemy + +warpy = true; +roomname = "Don't Get Ahead of Yourself!"; +break; + +case rn(44,56): + +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,100,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,258,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,100,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + +obj.createentity(game, 144, 40, 10, 1, 56440); // (savepoint) + +if(!game.nodeathmode){ + obj.createblock(1, 200, 0, 32, 240, 42); //scene 3 +} + + +roomname = "Very Good"; +warpy = true; +break; + +case rn(45,56): + +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,180,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("259,259,259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179,179,179,179,179"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,98,98,98,98,98"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259,259,259,259,259,259"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,178,179,179,180,178,179,179,180,178,179,179,179,179,179,179,180,178,179,179,180,178,179,179,179,180,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,218,98,98,220,258,259,259,260,218,98,98,98,98,98,98,220,258,259,259,260,218,98,98,98,220,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,218,98,98,98,220,178,179,179,179,179,179,179"); +tmap.push("179,179,179,179,179,140,98,220,218,98,98,220,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,218,98,98,98,220,218,98,98,98,98,98,98"); +tmap.push("98,98,98,98,98,98,98,220,218,98,98,220,0,0,0,0,258,259,259,259,259,259,259,260,0,0,0,0,218,98,98,98,220,218,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,260,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,220,258,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,260,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + +obj.createentity(game, 104, 152, 1, 0, 3); // Enemy +obj.createentity(game, 200, 152, 1, 0, 3); // Enemy + +roomname = "Must I Do Everything For You?"; +warpy = true; + +break; + +case rn(46,56): + +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); + +obj.createentity(game, 56, 192, 10, 1, 56460); // (savepoint) + +if(!game.nodeathmode){ + obj.createblock(1, 200, 0, 32, 240, 43); //scene 3 +} + +roomname = "Now Stay Close To Me..."; +warpy = true; +break; + +case rn(47,56): + +tmap.push("219,219,219,218,98,220,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("219,219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,219,219,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,178,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("179,179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,0,0,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,6,6,6,6,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,100,98,220,178,179,179,180,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); + +obj.createentity(game, 144, 64, 2, 0, 2, 144, 64, 176, 216); // Platform, bounded + +roomname = "...But Not Too Close"; +warpy = true; +break; + +case rn(48,56): + +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,180,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,180,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,260,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,220,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,139,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,180,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,50,258,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,6,6,6,6,6,6,6,6,258,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("219,219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,219,219,218,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +warpy = true; +roomname = "Don't Be Afraid"; +break; + +case rn(49,56): + +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +obj.createentity(game, 152, 176, 10, 1, 56490); // (savepoint) +if(!game.nodeathmode){ + obj.createblock(1, 200, 0, 32, 240, 44); //scene 3 +} +warpy = true; +roomname = "Do as I Say..."; +break; + +case rn(50,56): + +tmap.push("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,218,98,220,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,219,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,218,98,220,178,179,179,180,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7"); +tmap.push("219,219,218,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,218,98,220,218,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,218,98,220,258,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179,179,179,179,179,180,178,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98,98,220,218,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,260,218,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("179,179,179,179,179,179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98"); +tmap.push("259,259,259,259,259,259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,180,218,98"); +tmap.push("219,219,219,219,219,219,218,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,98,220,218,98"); +tmap.push("219,219,219,219,219,219,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,98,220,218,98"); + +obj.createentity(game, 88, 200, 2, 1, 4, 88, 128, 216, 208); // Platform, bounded +obj.createentity(game, 136, 136, 2, 0, 4, 88, 128, 216, 208); // Platform, bounded +obj.createentity(game, 184, 200, 2, 1, 4, 88, 128, 216, 208); // Platform, bounded + +roomname = "...Not as I Do"; +warpy = true; +break; + +case rn(51,56): + +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,98,220,218,98,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,218,98,98,220,218,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,260,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +obj.createentity(game, 192, 136, 10, 1, 56510); // (savepoint) +if(!game.nodeathmode){ + obj.createblock(1, 80, 0, 32, 240, 45); //scene 3 +} +warpy = true; +roomname = "Mind Your Head"; +break; + +case rn(52,56): + +tmap.push("219,218,98,220,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219"); +tmap.push("219,218,98,220,7,7,7,7,7,178,180,7,7,7,7,7,7,7,178,180,7,7,7,7,178,179,179,180,7,7,7,7,7,7,7,7,218,98,220,219"); +tmap.push("219,218,98,220,0,0,0,0,0,218,220,0,0,0,0,0,0,0,218,220,0,0,0,0,218,98,98,220,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("219,218,98,220,0,0,0,0,0,258,260,0,0,0,0,0,0,0,258,260,0,0,0,0,258,259,259,260,0,0,0,0,0,0,0,0,218,98,139,179"); +tmap.push("219,218,98,220,0,0,0,0,0,7,7,0,0,0,0,0,0,0,7,7,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,218,98,98,98"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,179,179,179"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98"); +tmap.push("259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,99,259"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("259,100,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219"); +tmap.push("219,218,98,220,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,218,98,220,219"); +tmap.push("219,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,220,219"); + +obj.createentity(game, 48, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded +obj.createentity(game, 80, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded +obj.createentity(game, 112, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded +obj.createentity(game, 144, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded +obj.createentity(game, 176, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded +obj.createentity(game, 208, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded +obj.createentity(game, 240, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded + +roomname = "Do Try To Keep Up"; +warpy = true; +break; + +case rn(53,56): + +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,220,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,180,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,0,0,218,98,220,219,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,218,98,220,219,219,219,219,219"); +tmap.push("259,259,259,259,259,100,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219,219"); +tmap.push("219,219,219,219,219,218,98,220,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,218,98,139,179,179,179,179,179"); +tmap.push("219,219,219,219,219,218,98,220,0,0,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,98,98,98,98,98,98"); +tmap.push("219,219,219,219,219,218,98,220,0,0,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,258,259,259,259,259,259,259,259"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("219,219,219,219,219,218,98,220,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("219,219,219,219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("219,219,219,219,219,218,98,220,218,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +obj.createentity(game, 72, 72, 10, 1, 56530); // (savepoint) + +roomname = "You're Falling Behind"; +warpy = true; +break; + +case rn(54,56): + +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,139,179,179,179,179,179,179,179,179,179,179,179,140,98,220,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,218,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,220,219,219,219,219"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,139,179,179,179,179"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,98,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,258,259,259,259,259,259,259"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259"); +tmap.push("219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219"); + +obj.createentity(game, (18 * 8) + 4, (10 * 8) + 4, 14); //Teleporter! + +if(!game.nodeathmode){ + obj.createblock(1, 104, 0, 32, 240, 46); //scene 3 +} + +roomname = "Class Dismissed!"; +warpy = true; +break; + + + + default: + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + roomname = "Outer Space"; + + //game.test = true; + //game.teststring = "ERROR: Map not found in Final Area"; + break; + } + } + + public var roomname:String; + public var coin:int; + public var rcol:int; + public var warpx:Boolean, warpy:Boolean; + } +} \ No newline at end of file diff --git a/mobile_version/levels/labclass.as b/mobile_version/levels/labclass.as new file mode 100644 index 00000000..2e2a0137 --- /dev/null +++ b/mobile_version/levels/labclass.as @@ -0,0 +1,1864 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class labclass extends Sprite { + public function rn(rx:int, ry:int):int { + return rx + (ry * 100); + } + + public function loadlevel(rx:int, ry:int, game:gameclass, obj:entityclass):void { + var t:int; + tmap.reset(); + + rx=rx-100; + ry=ry-100; + if(ry<5){ + rx+=50-2; ry+=54; //lab + }else{ + rx+=50-2; ry+=50-16; //lab + } + + t = rx + (ry * 100); + + coin = 0; rcol = 0; + roomname = "Untitled room ["+String(rx) + "," + String(ry)+"]"; + + switch(t) { + + case rn(50,50): + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,284,444,444,444,444,444,444,444,444,444,285,283,284,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,0,0,0,363,364,365,0,0,0,403,283,405,0,0,0,363,364,365,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,0,0,0,403,283,405,0,0,0,443,444,445,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("444,444,444,444,444,444,285,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("0,0,0,0,0,0,403,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("0,0,0,0,0,0,403,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("0,0,0,0,0,0,403,283,405,0,0,0,403,283,324,364,364,364,364,364,364,364,364,364,325,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("0,0,0,0,0,0,403,283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("0,0,0,0,0,0,403,283,405,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,285,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("364,364,365,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,403,283,324,364,364,364,364,364,364,364,364,364,364,364,365,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,444,444,445,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283"); + +obj.createentity(game, 232, 24, 10, 0, 250500); // (savepoint) + +if(game.intimetrial) { + obj.createblock(0, 0, 0, 8, 240); +} + +rcol=1; +roomname = "Get Ready To Bounce"; +break; + +case rn(50,51): + +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,400,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,400,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,281,441,442,0,0,0,0,0,0,440,441,441,441,441,282,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,281,442,64,64,0,0,0,0,0,0,64,64,64,64,64,440,282"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,442,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("63,63,63,63,63,63,63,63,63,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("361,361,361,361,361,361,361,361,361,361,361,361,362,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,321,362,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,360,322"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,321,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,322,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + +obj.createentity(game, 112, 180, 11, 192); // (horizontal gravity line) +rcol = 0; + +roomname = "It's Perfectly Safe"; +break; + +case rn(49,51): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,72,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,414,0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,71,71,71,71,71,71,71,71,71,71,71"); +tmap.push("292,414,0,0,0,0,0,0,0,60,413,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,307,308,308,308,308,308,308,349,373,373,373,373"); +tmap.push("292,414,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,71,71,71,0,0,0,0,0,71,71,71,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,333,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292"); + +obj.createentity(game, 96, 124, 11, 120); // (horizontal gravity line) +obj.createentity(game, 248, 48, 10, 0, 251490); // (savepoint) +rcol = 4; + +roomname = "Rascasse"; +break; + +case rn(49,52): + +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("286,287,447,447,447,447,447,447,447,447,288,286,286,287,447,447,447,447,447,447,447,447,288,286,286,287,447,448,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("286,408,68,68,68,68,68,68,68,68,406,286,286,408,68,68,68,68,68,68,68,68,406,286,286,408,68,68,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("447,448,0,0,0,0,0,0,0,0,446,447,447,448,0,0,0,0,0,0,0,0,446,447,447,448,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,68,68,68,68,0,0,0,0,0,0,0,0,68,68,68,68,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,67,67,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286"); +tmap.push("367,367,367,367,367,367,367,368,0,0,0,0,0,0,0,0,366,367,367,368,0,0,0,0,0,0,0,0,366,367,367,367,367,367,367,328,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,67,67,67,67,67,67,67,67,406,286,286,408,67,67,67,67,67,67,67,67,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,327,367,367,367,367,367,367,367,367,328,286,286,327,367,367,367,367,367,367,367,367,328,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + +obj.createentity(game, 248, 136, 10, 1, 252490); // (savepoint) +obj.createentity(game, 16, 68, 11, 64); // (horizontal gravity line) +obj.createentity(game, 112, 68, 11, 64); // (horizontal gravity line) +obj.createentity(game, 64, 164, 11, 64); // (horizontal gravity line) +obj.createentity(game, 160, 164, 11, 64); // (horizontal gravity line) +rcol = 2; + +roomname = "Keep Going"; +break; + +case rn(48,52): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289"); +tmap.push("289,289,289,289,289,411,70,70,70,70,70,70,70,70,70,70,70,70,70,409,289,289,289,411,70,70,70,70,70,70,70,70,70,70,70,70,70,409,289,289"); +tmap.push("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); +tmap.push("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); +tmap.push("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); +tmap.push("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); +tmap.push("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); +tmap.push("289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289"); +tmap.push("289,290,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450"); +tmap.push("289,411,70,70,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,70,70,70,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,69,69,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,369,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,411,69,69,69,69,69,0,0,0,0,0,69,69,69,69,69,409,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,330,370,370,370,370,371,0,0,0,0,0,369,370,370,370,370,331,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,411,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,411,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,330,370,370,370,370,370,331,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + +obj.createentity(game, 280, 136, 10, 1, 252480); // (savepoint) +obj.createentity(game, 48, 52, 11, 104); // (horizontal gravity line) +obj.createentity(game, 192, 52, 11, 104); // (horizontal gravity line) +obj.createentity(game, 152, 196, 11, 40); // (horizontal gravity line) +rcol=3; + +roomname = "Single-slit Experiment"; +break; + + +case rn(48,53): + +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,296,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,417,74,74,74,74,74,74,74,74,74,74,74,74,74,74"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,455,456,456,456,456,456,456,456,456,456,456,456,456,456,457,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + +obj.createentity(game, 32, 128, 10, 1, 253480); // (savepoint) +obj.createentity(game, 187, 88, 12, 56); // (vertical gravity line) +obj.createentity(game, 107, 88, 12, 56); // (vertical gravity line) +rcol = 5; + +roomname = "Don't Flip Out"; +break; + +case rn(49,53): + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,284,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("444,444,444,444,444,285,283,283,283,283,283,283,283,283,283,405,66,66,66,66,66,66,66,66,66,403,283,283,283,283,283,283,283,283,283,284,444,444,444,444"); +tmap.push("66,66,66,66,66,403,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,405,66,66,66,66"); +tmap.push("0,0,0,0,0,443,444,444,444,444,444,444,444,444,444,445,0,0,0,0,0,0,0,0,0,443,444,444,444,444,444,444,444,444,444,445,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("364,364,364,364,364,365,0,0,0,0,0,0,0,0,0,363,364,364,364,364,364,364,364,364,364,365,0,0,0,0,0,0,0,0,0,363,364,364,364,364"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,403,283,283,283,283"); +tmap.push("283,283,283,283,283,405,65,65,65,65,65,65,65,65,65,403,283,283,283,283,283,283,283,283,283,405,65,65,65,65,65,65,65,65,65,403,283,283,283,283"); +tmap.push("283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,325,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.createentity(game, 43, 88, 12, 56); // (vertical gravity line) +obj.createentity(game, 123, 88, 12, 56); // (vertical gravity line) +obj.createentity(game, 203, 88, 12, 56); // (vertical gravity line) +obj.createentity(game, 283, 88, 12, 56); // (vertical gravity line) + +obj.createentity(game, 156, 128, 20, 1); // (terminal) +obj.createblock(5, 156-8, 128, 20, 16, 19); +rcol = 1; + +roomname = "Shuffled Hallway"; +break; + +case rn(50,53): + +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,70,70,70,70,70,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("70,70,70,70,70,70,70,70,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,69,69,69,69,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,330,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,69,69,69,69,69,69,69,69"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,330,370,370,370,370,370,370,370,370"); + +obj.createentity(game, 96, 192, 10, 1, 253500); // (savepoint) +obj.createentity(game, 163, 32, 12, 168); // (vertical gravity line) +rcol = 3; + +roomname = "Double-slit Experiment"; +break; + +case rn(51,53): + +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,287,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + +obj.createentity(game, 264, 104, 10, 1, 253510); // (savepoint) +obj.createentity(game, 131, 120, 12, 96); // (vertical gravity line) +obj.createentity(game, 187, 16, 12, 96); // (vertical gravity line) +obj.createentity(game, 40, 112, 10, 0, 253511); // (savepoint) +rcol = 2; +roomname = "They Call Him Flipper"; +break; + +case rn(52,53): + +tmap.push("453,453,453,453,453,453,294,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("72,72,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,293,453,453,453,294,292,293,453,453,453,294,292,293,453,453,453,294,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,412,414,0,0,0,0,0,0,412,414,72,72,72,412,292,414,72,72,72,412,292,414,72,72,72,412,292,292,292,292,292,292,292,292"); +tmap.push("373,374,0,0,0,0,412,414,0,0,0,0,0,0,452,454,0,0,0,452,453,454,0,0,0,452,453,454,0,0,0,452,453,453,453,453,453,453,294,292"); +tmap.push("292,414,0,0,0,0,412,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); +tmap.push("292,414,0,0,0,0,412,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); +tmap.push("292,414,0,0,0,0,412,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); +tmap.push("292,414,0,0,0,0,412,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,71,0,0,0,412,292"); +tmap.push("292,414,0,0,0,0,452,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,307,309,0,0,0,412,292"); +tmap.push("292,414,0,0,0,0,72,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,72,0,0,0,412,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); +tmap.push("292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292"); +tmap.push("292,333,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,0,372,373,373,373,374,0,0,0,0,0,372,373,373,373,373,373,373,373,373,334,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,414,71,71,71,71,71,412,292,292,292,414,71,71,71,71,71,412,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,333,373,373,373,373,373,334,292,292,292,333,373,373,373,373,373,334,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + +obj.createentity(game, 24, 184, 10, 1, 253520); // (savepoint) +obj.createentity(game, 64, 164, 11, 200); // (horizontal gravity line) +rcol = 4; +roomname = "Three's a Crowd"; +break; + +case rn(52,52): + +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286,286,286,286,286"); +tmap.push("68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("367,367,367,367,367,367,367,351,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,312,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,366,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + +obj.createentity(game, 195, 24, 12, 80); // (vertical gravity line) +obj.createentity(game, 195, 128, 12, 80); // (vertical gravity line) +obj.createentity(game, 80, 120, 10, 0, 252520); // (savepoint) +obj.createentity(game, 80, 96, 10, 1, 252521); // (savepoint) +rcol = 2; +roomname = "Hitting the Apex"; +break; + +case rn(51,52): + +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,280,281,441,441,441,441,441,441,441,441,441,441"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,281,442,64,64,64,64,64,64,64,64,64,64"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,281,441,441,441,441,442,51,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,281,442,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,440,282,280,281,442,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,440,344,442,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,464,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,360,361,361,361,361,361,361,361"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("280,321,362,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,360,322,280,280,280,280,280,280,280"); +tmap.push("280,280,321,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,322,280,280,280,280,280,280,280,280"); + +obj.createentity(game, 24, 188, 11, 224); // (horizontal gravity line) +obj.createentity(game, 280, 96, 10, 1, 252510); // (savepoint) + +obj.createentity(game, 204, 32, 20, 0); // (terminal) +obj.createblock(5, 204-8, 32, 20, 16, 20); +rcol=0; + +roomname = "Square Root"; +break; + + +case rn(51,51): + +tmap.push("292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,293,454,72,72,72,72,72,72,72,72,72,72,72,72,72,72,452,294,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,452,319,454,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,467,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,387,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,372,347,374,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,333,374,71,71,71,71,71,71,71,71,71,71,71,71,71,71,372,334,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,333,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292"); +tmap.push("292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + +obj.createentity(game, 24, 44, 11, 112); // (horizontal gravity line) +obj.createentity(game, 176, 180, 11, 112); // (horizontal gravity line) +rcol = 4; +roomname = "Thorny Exchange"; +break; + +case rn(51,50): + +tmap.push("283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("283,283,284,445,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,405,53,0,0,0,0,0,363,364,364,364,364,365,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,364"); +tmap.push("283,283,405,53,0,0,0,0,54,403,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,443,444,444,444,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,363,365,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,324,365,65,65,65,65,65,65,65,65,65,65,65,65,65,65,363,325,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); +tmap.push("283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283"); + +obj.createentity(game, 32, 28, 11, 296); // (horizontal gravity line) +obj.createentity(game, 32, 196, 11, 112); // (horizontal gravity line) +obj.createentity(game, 128, 100, 11, 160); // (horizontal gravity line) +obj.createentity(game, 88, 112, 10, 0, 250510); // (savepoint) +roomname = "Brought to you by the letter G"; +rcol = 1; +break; + +case rn(52,50): + +tmap.push("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447"); +tmap.push("68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("367,367,367,367,367,367,367,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 28, 11, 336); // (horizontal gravity line) +obj.createentity(game, 32, 72, 10, 1, 250520); // (savepoint) +rcol=2; + +roomname = "Free Your Mind"; +break; + +case rn(52,51): + +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("280,280,280,280,280,280,280,280,321,362,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63"); +tmap.push("280,280,280,280,280,280,280,280,280,321,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + +obj.createentity(game, 80, 180, 11, 248); // (horizontal gravity line) +rcol=0; +roomname = "I Changed My Mind, Thelma..."; +break; + +case rn(53,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,414,59,0,0,0,0,0,0,0,0,0,0"); +tmap.push("71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,372,334,292,333,374,71,71,71,71,71,71,71,71,71,71"); +tmap.push("373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292,333,373,373,373,373,373,373,373,373,373,373"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + +obj.createentity(game, -8, 180, 11, 208); // (horizontal gravity line) +obj.createentity(game, 240, 180, 11, 88); // (horizontal gravity line) +rcol=4; + +roomname = "Indirect Jump Vector"; +break; + +case rn(53,50): + +tmap.push("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); +tmap.push("74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,396,73,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,375,356,377,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295,417,61,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 28, 11, 336); // (horizontal gravity line) +rcol=5; + +roomname = "In a Single Bound"; +break; + +case rn(54,50): + +tmap.push("444,444,444,444,444,444,444,444,444,285,283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,284,444,444,444,444,444,444,444,444,444"); +tmap.push("66,66,66,66,66,66,66,66,66,443,285,283,284,445,66,66,66,66,66,66,66,66,66,66,66,66,443,285,283,284,445,66,66,66,66,66,66,66,66,66"); +tmap.push("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,54,443,359,445,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,66,473,66,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,65,393,65,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,54,363,353,365,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,53,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 28, 11, 80); // (horizontal gravity line) +obj.createentity(game, 112, 28, 11, 96); // (horizontal gravity line) +obj.createentity(game, 248, 28, 11, 80); // (horizontal gravity line) +rcol=1; + +roomname = "Barani, Barani"; +break; + + +case rn(54,51): + +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,446,399,448,55,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,68,470,68,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,67,390,67,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,366,350,368,55,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,56,406,286,408,55,0,0,0,0,0,0,0,0,0"); +tmap.push("67,67,67,67,67,67,67,67,67,366,328,286,327,368,67,67,67,67,67,67,67,67,67,67,67,67,366,328,286,327,368,67,67,67,67,67,67,67,67,67"); +tmap.push("367,367,367,367,367,367,367,367,367,328,286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,327,367,367,367,367,367,367,367,367,367"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + +obj.createentity(game, -8, 180, 11, 80); // (horizontal gravity line) +obj.createentity(game, 112, 180, 11, 96); // (horizontal gravity line) +obj.createentity(game, 248, 180, 11, 80); // (horizontal gravity line) +rcol=2; + +roomname = "Safety Dance"; +break; + +case rn(55,50): + +tmap.push("450,450,450,450,291,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("70,70,70,70,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,449,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,69,0,0,0,0,0,0,69,369,331,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,369,371,0,0,0,0,0,0,369,331,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,409,411,0,0,0,0,0,0,409,289,289,289"); + +obj.createentity(game, -8, 28, 11, 40); // (horizontal gravity line) + +rcol=3; +roomname = "Heady Heights"; +break; + +case rn(55,49): + +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,296,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,62,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,62,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("456,457,0,0,0,0,0,0,0,0,0,62,455,456,456,456,456,456,456,456,456,456,456,456,456,297,296,456,456,456,456,456,456,456,456,456,456,456,297,295"); +tmap.push("0,0,0,0,375,376,377,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("0,0,0,0,415,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("0,0,0,0,415,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("0,0,0,0,415,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("376,376,376,376,337,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,455,457,61,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,377,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,296,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,457,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); +tmap.push("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,415,295"); + + +obj.createentity(game, 160, 176, 10, 0, 249550); // (savepoint) +obj.createentity(game, 224, 68, 11, 72); // (horizontal gravity line) + + +//obj.createentity(game, 224, 192, 10, 0, 249550); // (savepoint) + +if(!game.intimetrial) obj.createentity(game, (12 * 8)-4, (6 * 8) + 4, 14); //Teleporter! +rcol = 5; + +roomname = "Entanglement Generator"; +break; + + +case rn(55,51): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,360,322,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,322,280,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,400,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,400,280,280,280"); + +obj.createentity(game, -8, 180, 11, 224); // (horizontal gravity line) + +rcol = 0; +roomname = "Exausted?"; +break; + + +case rn(55,52): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,333,373,373,373,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,59,0,0,0,0,0,0,0,60,412,292,414,0,0,0,0,0,0,412,292,292,292"); + +obj.createentity(game, 32, 64, 9, 10); // (shiny trinket) +obj.createentity(game, 120, 72, 10, 1, 252550); // (savepoint) +rcol = 4; + +roomname = "The Tantalizing Trinket"; +break; + +case rn(55,53): + +tmap.push("283,283,283,283,283,283,283,283,283,284,444,444,444,444,444,444,444,445,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,284,445,66,66,66,66,66,66,66,66,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,363,364,364,325,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,443,444,444,444,444,285,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,65,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,393,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,433,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,433,53,0,0,0,0,0,0,0,54,403,283,439,314,314,314,314,315,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,433,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,54,473,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,66,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,0,0,403,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,363,364,364,364,364,325,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,443,444,444,285,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,324,365,65,65,65,65,65,65,65,65,0,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,365,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283"); + +obj.createentity(game, 272, 144, 10, 1, 253550); // (savepoint) +obj.createentity(game, 152, 116, 11, 56); // (horizontal gravity line) +obj.createentity(game, 139, 16, 12, 72); // (vertical gravity line) +obj.createentity(game, 139, 144, 12, 72); // (vertical gravity line) +rcol=1; + +roomname = "The Bernoulli Principle"; +break; + +case rn(55,54): + +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); +tmap.push("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,297,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); +tmap.push("74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,415,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,61,0,0,0,0,0,0,0,62,415,295,417,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,455,457,0,0,0,0,0,0,0,0,0,455,456,457,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + +obj.createentity(game, 216, 144, 10, 1, 254550); // (savepoint) +obj.createentity(game, -8, 60, 11, 136); // (horizontal gravity line) +obj.createentity(game, -8, 172, 11, 136); // (horizontal gravity line) +rcol = 5; + +roomname = "Standing Wave"; +break; + +case rn(54,54): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,288,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,446,447,447,447,447,447,447,447,447,447,447"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,68,68,68,68,68,68,68,68,68,68"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,67,67,67,67,67,67,67,67,67,67"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,366,367,367,367,367,367,367,367,367,367,367"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286"); + +obj.createentity(game, -8, 60, 11, 336); // (horizontal gravity line) +obj.createentity(game, -8, 172, 11, 336); // (horizontal gravity line) +rcol=2; + +obj.fatal_top(); +roomname = "Topsy Turvyism"; +break; + +case rn(53,54): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,371,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,371,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,451,0,0,0,0,0,0,449,450,450,450,450,450,291,289,289,411,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,70,70,70,70,70,70,0,0,0,0,0,0,70,70,70,70,70,70,449,450,450,451,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,369,370,370,371,69,69,69,69,69,69,0,0,0,0,0,0,69,69,69,69,69,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,409,289,289,330,370,370,370,370,370,371,0,0,0,0,0,0,369,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,449,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,449,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 60, 11, 120); // (horizontal gravity line) +obj.createentity(game, -8, 172, 11, 40); // (horizontal gravity line) +obj.createentity(game, 264, 72, 10, 0, 254530); // (savepoint) +obj.createentity(game, 40, 144, 10, 1, 254531); // (savepoint) +obj.createentity(game, 160, 60, 11, 48); // (horizontal gravity line) +obj.createentity(game, 288, 60, 11, 40); // (horizontal gravity line) +obj.createentity(game, 112, 172, 11, 48); // (horizontal gravity line) +obj.createentity(game, 208, 172, 11, 120); // (horizontal gravity line) +rcol=3; + +obj.fatal_top(); +roomname = "Spike Strip Deployed"; +break; + +case rn(52,54): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 60, 11, 336); // (horizontal gravity line) +obj.createentity(game, -8, 172, 11, 336); // (horizontal gravity line) +obj.createentity(game, 72, 64, 1, 0, 8, 72, 64, 248, 168); // Enemy, bounded +obj.createentity(game, 232, 64, 1, 0, 8, 72, 64, 248, 168); // Enemy, bounded +obj.createentity(game, 152, 152, 1, 1, 8, 72, 64, 248, 168); // Enemy, bounded + +obj.fatal_top(); +roomname = "Vibrating String Problem"; +rcol = 5; +break; + +case rn(51,54): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,365,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,365,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 176, 60, 11, 152); // (horizontal gravity line) +obj.createentity(game, 176, 172, 11, 152); // (horizontal gravity line) +obj.createentity(game, -8, 84, 11, 160); // (horizontal gravity line) +obj.createentity(game, -8, 148, 11, 160); // (horizontal gravity line) +obj.createentity(game, 160-4, 120, 10, 1, 254510); // (savepoint) +rcol=1; + +obj.fatal_top(); +roomname = "Merge"; +break; + +case rn(50,54): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, -8, 84, 11, 336); // (horizontal gravity line) +obj.createentity(game, -8, 148, 11, 336); // (horizontal gravity line) +obj.createentity(game, 88, 96, 1, 3, 3); // Enemy +obj.createentity(game, 40, 120, 1, 3, 3); // Enemy +obj.createentity(game, 136, 120, 1, 3, 3); // Enemy +rcol = 0; + +obj.fatal_top(); + +roomname = "Kids His Age Bounce"; +break; + +case rn(49,54): + +tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,287,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,310,352,368,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,56,390,55,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,390,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,406,408,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,310,392,448,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,470,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,390,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,56,430,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 264, 84, 11, 64); // (horizontal gravity line) +obj.createentity(game, 240+4, 96, 10, 0, 254490); // (savepoint) +obj.createentity(game, 48, 28, 11, 192); // (horizontal gravity line) +obj.createentity(game, 120, 148, 11, 208); // (horizontal gravity line) +rcol=2; + +roomname = "I'm Sorry"; +break; + + +case rn(49,55): + +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,468,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,428,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,60,427,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,60,467,59,0,0,0,0,0,0,60,467,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,373,373,373,373,373,373"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,414,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,412,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,333,374,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,71,372,334,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,333,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + +obj.createentity(game, 48, 156, 11, 200); // (horizontal gravity line) +obj.createentity(game, 216, 56, 10, 0, 255490); // (savepoint) +rcol=4; + +roomname = "Please Forgive Me!"; +break; + +case rn(50,55): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("364,364,364,364,364,364,364,364,364,354,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,355,364,364"); +tmap.push("283,283,283,283,283,283,283,283,283,405,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,443,444,444"); +tmap.push("444,444,444,444,444,444,444,444,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("364,364,364,364,364,364,364,364,364,365,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,405,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,363,364,364"); +tmap.push("283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.createentity(game, 131, 48, 12, 152); // (vertical gravity line) +obj.createentity(game, 179, 48, 12, 152); // (vertical gravity line) +obj.createentity(game, 227, 48, 12, 152); // (vertical gravity line) +obj.createentity(game, 275, 48, 12, 152); // (vertical gravity line) +rcol=1; + +roomname = "Playing Foosball"; +break; + +case rn(51,55): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("376,376,376,376,376,357,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,358,376,376,376,376"); +tmap.push("456,456,456,456,456,457,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,455,456,456,456,456"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,416,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,416,61,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,416,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,62,416,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("376,376,376,376,376,377,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,375,376,376,376,376"); +tmap.push("295,295,295,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + +obj.createentity(game, 91, 168, 12, 32); // (vertical gravity line) +obj.createentity(game, 139, 80, 12, 120); // (vertical gravity line) +obj.createentity(game, 235, 104, 12, 96); // (vertical gravity line) +obj.createentity(game, 187, 144, 12, 56); // (vertical gravity line) +obj.createentity(game, 43, 48, 12, 152); // (vertical gravity line) +obj.createentity(game, 91, 48, 12, 112); // (vertical gravity line) +obj.createentity(game, 139, 48, 12, 24); // (vertical gravity line) +obj.createentity(game, 187, 48, 12, 88); // (vertical gravity line) +obj.createentity(game, 235, 48, 12, 48); // (vertical gravity line) +obj.createentity(game, 283, 48, 12, 152); // (vertical gravity line) +obj.createentity(game, 8, 48, 10, 0, 255510); // (savepoint) +rcol=5; + +roomname = "A Difficult Chord"; +break; + +case rn(52,55): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("361,361,345,305,305,305,305,346,361,345,305,305,305,305,305,346,361,345,305,305,305,305,305,346,361,345,305,305,305,305,305,346,361,361,361,361,361,361,361,361"); +tmap.push("441,441,442,64,64,64,64,440,344,442,64,64,64,64,64,440,344,442,64,64,64,64,64,440,344,442,64,64,64,64,64,440,282,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,464,0,0,0,0,0,0,52,424,51,0,0,0,0,0,64,464,64,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,464,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,384,0,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,0,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,0,384,0,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,424,51,0,0,0,0,0,52,424,51,0,0,0,0,0,52,424,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280"); +tmap.push("361,361,361,361,361,361,361,361,479,362,63,63,63,63,63,360,466,51,0,0,0,0,0,52,465,362,63,63,63,63,63,360,322,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,321,361,361,361,361,361,322,402,51,0,0,0,0,0,52,400,321,361,361,361,361,361,322,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,52,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + +obj.createentity(game, 16, 184, 10, 1, 255520); // (savepoint) +obj.createentity(game, 131, 88, 12, 96); // (vertical gravity line) +obj.createentity(game, 208, 180, 11, 40); // (horizontal gravity line) +obj.createentity(game, 67, 56, 12, 80); // (vertical gravity line) +obj.createentity(game, 195, 56, 12, 80); // (vertical gravity line) +rcol = 0; + +roomname = "The Living Dead End"; +break; + +case rn(52,56): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,57,0,0,0,0,0,58,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +rcol=3; + +roomname = "AAAAAA"; +break; + +case rn(52,57): + +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,287,447,447,447,288,286,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,286,287,447,447,447,288,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,68,68,68,406,286,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,286,408,68,68,68,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,446,288,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,287,448,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,68,406,286,286,286,286,408,55,0,0,0,0,0,56,406,286,286,286,286,408,68,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,446,447,447,447,447,448,55,0,0,0,0,0,56,446,447,447,447,447,448,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,68,68,68,68,68,68,0,0,0,0,0,0,0,68,68,68,68,68,68,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,366,367,367,367,368,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,366,367,328,286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,366,367,367,328,286,286,286,286,286,286,286,327,367,367,368,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,446,447,288,286,286,286,286,286,286,286,286,286,287,447,448,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,68,68,446,447,288,286,286,286,286,286,287,447,448,68,68,0,0,0,0,0,0,406,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,327,368,0,0,0,0,0,0,0,68,68,446,447,288,286,287,447,448,68,68,0,0,0,0,0,0,0,366,328,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,68,68,446,447,448,68,68,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,327,368,0,0,0,0,0,0,0,0,0,0,68,68,68,0,0,0,0,0,0,0,0,0,0,366,328,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,327,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,328,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,328,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,366,367,328,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,368,0,0,0,0,0,366,367,328,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +rcol = 2; + +roomname = "Diode"; +break; + + +case rn(50,52): + +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("281,441,441,441,441,282,281,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,282,280,280"); +tmap.push("402,0,0,0,0,400,402,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,440,282,280"); +tmap.push("402,0,0,0,0,400,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("402,0,0,0,0,400,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("402,0,0,0,0,440,442,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("321,361,361,361,361,361,361,361,361,362,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,360,361,361,361,345,306,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,384,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,402,0,0,63,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,402,0,0,384,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,402,0,0,424,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,402,0,0,424,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,402,0,0,424,0,0,0,0,0,0,0,0,0,0,424,0,0,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,402,63,63,424,63,63,63,63,63,63,63,63,63,63,424,63,63,400,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,321,361,361,479,361,361,361,361,361,361,361,361,361,361,479,361,361,322,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,51,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,281,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,385,306,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,400,280"); +tmap.push("280,280,280,280,280,280,280,280,402,0,0,0,0,0,360,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,322,280"); +tmap.push("280,280,280,280,280,280,280,280,402,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,402,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); + +obj.createentity(game, 267, 24, 12, 184); // (vertical gravity line) +obj.createentity(game, 16, 24, 9, 9); // (shiny trinket) +obj.createentity(game, 187, 24, 12, 64); // (vertical gravity line) +obj.createentity(game, 104, 124, 11, 80); // (horizontal gravity line) +obj.createentity(game, 48, 72, 10, 1, 252500); // (savepoint) +obj.createentity(game, 224, 72, 10, 1, 252501); // (savepoint) +obj.createentity(game, 99, 24, 12, 80); // (vertical gravity line) +rcol=0; + +roomname = "Young Man, It's Worth the Challenge"; +break; + +case rn(53,55): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("367,367,367,367,367,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,360,361,362,372,373,374,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,402,412,292,414,0,0,0,0,0,0,0,0,0,0"); +tmap.push("447,447,447,447,288,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,402,412,292,414,0,0,0,0,0,0,0,0,0,0"); +tmap.push("364,364,364,365,406,286,408,0,0,0,0,0,0,0,0,0,0,360,361,362,0,0,0,0,400,280,402,452,453,454,0,0,0,0,366,367,367,368,0,0"); +tmap.push("283,283,283,405,406,286,408,0,0,0,0,0,0,0,0,0,0,400,280,402,0,0,0,0,400,280,321,361,361,362,0,0,0,0,406,286,286,408,0,0"); +tmap.push("283,283,283,405,406,286,408,0,0,0,0,0,0,0,0,0,0,400,280,402,0,0,0,0,440,441,441,282,280,402,0,0,0,0,406,286,286,408,0,0"); +tmap.push("283,283,283,405,406,286,408,0,0,0,0,369,370,371,360,361,361,322,280,402,0,0,0,0,0,0,0,400,280,402,0,0,0,0,406,286,286,408,0,0"); +tmap.push("283,283,283,405,406,286,408,0,0,0,0,409,289,411,400,280,280,280,280,402,0,0,0,0,0,0,0,400,280,402,0,0,0,0,406,286,286,408,0,0"); +tmap.push("283,283,283,405,446,447,448,0,0,0,0,409,289,411,440,441,441,441,441,442,0,0,0,0,0,0,0,440,441,442,0,0,0,0,406,286,286,408,0,0"); +tmap.push("283,283,283,324,364,364,365,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0"); +tmap.push("283,283,283,283,283,283,405,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0"); +tmap.push("283,283,283,283,283,283,405,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,363,364,364,364,364,365,0,0,0,0,406,287,447,448,0,0"); +tmap.push("283,283,283,283,283,283,405,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,443,444,285,283,283,405,0,0,0,0,406,408,375,377,0,0"); +tmap.push("444,444,444,444,444,444,445,0,0,0,0,409,289,411,0,0,0,369,370,370,370,370,370,370,370,371,403,284,444,445,0,0,0,0,406,408,415,417,0,0"); +tmap.push("373,373,373,373,373,373,374,0,0,0,0,409,289,411,0,0,0,409,289,290,450,450,450,450,450,451,403,405,0,0,0,0,0,0,406,408,415,417,0,0"); +tmap.push("292,292,292,292,292,292,414,375,376,376,377,409,289,411,0,0,0,409,289,411,363,364,364,364,364,364,325,405,0,0,0,0,0,0,406,408,415,417,0,0"); +tmap.push("292,292,292,293,453,453,454,415,295,295,417,409,289,411,0,0,0,449,450,451,443,444,444,444,444,444,444,445,0,0,0,0,0,0,446,448,415,336,376,376"); +tmap.push("292,292,292,414,360,361,362,415,295,295,417,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,337,295,295,295"); +tmap.push("292,292,292,414,400,280,402,415,295,295,417,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295"); +tmap.push("292,292,292,414,400,280,402,455,456,456,457,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295"); +tmap.push("292,292,292,414,400,280,321,361,361,361,362,409,289,330,370,370,370,370,370,370,370,370,370,370,371,375,376,376,376,376,376,337,295,295,295,295,295,295,295,295"); +tmap.push("292,292,292,414,400,280,280,280,280,280,402,409,289,289,289,289,289,289,289,290,450,450,450,450,451,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("292,292,292,414,400,280,280,280,280,280,402,409,289,289,289,289,289,289,289,411,375,376,376,376,376,337,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("292,292,292,414,400,280,280,280,280,280,402,409,289,289,289,289,289,289,289,411,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + +rcol = 6; + +roomname = "Anomaly"; +break; + +case rn(54,55): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,417,412,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,417,412,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,296,456,457,412,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,295,417,372,373,334,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,296,456,457,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,417,372,373,334,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,296,456,457,412,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,417,372,373,334,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,296,456,457,412,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,372,373,334,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,455,457,412,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,334,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,334,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,334,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,360,361,361,361,361,362,0,0,0,0,0,366,368,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,402,0,0,0,0,0,406,408,452,453,453,453,294,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("370,370,370,371,366,367,367,368,363,364,365,440,282,280,280,281,442,363,364,365,366,367,328,408,369,370,370,371,452,453,294,292,292,292,292,292,292,292,292,292"); +tmap.push("289,289,289,411,406,286,286,408,403,283,324,365,440,282,281,442,363,325,283,405,406,286,286,408,409,289,289,330,370,371,452,453,294,292,292,292,292,292,292,292"); +tmap.push("289,289,289,411,446,288,286,408,443,285,283,324,365,440,442,363,325,283,284,445,406,286,287,448,409,289,289,289,289,330,370,371,452,453,294,292,292,292,292,292"); +tmap.push("289,289,289,330,371,446,288,327,368,443,285,283,324,364,364,325,283,284,445,366,328,287,448,369,331,289,289,289,289,289,289,330,370,371,452,453,294,292,292,292"); +tmap.push("289,289,289,289,330,371,406,286,327,368,443,444,285,283,283,284,444,445,366,328,286,408,369,331,289,289,289,289,289,289,289,289,289,330,370,371,452,453,294,292"); +tmap.push("289,289,289,289,289,411,446,288,286,327,367,368,443,444,444,445,366,367,328,286,287,448,409,289,289,289,289,289,289,289,289,289,289,289,289,330,370,371,452,453"); +tmap.push("289,289,289,289,289,330,371,446,447,288,286,327,367,367,367,367,328,286,287,447,448,369,331,289,289,289,289,289,289,289,289,289,289,289,289,289,289,330,370,370"); +tmap.push("289,289,289,289,289,289,330,370,371,406,286,286,286,286,286,286,286,286,408,369,370,331,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + +obj.createentity(game, 104, 128, 9, 11); // (shiny trinket) +rcol = 6; + +roomname = "Purest Unobtainium"; +break; + + +case rn(52,58): + +tmap.push("295,295,295,295,295,417,0,415,295,295,295,295,295,295,295,295,295,417,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,295,295,295,295,295,295,295,417,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,295,295,295,295,295,295,295,417,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,296,456,456,456,456,456,456,457,0,0,0,0,0,455,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,375,376,376,376,376,377,0,0,0,0,0,375,376,376,376,376,376,376,376,376,376,377,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,295,295,295,417,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,296,456,456,457,0,0,0,0,0,455,456,456,456,456,456,456,456,297,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,375,377,0,0,0,0,0,375,376,376,376,376,376,377,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,455,456,456,456,456,297,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,0,0,0,0,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,375,376,376,377,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,455,456,297,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,0,0,415,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,396,0,415,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,476,0,415,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,0,0,415,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,415,295,417,0,415,417,0,0,0,0,0,375,376,337,417,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("456,456,456,456,456,457,0,455,456,456,457,0,455,456,457,0,455,457,0,0,0,0,0,455,456,456,457,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,337,417,0,415,295,417,0,415,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,455,456,456,456,456,456,457,0,415,295,417,0,415,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,417,0,415,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,376,376,376,337,295,417,0,415,295,295,295,295"); +tmap.push("376,376,376,376,376,377,0,375,376,376,377,0,375,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295,295,295,295,295,295,417,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,457,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,295,417,0,415,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295"); + +obj.createentity(game, 112, 184, 10, 1, 258520); // (savepoint) +rcol = 5; + +roomname = "I Smell Ozone"; +break; + +case rn(51,58): + +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +rcol=0; + +if(!game.intimetrial){ + if(game.companion==0 && obj.flags[9]==0 && !game.crewstats[5]){ //also need to check if he's rescued in a previous game + obj.createentity(game, 32, 177, 18, 16, 1, 17, 1); + obj.createblock(1, 24*8, 0, 32, 240, 33); + } +} + +roomname = "Why So Blue?"; + +break; + +case rn(50,58): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,290,450,450,450,450,450,450,450,450,450,291,289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,369,331,289,289,289,330,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,449,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,369,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,330,370,370,370,331,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,290,450,450,450,291,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,449,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,369,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,449,291,289,289,289,290,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,409,289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,330,370,370,370,370,370,370,370,370,370,331,289,289,289,330,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +rcol=3; + + +obj.createentity(game, (10 * 8)-4, (8 * 8) + 4, 14); //Teleporter! + +if(game.intimetrial) { + obj.createblock(1, 280, 0, 32, 240, 82); +} + +roomname = "Philadelphia Experiment"; +break; + + + +default: + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + roomname = "Outer Space"; + + game.test = true; + game.teststring = "ERROR: Map not found in Lab Area"; + break; + } + } + + public var roomname:String; + public var coin:int; + public var rcol:int; + } +} \ No newline at end of file diff --git a/mobile_version/levels/newgameclass.as b/mobile_version/levels/newgameclass.as new file mode 100644 index 00000000..afddb31a --- /dev/null +++ b/mobile_version/levels/newgameclass.as @@ -0,0 +1,75 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class newgameclass { + public function newgameclass():void { + tmap.reset(); + } + + public function changemapsize(xw:int, yh:int):void { + mapwidth = xw; mapheight = yh; + } + + public function loadlevel(t:String, obj:entityclass, music:musicclass):void { + if(t=="newgame_enter"){ + changemapsize(40,30); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,2,2,2,2,2,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,2,2,2,2,2,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,2,2,2,2,2,1,2,1,2,1,1,2,1,1,2,1,1,1,2,1,1,2,1,2,1,2,2,2,2,1,1,1,1,1,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,1,1,1,2,2,1,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2"); + tmap.push("2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + + obj.createdoor(8, 12, "newgame_room2", 4, 10); + }else if(t=="newgame_room2"){ + changemapsize(20,15); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); + + obj.createdoor(16, 12, "newgame_enter", 7, 22); + } + } + + public var mapwidth:int, mapheight:int; + } +} diff --git a/mobile_version/levels/otherlevelclass.as b/mobile_version/levels/otherlevelclass.as new file mode 100644 index 00000000..fa9a83f6 --- /dev/null +++ b/mobile_version/levels/otherlevelclass.as @@ -0,0 +1,8093 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class otherlevelclass extends Sprite { + static public var BLOCK:Number = 0; + static public var TRIGGER:Number = 1; + static public var DAMAGE:Number = 2; + static public var DIRECTIONAL:Number = 3; + static public var SAFE:Number = 4; + static public var ACTIVITY:Number = 5; + + public function otherlevelclass():void { + for (i = 0; i < 50; i++) { + roomtext.push(new String()); + } + } + + public function addline(t:String):void { + roomtext[roomtextnumlines] = t; + roomtextnumlines++; + } + + public function rn(rx:int, ry:int):int { + return rx + (ry * 100); + } + + public function loadlevel(rx:int, ry:int, game:gameclass, obj:entityclass):void { + var t:int; + roomtileset = 1; + + rx -= 100; ry -= 100; + t = rx + (ry * 100); + tmap.reset(); + roomname = ""; + + roomtextnumlines = 0; roomtextx = 0; roomtexty = 0; roomtexton = false; + + switch(t) { +case rn(0,0): + +tmap.push("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,240,241,241,241,241,241,241,241,241,241,241,241,241,241,242,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,240,241,241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,200,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,160,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,121,161,161,161,161,122,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,200,80,80,80,80,80,80,80,80,202,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,241,241,241,241,241,241,241,241,242,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,160,162,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,240,242,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,202,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,688,687,687,687,688,687,687,687,687,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,240,241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,160,161,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,160,161,161,161,161,161,161,161,161,161,161,161,161,161,162,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,686,0,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("201,201,201,201,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,160,161,162,0,0,686,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("161,161,161,162,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,160,161,161,162,0,0,0,606,486,486,486,486,486,486"); +tmap.push("80,80,80,202,200,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,202,240,241,241,242,0,0,0,606,486,486,486,486,486,486"); +tmap.push("241,241,241,242,240,241,241,242,240,241,241,241,241,241,241,241,241,241,241,241,241,241,242,240,241,242,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); + +obj.createentity(game, 72, 32, 14); //Teleporter! +obj.createentity(game, 216, 144, 20, 1); + +obj.createblock(5, 216-4, 144, 20, 16, 8); +break; + +case rn(0,1): + +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +break; + +case rn(0,2): + +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,692,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,0,692,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(0,3): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,642,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,481,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641"); +tmap.push("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,4): + +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,496,657,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,5): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,6,6,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("6,6,6,6,6,6,6,6,6,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(0,6): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,560,561,561,561,561,562,0,0,0,0,600,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,602,681,681,681,681,640,641"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,640,641,641,641,641,642,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,680,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0"); +break; + +case rn(0,7): + +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,663,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,663,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,8): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,699,699,699,699,699,699,699,699,699,699,699"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +break; + +case rn(0,9): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); +tmap.push("641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,521,562,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,521,562,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,640,641,641,482,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,600,480,602,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,642,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,680,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 152, 144, 10, 1, 9000); // (savepoint) +break; + +case rn(0,10): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,484,644,644,644,644,645,7,7,7,7,7,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,605,7,7,7,7,7,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644"); +tmap.push("644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,7,7,7"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483,483,484,644,645,7,7,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,7,7,7,7,7,603,483,483,483,483,483,483,605,7,7,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,645,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,603,605,6,6,6,6,6,6,6,6,6,603,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,603,524,564,564,564,564,564,564,564,564,564,525,605,6,6,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564"); +tmap.push("6,6,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483,524,564,565,6,6,6,6,6,6,6,6,6,6,6,6,603,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 224, 96, 10, 0, 10000); // (savepoint) +break; + +case rn(0,11): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,602,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,680,0,560,561,561,562,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,602,0,680,0,0,0,0,0,0,0,0,680,0,600,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,560,561,561,522,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,560,561,561,522,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,600,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,481,641,641,642,0,0,0,0,0,0,0,680,0,560,561,561,522,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); +tmap.push("480,480,480,602,0,680,0,0,0,0,0,0,0,0,680,0,600,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("641,641,641,642,0,680,0,0,0,0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,680,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,640,641,641,641,641,641,641"); +tmap.push("0,0,0,0,560,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 56, 32, 13); //Warp Token + +break; + +case rn(0,12): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,692,0,0,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,692,0,0,0,0,0,692,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,692,0,0,0,0,0,692,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("573,573,573,574,0,0,0,692,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,533,573,574,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,533,574,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,533,574,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,533,574,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,493,653,653,654,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,652,653,494,492,492,493,653,653,654,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,692,0,652,653,653,654,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,693,693,693,694,693,693,693,693,693,693,694,693,693,693,693,693,693,693,694,693,693,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,614,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,493,653,654,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,493,653,653,653,653,654,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("653,654,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,525,483,524,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(0,14): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0"); +break; + +case rn(0,15): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,660,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,499,659,660,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,499,660,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,620,699,699,699,699,699,700,699,699,699,699,699,699,699,699,699,699,699,699,700,699,699,699,699,699,699,699,699,699,699,699,699"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(0,16): + +tmap.push("480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,481,642,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,481,642,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,481,642,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,481,642,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,560,561,561,561,561"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,560,561,561,561,561,522,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,640,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,680"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 120, 40, 14); //Teleporter! +break; + +case rn(0,17): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(1,2): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,496,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,496,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,496,657,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,536,576,576,577,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,617,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,536,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(1,3): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,490,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,490,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(1,4): + +tmap.push("0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 144, 136, 10, 1, 4010); // (savepoint) +break; + +case rn(1,5): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,641,641"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,680,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,562,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 88, 104, 10, 1, 106010); // (savepoint) +break; + +case rn(1,6): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,490,650,651,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,611,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,611,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489"); +tmap.push("489,489,489,611,0,0,0,0,0,569,570,570,570,570,570,570,570,571,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,649,650,650,491,489,489,489"); +tmap.push("489,489,489,611,0,0,0,569,570,531,489,489,489,489,489,489,489,530,570,571,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,649,650,650,650"); +tmap.push("489,489,489,611,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); +tmap.push("650,650,650,651,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); +tmap.push("0,0,0,0,0,0,0,649,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,689,0,0,0,0,0,689,0,0"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,689,0,0,0,0,0,689,0,0"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,569,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,649,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(1,8): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(1,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,485,483,483,484,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,643,644,644,645,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,684,685,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,196,197,197,197,197,198,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,563,565,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,563,564,525,605,236,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,525,483,483,605,236,116,116,116,116,157,197,198,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,157,197,198,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,276,277,118,116,116,116,116,116,116,157,197,197,197,197,197,197,197,197,197"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,236,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); + +obj.createentity(game, 152, 64, 10, 0, 9010); // (savepoint) +break; + +case rn(1,10): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("7,7,7,7,7,7,7,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,652,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,572,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,572,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +obj.createentity(game, 208, 120, 9, 15); // (shiny trinket) +break; + +case rn(1,11): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,494,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,612,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,614,0,0,0,0,612,492,492"); +tmap.push("492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492"); +tmap.push("492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,653,653,653,653,653,653,494,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,692,0,0,0,0,692,0,0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,692,0,0,0,0,0,612,492,492"); +tmap.push("492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,533,573,573,573,573,573,574,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492"); +tmap.push("653,653,653,653,653,653,653,653,494,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,612,492,492"); +tmap.push("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,692,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492"); +tmap.push("573,573,573,573,573,573,573,573,534,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +obj.createentity(game, 40, 192, 13); //Warp Token +obj.createentity(game, 168, 136, 13); //Warp Token +obj.createentity(game, 224, 136, 13); //Warp Token + + + +obj.createentity(game, 96, 80, 13); //Warp Token + +break; + +case rn(1,12): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,230,110,110,110,110,110,110"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,270,271,271,271,271,271,271"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,649,650,650,650,650,650,491,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(1,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,562,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,522,480,521,562,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,481,642,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,642,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 112, 152, 10, 1, 13010); // (savepoint) +break; + +case rn(1,14): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +break; + +case rn(1,15): + +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("693,693,693,693,693,693,693,693,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(1,16): + +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,496,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,375,376,376,376,376,376,376,376,376,376,376"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,537,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,617,415,295,295,295,295,295,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,617,455,456,456,456,456,456,456,456,456,456,456"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,575,576,576,537,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,695,0,0,0,575,576,576,576,576,537,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,575,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,575,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,375,376,376,376,376,376"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,657,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,657,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,415,295,295,295,295,295"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,415,295,295,295,295,295"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,415,295,295,295,295,295"); + +obj.createentity(game, 280, 120, 10, 1, 16010); // (savepoint) +break; + +case rn(2,2): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,484,645,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,605,49,0,0,0,0,0,0,50,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 56, 32, 10, 1, 2020); // (savepoint) +break; + +case rn(2,3): + +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,50,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,49,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(2,5): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,643,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644,644,644"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,484,644,644,644,644,645,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,524,564,564,565,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,683,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,563,564,565,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,643,644,645,0,0,0,0,0,563,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(2,6): + +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,487,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 40, 88, 10, 1, 6020); // (savepoint) +break; + +case rn(2,8): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +break; + +case rn(2,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,562,0,0,0,680,0,0,0,0,0,0,0,0"); +tmap.push("681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,193,194,195,0,0,0,193,194,195,0,0,0,193,194,195,0,0,0,193,194,194"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,235,0,0,0,233,113,235,0,0,0,233,113,154,194,194,194,155,113,113"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,235,0,0,0,233,113,154,194,194,194,155,113,113,113,113,113,113,113,113"); +tmap.push("194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,155,113,154,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +break; + +case rn(2, 10): +if(obj.altstates==0){ + + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,114,274,274,274,274,274"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,235,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,235,753,753,753,753,753"); + tmap.push("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,0,0,0,273,274,274,274,275,753,753,753,753,753"); + tmap.push("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,154,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194"); + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + + obj.createentity(game, 40, 32, 22, 0); // (shiny trinket) + obj.createentity(game, 64, 32, 22, 1); // (shiny trinket) + obj.createentity(game, 88, 32, 22, 2); // (shiny trinket) + obj.createentity(game, 40, 80, 22, 3); // (shiny trinket) + obj.createentity(game, 64, 80, 22, 4); // (shiny trinket) + obj.createentity(game, 88, 80, 22, 5); // (shiny trinket) + obj.createentity(game, 112, 80, 22, 6); // (shiny trinket) + obj.createentity(game, 40, 128, 22, 7); // (shiny trinket) + obj.createentity(game, 64, 128, 22, 8); // (shiny trinket) + obj.createentity(game, 88, 128, 22, 9); // (shiny trinket) + obj.createentity(game, 112, 128, 22, 10); // (shiny trinket) + obj.createentity(game, 136, 128, 22, 11); // (shiny trinket) + obj.createentity(game, 40, 176, 22, 12); // (shiny trinket) + obj.createentity(game, 64, 176, 22, 13); // (shiny trinket) + obj.createentity(game, 88, 176, 22, 14); // (shiny trinket) + obj.createentity(game, 112, 176, 22, 15); // (shiny trinket) + obj.createentity(game, 136, 176, 22, 16); // (shiny trinket) + obj.createentity(game, 112, 32, 22, 17); // (shiny trinket) + obj.createentity(game, 136, 80, 22, 18); // (shiny trinket) + obj.createentity(game, 136, 32, 22, 19); // (shiny trinket) + + if(!game.nocutscenes && obj.flags[70]==0){ + obj.createblock(1, 304, 0, 16, 240, 48); + } +}else{ + + tmap.push("113,113,113,113,113,113,113,114,274,274,274,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,113,113,114,274,275,0,0,0,0,0,0,0,0,0,0,273,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,114,274,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,273,274,274,274,115,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,235,778,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,113,113,114,274,274,274,274,274"); + tmap.push("113,113,114,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,273,274,115,113,235,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,233,113,235,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,273,274,275,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,873,753,753,753,753,753,753,753"); + tmap.push("113,113,113,154,194,194,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,193,194,194,194,194,194,194,194,194,194,194,194,194"); + tmap.push("113,113,113,113,113,113,154,194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,0,193,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,194,194,194,194,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + + obj.createentity(game, 90, 52, 26, 0); // (super warp) +} + +break; + +case rn(2,11): + +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,105,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,746,744,745,905,746,744,745,905,746,744,745,905,746,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,786,744,785,825,786,744,785,825,786,744,785,825,786,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,905,905,905,905,905,905,905,905,905,905,905,905,746,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,825,825,825,825,825,825,825,825,825,825,825,825,786,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,745,905,746,744,745,905,746,744,745,905,746,744,745,905,746,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,866,0,864,744,866,0,864,744,866,0,864,744,866,0,864,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,785,825,786,744,785,825,786,744,785,825,786,744,785,825,786,744"); +tmap.push("104,104,104,104,226,744,866,0,0,0,0,0,0,0,0,0,0,0,0,0,0,864,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744,744"); +tmap.push("104,104,104,104,145,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,186,744,744,744,744"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,744,744,744,744"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,744,744,744,744"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,145,185,185,185,185"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + +obj.createentity(game, 64, 64, 14); //Teleporter! +break; + +case rn(2,12): + +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("265,265,265,265,106,105,265,265,265,265,265,265,265,106,104,105,265,265,265,265,265,265,265,106,105,265,265,265,265,265,265,265,106,104,105,265,265,265,265,265"); +tmap.push("567,567,567,568,224,226,566,567,567,567,567,567,568,224,105,266,566,567,567,567,567,567,568,224,226,566,567,567,567,567,567,568,264,106,226,566,567,567,567,567"); +tmap.push("486,486,608,184,146,266,606,486,486,486,487,647,648,224,226,566,528,486,486,486,487,647,648,224,226,606,486,486,486,486,486,527,568,224,226,606,486,486,486,486"); +tmap.push("486,486,608,264,266,566,528,486,486,486,608,184,185,146,266,606,486,486,486,487,648,184,185,146,266,606,486,486,486,486,487,647,648,224,226,606,486,486,486,486"); +tmap.push("486,486,527,567,567,528,486,486,486,486,608,264,265,266,566,528,486,486,486,608,184,146,105,266,566,528,486,486,486,486,608,184,185,146,266,606,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,608,264,265,266,566,528,486,486,486,486,486,608,264,265,266,566,528,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,648,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("486,487,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("647,648,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,568,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("0,0,0,566,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,648,0,0,0,0,0,566,567,568,0,0,0,0"); +tmap.push("0,0,0,646,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,648,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(2,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,615,495,617,696,696,696,696,696,696,696,696,696,696,696,697,696,696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,696,696,697,696,696,696,696,615,495,617,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,697,696,696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(2,14): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(2,15): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,571,6,6,6,6,6,6"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 240, 96, 10, 0, 15020); // (savepoint) +break; + +case rn(3,2): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,499,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,500,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,499,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,500"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,539,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,540"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,499,660,0,0,0,0,658,500,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,539,580,0,0,0,0,578,540,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,539,579,579,579,579,540,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,499,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,500"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,620,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,618"); +tmap.push("498,539,579,580,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,0,0,0,0,578,579,540"); +tmap.push("498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,539,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498"); + +obj.createentity(game, 152, 96, 9, 16); // (shiny trinket) +break; + +case rn(3,3): + +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,662,662,662,662,662,663,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,662,662,662,662,662,662,663,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,621,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,502,663,0,0,0,0,0,0,0,0,0,581,582,582,582,582,582,582,582,582,582,582,582,582,582,543,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,502,662,662,662,662,662,663,702,702,702,702,702,702,702,702,702,581,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("662,662,662,662,662,662,663,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + +obj.createentity(game, 24, 192, 10, 1, 3030); // (savepoint) +break; + +case rn(3,5): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,640,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641"); +tmap.push("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,681,682,681,681,681,681,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,560,561,561,561,561,561,562,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,640,641,641,641,641,641,642,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(3,6): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,693,693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(3,7): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,690,690,690,691,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(3,8): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(3,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,183,0,0,181,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,182,143,142,182,182,143,142,182,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,261,262,103,102,262,262,103,102,262,263,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,181,182,143,223,0,0,221,142,182,183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,261,262,103,223,0,0,221,102,262,263,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221,223,0,0,221,223,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,143,142,182,182,143,142,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + +obj.createentity(game, 248, 168, 10, 1, 9030); // (savepoint) +break; + +case rn(3,10): + +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,742,902,902,902,902,743,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,863,0,0,0,0,861,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,782,822,822,822,822,783,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741,741,863,0,0,0,0,0,0,0,861,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,261,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,263,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,742,902,902,902,902,902,902,743,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); +tmap.push("741,741,741,742,902,902,902,902,902,902,902,902,902,743,741,741,863,0,0,0,0,0,0,861,741,741,742,902,902,902,902,902,902,902,902,902,743,741,741,741"); +tmap.push("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); +tmap.push("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); +tmap.push("741,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,861,741,741,863,0,0,0,0,0,0,0,0,0,861,741,741,741"); +tmap.push("741,741,741,782,822,822,822,822,822,822,822,822,822,783,741,741,863,0,0,0,0,0,0,861,741,741,782,822,822,822,822,822,822,822,822,822,783,741,741,741"); +tmap.push("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,782,822,822,822,822,822,822,783,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); +tmap.push("741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741,741"); +tmap.push("182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,741,741,741,741,741,741,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); +tmap.push("101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,223,741,741,741,741,741,741,221,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101"); + +obj.createentity(game, 88, 80, 21, 1); //Terminal // UU Brothers +obj.createblock(5, 88 - 4, 80, 20, 16, 25); + +if(game.stat_trinkets>=5){ + obj.createentity(game, 128, 80, 21, 1); //Terminal + obj.createblock(5, 128 - 4, 80, 20, 16, 26); +} + +if(game.stat_trinkets>=8){ + obj.createentity(game, 176, 80, 21, 1); //Terminal + obj.createblock(5, 176 - 4, 80, 20, 16, 27); +} + +if(game.stat_trinkets>=10){ + obj.createentity(game, 216, 80, 21, 1); //Terminal + obj.createblock(5, 216 - 4, 80, 20, 16, 28); +} + +if(game.stat_trinkets>=12){ + obj.createentity(game, 88, 128, 21, 0); //Terminal + obj.createblock(5, 88 - 4, 128, 20, 16, 29); +} + +if(game.stat_trinkets>=14){ + obj.createentity(game, 128, 128, 21, 0); //Terminal + obj.createblock(5, 128 - 4, 128, 20, 16, 33); +} + +if(game.stat_trinkets>=16){ + obj.createentity(game, 176, 128, 21, 0); //Terminal + obj.createblock(5, 176 - 4, 128, 20, 16, 30); +} + +if(game.stat_trinkets>=18){ + obj.createentity(game, 216, 128, 21, 0); //Terminal + obj.createblock(5, 216 - 4, 128, 20, 16, 32); +} + +//Special cases +if(game.stat_trinkets>=20){ + obj.createentity(game, 40, 40, 21, 0); //Terminal + obj.createblock(5, 40 - 4, 40, 20, 16, 31); +} + +if(game.stat_trinkets>=20){ + obj.createentity(game, 264, 40, 21, 0); //Terminal + obj.createblock(5, 264 - 4, 40, 20, 16, 34); +} + +obj.createentity(game, 152, 40, 21, 0); //Terminal (jukebox instructions) +obj.createblock(5, 152 - 4, 40, 20, 16, 24); +break; + +case rn(3,11): + +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,748,908,908,749,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,788,828,828,789,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,747,747,747,747,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("268,268,268,268,268,268,268,268,268,268,268,109,107,107,107,107,229,747,748,908,908,749,747,227,107,107,107,107,108,268,268,268,268,268,268,268,268,268,268,268"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,869,0,0,867,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,227,107,107,107,107,229,747,788,828,828,789,747,227,107,107,107,107,229,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,267,268,268,268,268,269,747,747,747,747,747,747,267,268,268,268,268,269,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,748,908,908,749,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,747,747,747,748,908,908,749,869,0,0,867,748,908,908,749,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,748,908,908,749,869,0,0,867,869,0,0,867,869,0,0,867,748,908,908,749,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,869,0,0,867,869,0,0,867,788,828,828,789,869,0,0,867,869,0,0,867,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,869,0,0,867,788,828,828,789,747,747,747,747,788,828,828,789,869,0,0,867,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,788,828,828,789,747,747,747,747,747,747,747,747,747,747,747,747,788,828,828,789,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,189,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,267,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,269,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,748,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,908,749,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,869,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,867,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,869,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,867,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,788,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,828,789,747,747,747,747,747,747,747,747,747,747"); +tmap.push("747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747,747"); +tmap.push("188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +break; + +case rn(3,12): + +tmap.push("107,107,107,107,107,107,107,107,108,268,268,109,108,268,268,109,108,268,268,109,108,268,268,268,109,108,268,268,268,268,109,107,108,268,268,268,109,107,107,107"); +tmap.push("268,268,268,268,268,268,268,268,269,572,574,227,229,572,574,267,269,572,574,267,269,572,573,574,227,229,572,573,573,574,267,268,269,572,573,574,267,268,268,268"); +tmap.push("573,573,573,573,573,573,573,573,573,534,614,227,229,612,533,573,573,534,533,573,573,534,492,614,227,229,612,492,492,533,573,573,573,534,492,614,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,227,229,612,492,492,492,492,492,492,492,493,653,654,227,229,612,492,492,492,492,492,492,492,492,614,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,227,229,612,492,492,492,492,492,492,492,614,187,188,149,269,612,492,492,492,492,492,492,492,493,654,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,614,267,269,612,492,492,492,492,492,492,492,614,267,268,269,572,534,492,492,492,492,492,493,653,654,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,533,573,573,534,492,492,492,492,492,492,492,533,573,573,573,534,492,492,492,492,492,493,654,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,654,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,654,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0"); +tmap.push("0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573"); +tmap.push("0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,652,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,692,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 128, 160, 10, 1, 113030); // (savepoint) +break; + + +case rn(3,13): + +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,563,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 192, 96, 10, 0, 114030); // (savepoint) +break; + +case rn(3,14): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,580,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(3,15): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,645,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,563,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,603,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,563,564,525,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,563,525,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,605,683,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,605,683,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,643,485,483,483,483,483,483,484,645,683,0,0,0,0,0,563,525,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,603,483,483,483,483,483,605,0,683,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,643,485,483,483,483,483,605,0,683,0,0,0,0,563,525,483,483,483,483,483"); +tmap.push("6,6,6,6,6,6,6,6,6,563,564,564,565,0,0,0,0,683,0,0,0,643,644,644,644,644,645,0,683,0,0,0,0,603,483,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,525,483,483,524,565,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,563,525,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,524,565,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,565,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,563,564,564,564,525,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(4,5): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,499,659,659,659,660,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,658,659,659,659,659,500,498,498,498,498,498"); +tmap.push("498,498,498,498,498,499,659,660,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,658,500,498,498,498,498"); +tmap.push("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,620,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,698,0,0,0,0,0,658,659,659,659,659"); +tmap.push("659,659,659,659,659,660,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,0,0,0,0,578,579,579,579,579,580,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,580,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,578,579,540,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,618,498,498,498,498,498,498,539,579,579,580,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,499,660,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,578,579,579,540,498,498,498,498,498,620,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,618,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,618,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,620,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,658,500,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,499,659,660,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,658,500,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,499,660,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,618,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,658,659,500,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,620,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,658,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,660,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(4,7): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,572,573,574,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,612,492,614,0,0,0,0,0,0,693,694,693,693,693,693,693,693,693,694,693,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,652,653,654,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,692,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,692,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0,0,0,693,693,694,693,693,693,693,693,693,693,694,693,693,694,693,693,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,692,0,0,0,0,0,0"); +tmap.push("693,693,693,693,693,694,693,693,693,693,693,693,693,693,694,693,693,0,0,0,0,0,692,0,0,0,0,0,0,0,692,0,0,692,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0"); +tmap.push("0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0"); +tmap.push("0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,614,693,693,693,693,693,694,693,693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(4,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,190,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,270,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,190,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,270,272,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,190,191,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,230,110,232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,270,271,272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,192,0,0,0,190,191,191,191,191,191,191,192,0,0,190,191,191,191,191,191,191,191,191,191,191"); +tmap.push("110,110,110,110,110,110,110,111,271,271,271,112,110,110,110,232,0,0,0,230,110,110,110,110,110,110,232,0,0,230,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,232,0,0,0,230,110,110,110,110,110,110,151,191,191,152,110,111,271,271,271,112,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,151,191,191,191,152,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,151,191,191,191,152,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,230,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,151,191,191,191,152,110,110,110,110"); +break; + +case rn(4,10): + +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("271,271,271,271,271,271,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,750,750,750,750,750,750,750,270,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,750,750,750,750,750,750,750,750,750,750,270,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,751,911,911,911,911,911,911,752,750,750,750,750,750,270,271,271,271,271,271,271,271,271,271,271,271,271,271,112,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,270,271,271,271,271,112,110,110,110,110,110,110"); +tmap.push("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,750,750,750,750,751,911,911,752,750,750,750,750,872,0,0,0,270,271,112,110,110,110,110"); +tmap.push("750,872,0,0,0,0,0,0,870,750,750,750,750,750,750,750,750,751,911,911,752,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,791,831,831,831,831,831,831,792,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,750,750,750,750,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,750,750,750,750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,751,911,911,752,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,190,191,191,191,191,191,191,152,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,190,152,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,190,152,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,270,271,271,271,271,271,271,271,271,112,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,872,0,0,870,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,791,831,831,792,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,750,872,0,0,0,0,0,230,110,110,110,110"); +tmap.push("191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,152,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + +obj.createentity(game, 256, 120, 20, 1); //Terminal Ship computer +obj.createblock(5, 256 - 4, 120, 20, 16, 22); + +obj.createentity(game, 256, 184, 20, 1); //Terminal +obj.createentity(game, 232, 184, 20, 1); //Terminal +obj.createentity(game, 208, 184, 20, 1); //Terminal +obj.createblock(5, 208 + 4, 184, 56, 16, 23); +break; + +case rn(4,11): + +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,118,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,757,917,917,917,917,758,756,756,757,917,917,917,917,758,756,756,757,917,917,917,917,758,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,797,837,837,837,837,798,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,756,756,756,756,756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,756,756,756,756,756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,196,197,197,197,197,198,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,238,756,756,878,0,0,0,0,876,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,797,837,837,837,837,798,756,756,236,116,116,116,116,238,756,756,797,837,837,837,837,798,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,238,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("756,756,756,756,756,756,756,756,756,756,756,756,236,116,116,116,116,238,917,917,758,756,756,756,756,757,917,917,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("197,197,197,197,197,197,197,197,197,197,197,197,158,116,116,116,116,238,0,0,876,756,756,756,756,878,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,916,917,917,917,917,918,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +break; + +case rn(4,12): + +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,236,116,116,116,116,116,116,116,116,116,116,116"); +tmap.push("277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,118,116,238,0,0,0,0,0,0,0,0,0,0,236,116,117,277,277,277,277,277,277,277,277,277"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0,0,236,116,238,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,276,277,278,0,0,0,0,0,0,0,0,0,0,276,277,278,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,563,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,563,564,564,564,525,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,564,525,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,484,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("644,644,644,644,644,644,644,645,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(4,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,571,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,651,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,689,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,689,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,689,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,690,690,690,691,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,690,691,690,690,691,690,690,690,690,690,690"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,689,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,571,0,689,0,0,689,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,530,570,570,571,0,689,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,491,489,489,530,570,570,571,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,530,570,570,570,570,570"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 248, 112, 10, 1, 114040); // (savepoint) +break; + +case rn(4,14): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,494,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,652,653,653,653,653,653,653,653"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,533,573,574,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,533,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,533,573,574,0,0,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,574,0,692,0,0,0,0,0,0,0,0,0,0"); +tmap.push("573,573,573,573,573,574,0,0,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,574,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,692,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,574,0,0,0,0"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,652,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573"); +tmap.push("492,492,492,492,492,533,574,0,0,0,0,692,0,0,0,0,692,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,692,0,0,0,0,692,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,533,574,0,0,0,692,0,0,0,0,692,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,533,573,574,0,692,0,0,0,0,692,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,574,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +obj.createentity(game, 104, 176, 10, 1, 115040); // (savepoint) +break; + +case rn(4,15): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,602,0,0,0,0,0,560,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,680,640,641,482,480,480,480,481,641,642,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,680,0,0,640,641,641,641,642,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("561,561,561,561,562,0,0,0,0,680,0,0,0,680,0,0,0,680,0,0,0,0,0,560,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,521,561,562,0,0,680,0,0,0,680,0,0,0,680,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,521,562,0,680,0,0,0,680,0,0,0,680,0,0,0,560,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,521,561,562,0,0,0,680,0,0,0,680,0,560,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 16, 40, 10, 1, 15040); // (savepoint) +break; + +case rn(5,2): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,645,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,3): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,612,492,614,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,572,573,573,574,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,693,694,693,693,693,694,693,693,694,693,612,492,492,614,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,652,653,653,654,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,692,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,572,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,652,653,654,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,572,573,574,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,612,492,614,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 272, 128, 10, 0, 3050); // (savepoint) +break; + +case rn(5,4): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,490,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,5): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,646,647,488,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,646,488,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,646,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,6): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,7): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(5,8): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,184,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,264,266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,184,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,224,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,264,265,266,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("185,185,185,185,185,185,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,145,185,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,10): + +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("104,104,104,104,104,104,104,104,104,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,11): + +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,154,194,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,12): + +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(5,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693"); +tmap.push("0,0,0,0,0,0,612,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,652,653,653,653,654,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("693,693,693,693,693,693,693,693,694,693,693,693,693,693,693,693,693,693,693,693,694,693,693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,574,0,0,0,0"); +tmap.push("573,573,573,573,573,573,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +obj.createentity(game, 184, 176, 10, 1, 13050); // (savepoint) +break; + +case rn(5,14): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,657,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,657,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,695,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,577,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + + +case rn(5,15): + +tmap.push("486,486,486,486,486,486,486,487,647,647,647,647,488,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,487,647,647,648,0,0,0,0,606,486,486,487,647,648,0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486"); +tmap.push("486,487,647,647,648,686,0,0,0,0,0,0,606,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,608,0,0,0,686,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,566,528,487,647,647,647,647"); +tmap.push("486,608,0,0,0,686,0,0,0,0,0,0,606,486,608,687,687,687,687,687,566,567,567,567,567,567,568,687,687,606,486,608,0,606,486,608,0,0,686,0"); +tmap.push("486,608,0,0,0,686,0,0,0,0,0,0,646,488,608,0,0,0,0,0,606,486,486,486,487,647,648,0,0,646,647,648,0,606,486,608,0,0,566,567"); +tmap.push("486,608,0,0,0,686,0,0,0,566,568,0,0,646,648,0,0,0,0,566,528,486,486,486,608,0,0,0,0,0,686,0,0,606,486,608,0,0,606,486"); +tmap.push("486,608,0,0,0,566,568,0,0,606,527,568,0,0,686,0,0,0,0,646,647,647,488,486,527,568,0,0,0,0,686,0,0,606,486,608,0,0,646,647"); +tmap.push("486,608,687,687,687,606,527,567,567,528,486,608,0,0,686,0,0,0,0,0,0,0,646,647,488,527,568,0,0,0,686,0,0,606,486,608,0,0,0,0"); +tmap.push("486,608,0,0,0,646,488,486,486,486,487,648,0,0,686,0,0,0,0,0,0,0,686,0,606,487,648,0,0,0,686,0,566,528,486,608,0,0,0,0"); +tmap.push("486,608,0,0,0,0,646,488,486,486,608,0,0,0,686,0,0,0,0,0,0,0,686,0,646,648,0,0,0,0,686,0,606,486,487,648,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,646,647,647,648,0,566,567,567,567,568,0,0,0,566,567,568,0,0,0,0,0,0,566,567,567,528,486,608,0,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,686,0,0,0,566,528,486,486,486,608,0,0,566,528,486,608,687,687,687,687,687,687,606,486,487,647,647,648,0,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,686,0,0,566,528,486,486,487,647,648,0,0,606,486,487,648,0,0,0,0,0,0,606,486,608,0,0,686,0,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,686,0,0,606,486,486,487,648,0,0,0,0,646,647,648,0,0,0,0,0,0,566,528,486,608,0,0,686,0,0,0,0,0"); +tmap.push("486,608,0,0,0,0,0,686,0,0,646,488,486,608,0,0,0,0,0,0,686,0,0,0,0,566,567,567,528,487,647,648,0,0,686,0,0,0,0,0"); +tmap.push("486,608,0,0,0,566,567,568,0,0,0,646,488,608,0,0,0,0,0,0,686,0,0,0,0,606,486,487,647,648,0,0,0,0,686,0,0,0,0,0"); +tmap.push("486,527,567,568,0,606,486,608,0,0,0,0,606,527,568,0,0,0,0,566,568,0,0,0,0,646,488,608,0,0,0,0,0,0,566,567,568,0,0,0"); +tmap.push("486,486,486,608,0,646,647,648,0,0,0,0,606,486,608,0,0,566,567,528,608,0,0,0,0,0,646,648,0,0,0,0,0,0,606,486,608,0,0,0"); +tmap.push("486,486,486,527,568,0,0,686,0,0,0,0,606,487,648,687,687,606,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,606,487,648,0,0,0"); +tmap.push("486,486,486,486,608,0,0,686,0,0,0,0,606,608,0,0,0,606,486,486,608,0,0,0,0,0,0,566,567,567,568,0,0,566,528,608,0,0,0,0"); +tmap.push("486,486,486,486,608,0,0,566,567,568,0,0,606,608,0,0,0,606,486,486,527,567,567,568,687,687,687,606,486,486,608,0,0,606,486,608,0,0,0,0"); +tmap.push("486,486,486,486,608,0,566,528,486,608,0,0,606,608,0,0,0,606,486,486,486,486,486,608,0,0,0,646,647,647,648,0,0,646,647,648,0,0,0,0"); +tmap.push("486,486,486,486,608,0,606,486,487,648,0,0,646,648,0,0,0,606,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0"); +tmap.push("486,486,486,486,608,0,606,486,608,0,0,0,0,686,0,0,566,528,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0"); +tmap.push("486,486,486,486,527,567,528,486,608,0,0,0,0,686,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,608,0,0,0,0,686,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,527,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,527,567,568,0,0,686,0,0,606,486,486,486,486,486,486,486,527,568,0,0,0,0,0,566,567,528,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,528,486,486,486,486,486,486,486,486,527,567,567,567,567,567,528,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 72, 16, 9, 14); // (shiny trinket) +break; + +case rn(5,18): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,690,690,690,690,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 224, 160, 13); //Warp Token + +break; + +case rn(5,19): + +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,652,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,693,693,693,693,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,533,573,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,693,693,693,693,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,692,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,652,653,653,494,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,533,573,573,574,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,693,693,693,693,612,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,652,653,653,494,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(6,2): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,481,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,482,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,602,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,481,641,641,642,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,640,641,641,482,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,600,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,481,641,641,642,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,640,641,641,482,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("641,641,641,641,642,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,640,641,641,641,641"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 152, 152, 10, 0, 103060); // (savepoint) +break; + +case rn(6,4): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,565,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,645,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,565,0,0,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,524,564,565,0,0,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,524,564,565,0,683,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,524,564,565,0,0,683,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 128, 120, 10, 1, 4060); // (savepoint) +break; + +case rn(6,5): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(6,6): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,687,687,688,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,608,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,646,647,647,647,648,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(6,7): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,569,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,609,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,569,531,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,489,489,489,530,571,0,0,0,0,0,0,569,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,531,489,489,489,489,489,530,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 64, 88, 10, 1, 7060); // (savepoint) +break; + +case rn(6,8): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(6,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(6,10): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("699,699,699,699,699,699,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); + +obj.createentity(game, 152, 128, 10, 0, 10060); // (savepoint) +break; + +case rn(6,11): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,696,615,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,615,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,655,656,657,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,696,696,696,696,696,697,696,696,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(6,12): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,649,491,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,650,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(6,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,688,687,687,687,687,687,687,687,687,687,687,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(6,14): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,641,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,481,641,641,641,642,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,481,641,641,641,641,642,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("641,641,641,641,642,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + + +case rn(6,15): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,490,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,491,489,611,0,0,0,0,0,609,489,490,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("0,689,0,0,0,0,609,489,611,0,0,0,0,0,649,650,651,0,0,0,0,0,689,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); +tmap.push("570,570,571,690,690,690,609,489,611,0,0,0,0,0,0,689,0,0,0,0,569,570,570,571,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); +tmap.push("489,489,611,0,0,0,649,650,651,0,0,0,0,0,569,570,570,570,571,690,609,489,489,611,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); +tmap.push("650,650,651,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,611,0,649,650,650,651,0,0,0,0,689,0,0,0,0,0,0,0,0,0,689,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,609,489,489,490,650,650,650,651,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,569,570,570"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,649,650,650,651,0,0,689,0,0,0,0,0,0,0,0,569,531,489,611,0,0,0,0,0,0,569,531,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,569,570,571,0,0,0,0,0,0,0,609,489,490,651,0,0,0,0,0,0,609,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,609,489,611,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,569,531,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,649,491,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489"); +tmap.push("0,0,0,0,0,569,570,571,0,0,0,0,609,489,611,0,0,609,489,489,611,0,0,0,0,0,0,0,569,570,571,0,0,569,531,489,489,489,489,489"); +tmap.push("0,0,0,0,569,531,489,530,571,0,0,0,649,650,651,0,0,609,489,490,651,0,0,0,0,0,0,0,609,489,611,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,569,570,570,570,531,490,651,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,609,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,569,570,571,690,690,649,650,650,491,489,611,0,0,0,649,650,491,489,489,489,489"); +tmap.push("0,0,0,0,649,650,491,489,611,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,609,490,651,0,0,0,0,0,609,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,611,0,0,0,0,569,570,570,571,0,0,609,489,611,0,0,0,0,569,531,611,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,530,570,571,0,0,609,489,489,530,570,570,531,489,611,0,0,0,0,609,489,611,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,489,489,611,690,690,649,650,491,489,490,650,650,650,651,0,0,0,0,609,489,611,0,0,0,0,569,570,531,489,489,489,489"); +tmap.push("0,0,0,0,0,0,609,489,490,650,651,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,609,489,530,571,0,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,569,570,531,489,611,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,609,489,489,611,690,690,690,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,611,0,0,0,609,489,489,489,489,489,489"); +tmap.push("0,0,0,0,609,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,491,489,611,0,0,0,649,650,491,489,489,489,489"); +tmap.push("570,570,570,570,531,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,611,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,530,570,570,570,570,570,570,571,0,0,0,0,0,0,609,489,530,570,570,570,570,531,489,530,570,570,570,570,570,531,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +if(!game.intimetrial){ + obj.createentity(game, 96, 48, 20, 1);//Terminal + obj.createblock(5, 96 - 4, 48, 20, 16, 12); +} + +obj.createentity(game, 128, 216, 10, 1, 116061); // (savepoint) +break; + +case rn(6,18): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483"); +tmap.push("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,563,564,564,565,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,684,684,684,684,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483,605,0,0,0,0,603,483,483"); +break; + +case rn(6,19): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,608,687,687,687,687,606,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,608,687,687,687,687,606,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,646,647,647,648,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); +tmap.push("0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(7,1): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,686,0,0,686,0,0,686,0,0,686,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 192, 104, 13); //Warp Token + +break; + +case rn(7,2): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,653,653,653,494,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,493,653,653,653,653,653"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,493,654,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,614,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,493,654,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,652,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,493,654,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,494,492,493,654,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,614,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,654,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 88, 136, 10, 0, 103070); // (savepoint) +break; + +case rn(7,3): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,496,656,656,656,656,497,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,496,657,0,0,0,0,655,497,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,496,657,0,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,0,575,577,0,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,575,537,536,577,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,615,495,495,617,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,655,497,496,657,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,617,0,0,0,655,657,0,0,0,615,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,575,537,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,575,537,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,536,576,576,576,576,537,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(7,4): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,568,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,568,0,0,0,606,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("567,567,567,567,567,567,567,567,567,567,568,0,0,0,606,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 208, 128, 10, 1, 4070); // (savepoint) +break; + +case rn(7,5): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,641,641,641,482,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,680,0,640,641,482,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,680,0,0,0,640,641,482,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,680,0,0,0,0,680,600,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,680,640,482,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,680,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,560,561,562,0,0,0,680,0,640,482,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,602,0,0,0,680,0,0,600,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,521,562,0,0,680,0,0,640,482,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,602,0,0,680,0,0,0,600,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,521,562,0,680,0,0,0,640,641,482,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,602,0,680,0,0,0,680,0,640,641,641"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,521,561,562,0,0,0,680,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,600,480,480,480,480,480,602,0,0,0,680,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,600,480,480,480,480,480,602,0,0,0,680,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,521,561,562,0,680,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,600,480,480,480,480,480,480,480,521,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + +case rn(7,6): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,692,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,654,0,692,0,0,0,572,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,692,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,654,0,0,692,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,692,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,572,573,534,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(7,7): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,490,651,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(7,8): + +tmap.push("480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480"); +break; + +case rn(7,9): + +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,685,684,684,685,684,684,685,684,684,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,683,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 64, 112, 14); //Teleporter! +break; + +case rn(7,10): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495"); +tmap.push("0,0,695,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,695,0,0,0,615,495,495,495"); +tmap.push("0,0,695,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,695,0,0,0,615,495,495,495"); +tmap.push("0,0,695,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,695,0,0,0,615,495,495,495"); +tmap.push("0,0,695,0,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,0,695,0,0,0,695,0,0,0,615,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,575,576,576,576,576,576,577,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,615,495,495,495,495,495,617,696,696,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,497,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,497,495,617,0,0,575,576,577,0,0,615,495,617,0,0,615,495,495,495,495,495,617,696,696,615,495,495,495"); +tmap.push("0,0,695,0,0,0,0,0,695,0,0,0,615,495,617,696,696,615,495,617,696,696,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("0,0,695,0,0,0,0,0,695,0,0,0,615,495,617,0,0,615,495,617,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("0,0,695,0,0,0,0,0,695,0,0,0,615,495,617,0,0,615,495,617,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("0,0,695,0,0,0,0,0,695,0,0,0,615,495,617,0,0,615,495,617,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,577,0,0,615,495,617,0,0,615,495,617,0,0,615,495,617,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,696,696,615,495,617,696,696,615,495,617,696,696,615,495,617,696,696,615,495,495,495,495,495,617,696,696,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,655,656,657,0,0,615,495,617,0,0,655,656,657,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,0,695,0,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,0,695,0,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,0,695,0,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,695,0,0,0,615,495,617,0,0,0,695,0,0,0,615,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,537,495,536,576,576,576,576,576,576,576,537,495,495,495,495,495,617,696,696,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,615,495,495,495"); +break; + +case rn(7,11): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,647,647,647,647,648,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,686,0,0,0,686,0,0,0,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,566,567,567,567,567,567,567,567,567,528,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,606,486,486,486,486,486,486,486,487,647,647,647,647"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,646,647,647,647,647,647,647,647,648,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,487,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(7,14): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,605,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 48, 192, 10, 1, 14070); // (savepoint) +break; + +case rn(8,0): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,6,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,6,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,7,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +break; + +case rn(8,1): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(8,2): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,646,488,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,646,488,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,648,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,487,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +break; + +case rn(8,3): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,684,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,485,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,603,483,483,483"); +tmap.push("0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +break; + +case rn(8,4): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,543,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,582,582,543,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,582,582,583,0,0,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,0,0,0,0,0,581,582,582,582,582,582,543,501,501,501,542,582,583,0,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501"); +tmap.push("0,0,0,0,581,582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,581,543,501,501,501,501,501,501,501,501,501"); +tmap.push("582,582,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,542,583,0,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,581,543,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501"); +break; + +case rn(8,5): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,497,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,496,656,657,0,0,0,695,0,0,0,0,0,655,497,495,495,495,536,577,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,655,497,495,495,495,617,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,496,657,0,0,0,0,0,695,0,0,0,0,0,0,0,655,497,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,575,576,576,577,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,575,537,495,495,536,577,0,0,0,0,0,0,655,497,495,495,617,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,696,696,696,655,497,495,495,495,536,577,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,615,495,495,495,495,536,577,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,655,497,495,495,495,495,617,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,655,656,497,495,495,617,696,696,696,696,696,696,615,495,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,655,497,495,495,495,495,495"); +tmap.push("495,495,495,495,536,576,577,0,0,0,0,0,655,497,495,536,577,0,0,0,0,0,615,495,495,495,536,577,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,536,577,0,0,0,0,655,497,495,495,495,536,577,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,536,577,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,615,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,655,497,495,495,617,696,696,696,696,696,615,495,495,495,495,536,577,0,0,0,0,655,497,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,536,577,0,0,0,0,0,615,495,495,617,0,0,0,0,0,615,495,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,617,0,0,0,0,0,655,497,495,495,495,495,617,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,617,0,0,0,0,0,615,495,495,617,0,0,0,0,0,0,615,495,495,495,495,617,696,696,696,696,696,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,496,656,657,0,0,0,0,0,615,495,495,536,577,0,0,0,0,0,655,497,495,495,496,657,0,0,0,0,0,615,495,495,495,495"); +tmap.push("656,656,656,656,656,656,657,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,655,656,656,657,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,695,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,575,537,495,495,495,495"); +tmap.push("0,0,0,695,0,0,0,0,0,0,0,0,0,575,537,495,495,495,536,577,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("0,0,0,695,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("0,0,0,695,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,536,577,0,0,0,0,0,0,695,0,0,0,0,575,576,537,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 80, 40, 10, 1, 5080); // (savepoint) +break; + +case rn(8,6): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,490,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,490,650,651,0,0,0,0,689,0,0,0,649,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,649,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,569,570,570,571,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,611,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,690,690,690,609,489,489,611,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,530,571,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,530,571,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,611,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 96, 72, 13); //Warp Token + +break; + +case rn(8,7): + +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,614,693,693,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,614,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,652,653,653,653,653,654,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492"); +break; + +case rn(8,8): + +tmap.push("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483"); +tmap.push("483,483,483,484,644,644,645,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,643,644,644,644,485,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,563,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,563,564,564,564,564,565,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,605,684,684,684,684,603,483,483"); +tmap.push("483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,605,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,524,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,563,564,564,564,564,564,564,564,525,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,483"); +tmap.push("483,483,484,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,645,0,0,0,0,603,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,603,483,483"); +tmap.push("483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(8,10): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,493,653,653,494,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,614,0,0,612,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,493,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,654,0,0,652,494,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,572,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,693,693,693,693,612,492,492,492,492,492,492,492,492,614,693,693,693,693,693,693,693,693,693,693,693,693,693,693,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,612,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +break; + +case rn(8,11): + +tmap.push("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,684,684,684,684,603,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,643,644,644,644,644,644,644,485,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,683,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,524,564,564,564,564,564,564,565,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,484,644,644,644,645,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("483,483,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,525,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483"); + +obj.createentity(game, 176, 40, 14); //Teleporter! +obj.createentity(game, 120, 128, 20, 1); // (terminal) + +obj.createblock(5, 120-4, 128, 20, 16, 7); +break; + +case rn(8,12): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +break; + +case rn(8,13): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,560,561,561,561,562,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480,480,481,641,641,641,641,641,641,641,641,641,641,641,641,641,641,482,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,481,642,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,480,602,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,560,561,561,561,562,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,560,522,480,480,602,681,681,681,681,681,600,480,480,480,480,602,681,681,681,681,681,600,480,480,480,602,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,600,480,480,481,642,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,560,522,480,480,480,602,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,0,600,480,480,602,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,600,480,480,480,481,642,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,560,522,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,0,0,0,680,0,0,0,0,0,560,561,522,480,480,480,602,681,681,681,681,681,681,600,480,480"); +tmap.push("0,0,0,0,560,522,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,522,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,642,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,600,480,480"); +tmap.push("0,0,0,0,640,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,560,561,522,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480"); +break; + +case rn(8,14): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,494,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,493,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,493,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); + +obj.createentity(game, 40, 152, 10, 1, 14080); // (savepoint) +break; + +case rn(8,15): + +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,537,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +break; + +case rn(8,16): + +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,491,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,690,690,690,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,649,650,491,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,7,7,649,650,650,651,7,7,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,490,650,651,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); +tmap.push("489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489"); + +obj.createentity(game, 152, 80, 10, 1, 16080); // (savepoint) +break; + +case rn(8,17): + +tmap.push("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,499,659,659,500,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,499,659,660,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,699,618,498,498,499,659,660,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,499,659,660,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,660,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498"); +break; + +case rn(8,18): + +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,606,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,528,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,6,606,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486"); +break; + +case rn(8,19): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,645,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,7,0,0,0,0,0,0,0,6,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(10,0): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(10,1): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(10,2): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,660,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,658,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,580,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(10,3): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,646,647,647,647,488,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,647,647,647,647"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(10,8): + +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,296,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,296,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,415,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,375,376,376,376,376,376,337,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,417,698,698,698,698,375,376,377,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,455,456,456,456,456,456,456,456,456,457,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,296,456,456,456,456,456,456,456,456,456,456,456,457,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295"); + +obj.createentity(game, 80, 40, 9, 17); // (shiny trinket) +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,9): + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,443,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.nearelephant = false; +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,10): + +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,285,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,403,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,403,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,443,444,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,357,398,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,317,477,478,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,317,477,478,0,0,0,0,0,0,815,695,695,695,695,695,695,695"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,0,815,363,364,364,364,364,364,364"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,0,815,403,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,363,364,325,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,363,364,325,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,438,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,11): + +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,117,278,0,0,0,0,0,0,0,0,0,0,572,573,534,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,572,534,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,198,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,198,0,0,0,0,0,0,0,0,652,653,494,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,0,0,0,0,0,0,0,652,494,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,197,197,198,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,157,197,198,0,0,0,0,0,0,612,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,572,573,573,534,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,238,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,12): + +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,517,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,677,518,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,590,591,591,591,591,591,591,591,591,591,591,591,592,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,670,671,671,671,671,671,671,671,671,671,512,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,636,516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,676,677,677,678,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,557,597,597,597,597,597,597,597,597,598,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,516,516,516,516,516,516,516,516,516,638,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,517,677,677,677,677,677,677,677,677,678,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,551,591,591,591,591,591,591,591,591,591,591,552,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,590,591,591,591,591,591,591,591,591,591,552,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("516,516,638,0,0,0,630,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); + +obj.createentity(game, 184, 176, 10, 1, 12100); // (savepoint) +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,13): + +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,514,675,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,554,595,0,0,264,106,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,514,675,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,554,595,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,264,106,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,184,146,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("513,513,635,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,14): + +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,443,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,0,0,0,0,403,283,284,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,284,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("316,316,438,0,0,0,0,0,0,443,444,445,0,0,0,0,403,283,405,0,0,0,0,403,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,357,398,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,357,398,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("316,316,316,316,438,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(10,15): + +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,536,577,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,536,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,536,577,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,615,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,655,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,696,615,495,495,495,617,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(10,16): + +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 216, 72, 10, 1, 16100); // (savepoint) +break; + +case rn(10,17): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(10,18): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(10,19): + +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,502,662,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,502,662,663,0,0,0,0,0,701,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,502,662,663,0,701,0,0,0,0,0,701,0,0,0,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,502,662,663,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,661,662,662,503,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,502,662,663,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,661,662,662,503,501,501,501,501,501,501"); +tmap.push("501,501,501,502,663,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,661,662,662,662,662,662,662"); +tmap.push("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,702,702,702,702,703,702,702,702,703,702,702,702,702,702,703,702,702,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,702,702,702,702,703,702,702,702,703,702,702,702,702,702,703,702,702,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,623,0,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0"); +tmap.push("501,501,501,542,583,0,0,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,581,582,582,582,582,582,582"); +tmap.push("501,501,501,501,542,582,583,0,701,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,581,582,582,543,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,542,582,583,0,0,0,701,0,0,0,0,0,701,0,0,0,0,0,701,0,0,581,582,582,543,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,542,582,583,0,701,0,0,0,0,0,701,0,0,0,0,0,581,582,582,543,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,542,582,583,0,0,0,0,0,701,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,542,582,583,0,0,0,701,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,542,582,582,582,583,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,702,702,702,702,702,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); +tmap.push("501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,623,0,0,0,0,0,621,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501"); + +obj.createentity(game, 40, 112, 9, 13); // (shiny trinket) +break; + +case rn(11,0): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(11,1): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(11,2): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,577,0,0,0,0,575,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,577,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,657,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(11,3): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,569,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(11,8): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + + +obj.createentity(game, (8 * 8), (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy +obj.nearelephant = true; + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(11,9): + +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,432,0,0,0,0,390,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391"); +tmap.push("471,471,472,0,0,0,0,470,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391"); +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + + +obj.createentity(game, 8 * 8, -248 + (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy +obj.nearelephant = true; + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(11,10): + +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253,253,94,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,172,173,173,173,173,173,173,174,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212,92,92,92,92,92,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92"); +tmap.push("173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92,92,92,92,214,683,683,683,252,253,253,253,253,253,253,253,253,253,253"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,173,173"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(11,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,571,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,531,489,489,611,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,569,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,569,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0"); +tmap.push("570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(11,17): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,680,0,0,0,0,0,0,560,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,680,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,562,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,640,641,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,681,681,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + +case rn(11,18): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(11,19): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(12,0): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,490,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,166,167,167,167,168,609,489,489,489,489,489,489,489,489,489,490,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,166,167,168,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,206,86,208,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,206,86,86,86,208,609,489,489,489,489,489,489,489,489,489,611,246,247,248,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,611,246,247,247,247,248,609,489,489,489,489,489,489,489,489,489,530,570,570,570,531,489,489,489,489,490,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("489,489,530,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,166,167,167,167,168,166,167,167,167,167,167,167"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,86,86,86,86,86"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,87,247,247,247,247"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,208,206,86,208,207,207,207,207"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,611,246,247,247,247,248,206,86,208,207,207,207,207"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,571,206,86,208,207,207,207,207"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,208,207,207,207,207"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,127,167,167,167,167"); +tmap.push("489,489,489,489,489,489,489,489,489,489,490,650,650,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,206,86,86,86,86,86,86"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,166,167,168,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,246,247,247,247,247,247,247"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,206,86,208,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,246,247,248,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,530,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(12,1): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0"); +tmap.push("579,579,579,579,579,579,579,579,579,580,0,0,0,0,0,698,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,698,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(12,2): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(12,8): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,373,373,374,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,414,698,698,698,412,292,292,292"); + + +obj.createentity(game, -328 + (8 * 8), (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy +obj.nearelephant = true; + +obj.createentity(game, 240, 72, 10, 1, 8120); // (savepoint) +roomtileset = 0; // (Use space station tileset) +break; + +case rn(12,9): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,217,689,689,689,215,95,95,95"); +tmap.push("176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,137,95,95,217,689,689,689,215,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,689,689,689,215,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,689,689,689,215,95,95,95"); + + +obj.createentity(game, -328 + (8 * 8), -248 + (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy +obj.nearelephant = true; + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(12,10): + +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,224,104,104,104"); +tmap.push("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,266,704,704,704,224,104,104,104"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,224,104,104,104"); +tmap.push("185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,146,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); + +obj.nearelephant = false; +roomtileset = 0; // (Use space station tileset) +break; + +case rn(12,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,539,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(12,17): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("570,570,570,570,570,570,570,570,570,571,0,0,0,0,0,689,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,689,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,490,650,651,0,0,0,0,649,650,491,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(12,18): + +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,646,647,647,647,647,647,647,647,488,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,686,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,686,0,0,0,0,0,646,647,647,647,647,647,647,647,647,647"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,0,0,0,0,0,686,0,0,0,0,0,0,566,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,686,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,568,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,647,648,0,0,0,0,646,647,488,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,687,687,687,687,687,687,687,687,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +break; + +case rn(12,19): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,569,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,649,650,650,650,650,650,650,650,491,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,0,0,689,0,0,0,0,0,649,650,650,650,650,650,650,650,650,650"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,689,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(13,1): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,217,216,216,216,216,216,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,136,176,176,176,176,176,176,176,176,176,176,176"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,215,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,255,256,256,256,256,256,256,256,256,256,256,256,256,256"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,215,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,175,176,176,176,176,176,176,176,176"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,96,256,256,256,256,256,256"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("576,576,576,576,576,576,576,576,576,577,175,176,176,176,177,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,696,696,696,696,696,696,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,215,95,95,95,217,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,617,215,95,95,95,217,0,0,0,0,0,0,255,256,256,256,257,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,617,255,256,256,256,257,0,0,0,0,0,0,575,576,576,576,577,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,536,576,576,576,576,577,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,615,495,495,495,617,696,696,696,696,696,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,615,495,495,495,617,0,0,0,0,0,215,95,217,216,216,216,216,216,216"); +break; + +case rn(13,2): + +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,681,681,681,681,681,681,600,480,480,480,602,681,681,681,681,681,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,481,641,641,641,641,641,641,641,641,641,642,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,681,681,681,681,681,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,602,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,641,641,642,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,211,210,210,210,210,210,210"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,130,170,170,170,170,170,170"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,0,0,249,250,250,250,250,250,250,250,250"); +tmap.push("480,480,480,480,521,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); + +obj.createentity(game, 48, 96, 14); //Teleporter! +break; + +case rn(13,14): + +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,90,250,250,250,250,250,250,250,250,250,250,250,250,250,91,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,90,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,131,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,775,776,776,776,776,776,776,776,776,776,776,776,776,776,776,777,0,0,0,209,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,249,250,250,250,250,250,250"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,169,170,170,170,170,170,170,171,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,211,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("89,89,89,89,89,89,89,89,90,250,250,250,251,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("89,89,89,89,89,89,89,89,211,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("89,89,89,89,89,89,89,89,211,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,211,695,695,817,0,0,0,0,815,695,695,695,695,695"); +tmap.push("250,250,250,250,250,250,250,250,251,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,756,0,0,0,0,0,756,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,396,397,397,397,397,397,397,397,397,397,397,397,398,856,856,856,856,856,856,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,476,477,477,477,477,477,477,477,477,477,477,477,478,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 280, 32, 20, 1); //terminal +obj.createblock(5, 280-4, 32, 20, 16, 9); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(13,15): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,583,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,623,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,661,662,663,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581,582,583,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,621,501,623,702,702,702,703,702,702,702,702,702,702,702,702,702,703,702,702,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,661,662,663,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,581,582,583,0,0,581,582,583,0,0,0,701,0,0,0,0,701,0,0,0,581,582,583,0,0,581,582,583,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,621,501,623,702,702,621,501,623,702,702,702,703,702,702,702,702,703,702,702,702,621,501,623,702,702,621,501,623,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,661,662,663,0,0,661,662,663,0,0,0,701,0,0,0,0,701,0,0,0,661,662,663,0,0,661,662,663,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,581,582,583,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,702,702,703,702,702,702,702,702,702,702,702,702,703,702,702,702,621,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,661,662,663,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,701,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,581,582,583,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,621,501,623,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,661,662,663,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,701,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(13,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,575,576,576,537,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,575,576,576,537,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,655,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,655,656,656,497,495,495,495,495,496,656,656,656,656,497,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,655,656,656,656,656,657,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,695,0,0,0,0,0,0,695,0,0,0,0,0,615,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 80, 104, 10, 1, 16130); // (savepoint) +break; + +case rn(13,17): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("0,0,0,0,695,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,696,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 240, 128, 10, 1, 17130); // (savepoint) +break; + +case rn(13,18): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,651,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(13,19): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,164,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,83,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,244,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,163,164,165,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,203,83,205,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,605,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(14,14): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,293,453,453,453,294,292,292,292,292,292,292,292,292,293,453,453,453,294,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,9,9,9,412,292,292,292,292,292,292,292,292,414,9,9,9,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,414,782,782,782,412,292,292,292,292,292,292,292,292,414,782,782,782,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("453,453,453,453,453,453,453,453,453,453,453,454,701,701,701,452,453,453,453,453,453,453,453,453,454,701,701,701,452,453,453,453,453,453,453,453,453,453,453,453"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701,701"); +tmap.push("373,373,373,373,373,373,374,701,701,701,372,373,373,373,373,373,373,374,701,701,701,701,372,373,373,373,373,373,373,374,701,701,701,372,373,373,373,373,373,373"); +tmap.push("292,292,292,292,292,292,414,701,701,701,412,292,292,292,292,292,292,414,701,701,701,701,412,292,292,292,292,292,292,414,701,701,701,412,292,292,292,292,292,292"); +tmap.push("453,453,453,453,453,294,414,862,862,862,412,292,292,292,292,292,292,414,862,862,862,862,412,292,292,292,292,292,292,414,862,862,862,412,293,453,453,453,453,453"); +tmap.push("0,0,0,0,0,412,414,0,0,0,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,0,0,0,412,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,412,414,0,0,0,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,0,0,0,412,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,412,414,8,8,8,412,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,414,8,8,8,412,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,412,333,373,373,373,334,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,333,373,373,373,334,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,452,453,453,453,453,453,453,453,453,453,294,292,414,8,8,8,8,412,292,293,453,453,453,453,453,453,453,453,453,454,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,333,373,373,373,373,334,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,452,453,453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(14,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,693,694,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("573,573,573,573,573,573,573,573,573,573,573,573,574,693,693,693,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,574,693,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,693,693,693,693,693,693,693,693,693,694,693,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,692,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(14,17): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,698,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("659,659,659,659,659,659,659,659,659,659,659,659,659,660,699,700,699,699,699,699,699,699,699,699,700,699,658,500,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("579,579,579,579,579,579,579,579,579,579,579,579,579,580,699,700,699,699,699,699,699,699,699,699,700,699,578,540,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,698,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,580,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(14,18): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,499,659,659,660,0,698,0,0,0,658,659,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,499,659,659,660,0,0,0,0,698,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,658,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,698,0,0,0"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,578,579,579,579,579"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,578,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(14,19): + +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495"); +tmap.push("495,495,495,617,696,696,696,696,696,696,696,615,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,536,577,0,0,0,0,0,0,0,0,655,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,617,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,536,576,576,577,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,0,0,0,0,0,0,695,0,0,0,695,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 176, 72, 14); //Teleporter! +obj.createentity(game, 88, 160, 20, 1);//terminal + +obj.createblock(5, 88-4, 160, 20, 16, 11); +break; + +case rn(15,14): + +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,705,865,865,706,704,705,865,865,706,704,705,865,865,706,704,704,704"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,186,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,106,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,826,0,0,824,704,826,0,0,824,704,826,0,0,824,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,745,785,785,746,704,745,785,785,746,704,745,785,785,746,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,226,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,145,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,264,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(15,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,481,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(15,17): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(15,18): + +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,487,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("647,647,647,647,647,647,647,647,647,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,686,0,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,568,0,0,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,527,567,567,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 88, 96, 10, 0, 18150); // (savepoint) +break; + +case rn(15,19): + +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,530,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,570,570,570"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,530,570,570,570,570,570,570,570,570,570,570,570,570,570,570,531,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +break; + +case rn(16,4): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,484,644,644,644,485,483,483,483,483,483,483,483,483,484,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,605,163,164,165,643,644,644,644,644,644,644,644,644,645,163,164,165,603,483,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("483,605,203,83,205,163,164,164,164,164,164,164,164,164,165,203,83,205,603,483,484,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,605,243,244,245,243,244,244,244,244,244,244,244,244,245,243,244,245,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,524,565,163,165,0,0,0,0,0,0,0,0,0,0,163,165,563,525,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,243,245,643,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,605,203,205,0,0,0,0,0,0,0,0,0,0,163,165,563,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,484,645,243,245,0,0,0,0,0,0,0,0,0,0,243,245,643,485,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,605,163,164,165,163,164,164,164,164,164,164,164,164,165,163,164,165,603,483,483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,605,203,83,205,243,244,244,244,244,244,244,244,244,245,203,83,205,603,483,483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0"); +tmap.push("483,605,243,244,245,563,564,564,564,564,564,564,564,564,565,243,244,245,603,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0"); +tmap.push("483,524,564,564,564,525,483,483,483,483,483,483,483,483,524,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); + +obj.createentity(game, 72, 120, 13); //Warp Token + +break; + +case rn(16,14): + +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,690,850,850,691,689,690,850,850,691,689,690,850,850,691,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,109,107,107,107,107,107,107,107,107,107"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,267,268,268,268,268,268,268,268,268,268"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); +tmap.push("689,811,0,0,809,689,811,0,0,809,689,811,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); +tmap.push("689,730,770,770,731,689,730,770,770,731,689,730,770,770,731,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0"); +tmap.push("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,187,188,189,689,811,0,0,0"); +tmap.push("689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,227,107,229,689,811,0,0,0"); +tmap.push("188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,149,107,229,850,851,0,0,0"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,0"); +tmap.push("268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,269,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +obj.createentity(game, 176, 152, 10, 1, 14160); // (savepoint) +break; + +case rn(16,17): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,496,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(16,19): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(17,4): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,499,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,499,659,659,659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("659,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("579,579,579,579,579,579,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,579,580,6,6,6,6,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,580,6,6,6,6,6"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(17,12): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,760,761,761,761,761,761,761,761,761,761,761,761,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,577,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,536,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,575,537,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,615,495,495,495,495,495"); + +obj.createentity(game, 40, 40, 14); //Teleporter! +obj.createentity(game, 192, 120, 20, 1);//terminal + +obj.createblock(5, 192-4, 120, 20, 16, 10); +roomtileset = 0; // (Use space station tileset) +break; + +case rn(17,13): + +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,684,844,844,844,844,685,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,805,0,0,0,0,803,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,724,764,764,764,764,725,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,683,683,683,683,683,683,212,92,92,92,92,92"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(17,14): + +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,169,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(17,15): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,837,837,837,837,837,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +break; + +case rn(17,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,567,567,567,567,567,567,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(17,17): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,570,570,570,570,571,0,0,0,0,0,0,0,0,569,570,570,570,570,570,571,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,490,650,650,650,651,0,0,0,0,0,0,0,0,649,650,650,650,491,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,530,570,570,570,571,0,0,0,0,0,0,0,0,569,570,570,570,531,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,609,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,649,650,650,650,650,650,651,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 112, 72, 14); //Teleporter! +break; + +case rn(17,18): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(17,19): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,566,567,568,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,568,0,0,566,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,608,0,0,606,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,527,567,567,528,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,488,486,486,487,648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("567,567,567,567,567,567,567,567,567,568,687,687,687,687,687,687,687,687,606,486,486,608,687,687,687,687,687,687,687,687,566,567,567,567,567,567,567,567,567,567"); +tmap.push("486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,646,647,647,648,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,606,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,527,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,566,528,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,527,567,568,0,0,0,0,0,0,0,0,0,0,0,0,566,567,528,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,527,567,567,567,567,567,567,567,567,567,567,567,567,528,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); +tmap.push("486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486"); + +obj.createentity(game, 152, 152, 10, 0, 19170); // (savepoint) +break; + +case rn(18,4): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,7,7,7,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,615,495,495,495,496,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,657,0,0,0,615,495,495,495,617,7,7,7,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,496,656,656,656,497,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,615,495,495,495,617,7,7,7,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,617,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,657,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6"); +tmap.push("576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(18,15): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,514,674,674,674,515,513,513,513,513,513,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,635,369,370,371,633,513,513,513,513,513,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,633,513,513,635,409,289,411,633,513,514,674,674,515,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,450,450,450,451,633,513,513,635,449,450,451,633,513,635,369,371,633,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,593,594,594,594,555,513,513,554,594,594,594,555,513,635,449,451,633,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,450,450,451,633,513,513,513,513,513,513,513,513,513,513,513,513,554,594,594,555,513,513,513,513,513"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,593,594,594,555,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); +tmap.push("450,450,450,450,450,450,450,450,450,450,450,450,450,450,451,633,513,513,514,674,674,515,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,635,369,371,633,513,514,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674,674"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,635,449,451,633,513,635,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,633,513,513,554,594,594,555,513,635,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,673,674,674,674,674,674,674,674,675,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,796,0,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,593,594,594,594,594,594,594,595,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,673,674,674,674,674,674,674,675,0,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,593,594,595,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,633,513,635,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,673,674,675,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomtileset = 0; // (Use space station tileset) +obj.createentity(game, 104, 152, 10, 1, 15180); // (savepoint) +break; + +case rn(18,17): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,522,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,522,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,482,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,482,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,641,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(18,19): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,525,483,483,483,483,483"); +tmap.push("564,564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,524,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,524,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,525,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,524,564,564,565,0,0,0,0,0,0,0,0,0,563,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,564,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(19,4): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,484,644,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,7,7,7,7,7,603,483,483,483,483,483,483,605,7,7,7,7,7,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,605,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,645,0,0,0,0,0,643,644,644,644,644,644,644,645,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,644,644,644,644,644,644,644,644,644"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,684,684,685,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,684,685,684,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,563,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,643,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,645,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("564,564,564,564,564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 192, 176, 10, 1, 105190); // (savepoint) +break; + +case rn(19,5): + +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,575,577,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,575,577,0,0,0,0,0,0,0,0,575,577,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,0,0,0,615,617,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,6,6,6,615,617,6,6,6,6,6,0,0,615,617,0,0,0,0,0,0,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,575,576,576,537,536,576,576,576,576,577,6,6,615,617,6,6,6,6,6,6,0,0,615,617,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,617,0,0,615,495,495,495,495,495,495,495,495,536,576,576,537,536,576,576,576,576,576,577,6,6,615,617,6,6,6,6,6,6,6"); +tmap.push("656,656,656,656,656,656,657,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,537,536,576,576,576,576,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 40, 192, 10, 1, 106190); // (savepoint) +break; + + +case rn(19,9): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,497,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,496,656,656,656,656"); +tmap.push("495,495,495,495,495,495,495,495,495,495,617,7,7,7,7,7,7,7,615,495,617,7,7,7,7,7,7,7,7,7,7,7,7,615,495,617,0,0,0,0"); +tmap.push("495,495,495,496,656,656,656,656,656,656,657,0,0,0,0,0,0,0,655,656,657,0,0,0,0,0,0,0,0,0,0,0,0,655,656,657,0,0,0,0"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,496,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,577,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,575,576,576,577,0,0,0,0,0,0,6,6,6,6,6,6,6,615,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,617,6,6,6,6,6,6,575,576,576,576,576,576,576,537,495,536,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,536,576,576,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(19,10): + +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,500,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,7,7,618,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,7,7,0,0,618,498,498,498,498,498,498"); +tmap.push("498,498,620,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,499,659,659,660,7,7,7,0,0,0,0,618,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,620,7,7,7,0,0,0,0,0,0,0,658,659,659,659,659,659,659"); +tmap.push("498,498,620,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,658,500,498,498,498,498,498,498,499,659,659,500,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,658,500,498,498,498,499,659,660,7,7,618,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,658,659,659,659,660,0,0,0,0,618,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,658,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,539,579,579,579,580,0,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,539,580,0,0,0,0,0,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,539,579,579,579,579,580,0,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,580,0,0,0,0,0,0,0,0,0,578,580,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,580,6,6,6,6,6,6,618,620,6,6,6,6,6,6,6,6,6,6,6,6,6"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,539,579,579,579,579,579,579,540,539,579,579,579,579,579,579,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + +obj.createentity(game, 72, 168, 10, 1, 111190); // (savepoint) +break; + +case rn(19,11): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,615,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,655,656,656,497,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,0,695,0,0,0,0,0,0,0,695,0,0,0,0,615,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,575,576,576,576,577,0,0,0,0,695,0,0,0,0,655,656,656,497,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,617,0,0,0,0,695,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,696,696,696,696,615,495,495,495,536,576,576,577,0,695,0,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,617,0,695,0,0,0,0,0,0,0,0,695,0,615,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,536,576,576,577,0,0,0,0,0,0,0,695,0,655,656,656,497,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,615,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,695,0,0,0,0,655,656,656,497,495,495,495,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,695,0,0,0,0,0,0,0,615,495,495,495,495,495,495"); +tmap.push("495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,695,0,0,0,0,0,0,0,655,656,656,497,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,695,0,0,0,0,0,0,0,0,695,0,615,495,495,495"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,0,0,0,695,0,655,656,656,656"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,695,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0,695,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,695,0,0,0,0,0"); +tmap.push("495,495,617,696,696,696,696,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,695,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,695,0,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,577,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,536,576,576,576,576"); +tmap.push("495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,536,576,576,576,576,537,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +break; + +case rn(19,12): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,499,659,660,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,0,0,0,0,0,698,0,0"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,0,0,698,0,0,578,579,579,579,579,579,579,579"); +tmap.push("498,498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,578,579,579,579,579,540,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,698,0,578,579,579,540,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,698,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,578,579,540,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,699,699,699,699,699,699,699,699,699,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,500,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659"); +tmap.push("498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,499,660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("498,498,498,498,498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +break; + +case rn(19,13): + +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,481,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,521,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,560,561,561,561,522,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,602,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480"); +break; + +case rn(19,14): + +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,689,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,611,690,691,690,690,691,690,690,690,690,690,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,569,570,571,0,0,0,0,0,0,0,649,650,651,0,689,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,691,690,609,489,611,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,649,650,651,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,689,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,649,650,651,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,0,0,0,0,0,0,0,569,570,571,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,569,571,0,0,0,0,0,609,489,611,690,690,690,690,690,690,690,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,690,691,690,609,611,0,0,0,0,0,649,650,651,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,689,0,649,651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,569,570,570,531,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,611,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); + +obj.createentity(game, 80, 144, 10, 1, 14190); // (savepoint) +break; + +case rn(19,15): + +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492"); +tmap.push("492,492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); +tmap.push("492,492,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); +tmap.push("492,492,492,493,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,534,492,492,492"); +tmap.push("653,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,653,494,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,494,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,534,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,653,494,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,534,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,652,653,653,653,653,494,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,573,573,573,573,573,573,573,534,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492,492,492,492,492,492,492,492,492"); +break; + +case rn(19,16): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,565,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,684,684,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,683,0,0,0,0,0,0,0,0,563,564,564,564,564,525,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,684,685,684,684,685,684,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,0,683,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,563,564,565,0,0,0,0,0,0,0,643,644,644,644,644,485,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,683,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,0,0,0,50,603,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,563,564,564,564,564,525,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,684,684,684,684,684,684,684,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,643,644,645,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483,483,483,483,483,483,483,483"); +break; + +case rn(19,17): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,497,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,497,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0,695,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.createentity(game, 168, 88, 10, 1, 17190); // (savepoint) +break; + +case rn(19,18): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,699,699,699,699,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,660,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,0,0,0,0,698,0,0,0,0,0,618,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,579,579,579,579,579,579,579,579,579,579,540,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +break; + +case rn(19,19): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,640,482,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("561,561,561,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,521,561,561,562,0,0,0,0,0,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,521,561,561,561,561,562,0,0,0,0,0,0,0,600,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,521,561,561,561,561,561,561,561,522,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +tmap.push("480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480"); +break; + +///Secret lab! + +case rn(17, 6): +//Phase 1 +if(obj.altstates==1){ + + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,287,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,367,367,367,328,286,286,286,408,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,286,287,448,0,0,0,406,286,286,287,448,0,0,0"); + tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,286,286,287,448,0,0,0,0,406,286,287,448,0,0,0,0"); + tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,446,447,447,447,288,286,286,408,0,0,0,0,0,406,286,408,0,0,0,0,0"); + tmap.push("286,286,286,287,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,287,448,0,0,0,0,366,328,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,366,328,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,327,368,0,0,0,406,286,286,286,327,368,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,286,408,0,0,0,406,286,286,286,286,408,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0,406,286,286,286,286,408,0,0,0,0"); + tmap.push("286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,327,367,367,367,328,286,286,286,286,327,367,367,367,367"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +}else if(obj.altstates==2){ + //Phase 2 + + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,287,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,288,287,447,448,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,448,0,0,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,287,448,0,0,0"); + tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,287,448,0,0,0,0"); + tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,408,0,0,0,0,0"); + tmap.push("286,286,286,287,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,328,286,286,408,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,327,368,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,408,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286,286,286,408,0,0,0,0"); + tmap.push("286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286,286,286,327,367,367,367,367"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +}else{ + //Phase 3 + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,287,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,288,287,447,448,0,0,0,406,286,286,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,448,0,0,0,0,0,446,447,288,286,408,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,447,448,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,327,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,287,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +} +break; + +case rn(18,6): + +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,402,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,442,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,440,441,441,441,441,441,441,441,441,441,441,441"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +tmap.push("280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280"); +break; + +case rn(18,5): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,0,0,0,372,373,373,373,373,373,373,334,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,452,453,453,453,453,453,453,453,453,453,294,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("453,453,453,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,293,453,453,453,453,453"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,414,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,414,0,0,0,0,0,0,0,412,292,292,292,292,292,414,0,0,0,0,0"); +tmap.push("373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,414,0,0,0,0,0,0,0,412,292,292,292,292,292,333,373,373,373,373,373"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292"); + +obj.createentity(game, 256, 88, 21, 1); //Terminal +obj.createentity(game, 128, 88, 21, 1); //Terminal +obj.createentity(game, 104, 88, 21, 1); //Terminal +obj.createentity(game, 80, 88, 21, 1); //Terminal +obj.createentity(game, 128, 128, 21, 0); //Terminal +obj.createentity(game, 128, 192, 21, 1); //Terminal +obj.createentity(game, 104, 192, 21, 1); //Terminal +obj.createentity(game, 80, 192, 21, 1); //Terminal + +if(game.insecretlab){ + //vitellary + obj.createentity(game, 231, 81, 18, 14, 0, 18); + obj.createblock(5, 231- 32, 0, 32 + 32 + 32, 240, 2); + + //violet + obj.createentity(game,83, 126, 18, 20, 0, 18); + obj.entities[obj.getcrewman(1)].rule = 7; obj.entities[obj.getcrewman(1)].tile +=6; + obj.createblock(5, 83 - 32, 0, 32 + 32 + 32, 240, 1); +} +break; + +case rn(17,5): + +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("376,376,376,376,377,0,0,0,0,0,0,375,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,375,376,376,377,0,0,0,0,375,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,337,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,415,295,295,417,0,0,0,0,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,455,456,456,457,0,0,0,0,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); + +obj.createentity(game, 96, 48, 25, 0, 1); //Terminal +obj.createentity(game, 128, 48, 25, 0, 2); //Terminal +obj.createentity(game, 160, 48, 25, 0, 3); //Terminal +obj.createentity(game, 192, 48, 25, 0, 4); //Terminal +obj.createentity(game, 224, 48, 25, 0, 5); //Terminal +obj.createentity(game, 256, 48, 25, 0, 6); //Terminal + +obj.createentity(game, 96, 88, 25, 1, 13); //Terminal +obj.createentity(game, 128, 88, 25, 1, 14); //Terminal +obj.createentity(game, 160, 88, 25, 1, 15); //Terminal +obj.createentity(game, 192, 88, 25, 1, 16); //Terminal +obj.createentity(game, 224, 88, 25, 1, 17); //Terminal +obj.createentity(game, 256, 88, 25, 1, 18); //Terminal + +obj.createentity(game, 96, 128-3, 25, 0, 7); //Terminal +obj.createentity(game, 96, 168, 25, 1, 8); //Terminal + +obj.createentity(game, 160, 128, 25, 0, 12); //Terminal +obj.createentity(game, 192, 128, 25, 0, 11); //Terminal +obj.createentity(game, 224, 128, 25, 0, 10); //Terminal +obj.createentity(game, 256, 128, 25, 0, 9); //Terminal +break; + +case rn(16,5): + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,364,364"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,363,364,364,364,364,364,364,364,364,364,364,365,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,405,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,283,283,324,364,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,325,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.createentity(game, 152, 168, 25, 0, 20); //Terminal +obj.createentity(game, 152, 168, 25, 0, 19); //Terminal +break; + +case rn(19,6): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,411,0,0,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("450,450,450,451,0,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,409,289,289,289"); +tmap.push("370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,0,0,409,289,289,289"); + +obj.createentity(game, 216, 176, 21, 1); //Terminal +obj.createentity(game, 192, 176, 21, 1); //Terminal +obj.createentity(game, 168, 176, 21, 1); //Terminal +obj.createentity(game, 144, 176, 21, 1); //Terminal +obj.createentity(game, 88, 96, 21, 1); //Terminal +obj.createentity(game, 112, 96, 21, 1); //Terminal +obj.createentity(game, 136, 96, 21, 1); //Terminal +obj.createentity(game, 160, 96, 21, 1); //Terminal + +//vertigris: +obj.createentity(game, 100, 169, 18, 13, 0, 18); +obj.createblock(5, 100 - 16, 0, 32 + 32, 240, 4); + +//victoria: +obj.createentity(game, 193, 89, 18, 16, 0, 18); +obj.createblock(5, 193-16, 0, 32+32, 240, 5); +break; + + +case rn(19,7): + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,363,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,445,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283"); +tmap.push("283,324,364,364,364,364,364,365,0,0,0,0,363,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,283,283"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,324,364,364,364,364,325,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.createentity(game, 72, 192, 13); // (shiny trinket) +obj.createentity(game, 112, 144, 20, 1); // (terminal) +obj.createblock(5, 112 - 4, 144, 20, 16, 21); + +//vermilion +obj.createentity(game, 186, 137, 18, 15, 0, 18); +obj.createblock(5, 186 - 32, 0, 32 + 32 + 32, 240, 3); + +//naughty corner! +obj.createblock(1, 30, 0, 20, 50, 15); +obj.createblock(1, 90, 0, 20, 50, 16); +break; + + +case rn(19, 8): +//The SUPER GRAVITRON + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.createentity(game, -8, 84-32, 11, 328+8); // (horizontal gravity line) +obj.createentity(game, -8, 148 + 32, 11, 328+8); // (horizontal gravity line) +obj.createblock(1, -10, 84 - 16, 340, 32, 9); //start the game +break; + + default: + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + //obj.fatal_bottom(); + break; + } + } + + public var roomname:String; + public var roomtileset:int; + public var i:int; + + //roomtext thing in other level + public var roomtexton:Boolean, roomtextx:int, roomtexty:int, roomtextnumlines:int; + public var roomtext:Array = new Array(); + } +} \ No newline at end of file diff --git a/mobile_version/levels/spacestation2class.as b/mobile_version/levels/spacestation2class.as new file mode 100644 index 00000000..4e155ff5 --- /dev/null +++ b/mobile_version/levels/spacestation2class.as @@ -0,0 +1,3197 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class spacestation2class extends Sprite { + public function rn(rx:int, ry:int):int { + return rx + (ry * 100); + } + + public function loadlevel(rx:int, ry:int, game:gameclass, obj:entityclass):void { + var t:int; + tmap.reset(); + rx -= 100; ry -= 100; + + rx += 50 - 12; ry += 50 - 14; //Space Station + + t = rx + (ry * 100); + + roomname = "Untitled room ["+String(rx) + "," + String(ry)+"]"; + + switch(t){ + case rn(50,50): + +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,840,841,841,841,841,841,841,841,841,682,680,680,680,680,680,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,1120,6,6,6,6,6,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,574,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,680,680,680,680,680,680,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,680,680,680,680,680,680,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,493,653,654,680,680,680,680,680,680,680,680,680,680,652,653,494,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("653,653,653,653,653,653,653,653,653,653,653,653,654,680,680,680,680,680,680,680,680,680,680,680,680,680,680,652,653,653,653,653,653,653,653,653,653,653,653,653"); +tmap.push("0,0,0,0,0,716,0,0,0,716,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,716,0,0,0,716,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,716,0,0,0,716,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,716,0,0,0,716,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,716,0,0,0,716,0,840,841,682,680,680,680,680,680,680,680,680,680,680,680,680,681,841,842,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,716,0,0,0,716,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,716,0,0,0,716,0,0,0,840,841,841,841,841,841,841,841,841,841,841,841,841,842,0,0,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,196,197,197,197,197,197,198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,276,277,277,277,277,277,278,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,716,0,0,0,716,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,196,197,197,197,197,197,198,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,276,277,277,277,277,277,278,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 96, 40, 10, 0, 450500); // (savepoint) +if(game.intimetrial) { + obj.createentity(game, 136, 92, 11, 48); // (horizontal gravity line) +} + +roomname = "Outer Hull"; //If not yet in level, use "The Space Station"; + +break; + + case rn(49,50): + +tmap.push("295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,417,698,698,698,698,455,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); +tmap.push("295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,295,295,417,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,295,295,417,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,860,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,295,295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("295,295,295,295,295,295,336,376,376,376,376,376,377,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,336,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295"); +tmap.push("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +roomname = "The Filter"; //If not yet in level, use "The Space Station" +break; + + case rn(49,49): + +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,108,268,268,268,268,268,268,268,268"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,229,850,850,691,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,229,0,0,809,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,229,0,0,809,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,229,0,0,809,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,229,0,0,809,689,227,107,107,229,689,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,229,689,811,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,229,0,0,849,850,227,107,107,229,850,850,850,850,850,227,107,107,107,107,107,107,107,107,107,107,229,850,851,0,0,8,8,8,8"); +tmap.push("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,227,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,187,188,188,188"); +tmap.push("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,267,268,268,268,268,268,268,268,268,268,268,269,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,770,771,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,811,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,811,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,811,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,811,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,730,770,770,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,148,188,188,188,188,189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,107,107,107,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,107,107,107,107,107,229,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,227,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,107,107,107,107,107,148,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,149,107,107,107"); +tmap.push("107,107,107,107,107,107,229,689,689,689,689,227,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + +obj.createentity(game, 128, 176, 10, 1, 449490); // (savepoint) +obj.createentity(game, 160, 192, 3); //Disappearing Platform +obj.createentity(game, 192, 192, 3); //Disappearing Platform +obj.createentity(game, 224, 192, 3); //Disappearing Platform +obj.createentity(game, 256, 192, 3); //Disappearing Platform +obj.createentity(game, 216-4, 168, 1, 0, 4, 160, 88, 256, 192); // Enemy, bounded +obj.createentity(game, 184-24, 96, 1, 1, 4, 160, 88, 256, 192); // Enemy, bounded +obj.createentity(game, 256, 8, 2, 10, 4); //Big Threadmill, >>>>>> +roomname = "Boldly To Go"; +break; + + +case rn(49,48): + +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,761,761,761,761,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,411,680,680,680,680,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,290,450,450,450,450,450,450,450,450,451,680,680,680,680,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,800,680,409,289,289,411,680,680,680,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,840,841,409,289,289,411,841,841,682,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,6,6,6,6,6,6,6,6,6,409,289,289,289"); +tmap.push("289,289,289,289,289,289,411,0,0,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,369,370,370,370,370,370,370,370,370,331,289,289,289"); +tmap.push("289,289,289,289,289,289,411,761,762,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,449,450,450,450,450,450,450,450,450,450,450,450,450"); +tmap.push("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,800,680,680,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0"); +tmap.push("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,840,841,841,409,289,411,841,841,841,841,841,841,841,841,841,841,841,841,841,841,842,0,0"); +tmap.push("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,0,0,0,409,289,411,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("289,289,289,289,289,289,411,680,802,0,0,409,289,289,411,0,0,0,0,0,409,289,411,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); +tmap.push("289,289,289,289,289,289,411,680,721,761,761,409,289,289,411,761,761,761,761,761,409,289,330,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370"); +tmap.push("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,411,680,680,680,680,409,289,289,411,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + +obj.createentity(game, 192, 96, 9, 2); // (shiny trinket) +roomname = "One Way Room"; +break; + + +case rn(49,47): + +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253"); +tmap.push("92,92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,9,9,9,9,9"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,0,0,763,764,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,93,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,173"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,92,214,0,0,803,683,212,92,92,214,683,683,683,683,683,172,173,173,173,173,173,173,173,173,173,173,174,0,0,0,0,212,92,92,92"); + +obj.createentity(game, 56, 24, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 120, 24, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 184, 24, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 88, 72, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 216, 72, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 280, 72, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 32, 10, 0, 447490); // (savepoint) +obj.createentity(game, 288, 160, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 280, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 160, 216, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 224, 216, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 248, 24, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 120, 168, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 184, 168, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 216, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 152, 72, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 224, 120, 10, 0, 447491); // (savepoint) + +roomname = "Conveying a New Idea"; +break; + + +case rn(50,47): + +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,100,98,98,98,98,98,98,98,98,98,98,98,98,98,98,99,259,259,259,259,259,259,259,259,100,98,98,98"); +tmap.push("9,9,9,9,9,9,9,9,9,9,9,9,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,7,7,7,7,7,7,7,7,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,680,680,680,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,680,680,680,218,98,98,98"); +tmap.push("179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,180,8,8,8,8,8,8,8,8,178,179,179,179,179,179,179,180,680,680,680,680,218,98,98,98"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,139,179,179,179,179,179,179,179,179,140,98,98,98,98,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,99,259,259,259,259,259,259,259,259,100,98,98,98,98,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,9,9,9,9,9,9,9,9,258,259,259,259,100,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("179,179,179,180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,218,98,98,220,680,680,680,680,218,98,98,98"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,840,841,841,218,98,98,220,841,841,841,841,218,98,98,98"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98"); +tmap.push("98,98,98,220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,218,98,98,220,0,0,0,0,218,98,98,98"); +tmap.push("98,98,98,220,0,0,0,0,178,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,98,220,0,0,0,0,218,98,98,98"); + +obj.createentity(game, 0, 72, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 96, 24, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 160, 24, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 168, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 168, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 160, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 160, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 0, 160, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 0, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 216, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 216, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 216, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 0, 168, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 72, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 72, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 112, 2, 8, 4); //Threadmill, >>> +roomname = "Upstream Downstream"; +break; + +case rn(50,48): + +tmap.push("292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,452,453,453,453,453,453,294,292,292,292,292,292,292,292,292,292,292,293,453,453,453,453,453,454,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,9,9,9,9,9,9,412,292,292,292,292,292,292,292,292,292,292,414,9,9,9,9,9,9,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,452,453,453,453,453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,333,373,373,373,374,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,414,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412,292,292,292"); +tmap.push("292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,372,373,373,373,334,292,292,292"); +tmap.push("292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,414,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,412,292,292,292,292,292,292,292"); +tmap.push("453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,292,292,292,292"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,412,292,292,292,292,292,292,292"); +tmap.push("373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + +obj.platformtile = 119; +obj.createentity(game, 64, 72, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded +obj.createentity(game, 96, 80, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded +obj.createentity(game, 128, 88, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded +obj.createentity(game, 160, 96, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded +obj.createentity(game, 192, 104, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded +obj.createentity(game, 224, 112, 2, 0, 4, 64, 72, 256, 160); // Platform, bounded +obj.createentity(game, 264, 96, 10, 1, 448500); // (savepoint) +roomname = "The High Road is Low"; +break; + +case rn(50,49): + +tmap.push("274,274,274,274,274,274,274,274,274,274,274,274,115,113,113,113,113,113,113,113,113,113,113,113,113,113,113,114,274,274,274,274,274,274,274,274,274,274,274,274"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,273,115,113,113,113,113,113,113,113,113,113,113,113,113,114,275,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,9,233,113,113,113,113,113,113,113,113,113,113,113,113,235,9,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,273,115,113,113,113,113,113,113,113,113,113,113,114,275,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,9,233,113,113,113,113,113,113,113,113,113,113,235,9,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,273,115,113,113,113,113,113,113,113,113,114,275,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,233,113,113,113,113,113,113,113,113,235,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,273,115,113,113,113,113,113,113,114,275,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8"); +tmap.push("194,194,194,194,194,194,194,194,195,0,0,0,0,0,0,9,233,113,113,113,113,113,113,235,9,0,0,0,0,0,0,193,194,194,194,194,194,194,194,194"); +tmap.push("113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,273,115,113,113,113,113,114,275,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,9,233,113,113,113,113,235,9,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,273,115,113,113,114,275,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,9,233,113,113,235,9,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,273,115,114,275,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,9,233,235,9,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,273,275,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,9,9,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,0,0,0,0,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,195,0,0,0,0,193,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,235,8,8,8,8,233,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); +tmap.push("113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,154,194,194,194,194,155,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113"); + +obj.createentity(game, 144, 200, 3, 51); //Disappearing Platform +obj.createentity(game, 24, 16, 10, 0, 449500); // (savepoint) +obj.createentity(game, 280, 16, 10, 0, 449501); // (savepoint) +obj.createentity(game, 0, 8, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 8, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 224, 8, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 288, 8, 2, 9, 4); //Threadmill, <<< +roomname = "Give Me A V"; +break; + +case rn(51,49): + +tmap.push("244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,85,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,7,7,7,7,7,7,7,7,7,7,7,1125,9,9,9,9"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("164,164,164,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,6,6,6,6,6,6,6,6,6,6,6,1122,8,8,8,8"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164"); +tmap.push("83,83,83,124,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,125,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + +obj.createentity(game, 0, 8, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 64, 8, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 8, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 192, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 256, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 152, 88, 10, 1, 449510); // (savepoint) +obj.createentity(game, 152, 120, 10, 0, 449511); // (savepoint) +obj.createentity(game, 128, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 256, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 32, 208, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 64, 208, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 208, 2, 10, 4); //Big Threadmill, >>>>>> +roomname = "Select Track"; +break; + +case rn(52,49): + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); +tmap.push("364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.createentity(game, 0, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 256, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 152, 128, 1, 0, 5, 72, 120, 256, 200); // Enemy, bounded +obj.createentity(game, 240, 168, 1, 1, 5, 72, 120, 256, 200); // Enemy, bounded +obj.createentity(game, 72, 168, 1, 1, 5, 72, 120, 256, 200); // Enemy, bounded +obj.createentity(game, 0, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 256, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 32, 3,10); //Disappearing Platform +obj.createentity(game, 96, 32, 3,10); //Disappearing Platform +obj.createentity(game, 192, 32, 3,10); //Disappearing Platform +obj.createentity(game, 224, 32, 3,10); //Disappearing Platform +roomname = "You Chose... Poorly"; +break; + +case rn(53,49): + +tmap.push("107,107,107,107,107,107,107,107,229,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,227,107,107,107,107,107,107,107,107"); +tmap.push("268,268,268,268,268,268,268,268,269,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,267,268,268,268,268,268,268,268,268"); +tmap.push("9,9,9,9,9,9,9,9,9,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,9,9,9,9,9,9,9,9,9"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,227,107,107,107,107,107,107,229,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,267,268,268,268,268,268,268,269,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,849,850,850,850,850,850,850,850,850,850,850,850,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); +tmap.push("188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); + +obj.createentity(game, 0, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 64, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 192, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 256, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 152, 120, 10, 0, 449530); // (savepoint) +obj.createentity(game, 0, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 256, 112, 2, 10, 4); //Big Threadmill, >>>>>> +roomname = "Hyperspace Bypass 5"; +break; + +case rn(54,49): + +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,763,764,764,764,764,764,764,764,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,173,173,174,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,214,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,253,253,254,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,0,0,0,0,843,844,844,844,844,844,844,844,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,173,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,214,8,8,8,8,8,8,8,8,8,8,8,8,212,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + +obj.platformtile = 319; +obj.createentity(game, 0, 104, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 64, 104, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 0, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 112, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 136, 104, 2, 0, 5, 136, 88, 200, 152); // Platform, bounded +obj.createentity(game, 168, 104, 2, 0, 5, 136, 88, 200, 152); // Platform, bounded +obj.createentity(game, 80, 112, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 80, 104, 2, 9, 4); //Threadmill, <<< +roomname = "Plain Sailing from Here On"; +break; + + +case rn(54,48): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,643,644,644,645,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,775,776,777,0,0,775,776,777,0,0,775,776,777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,855,856,857,0,0,855,856,857,0,0,855,856,857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,775,776,777,0,0,775,776,777,0,0,775,776,777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,525,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,855,856,857,0,0,855,856,857,0,0,855,856,857,0,0,0,0,0,0,0,0,0,0,0,643,644,644,644,485,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,775,776,777,0,0,775,776,777,0,0,775,776,777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("0,0,0,0,0,0,0,0,815,695,817,0,0,815,695,817,0,0,815,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("8,8,8,0,0,0,0,0,855,856,857,0,0,855,856,857,0,0,855,856,857,0,0,0,0,8,8,8,8,8,8,8,0,0,0,0,603,483,483,483"); +tmap.push("564,564,565,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,563,564,564,564,564,564,565,0,0,0,0,603,483,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,484,644,644,644,645,0,0,0,0,603,483,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("483,483,605,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,603,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("483,483,524,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,525,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,0,0,0,0,0,0,0,0,603,483,483,483"); + +obj.platformtile = 10; +obj.createentity(game, 264, 128, 10, 0, 448540); // (savepoint) +obj.createentity(game, 192, 32, 3, 10); //Disappearing Platform +obj.createentity(game, 32, 176, 2, 3, 4); // Platform +obj.createentity(game, 256, 120, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 224, 184, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 0, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 16, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 104, 24, 10, 0, 448541); // (savepoint) +roomname = "Ha Ha Ha Not Really"; +break; + + +case rn(53,48): + +tmap.push("510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510"); +tmap.push("671,671,671,671,671,671,671,671,671,671,512,511,671,671,671,671,671,671,671,671,671,671,671,671,671,671,512,511,671,671,671,671,671,671,671,671,671,671,671,671"); +tmap.push("9,9,9,9,9,9,9,9,9,9,630,632,9,9,9,9,9,9,9,9,9,9,9,9,9,9,630,632,9,9,9,9,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,670,672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,670,672,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,590,592,0,0,0,0,0,0,0,0,0,0,0,0,0,0,590,592,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,630,632,8,8,8,8,8,8,8,8,8,8,8,8,8,8,630,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,590,591,591,591,591,591,591,591,591,591,591,591,552,551,591,591,591,591,591,591,591,591,591,591,591,591,591,591,552,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,630,510,511,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,671,512,510,510,510,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,9,9,9,9,9,9,0,0,0,0,0,0,0,0,630,510,510,510,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,630,510,632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,630,510,510,510,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,630,510,632,0,0,0,0,778,779,779,779,779,779,779,779,779,779,779,779,779,780,0,0,0,0,630,510,510,510,632,0,0,0,0"); +tmap.push("0,0,0,0,0,0,630,510,632,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,630,510,510,510,632,8,8,8,8"); +tmap.push("0,0,0,0,0,0,630,510,632,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,630,510,510,510,551,591,591,591,591"); +tmap.push("0,0,0,0,0,0,630,510,632,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); +tmap.push("0,0,0,0,590,591,552,510,632,0,0,0,0,818,698,698,0,0,0,0,0,0,0,0,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); +tmap.push("0,0,0,0,630,510,510,510,632,0,0,0,0,818,698,698,590,591,591,591,591,591,591,592,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); +tmap.push("8,8,8,8,630,510,510,510,632,0,0,0,0,818,698,698,630,510,510,510,510,510,510,632,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); +tmap.push("591,591,591,591,552,510,510,510,632,0,0,0,0,818,698,698,630,510,510,510,510,510,510,632,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); +tmap.push("510,510,510,510,510,510,510,510,632,0,0,0,0,818,698,698,630,510,510,510,510,510,510,632,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); +tmap.push("510,510,510,510,510,510,510,510,632,0,0,0,0,818,698,698,630,510,510,510,510,510,510,632,698,698,820,0,0,0,0,630,510,510,510,510,510,510,510,510"); + +obj.platformtile = 279; +obj.createentity(game, 32, 168, 9, 3); // (shiny trinket) +obj.createentity(game, 16, 112, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 0, 112, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 0, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 256, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 96, 32, 2, 3, 4); // Platform +obj.createentity(game, 240, 88, 2, 2, 4); // Platform +obj.createentity(game, 128, 184, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 152, 168, 10, 1, 448530); // (savepoint) +obj.createentity(game, 72, 128, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 184, 128, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 48, 104, 2, 10, 4); //Big Threadmill, >>>>>> + +roomname="You Just Keep Coming Back"; +break; + +case rn(52,48): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("450,450,450,450,291,289,289,289,290,450,450,450,450,450,450,450,450,450,291,289,289,290,450,450,450,450,450,450,450,450,450,291,289,289,289,290,450,450,450,450"); +tmap.push("9,9,9,9,409,289,289,289,411,7,7,7,7,7,7,7,7,7,409,289,289,411,7,7,7,7,7,7,7,7,7,409,289,289,289,411,9,9,9,9"); +tmap.push("0,0,0,0,449,450,450,450,451,680,680,680,680,680,680,680,680,680,409,289,289,411,680,680,680,680,680,680,680,680,680,449,450,450,450,451,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,449,450,450,451,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,7,7,7,7,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,369,370,370,371,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,369,370,370,371,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,409,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,411,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,449,450,450,451,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,449,450,450,451,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,6,6,6,6,6,6,6,6,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,369,370,370,370,370,370,370,371,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,411,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0"); +tmap.push("0,0,369,370,370,370,370,370,371,680,680,680,680,680,680,680,409,289,289,289,289,289,289,411,680,680,680,680,680,680,680,369,370,370,370,370,370,371,0,0"); +tmap.push("8,8,409,289,289,289,289,289,411,6,6,6,6,6,6,6,409,289,289,289,289,289,289,411,6,6,6,6,6,6,6,409,289,289,289,289,289,411,8,8"); +tmap.push("370,370,331,289,289,289,289,289,330,370,370,370,370,370,370,370,331,289,289,289,289,289,289,330,370,370,370,370,370,370,370,331,289,289,289,289,289,330,370,370"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + +obj.platformtile = 359; +obj.createentity(game, 256, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 256, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 0, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 0, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 120, 104, 2, 0, 4, 96, 64, 224, 160); // Platform, bounded +obj.createentity(game, 168, 80, 2, 0, 4, 96, 64, 224, 160); // Platform, bounded +obj.createentity(game, 72, 64, 10, 1, 448520); // (savepoint) +obj.createentity(game, 232, 64, 10, 1, 448521); // (savepoint) +obj.createentity(game, 232, 144, 10, 0, 448522); // (savepoint) +obj.createentity(game, 72, 144, 10, 0, 448523); // (savepoint) +roomname = "Gordian Knot"; +break; + + +case rn(51,48): + +tmap.push("313,313,313,313,313,313,313,435,0,0,0,0,433,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313"); +tmap.push("313,313,313,313,313,313,313,435,0,0,0,0,433,313,313,313,313,313,313,313,313,313,313,313,313,313,313,314,474,474,474,474,474,474,474,474,474,474,474,474"); +tmap.push("313,313,313,313,313,313,313,435,770,770,771,0,433,313,313,313,313,313,313,313,313,313,313,313,313,313,313,435,9,9,9,9,9,9,9,9,9,9,9,9"); +tmap.push("313,313,313,313,313,313,313,435,689,689,811,0,433,313,313,313,313,313,313,313,313,313,313,313,313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,314,474,474,474,475,689,689,811,0,473,474,474,474,474,474,474,474,474,474,474,474,474,474,474,475,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,0,0,0,0,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,393,394,394,394,394,394,394,395,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,473,474,474,474,474,474,474,475,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,850,850,850,850,850,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,354,394,394,394,394,394,395,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,313,313,313,313,313,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("313,313,313,313,313,313,313,313,313,435,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); +tmap.push("313,313,313,313,313,313,313,313,313,354,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394"); +tmap.push("313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313"); +tmap.push("313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313"); + +obj.createentity(game, 256, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 192, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 64, 112, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 256, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 96, 40, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 160, 40, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 32, 40, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 72, 80, 10, 1, 448510); // (savepoint) +obj.createentity(game, 104, 128, 1, 0, 5, 104, 120, 288, 200); // Enemy, bounded +obj.createentity(game, 160+8, 168, 1, 1, 5, 104, 120, 288, 200); // Enemy, bounded +obj.createentity(game, 216+16, 128, 1, 0, 5, 104, 120, 288, 200); // Enemy, bounded + +roomname = "Backsliders"; +break; + +case rn(51,47): + +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,777,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283"); +tmap.push("283,284,444,444,444,444,444,444,444,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,284,444,444,444,444"); +tmap.push("283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,443,445,695,817,0,0"); +tmap.push("283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0"); +tmap.push("283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0"); +tmap.push("283,405,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,363,365,695,817,0,0"); +tmap.push("283,324,364,364,364,364,364,364,364,364,364,365,695,695,695,695,363,364,364,364,364,364,364,364,364,364,364,364,364,365,695,695,695,695,403,324,364,364,364,364"); +tmap.push("283,283,283,283,283,283,283,284,444,444,444,445,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,443,444,444,444,444,444"); +tmap.push("283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,695,403,283,283,283,283,283,283,283,283,283,283,283,283,405,695,695,695,695,695,695,695,817,0,0"); +tmap.push("283,283,283,283,283,283,283,405,856,856,856,856,856,856,856,856,403,283,283,283,283,283,283,283,283,283,283,283,283,405,856,856,856,856,856,856,856,857,0,0"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,363,364,364,364,325,283,283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364"); +tmap.push("283,283,283,283,283,283,283,405,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.createentity(game, 72, 184, 10, 0, 447510); // (savepoint) +obj.createentity(game, 80, 128, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 144, 128, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 208, 128, 2, 10, 4); //Big Threadmill, >>>>>> + +obj.createentity(game, 24 - 8, 144 - 8, 1, 10, 0); // Enemy + +obj.createentity(game, 24 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 8 + (117 * 3), 144 - 8, 1, 10, 1); // Enemy + +//LIES emitter starts here +roomname = "The Cuckoo"; +break; + +case rn(52,47): + +tmap.push("310,311,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,312,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("310,432,0,0,0,0,0,0,772,773,773,773,773,773,773,773,773,773,773,773,430,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("310,432,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,430,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("471,472,0,0,0,390,391,391,391,391,391,391,391,391,391,391,392,692,692,692,430,310,310,310,310,310,310,432,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,430,311,471,471,471,471,471,471,471,471,312,432,692,692,692,430,310,310,311,471,471,471,472,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,430,432,0,812,692,692,692,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,430,432,0,812,692,692,692,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,430,432,0,812,692,692,692,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("391,391,391,391,391,352,432,0,812,692,692,692,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,432,0,812,692,390,392,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,432,0,812,692,430,432,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,432,0,812,692,430,432,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,432,0,812,692,430,432,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,0,0,0,0,430,432,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,432,0,812,692,430,432,692,692,692,430,432,692,692,692,430,310,310,432,692,814,0,0,390,391,391,391,352,432,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,432,0,852,853,430,432,853,853,853,430,432,853,853,853,430,310,310,432,853,854,0,0,430,310,310,310,310,432,0,0,0,0,0,0"); +tmap.push("471,471,471,471,471,312,432,0,0,0,430,432,0,0,0,430,432,0,0,0,470,312,311,472,0,0,0,0,470,312,311,471,471,472,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,470,472,0,0,0,470,472,0,0,0,470,472,0,0,0,0,470,472,0,0,0,0,0,0,470,472,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,390,392,0,0,0,390,392,0,0,0,390,392,0,0,0,0,390,392,0,0,0,0,0,0,390,392,0,0,0,0,0,0,0,0,0"); +tmap.push("391,391,391,391,391,352,432,0,0,0,430,432,0,0,0,430,432,0,0,0,390,352,351,392,0,0,0,0,390,352,351,391,391,392,0,0,0,0,0,0"); +tmap.push("471,471,471,471,471,471,472,0,0,0,430,432,0,0,0,470,472,0,0,0,430,310,310,432,0,0,0,0,470,471,471,471,471,472,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,430,310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,430,310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,430,310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,430,310,310,432,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8"); +tmap.push("391,391,391,391,391,391,391,391,391,391,352,351,391,391,391,391,391,391,391,391,352,310,310,351,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391"); +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + +obj.createentity(game, 8, 200, 10, 1, 447520); // (savepoint) +obj.createentity(game, 200, 192, 9, 4); // (shiny trinket) +obj.createentity(game, 232, 96, 10, 1, 447521); // (savepoint) + +obj.createentity(game, 24 - 60 - 8, 144 - 8, 1, 10, 0); // Enemy + +obj.createentity(game, 24 - 60 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 60 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 60 - 8 + (117 * 3), 144 - 8, 1, 10, 1); // Enemy +//LIES Emitter, manually positioned +roomname = "Clarion Call"; +break; + +case rn(51,46): + +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,111,271,272,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,232,686,686,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,232,686,686,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,232,686,686,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,232,686,686,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,151,191,192,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,270,271,271,271,271,271,271,271,271,271,271,271,271,112,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,232,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,151,191,191,191,191,191,191,191,191,191,191,191,191,191,192,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); +tmap.push("110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,232,0,0,0,0,230,110,110,110,110,110,110,110,110,110,110,110,110,110,110"); + +obj.createentity(game, 176, 104, 10, 0, 446510); // (savepoint) + +obj.createentity(game, 7 * 8, 17 * 8, 1, 12, 0); // Enemy + +obj.createentity(game, 7*8, 2*8, 1, 12, 1); // Enemy +//FACTORY emitter starts here +roomname = "The Solution is Dilution"; +break; + +case rn(51,45): + +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,252,253,94,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,172,173,134,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,252,253,253,253,253,253,253,253,253,253,253,253,253,253,253"); +tmap.push("92,92,92,92,93,253,254,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173"); +tmap.push("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,133,173,174,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,252,253,94,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,172,173,134,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,214,683,683,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + +obj.createentity(game, 96, 168, 10, 0, 445510); // (savepoint) + +obj.createentity(game, 7 * 8, 36 * 8, 1, 12, 0); // Enemy + +obj.createentity(game, 7 * 8, (36 * 8)-108, 1, 12, 1); // Enemy +obj.createentity(game, 7 * 8, (36 * 8)-216, 1, 12, 1); // Enemy +//FACTORY emitter starts here (manually placed) + +roomname = "Lighter Than Air"; +break; + + +case rn(51,44): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,453,453,453,453,453,453,453,294,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,454,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,454,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,454,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,412,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,701,701,701,823,0,0,0,372,334,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292"); +tmap.push("292,292,292,292,293,453,454,701,701,701,701,701,701,701,701,823,0,0,372,334,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292"); +tmap.push("292,292,292,292,414,701,701,701,701,701,701,701,372,373,373,373,373,373,334,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,412,292,292"); +tmap.push("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,454,0,0,0,412,292,292"); +tmap.push("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,414,701,701,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292"); +tmap.push("292,292,292,292,333,373,374,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,373,334,292,292"); +tmap.push("292,292,292,292,292,292,414,701,701,701,701,701,412,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + +obj.createentity(game, 224, 200, 10, 1, 444510); // (savepoint) + +obj.createentity(game, 56, 40, 1, 0, 2); // Enemy //collector + +obj.createentity(game, 7 * 8, 36 * 8, 1, 12, 0); // Enemy + +obj.createentity(game, 7 * 8, (36 * 8)-108, 1, 12, 1); // Enemy +obj.createentity(game, 7 * 8, (36 * 8)-216, 1, 12, 1); // Enemy +//FACTORY emitter starts here (manually placed) + +if(!game.intimetrial){ + obj.createentity(game, 18 * 8, (5 * 8) + 4, 14); //Teleporter! +} +roomname = "Level Complete!"; +break; + +//Ok! Big open area is here: +case rn(52,45): + +tmap.push("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,287,447,448,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,408,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,408,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,366,367,367"); +tmap.push("286,286,408,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,446,447,447"); +tmap.push("286,286,408,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("447,447,448,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,727,767,767,767,767,767,767,767,767,767,767,767,767,767,767,767,768,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,808,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,808,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,808,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,366,368,686,686,686,686,808,0,0,0"); +tmap.push("367,367,367,367,368,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,408,686,686,686,686,808,0,0,0"); +tmap.push("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,327,367,368,686,686,808,0,0,0"); +tmap.push("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,408,686,686,808,0,0,0"); +tmap.push("286,286,286,286,408,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,366,367,328,286,286,408,686,686,808,0,0,0"); +tmap.push("286,286,286,286,327,367,368,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,408,686,686,808,0,0,0"); +tmap.push("286,286,286,286,286,286,408,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,327,367,368,808,0,0,0"); +tmap.push("286,286,286,286,286,286,408,0,0,0,806,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,286,286,408,808,0,0,0"); +tmap.push("286,286,286,286,286,286,327,367,367,367,367,367,367,368,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,286,286,408,808,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,408,686,686,686,686,686,686,686,686,686,686,686,686,686,686,406,286,286,286,286,286,286,408,808,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,367,367,367,367,367,367,367,367,368,686,686,686,686,406,286,286,286,286,286,286,408,808,0,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,686,686,686,686,406,286,286,286,286,286,286,327,367,368,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,367,367,367,328,286,286,286,286,286,286,286,286,408,0,0"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,367"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +roomname = "Green Grotto"; +break; + +case rn(52,44): + +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,0,0,218,98,98,98,98"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,258,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0,0,0,0,0,218,98,98,98,98"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,99,259,259"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,220,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,220,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,220,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,218,98,220,0,0"); +tmap.push("98,98,98,98,139,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,140,98,220,0,0"); +tmap.push("98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0"); +tmap.push("98,98,98,98,99,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,260,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,99,260,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,178,179,179,179,179,179,179,179,180,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,258,259,259,259,259,259,259,259,260,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,681,841,841,841,841,841,841,842,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,220,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,139,180,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,178,179,179,179,179,179,180,0,0,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,258,259,259,259,259,259,260,0,0,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("98,98,98,98,220,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 248 - 4, 160 - 48, 1, 1, 0); // Enemy +obj.createentity(game, 124, 120, 20, 1); // (terminal) +obj.createblock(5, 124-4, 120, 20, 16, 14); + +obj.createentity(game, 156, 40, 20, 1); // (terminal) +obj.createblock(5, 156-4, 40, 20, 16, 15); + +roomname = "The Hanged Man, Reversed"; +break; + +case rn(53,45): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370"); +tmap.push("450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,330,370,371,0,0,0,0,369,370,331,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); + +obj.createentity(game, 152, 120, 10, 0, 445530); // (savepoint) +roomname = "doomS"; +break; + +case rn(53,47): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,249,91,90,251,0,0,0,0,0,0,0,0,249,91,90,251,0,0,0,0,0,0,0,0,249,91,90,251,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,249,251,0,0,0,0,0,0,0,0,0,0,249,251,0,0,0,0,0,0,0,0,0,0,249,251,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,169,171,0,0,0,0,0,0,0,0,0,0,169,171,0,0,0,0,0,0,0,0,0,0,169,171,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,169,131,130,171,0,0,0,0,0,0,0,0,169,131,130,171,0,0,0,0,0,0,0,0,169,131,130,171,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0,0,0,209,89,89,211,0,0,0,0,0,0"); +tmap.push("8,8,8,8,8,8,209,89,89,211,8,8,8,8,8,8,8,8,209,89,89,211,8,8,8,8,8,8,8,8,209,89,89,211,8,8,8,8,8,8"); +tmap.push("170,170,170,170,170,170,131,89,89,130,170,170,170,170,170,170,170,170,131,89,89,130,170,170,170,170,170,170,170,170,131,89,89,130,170,170,170,170,170,170"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + +obj.createentity(game, 24-60-8, 144-8, 1, 10, 0); // Enemy +//LIES Emitter, manually positioned + +obj.createentity(game, 24 - 60 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 60 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 60 - 8 + (117 * 3), 144 - 8, 1, 10, 1); // Enemy + +roomname = "Chinese Rooms"; +break; + +case rn(53,46): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,290,450,451,0,0,0,0,449,450,291,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("370,370,370,370,370,370,370,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,369,370,370,370,370,370,370,370"); +tmap.push("450,450,450,450,450,450,450,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,449,450,450,450,450,450,450,450"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 152, 96, 10, 1, 446530); // (savepoint) +roomname = "Swoop"; +break; + +case rn(52,46): + +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107"); +tmap.push("107,107,108,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,187,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,189,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,267,268,268,268,268,268,268,268,268,268,268,268,109,107,107,108,268,268,268,268,268,268,268,268,268,109,229,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,9,9,9,9,9,9,9,9,9,9,9,9,227,107,107,229,9,9,9,9,9,9,9,9,9,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,267,268,268,269,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,0,0,0,0,0,0,0,0,0,187,188,188,189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,229,0,0,0,0,0,0,0,0,0,227,107,107,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,227,148,188,188,188,188,188,188"); +tmap.push("107,107,229,8,8,8,8,8,8,8,8,8,227,107,107,229,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,227,108,268,268,268,268,268,268"); +tmap.push("107,107,148,188,188,188,188,188,188,188,188,188,149,107,107,148,188,188,188,188,188,188,188,188,188,188,188,189,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); +tmap.push("107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,229,0,0,0,0,227,229,0,0,0,0,0,0"); + +obj.createentity(game, 64, 40, 10, 1, 446520); // (savepoint) +obj.createentity(game, 208, 88, 3, 827); //Disappearing Platform +obj.createentity(game, 152, 160, 3, 827); //Disappearing Platform +obj.createentity(game, 96, 88, 3, 827); //Disappearing Platform +obj.createentity(game, 40, 160, 3, 827); //Disappearing Platform +roomname = "Manic Mine"; +break; + + +case rn(53,44): + +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,91,89,211,0,0,0,0,0,0,0,0,0,0,209,89,90,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,8,8,0,0,0,0,0,0,8,8,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,210,210,0,0,0,0,0,0,210,210,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,9,9,0,0,0,0,0,0,9,9,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,8,8,0,0,0,0,8,8,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,210,210,0,0,0,0,210,210,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,9,9,0,0,0,0,9,9,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,209,89,211,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,775,776,776,776,209,89,211,776,776,776,776,776,776,776,776,776,776,209,89,211,776,776,776,777,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,209,89,211,695,695,695,695,695,695,695,695,695,695,209,89,211,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,209,89,211,695,695,695,695,695,695,695,695,695,695,209,89,211,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,209,89,211,695,695,695,695,695,695,695,695,695,695,209,89,211,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,209,89,130,170,170,170,170,170,170,170,170,170,170,131,89,211,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,249,250,91,89,89,89,89,89,89,89,89,89,89,90,250,251,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,695,695,249,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +roomname = "Sorrow"; +break; + + +case rn(54,45): + +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,473,474,474,474,474,474,474,315,313,313,313,313,313,313,313,313,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,433,313,313,313,313,313,313,313,313,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,473,474,474,474,474,474,474,474,315,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,0,0,0,0,0,0,0,0,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("394,394,394,394,394,355,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("474,474,474,474,474,315,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,689,689,689,0,0,0,0,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,354,394,394,394,394,394,394,394,395,689,689,689,393,394,394,395,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,314,474,474,474,474,474,474,474,475,689,689,689,473,474,474,475,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,689,689,689,0,0,0,0,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,0,0,0,0,0,689,689,689,0,0,0,0,0,0,0,433,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,393,394,394,394,395,689,689,689,393,394,394,394,394,394,394,355,313,435,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,473,474,474,474,475,689,689,689,473,474,474,474,474,474,474,474,474,475,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,0,0,0,0,0,689,689,689,0,0,0,0,0,0,0,0,0,0,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,849,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,851,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,433,313,313,313,313"); +tmap.push("0,0,0,0,0,433,313,435,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,433,313,313,313,313"); +tmap.push("394,394,394,394,394,355,313,354,394,394,394,394,394,394,394,394,395,0,0,0,0,0,0,0,0,0,0,393,394,394,394,394,394,394,394,355,313,313,313,313"); +tmap.push("313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,435,0,0,0,0,0,0,0,0,0,0,433,313,313,313,313,313,313,313,313,313,313,313,313"); +tmap.push("313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,354,394,394,394,394,394,394,394,394,394,394,355,313,313,313,313,313,313,313,313,313,313,313,313"); + +obj.createentity(game, 144-4, 208, 1, 1, 6); // Enemy +obj.createentity(game, 128+4, 8, 1, 0, 6); // Enemy +obj.createentity(game, 64, 200, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 216, 200, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 96, 160, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 160, 160, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 208, 160, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 248, 184, 10, 1, 445540); // (savepoint) +obj.createentity(game, 184, 24, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 64, 64, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 152, 64, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 152, 88, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 64, 88, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 96, 136, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 160, 136, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 184, 136, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 152, 24, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 104, 200, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 104, 136, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 104, 160, 2, 9, 4); //Threadmill, <<< + +roomname = "$eeing Dollar $ign$"; +break; + +case rn(54,44): + +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,87,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("247,247,247,247,247,88,86,86,86,86,86,86,86,86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,246,247,247,247,88,86,86,86,86,86,86,86,86,208,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,698,246,247,247,247,88,86,86,86,86,208,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,699,859,859,859,859,246,247,88,86,86,208,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,820,0,0,0,0,0,0,246,88,86,208,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,820,0,778,779,779,779,779,779,206,86,208,698,698,698,698,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,820,0,818,699,859,859,859,859,206,86,208,698,698,698,698,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); +tmap.push("0,0,0,818,698,820,0,818,820,0,818,820,0,0,0,0,206,86,208,698,698,698,698,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,818,698,820,0,818,820,0,818,820,0,778,780,0,206,86,208,698,698,698,698,206,86,86,86,86,86,87,247,247,247,247,247,247,247,247,247,247"); +tmap.push("0,0,0,818,698,820,0,818,820,0,818,820,0,858,860,0,206,86,208,698,698,698,698,206,86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,820,0,818,820,0,0,0,0,206,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,820,0,818,739,779,779,779,779,206,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,820,0,858,859,859,859,859,166,128,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,820,0,0,0,0,166,167,128,86,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,820,0,818,698,166,167,167,167,128,86,86,86,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,0,0,0,0,0"); +tmap.push("0,0,0,818,698,166,167,167,167,128,86,86,86,86,86,86,86,86,208,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,166,167,167,167,167"); +tmap.push("0,0,0,818,698,206,86,87,247,247,247,247,247,247,247,247,247,247,248,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,818,698,206,86,208,0,0,0,0,0,0,0,0,0,0,0,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,858,859,206,86,208,859,859,700,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,0,0,206,86,208,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,0,0,206,86,208,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,0,0,206,86,208,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,0,0,206,86,208,0,0,818,698,0,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,0,0,206,86,208,0,0,818,698,166,167,167,167,167,167,167,167,167,167,167,128,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,0,0,206,86,208,0,0,818,698,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,0,0,206,86,208,0,0,818,698,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); +tmap.push("0,0,0,0,0,206,86,208,0,0,818,698,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,820,0,0,206,86,86,86,86"); + +obj.createentity(game, 184, 56, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 248, 56, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 312, 56, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 152, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 216, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 280, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 280, 128, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 272, 88, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 64, 152, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 120, 152, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 96, 192, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 152, 192, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 240, 88, 2, 9, 4); //Threadmill, <<< +roomname = "Parabolica"; +break; + +case rn(54,47): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0"); +tmap.push("0,0,0,0,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,0,0,0,0"); +tmap.push("0,0,0,0,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,779,780,0,0"); +tmap.push("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); +tmap.push("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); +tmap.push("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); +tmap.push("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); +tmap.push("0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0"); +tmap.push("0,0,0,0,0,0,0,858,859,859,859,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,206,86,86,87,247,247,247,247,247,247,247,247,247,247,88,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,87,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,246,247,247,248,0,0,0,0,0,0,0,0,0,0,246,247,247,248,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0"); +tmap.push("0,0,0,0,166,167,167,168,0,0,0,0,0,0,0,0,0,0,166,167,167,168,0,0,0,0,0,0,0,0,0,0,166,167,167,168,0,0,0,0"); +tmap.push("0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0"); +tmap.push("0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,208,0,0,0,0"); +tmap.push("0,0,0,0,206,86,86,127,167,167,167,167,167,167,167,167,167,167,128,86,86,127,167,167,167,167,167,167,167,167,167,167,128,86,86,127,167,167,167,167"); +tmap.push("0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("8,8,8,8,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("167,167,167,167,128,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + +obj.createentity(game, 96, 80, 10, 1, 447540); // (savepoint) +obj.createentity(game, 64, 184, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 112, 184, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 176, 184, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 224, 184, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 232, 128, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 288, 128, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 288, 184, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 120, 112, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 168, 112, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 208, 168, 10, 1, 447541); // (savepoint) + +obj.createentity(game, 24 - 60 - 8, 144 - 8, 1, 10, 0); // Enemy + +obj.createentity(game, 24 - 60 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 60 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 60 - 8 + (117 * 3), 144 - 8, 1, 10, 1); // Enemy + +//LIES Emitter, manually positioned +roomname = "Spikes Do!"; +break; + +case rn(54,46): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,1125,9,9,9,9,9"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,840,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,842,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("576,576,576,576,576,576,576,576,576,576,577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("656,656,656,656,656,656,656,656,656,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 64, 152, 10, 1, 446540); // (savepoint) +obj.createentity(game, 120, 72, 3, 707); //Disappearing Platform +obj.createentity(game, 248, 72, 3, 707); //Disappearing Platform +obj.createentity(game, 184, 200, 3, 707); //Disappearing Platform +roomname = "What Lies Beneath?"; +break; + +case rn(55,47): + +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,209,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,249,250,250,250,250,250,250,91,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); +tmap.push("0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89"); +tmap.push("0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,170,170,131,89"); +tmap.push("0,0,0,0,0,0,0,0,169,170,170,170,170,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89"); +tmap.push("170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + +obj.createentity(game, 0, 128, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 128, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 112, 128, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 0, 184, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 184, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 184, 184, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 152, 168, 10, 1, 447550); // (savepoint) + +obj.createentity(game, 264, 136, 1, 0, 2); // Enemy //Collector +obj.createentity(game, 24 - 60 - 8, 144 - 8, 1, 10, 0); // Enemy +obj.createentity(game, 24 - 60 - 8 + 117, 144 - 8, 1, 10, 1); // Enemy +obj.createentity(game, 24 - 60 - 8 + (117 * 2), 144 - 8, 1, 10, 1); // Enemy +//LIES Emitter, manually positioned, collector! +roomname = "Chipper Cipher"; +break; + +case rn(55,46): + +tmap.push("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,683,683,683,683,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,683,683,683,683,664,506,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,683,683,683,683,683,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,844,844,844,844,844,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504,626,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("665,665,665,665,665,665,665,665,665,665,665,665,665,665,665,506,504,626,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,624,504,626,0,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,0,624,504,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,624,504,626,0,0,0,0,0,0,0,0,0,664,506,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,763,764,764,764,764,764,764,764,624,504,626,764,764,764,764,764,764,764,765,0,0,624,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,624,504,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,664,506,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,624,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,624,504,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,664,506,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,624,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,624,504,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,664,506,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,0,624,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,0,624,504,504,504,504,504,504,504,504"); +tmap.push("0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,624,504,626,683,683,683,683,683,683,683,805,0,0,0,0,0,624,504,504,504,504,504,504,504,504"); + +obj.createentity(game, 40, 72, 3, 787); //Disappearing Platform +roomname = "If You Fall Up"; +break; + +case rn(55,45): + +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,618,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,499,659,659,659,659,659,500,498,499,659,659,659,659,659,500,498,498,620,0,0,0,0,618,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,620,0,0,0,0,618,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,620,0,0,0,0,618,498"); +tmap.push("498,498,499,659,659,659,659,500,498,498,498,498,498,498,498,498,620,0,0,0,0,0,658,659,660,0,0,0,0,0,618,498,498,620,0,0,0,0,618,498"); +tmap.push("498,498,620,9,9,9,9,658,659,659,659,659,659,500,498,498,620,0,0,0,0,0,9,9,9,0,0,0,0,0,618,498,498,620,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,9,9,9,9,9,9,658,659,659,660,0,0,0,0,0,0,0,0,0,0,0,0,0,658,659,659,660,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,578,579,580,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0,0,618,498,620,0,0,0,0,0,8,8,8,8,8,8,8,8,618,498"); +tmap.push("498,498,620,0,0,0,0,8,8,8,8,8,8,578,579,579,580,0,0,0,0,0,618,498,620,0,0,0,0,0,578,579,579,579,579,579,579,579,540,498"); +tmap.push("498,498,620,0,0,0,0,578,579,579,579,579,579,540,498,498,620,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,539,579,579,579,579,579,540,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,658,659,659,659,659,659,659,659,659,659,659,659,659,659,659,500,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,498,620,0,0,0,0,0,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,775,776,776,776,776,776,776,776,776,776,618,498,620,776,776,776,776,776,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,618,498,620,695,695,695,695,695,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,620,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,618,498,620,695,695,695,695,695,618,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,539,579,579,579,579,579,579,579,579,579,579,579,579,579,579,580,695,695,695,695,618,498,539,579,579,579,579,579,540,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,695,695,695,695,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); +tmap.push("498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,620,695,695,695,695,618,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498"); + +obj.platformtile = 159; +obj.createentity(game, 24, 80, 2, 3, 6); // Platform +obj.createentity(game, 64, 176, 10, 0, 445550); // (savepoint) +obj.createentity(game, 216 - 4, 192, 10, 1, 445551); // (savepoint) +roomname = "Just Pick Yourself Down"; +break; + + +case rn(55,44): + +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,288,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286"); +tmap.push("367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,368,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,406,286"); + +obj.createentity(game, 32, 40, 10, 1, 444560); // (savepoint) +obj.createentity(game, 56, 24, 10, 0, 444551); // (savepoint) +obj.createentity(game, 80, 40, 10, 1, 444552); // (savepoint) +obj.createentity(game, 104, 24, 10, 0, 444553); // (savepoint) +obj.createentity(game, 128, 40, 10, 1, 444554); // (savepoint) +obj.createentity(game, 152, 24, 10, 0, 444555); // (savepoint) +obj.createentity(game, 176, 40, 10, 1, 444556); // (savepoint) +obj.createentity(game, 200, 24, 10, 0, 444557); // (savepoint) +obj.createentity(game, 224, 40, 10, 1, 444558); // (savepoint) +obj.createentity(game, 248, 24, 10, 0, 444559); // (savepoint) +obj.createentity(game, 272, 40, 10, 1, 444550); // (savepoint) +obj.createentity(game, 0, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 256, 16, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 0, 56, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 64, 56, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 128, 56, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 192, 56, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 256, 56, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 0, 88, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 64, 88, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 88, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 192, 88, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 240, 88, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 0, 128, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 64, 128, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 128, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 192, 128, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 240, 128, 2, 9, 4); //Threadmill, <<< +roomname = "The Warning"; +break; + +//Super driller starts here! +case rn(56,44): + +tmap.push("298,298,298,298,298,298,298,420,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("459,459,459,459,459,459,459,460,0,0,0,0,418,298,298,298,298,298,298,298,298,299,459,459,459,459,300,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,420,9,9,9,9,418,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,420,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,420,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,299,459,460,0,0,0,0,458,459,300,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,420,9,9,0,0,0,0,9,9,418,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,420,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("379,379,379,379,379,380,0,0,0,0,0,0,418,298,298,298,298,298,298,420,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,298,298,299,459,460,0,0,0,0,0,0,0,0,458,459,300,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,298,298,420,9,9,0,0,0,0,0,0,0,0,9,9,418,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,420,0,0,378,379,379,379,340,298,298,298,298,420,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,420,0,0,458,459,459,459,300,298,298,298,298,420,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,299,459,460,0,0,0,0,0,0,0,0,0,0,0,0,458,459,300,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,420,9,9,0,0,0,0,0,0,0,0,0,0,0,0,9,9,418,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,420,0,0,0,0,0,0,418,298,298,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,339,379,379,379,380,0,0,418,298,298,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298,298,298"); +tmap.push("299,459,459,459,459,459,459,459,459,460,0,0,418,299,459,460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,458,459,300,298,298,298,298,298"); +tmap.push("420,0,0,0,0,0,0,0,0,0,0,0,418,420,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,418,298,298,298,298,298"); +tmap.push("420,49,0,0,0,0,0,0,0,0,0,0,418,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298"); +tmap.push("420,49,0,0,0,0,0,0,0,0,0,0,418,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,298,298,298,298,298"); +tmap.push("420,49,0,0,0,0,0,0,0,0,0,0,458,460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,458,459,300,298,298,298"); +tmap.push("420,49,0,0,0,0,50,378,379,379,379,380,9,9,0,0,0,0,0,0,0,8,8,8,8,8,8,0,0,0,0,0,0,0,9,9,418,298,298,298"); +tmap.push("420,49,0,0,0,0,50,418,298,298,298,420,0,0,0,0,0,0,0,0,50,378,379,379,379,379,380,49,0,0,0,0,0,0,0,0,418,298,298,298"); +tmap.push("420,49,0,0,0,0,50,418,298,298,298,420,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,418,298,298,298"); +tmap.push("420,49,0,0,0,0,50,418,298,299,459,460,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,458,459,300,298"); +tmap.push("420,49,0,0,0,0,50,418,298,420,9,9,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,9,9,418,298"); +tmap.push("420,49,0,0,0,0,50,418,298,420,0,0,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,0,0,418,298"); +tmap.push("420,49,0,0,0,0,50,418,298,420,0,0,0,0,0,0,0,0,0,0,50,418,298,298,298,298,420,49,0,0,0,0,0,0,0,0,0,0,418,298"); + +obj.createentity(game, 176, 80, 3, 55); //Disappearing Platform +obj.createentity(game, 0, 56, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 16, 56, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 72, 72, 10, 1, 444561); // (savepoint) +obj.createentity(game, 8, 144, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 48, 144, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 0, 16, 2, 10, 4); //Big Threadmill, >>>>>> + + +roomname = "Getting Here is Half the Fun"; +break; + +case rn(56,45): + +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,612,492,492,492,492,614,49,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,50,652,653,653,653,653,654,49,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492"); +tmap.push("614,49,0,0,0,0,50,612,614,8,8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,612,492"); +tmap.push("614,49,0,0,0,0,50,612,533,573,573,573,573,573,573,573,573,573,574,49,0,0,0,0,0,0,0,0,50,572,573,573,573,573,573,573,573,573,534,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,652,494,492,492,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,533,574,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,652,494,492,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,533,574,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,652,494,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,533,574,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,652,494,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,492,533,574,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492"); +tmap.push("614,49,0,0,0,0,50,612,492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,49,0,0,0,0,0,0,0,0,50,612,492,492,492,492,492,492"); + +roomname = "Your Bitter Tears... Delicious"; +break; + +case rn(56,46): + +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,86,86,86,86,87,248,49,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,87,248,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,166,168,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,208,49,0,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,127,168,8,0,0,0,0,0,0,50,206,208,49,0,0,0,0,0,0,50,206,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,127,168,8,0,0,0,0,0,50,206,127,168,8,0,0,0,0,8,166,128,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,127,168,8,0,0,0,0,50,206,86,127,168,0,0,0,0,166,128,86,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,127,168,0,0,0,0,50,206,86,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,208,0,0,0,0,50,206,86,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,208,0,0,0,0,50,206,86,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86"); +tmap.push("208,49,0,0,0,0,50,206,86,86,86,86,86,86,86,86,86,208,0,0,0,0,50,206,86,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86"); + +roomname = "Easy Mode Unlocked"; +break; + +case rn(56,47): + +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,0,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,50,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,217,8,8,8,8,215,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,136,176,176,176,176,137,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("217,49,0,0,0,0,50,215,95,95,95,95,95,95,95,95,95,217,49,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + +roomname = "Vici!"; +break; + +case rn(56,48): + +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,470,312,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,9,470,312,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,9,470,312,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,9,470,471,312,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,9,9,470,471,312,310,310,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,9,9,470,471,312,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,9,9,470,312,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,50,390,352,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,351,392,8,8,8,8,0,0,0,0,0,0,0,0,50,430,310,310,310,310,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,351,391,391,391,392,49,0,0,0,0,0,0,0,50,470,471,471,471,312,310,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,9,9,9,9,470,312,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,311,472,49,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,432,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,351,392,8,8,0,0,0,0,0,0,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,391,392,8,8,0,0,0,0,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,391,392,8,8,0,0,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,391,392,8,0,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,392,8,0,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,392,8,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,351,392,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,50,430,310,310"); +tmap.push("432,49,0,0,0,0,50,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,50,430,310,310"); + +roomname = "Vidi"; +break; + +case rn(56,49): + +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,220,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,98,99,259,259,259,259,259,259,259,259,260,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,99,260,9,9,9,9,9,9,9,9,9,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,178,140,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,50,178,179,179,179,179,179,140,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,50,258,100,98,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,99,260,49,0,0,0,0,0,0,0,0,0,0,0,50,258,100,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98"); +tmap.push("220,49,0,0,0,0,50,218,98,98,98,98,98,98,98,98,220,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,218,98,98,98,98,98,98,98"); + +roomname="Veni"; +break; + +case rn(56,50): + +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,50,209,89,89,89,89,89,89,89,89,211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,50,209,89,89,89,89,89,89,89"); +tmap.push("211,49,0,0,0,0,0,249,250,250,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,250,250,250,250,91,89,89"); +tmap.push("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("211,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("130,170,170,170,170,170,171,0,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,0,0,0,0,209,89,89"); +tmap.push("89,89,89,89,89,89,211,0,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,0,209,89,89"); +tmap.push("89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("89,89,89,89,89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89"); +tmap.push("89,89,89,89,89,89,211,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,169,170,170,170,170,170,170,170,131,89,89"); +tmap.push("89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89,89,89"); + +obj.createentity(game, 224, 144, 9, 5); // (shiny trinket) +obj.createentity(game, 96, 152, 10, 1, 450560); // (savepoint) + +obj.createentity(game, 24, 152, 20, 1); // (terminal) +obj.createblock(5, 24-4, 152, 20, 16, 16); +roomname = "Doing Things The Hard Way"; +break; + +//Final section: The overlap + +case rn(53,43): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,761,761,761,761,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,657,680,680,680,680,655,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495"); +tmap.push("495,495,495,617,9,9,9,9,9,9,9,9,9,9,1123,7,7,7,680,680,680,680,7,7,7,1125,9,9,9,9,9,9,9,9,9,9,9,9,615,495"); +tmap.push("656,656,656,657,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,655,656"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("576,576,576,576,576,576,576,576,576,577,8,8,8,8,1120,680,680,680,680,680,680,680,680,680,680,1122,8,8,8,8,575,576,576,576,576,576,576,576,576,576"); +tmap.push("495,495,495,495,495,495,495,495,495,536,576,576,576,576,577,680,680,680,680,680,680,680,680,680,680,575,576,576,576,576,537,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,6,6,6,6,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,575,576,576,577,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,655,656,656,657,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,7,7,7,7,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,841,841,841,841,841,841,841,841,841,841,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); + +obj.platformtile = 707; +obj.createentity(game, 272, 40, 2, 14, 2); // Platform +obj.createentity(game, 240, 40, 3, 707); //Disappearing Platform + +if(game.intimetrial && game.timetriallevel > 0) { + obj.fatal_top(); +} +roomname = "Exhaust Chute"; +break; + +case rn(56,43): + +tmap.push("301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("462,462,462,462,303,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("9,9,9,9,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("0,0,0,0,461,303,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("0,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,302,462,462,462,462,462,462,462,462,462,462,462,462,462,303,301,301,301,301,301"); +tmap.push("0,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,302,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,301,301"); +tmap.push("0,0,0,0,0,461,303,301,301,301,301,301,301,301,301,301,302,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,461,303,301,301,301,301"); +tmap.push("0,0,0,0,0,0,421,301,301,301,301,301,301,301,302,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,301"); +tmap.push("0,0,0,0,0,0,421,301,301,301,301,301,302,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,461,303,301,301,301"); +tmap.push("0,0,0,0,0,0,461,462,462,462,462,462,463,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301"); +tmap.push("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,461,303,301,301"); +tmap.push("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301"); +tmap.push("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301"); +tmap.push("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301"); +tmap.push("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301"); +tmap.push("0,0,0,0,0,0,0,0,824,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,381,343,301,301"); +tmap.push("382,382,382,382,382,382,382,382,382,382,382,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301"); +tmap.push("301,301,301,301,301,301,301,301,301,301,301,301,342,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,381,343,301,301,301"); +tmap.push("462,462,462,462,462,462,462,462,462,462,462,462,303,301,342,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,301"); +tmap.push("704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,342,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,704,704,381,343,301,301,301,301"); +tmap.push("0,0,0,0,0,0,0,0,824,704,704,704,421,301,301,301,301,301,342,382,383,704,704,704,704,704,704,704,704,704,704,704,704,704,421,301,301,301,301,301"); +tmap.push("0,0,0,0,0,0,0,0,864,865,865,865,421,301,301,301,301,301,301,301,342,382,382,382,382,382,382,382,382,382,382,382,382,382,343,301,301,301,301,301"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("382,382,382,382,382,382,382,383,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("301,301,301,301,301,301,301,423,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); +tmap.push("301,301,301,301,301,301,301,423,0,0,0,0,421,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301"); + +obj.createentity(game, 0, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 64, 168, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 72, 128, 10, 1, 443560); // (savepoint) + +obj.createentity(game, (21 * 8), (9 * 8), 14); //Teleporter! + +if(game.intimetrial) { + obj.createblock(1, 56+16, 0, 32, 150, 82); +}else{ + if(obj.flags[7] == 0) { + if (game.nocutscenes) { + obj.changeflag(7, 1); + game.teleportscript = "levelonecomplete"; + }else { + obj.createblock(1, 56, 0, 32, 150, 32); + } + } +} +roomname = "A Wrinkle in Time"; +break; + + +case rn(55,43): + +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("247,247,247,88,86,86,86,87,247,247,247,247,247,247,247,88,86,86,86,86,86,86,86,86,87,247,247,247,247,247,247,247,88,86,86,86,87,247,247,247"); +tmap.push("9,9,9,206,86,86,86,208,9,9,9,9,9,9,9,206,86,86,86,86,86,86,86,86,208,9,9,9,9,9,9,9,206,86,86,86,208,9,9,9"); +tmap.push("0,0,0,246,247,247,247,248,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,208,0,0,0,0,0,0,0,246,247,247,247,248,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,247,247,247,247,247,247,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,858,859,859,859,859,860,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,0,0,0,0,0,0,0,0,166,167,167,167,167,167,167,168,0,0,0,0,0,0,0,0"); +tmap.push("86,86,86,86,86,86,86,86,86,87,247,247,247,88,86,208,0,0,0,0,0,0,0,0,206,86,87,247,247,247,88,127,167,168,0,0,0,0,0,0"); +tmap.push("86,86,86,86,86,86,86,86,86,208,0,0,0,206,86,208,0,0,0,0,0,0,0,0,206,86,208,0,0,0,206,86,86,127,167,168,0,0,0,0"); +tmap.push("86,86,86,86,86,86,86,86,86,208,0,0,0,206,86,208,8,8,8,8,8,8,8,8,206,86,208,0,0,0,206,86,86,86,86,127,167,168,0,0"); +tmap.push("86,86,86,86,86,86,86,86,86,208,0,0,0,206,86,127,167,167,167,167,167,167,167,167,128,86,208,0,0,0,206,86,86,86,86,86,86,127,167,167"); +tmap.push("86,86,86,86,86,86,86,86,86,208,779,779,779,206,86,86,86,86,86,86,86,86,86,86,86,86,208,779,779,779,206,86,86,86,86,86,86,86,86,86"); +tmap.push("247,247,247,247,247,247,247,247,247,248,698,698,698,246,247,247,247,247,247,247,247,247,247,247,247,247,248,698,698,698,246,247,247,247,247,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,698,698,698,0,0,0,0,0,0,0,0,0,0,0,0,0,0,698,698,698,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,858,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,860,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + +obj.createentity(game, 0, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 63, 64-16, 1, 3, 4, 64, 0, 256, 204); // Enemy, bounded +obj.createentity(game, 256-28, 80, 1, 2, 4, 64, 0, 256, 204); // Enemy, bounded +obj.createentity(game, 48, 168, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 104, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 152, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 240, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 288, 168, 2, 9, 4); //Threadmill, <<< +obj.createentity(game, 160 - 48, 184 - 8, 1, 3, 5);// , 160, 0, 320, 240); // Enemy, bounded +obj.createentity(game, 160 - 28 + 48, 184 - 8, 1, 2, 5);// , 0, 0, 160, 240); // Enemy, bounded +roomname = "Brass Sent Us Under The Top"; +break; + +case rn(54,43): + +tmap.push("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,627,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); +tmap.push("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,627,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); +tmap.push("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,667,668,509,507,507,507,507,508,668,668,668,668,668,668,668,668,668,668"); +tmap.push("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,9,9,627,507,507,507,507,629,9,9,9,9,9,9,9,9,9,9"); +tmap.push("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,667,668,668,668,668,669,0,0,0,0,0,0,0,0,0,0"); +tmap.push("668,668,668,668,668,668,668,668,509,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,627,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,627,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,627,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,627,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("588,588,589,0,0,769,770,770,627,507,507,507,507,507,507,629,770,770,771,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,629,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,629,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,629,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,548,588,588,588,588,589,0,0,0,0,0,0,0,0,0,0,0,0,587,588,588,588,588,588,588"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,627,507,507,507,507,507,507"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,627,507,507,507,507,507,507"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,629,8,8,8,8,8,8,8,8,8,8,8,8,627,507,507,507,507,507,507"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,548,588,588,588,588,588,588,588,588,588,588,588,588,549,507,507,507,507,507,507"); +tmap.push("507,507,629,0,0,809,689,689,627,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); +tmap.push("507,507,629,0,0,809,689,689,667,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668"); +tmap.push("507,507,629,0,0,809,689,689,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,629,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,629,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,629,0,0,849,850,850,850,850,850,850,850,850,850,850,850,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,629,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("507,507,548,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588"); +tmap.push("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); +tmap.push("507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507"); + +obj.createentity(game, 64, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 128, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 192, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 256, 168, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 32+4, 48, 10, 0, 443540); // (savepoint) +obj.createentity(game, 208-4, 48, 1, 0, 3, 104, 40, 324, 136); // Enemy, bounded +obj.createentity(game, 136 + 4, 96, 10, 1, 443541); // (savepoint) + +roomname = "The Tomb of Mad Carew"; +break; + +case rn(52,43): + +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,472,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,430,310,310,310,311,471,471,471,471,471,471,471,471,471,471,471"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,430,310,310,310,432,692,692,692,692,692,692,692,814,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,852,853,853,853,853,853,430,310,310,310,432,853,853,853,853,853,853,853,854,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,432,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,432,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,432,0,0,0,0,0,0,390,391,391,391,391"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,390,391,391,391,391,391,391,391,352,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,352,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("471,471,471,471,471,471,312,310,310,311,471,471,312,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("9,9,9,9,9,9,430,310,310,432,9,9,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,470,471,471,472,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,772,773,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("0,0,0,0,0,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("391,391,391,391,392,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("310,310,310,310,432,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("310,310,310,310,432,0,0,0,0,0,812,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310"); + +obj.createentity(game, 56, 144, 10, 0, 443520); // (savepoint) +obj.createentity(game, 152, 80, 10, 1, 443521); // (savepoint) +roomname = "The Sensible Room"; +break; + +case rn(51,43): + +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,8,8,8,8,8,8,8,8,8,8,8,8"); +tmap.push("170,170,170,170,170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89,89,89,89,89,89,89,130,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,91,90,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,249,251,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + +obj.createentity(game, 0, -200, 1, 16, 6, -64, -500, 320 + 64, 340); +roomname = "B-B-B-Busted"; +break; + + +case rn(50,43): + +tmap.push("286,286,286,286,286,408,689,689,811,0,0,0,406,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,408,689,689,811,0,0,0,406,287,447,447,447,447,288,286,286,286,286,286,286,287,447,447,447,447,288,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,408,689,689,811,0,0,0,446,448,9,9,9,9,446,447,447,447,447,447,447,448,9,9,9,9,446,447,447,447,447,447,447,447,447,447"); +tmap.push("286,286,286,286,286,408,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,408,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,408,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,408,689,689,811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,408,850,850,851,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("286,286,286,286,286,327,367,367,367,367,367,367,367,367,367,367,367,367,367,368,8,8,8,8,366,367,367,367,367,367,367,368,8,8,8,8,8,8,8,8"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,327,367,367,367,367,328,286,286,286,286,286,286,327,367,367,367,367,367,367,367,367"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("447,447,447,447,288,286,286,287,447,447,447,447,288,286,286,287,447,447,447,447,288,286,286,287,447,447,447,447,288,286,286,287,447,447,447,447,447,447,447,447"); +tmap.push("9,9,9,9,446,447,447,448,9,9,9,9,446,447,447,448,9,9,9,9,446,447,447,448,9,9,9,9,446,447,447,448,9,9,9,9,9,9,9,9"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("367,367,367,368,8,8,8,8,366,367,367,368,8,8,8,8,366,367,367,368,8,8,8,8,366,367,367,368,8,8,8,8,366,367,367,367,367,367,367,367"); +tmap.push("286,286,286,327,367,367,367,367,328,286,286,327,367,367,367,367,328,286,286,327,367,367,367,367,328,286,286,327,367,367,367,367,328,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + +obj.createentity(game, 280, 192, 10, 1, 443500); // (savepoint) +obj.createentity(game, 64, 80, 10, 1, 443501); // (savepoint) + +if(!game.nocutscenes){ + obj.createblock(1, 0, 0, 112, 112, 8); +} +roomname = "V Stitch"; +break; + + +case rn(49,43): + +tmap.push("492,614,680,680,680,680,652,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,680,680,802,0,0,0,612,492,492,492,492,492"); +tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,612,492,492,492,492,492"); +tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,612,492,492,492,492,492"); +tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,612,492,492,492,492,492"); +tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,612,492,492,492,492,492"); +tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,800,680,680,680,6,6,6,6,6,6,6,6,6,6,6,1122,8,8,8,612,492,492,492,492,492"); +tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,840,841,841,841,572,573,573,573,573,573,573,573,573,573,573,573,573,573,573,534,492,492,492,492,492"); +tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,612,492,492,493,653,653,653,653,653,653,653,653,653,653,653,653,653,653,494,492,492"); +if(game.nodeathmode || game.intimetrial) { + tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,652,653,653,654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +}else { + tmap.push("492,614,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,652,653,653,654,9,9,9,9,9,9,9,9,9,9,9,9,9,9,612,492,492"); +} +tmap.push("492,533,573,573,573,573,573,573,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,533,573,573,573,574,0,0,0,0,572,573,573,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,0,0,0,0,0,0,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,8,8,8,8,8,8,0,0,0,0,612,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,572,573,573,573,573,574,0,0,0,0,652,653,653"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,493,653,653,653,654,0,0,0,0,9,9,9"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,0,0,0,0,612,492,492,614,0,0,0,0,612,614,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,614,8,8,8,8,612,492,492,614,0,0,0,0,612,614,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,533,573,573,573,573,534,492,492,533,573,573,573,573,534,614,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,653,654,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("841,841,841,841,841,841,841,842,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); +tmap.push("492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492"); + +obj.platformtile = 747; +obj.createentity(game, 120, 72, 3, 747); //Disappearing Platform +obj.createentity(game, 120, 112, 3, 747); //Disappearing Platform +obj.createentity(game, 120, 128, 3, 747); //Disappearing Platform +obj.createentity(game, 88, 72, 2, 15, 4); // Platform +obj.createentity(game, 192, 128, 9, 6); // (shiny trinket) +obj.createentity(game, 240, 136, 10, 0, 443490); // (savepoint) +roomname = "Prize for the Reckless"; +if(game.nodeathmode) { + roomname = "I Can't Believe You Got This Far"; +}else if (game.intimetrial) { + roomname = "Imagine Spikes There, if You Like"; +} +break; + +case rn(48,43): + +tmap.push("89,89,211,695,695,695,695,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,211,695,695,695,695,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,211,695,695,695,695,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,91,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,695,695,695,695,695,695,817,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,856,856,856,856,856,856,857,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,0,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,0,0,0,815,695,695,695,695,695,695,209,89,89"); +tmap.push("89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,815,695,695,695,695,695,695,249,250,250"); +tmap.push("89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,815,695,695,695,695,695,695,695,695,695"); +tmap.push("89,89,211,0,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,815,695,695,695,695,695,695,695,695,695"); +tmap.push("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,855,856,856,856,856,856,856,856,856,856"); +tmap.push("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("89,89,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("89,89,130,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + +obj.createentity(game, 152, 32, 10, 1, 443480); // (savepoint) +obj.createentity(game, 152, 184, 10, 0, 443481); // (savepoint) +obj.createentity(game, 272, 120, 1, 2, 8); // Enemy +obj.createentity(game, 32, 96, 1, 3, 8); // Enemy +obj.createentity(game, 104, 80, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 168, 80, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 232, 80, 2, 8, 4); //Threadmill, >>> +obj.createentity(game, 56, 144, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 120, 144, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 184, 144, 2, 8, 4); //Threadmill, >>> +roomname = "A Deception"; +break; + +case rn(48,42): + +tmap.push("310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("310,310,310,310,310,310,310,310,311,471,471,471,471,471,471,312,310,310,310,310,311,471,471,471,471,471,471,312,310,310,310,310,310,310,310,310,310,310,310,310"); +tmap.push("310,310,310,310,310,310,310,310,432,9,9,9,9,9,9,430,310,310,310,310,432,9,9,9,9,9,9,430,310,310,310,310,311,471,471,471,471,471,471,471"); +tmap.push("310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,310,310,432,774,0,0,0,0,0,430,311,471,471,471,472,0,0,0,0,0,0,430,311,471,471,471,472,0,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,310,310,432,814,0,0,0,0,0,430,432,9,9,9,9,0,0,0,0,0,0,430,432,9,9,9,9,0,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,311,471,472,814,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,470,472,0,0,0,0,0,0,0,0,0,0,470,472,0,0,0,0,0,0,0,0,390,391,391"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,431,9,0,0,0,0,0,0,0,0,0,0,431,9,0,0,0,0,0,0,0,0,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,9,0,0,772,773,773,773,773,773,773,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,310,310,310,310,432,692,692,814,0,0,0,0,0,0,0,0,0,0,0,431,8,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,311,471,471,471,472,692,692,814,0,0,0,0,0,0,0,0,0,0,0,390,392,0,0,0,0,0,0,0,812,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,430,432,0,0,0,0,0,0,0,812,692,692,692,692,390,391,352,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,8,8,8,8,0,0,0,0,0,0,430,432,8,8,8,8,0,0,0,812,692,692,692,692,430,310,310,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,390,391,391,392,0,0,0,0,0,0,430,351,391,391,391,392,0,0,0,852,853,853,853,853,430,310,310,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,430,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,430,310,310,432,0,0,0,0,0,0,430,310,310,310,310,432,0,0,0,0,0,0,0,0,430,310,310,310,310"); +tmap.push("310,310,432,692,692,692,692,390,391,391,391,352,310,310,432,8,8,8,8,8,8,430,310,310,310,310,432,8,8,8,8,8,8,8,8,430,310,310,310,310"); +tmap.push("310,310,432,692,692,692,692,430,310,310,310,310,310,310,351,391,391,391,391,391,391,352,310,310,310,310,351,391,391,391,391,391,391,391,391,352,310,310,310,310"); +tmap.push("310,310,432,692,692,692,692,430,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310,310"); + +obj.platformtile = 239; +obj.createentity(game, 88, 112, 2, 0, 4, 88, 64, 264, 168); // Platform, bounded +obj.createentity(game, 136, 112, 2, 1, 4, 88, 64, 264, 168); // Platform, bounded +obj.createentity(game, 184, 112, 2, 0, 4, 88, 64, 264, 168); // Platform, bounded +obj.createentity(game, 232, 112, 2, 1, 4, 88, 64, 264, 168); // Platform, bounded +obj.createentity(game, 56, 64, 10, 0, 442480); // (savepoint) +obj.createentity(game, 280, 152, 10, 1, 442481); // (savepoint) + +roomname = "Down Under"; +break; + +case rn(49,42): + +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,456,297,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("0,0,0,858,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,376,377,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,296,456,456,456,456,456,456,457,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,295,295,295,295,295,295,295,295,417,9,9,9,9,9,9,9,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,296,456,456,456,456,456,456,456,457,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,818,698,698,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,858,859,859,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,0,0,0,0,0,0,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,778,779,779,779,779,779,415,295,295,295,295,295,417,779,779,779,780,0,0,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,818,698,698,698,698,698,415,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,0,0,0,0,0,0,0,375,376,376,376,376,376,376,376,337,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,8,8,8,8,8,8,8,415,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); +tmap.push("295,417,0,0,0,0,375,376,376,376,376,376,376,337,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); +tmap.push("295,417,779,779,779,779,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); +tmap.push("295,417,698,698,698,698,415,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,417,698,698,698,820,0,0,415,295,295,295,295,295"); + +obj.createentity(game, 16, 104, 2, 10, 4); //Big Threadmill, >>>>>> +obj.createentity(game, 104, 184, 2, 11, 4); //Big Threadmill, <<<<<< +obj.createentity(game, 144, 168, 10, 1, 442490); // (savepoint) +obj.createentity(game, 24, 112, 10, 0, 442491); // (savepoint) +roomname = "Shenanigan"; +break; + +case rn(49,41): + +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489"); +tmap.push("650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,491,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,609,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,609,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,809,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,609,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,849,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,850,609,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,489,489,489,489,489"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,609,489,489,489,489,489"); +tmap.push("570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,571,0,0,0,769,770,770,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); +tmap.push("489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,611,0,0,0,809,689,689,609,489,489,489,489,489"); + +obj.createentity(game, 192, 88, 10, 0, 441490); // (savepoint) + +if(!game.intimetrial){ + if(game.companion==0 && obj.flags[10]==0 && !game.crewstats[2]){ //also need to check if he's rescued in a previous game + obj.createentity(game, 42, 86, 16, 0); + obj.createblock(1, 0, 0, 140, 240, 34); + } +} +roomname = "Frown Upside Down"; +break; + +case rn(48,41): + +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,299,459,459,459,459,459,459,459,300,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,299,459,460,683,683,683,683,683,683,683,458,459,300,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,299,460,683,683,683,683,683,683,683,683,683,683,683,458,300,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,458,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8"); +tmap.push("298,298,298,420,683,683,683,683,683,683,683,683,683,683,683,683,683,378,379,379,380,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,378,379,379"); +tmap.push("298,298,298,339,380,683,683,683,683,683,683,683,683,683,683,683,378,340,298,298,420,0,0,0,0,0,0,0,0,0,0,8,8,8,378,379,379,340,298,298"); +tmap.push("298,298,298,298,339,379,380,683,683,683,683,683,683,683,378,379,340,298,298,298,420,0,0,0,0,0,0,0,8,8,8,378,379,379,340,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,339,379,379,379,379,379,379,379,340,298,298,298,298,298,420,0,0,0,0,8,8,8,378,379,379,340,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,420,8,8,8,8,378,379,379,340,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,339,379,379,379,379,340,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); +tmap.push("298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298"); + +obj.createentity(game, (5 * 8) - 4, (8 * 8) + 4, 14); //Teleporter! + +if(game.intimetrial) { + obj.createblock(1, 280, 0, 32, 240, 82); +} +roomname = "Energize"; +break; + +case rn(53,42): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,9,9,9,9,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0,0,0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,820,0,0,0"); +tmap.push("0,0,0,858,859,859,859,859,859,859,859,859,859,859,859,860,0,0,0,0,0,0,0,0,858,859,859,859,859,859,859,859,859,859,859,859,860,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); +tmap.push("373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,374,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + +obj.createentity(game, 40, 24, 10, 0, 442530); // (savepoint) +obj.createentity(game, 264, 24, 10, 0, 442531); // (savepoint) + +roomname = "Driller"; +break; + +case rn(54,42): + +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,253,253,253,253,94,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,9,9,9,9,9,9,9,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,174,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,8,8,8,8,0,0,0,0,8,8,8,8,212,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("8,8,8,8,8,8,8,8,8,8,8,8,8,212,92,133,173,173,173,174,0,0,0,0,172,173,173,173,134,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("173,173,173,173,173,173,173,173,173,173,173,173,173,134,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,254,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,172,173,134,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + +obj.createentity(game, 128, 80, 3, 867); //Disappearing Platform +obj.createentity(game, 160, 80, 3, 867); //Disappearing Platform +obj.createentity(game, 192, 80, 3, 867); //Disappearing Platform +obj.createentity(game, 128, 88, 3, 867); //Disappearing Platform +obj.createentity(game, 160, 88, 3, 867); //Disappearing Platform +obj.createentity(game, 192, 88, 3, 867); //Disappearing Platform +obj.createentity(game, 128, 96, 3, 867); //Disappearing Platform +obj.createentity(game, 128, 104, 3, 867); //Disappearing Platform +obj.createentity(game, 128, 112, 3, 867); //Disappearing Platform +obj.createentity(game, 128, 120, 3, 867); //Disappearing Platform +obj.createentity(game, 160, 96, 3, 867); //Disappearing Platform +obj.createentity(game, 160, 104, 3, 867); //Disappearing Platform +obj.createentity(game, 160, 112, 3, 867); //Disappearing Platform +obj.createentity(game, 160, 120, 3, 867); //Disappearing Platform +obj.createentity(game, 192, 96, 3, 867); //Disappearing Platform +obj.createentity(game, 192, 104, 3, 867); //Disappearing Platform +obj.createentity(game, 192, 112, 3, 867); //Disappearing Platform +obj.createentity(game, 192, 120, 3, 867); //Disappearing Platform + +if(!game.nocutscenes) { + if(obj.flags[68]==0){ + obj.createblock(1, 32, 0, 320, 240, 17); + obj.flags[68] = 1; + } +} +roomname = "Quicksand"; +break; + +case rn(52,42): + +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,769,770,770,770,770,770,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,809,689,689,689,689,689,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + +obj.createentity(game, 144, 40, 3); //Disappearing Platform +obj.createentity(game, 200, 128, 3); //Disappearing Platform +roomname = "Boo! Think Fast!"; +break; + +case rn(50,42): + +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,615,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,615,495,617,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,615,495,617,680,680,681,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,841,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,655,656,657,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,7,7,7,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,656,656,656,656"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,536,576,576,576,576,576,576,576,576,577,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,496,656,656,656,656,656,656,656,656,657,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,6,6,6,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,575,576,576,576,576"); +tmap.push("495,495,495,495,495,617,680,680,680,680,680,680,575,576,577,680,680,802,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,841,841,841,841,841,841,615,495,617,841,841,842,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,615,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,615,495,617,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,615,495,495,495,495"); +tmap.push("495,495,495,495,495,617,0,0,0,0,0,0,615,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495"); + +obj.createentity(game, 288, 160, 10, 1, 442500); // (savepoint) + + +obj.createentity(game, 135, 75, 2, 0, 3, 100, 70, 320, 160); +obj.createentity(game, 185, 110, 2, 0, 3, 100, 70, 320, 160); +obj.createentity(game, 235, 145, 2, 0, 3, 100, 70, 320, 160); +roomname = "Stop and Reflect"; +break; + +case rn(51,42): + +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,87,247,247,247,247,247,247,247,247,247,88,87,247,247,247,247,247,247,247,88,87,247,247,247,247,247,247,247,247,247,88,86,86"); +tmap.push("86,86,86,86,86,86,86,208,9,9,9,9,9,9,9,9,9,206,208,9,9,9,9,9,9,9,206,208,9,9,9,9,9,9,9,9,9,206,86,86"); +tmap.push("86,86,86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("247,247,247,247,247,247,88,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,0,0,0,166,168,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("0,0,0,0,778,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,206,86,86"); +tmap.push("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); +tmap.push("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); +tmap.push("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); +tmap.push("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); +tmap.push("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); +tmap.push("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); +tmap.push("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); +tmap.push("0,0,0,0,818,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,206,86,86"); +tmap.push("167,167,167,167,167,167,167,167,167,167,167,167,168,698,698,698,166,167,167,167,168,698,698,698,166,167,167,167,168,698,698,698,166,167,167,167,167,128,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,208,698,698,698,206,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,127,167,167,167,128,86,86,86,127,167,167,167,128,86,86,86,127,167,167,167,128,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + +obj.platformtile = 207; +obj.createentity(game, 112-4, 200-4, 1, 1, 6, 104, 144, 264, 240); // Enemy, bounded +obj.createentity(game, 176-4, 152, 1, 0, 6, 104, 144, 264, 240); // Enemy, bounded +obj.createentity(game, 240-4, 200-4, 1, 1, 6, 104, 144, 264, 240); // Enemy, bounded +obj.createentity(game, 64, 48, 2, 3, 4); // Platform +obj.createentity(game, 272, 152, 9, 1); // (shiny trinket) + +if(!game.nocutscenes){ + obj.createblock(1, 16, 0, 320, 240, 47); +} + +roomname = "Trench Warfare"; +break; + +case rn(50,41): + +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,212,92,93,253,253,253,94,92,92,92,92,92,92,92,92,92,92,92,92,92,93,253,253,253,94,92,92,92"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,212,92,214,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,212,92,214,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,212,92,214,0,0,0,212,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,252,253,254,0,0,0,252,253,253,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,252,253,253,94"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,763,764,764,764,764,764,764,764,764,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,133,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,174,0,0,0,172,173,173,173,173,174,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92,92,214,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,92,92,92,212,92,92,92,92,214,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,214,0,0,0,212,92,92,92,92,214,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,93,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,252,253,253,253,253,254,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,764,725,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,212"); +tmap.push("92,92,92,92,92,214,683,683,683,683,683,683,172,173,174,683,683,683,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,134"); +tmap.push("92,92,92,92,92,214,683,683,683,683,683,683,212,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,214,683,683,683,683,683,683,212,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,214,683,683,683,683,683,683,212,92,214,683,683,683,212,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("92,92,92,92,92,214,683,683,683,683,683,683,212,92,133,173,173,173,134,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92"); + +obj.createentity(game, 120+2, 8, 1, 0, 3); // Enemy +obj.createentity(game, 264+2, 8, 1, 0, 3); // Enemy +obj.createentity(game, 120+2, 208-4, 1, 1, 3); // Enemy +obj.createentity(game, 192+2, 176-4, 1, 1, 3); // Enemy +obj.createentity(game, 192+2, 40, 1, 0, 3); // Enemy + +obj.createentity(game, 64, 80, 10, 1, 441501); // (savepoint) +obj.createentity(game, 64, 136, 10, 0, 441502); // (savepoint) + +roomname = "The Yes Men"; +break; + +case rn(50,40): + +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,443,444,444,444,444,444,444,444,444,444,444,444,444,444,285,283,284,444,444,444,444,444,444,444,444,444,444,444"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,9,9,9,403,283,405,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,445,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,364,364,364,364,364,364"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,324,364,364,364,364,364,364,364,364,364,364,365,8,8,8,8,363,364,364,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,324,364,364,364,364,325,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,284,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,285,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,403,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,443,444,444,444,444,444,444,444"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,815,695,695,695,695,695"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,363,364,365,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,363,364,364,364,364,364,364,364,364"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,403,283,324,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,325,283,283,283,283,283,283,283,283"); +tmap.push("283,283,283,283,283,405,0,0,0,0,0,0,403,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283"); + +obj.platformtile = 10; +obj.createentity(game, 136-32, 64, 3, 10); //Disappearing Platform +obj.createentity(game, 136, 64, 3, 10); //Disappearing Platform +obj.createentity(game, 136+32, 64, 3, 10); //Disappearing Platform +obj.createentity(game, 56, 104, 10, 1, 440500); // (savepoint) +obj.createentity(game, 56, 152, 2, 3, 3); // Platform +obj.createentity(game, 280, 192, 10, 1, 440501); // (savepoint) + +roomname = "Gantry and Dolly"; +break; + +case rn(51,40): + +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,496,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,497,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("656,656,656,656,656,656,656,657,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,575,576,576,576,537,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,655,656,656,656,497,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("576,577,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,536,576,577,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,536,576,577,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,536,576,577,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,577,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,617,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,496,656,656,656,656,656,656,656,656,656,497,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,617,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,617,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,615,495,495,495,495"); +tmap.push("656,656,656,657,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,615,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,615,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,680,680,680,615,495,617,680,680,680,680,615,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,575,576,577,680,680,680,655,656,657,680,680,680,575,576,576,576,576,577,680,680,680,655,656,657,680,680,680,680,615,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,615,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("680,680,680,680,680,680,680,615,495,617,680,680,680,680,680,680,680,680,680,615,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("576,576,576,576,576,576,576,537,495,617,680,680,680,680,680,680,680,680,680,615,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,617,680,680,680,680,680,680,680,680,680,615,495,495,495,495,617,680,680,680,680,680,680,680,680,680,680,615,495,495,495,495"); +tmap.push("495,495,495,495,495,495,495,495,495,536,576,576,576,576,576,576,576,576,576,537,495,495,495,495,536,576,576,576,576,576,576,576,576,576,576,537,495,495,495,495"); + +obj.createentity(game, 88, 104, 21, 1); // (savepoint) +obj.createentity(game, 112, 104, 21, 1, 440511); // (savepoint) +obj.createentity(game, 136, 88, 1, 0, 0); // Enemy //the radar dish +//obj.createentity(game, 176, 104, 10, 1, 440512); // (savepoint) +obj.createentity(game, 200, 104, 21, 1); // (savepoint) +obj.createentity(game, 224, 104, 21, 1); // (savepoint) +obj.createentity(game, 256, 32, 1, 0, 0); // Enemy //in this case, the transmitter + +if(!game.intimetrial){ + obj.createblock(1, 120, 0, 320, 240, 31); +} + +roomname = "Comms Relay"; +break; + +case rn(50,39): + +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,294"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,372,373,374,698,698,698,698,372,373,373,373,374,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,412,292,414,698,698,698,698,412,292,292,292,414,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,412,292,414,698,698,698,698,412,292,292,292,414,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,452,453,454,698,698,698,698,412,292,292,292,414,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,698,698,698,698,698,698,698,698,698,698,412,292,292,292,414,698,698,698,698,698,698,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,859,859,859,859,859,859,859,859,859,859,412,292,292,292,414,859,859,859,859,859,859,412"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,452"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,333,373,373,373,373,373,374,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,414,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,293,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,454,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,412,292,292,292,414,0,0,0,0,0,0,0"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,372,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,334,292,292,292,333,373,373,373,373,373,373,373"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); +tmap.push("292,292,292,292,292,414,0,0,0,0,0,0,412,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292"); + +obj.createentity(game, 200, 32, 1, 0, 8); // Enemy +obj.createentity(game, 168, 104, 10, 1, 439500); // (savepoint) + +roomname = "Security Sweep"; +break; + +case rn(51,39): + +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,96,256,256,256,256,256,256,256,256,256,97,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,217,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,217,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,217,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("95,95,217,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,256,256,256,256,256,256"); +tmap.push("95,95,217,0,0,0,175,176,177,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0"); +tmap.push("95,95,217,0,0,0,215,95,217,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0"); +tmap.push("95,95,217,0,0,0,215,95,217,770,771,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0"); +tmap.push("95,95,217,0,0,0,215,95,217,689,811,0,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,97,95,217,0,0,0,0,0,0"); +tmap.push("95,95,217,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); +tmap.push("95,95,217,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); +tmap.push("95,95,217,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); +tmap.push("256,256,257,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,175,176,176"); +tmap.push("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,215,95,95"); +tmap.push("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,215,95,95"); +tmap.push("0,0,0,0,0,0,215,95,217,689,811,0,0,0,0,0,0,0,809,689,689,811,0,0,0,0,0,0,0,809,689,215,95,217,0,0,0,215,95,95"); +tmap.push("0,0,0,0,0,0,215,95,136,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,809,689,215,95,217,0,0,0,215,95,95"); +tmap.push("0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,849,850,215,95,217,0,0,0,215,95,95"); +tmap.push("0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,215,95,217,0,0,0,215,95,95"); +tmap.push("0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,255,256,257,0,0,0,215,95,95"); +tmap.push("176,176,176,176,176,176,137,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,215,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,215,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,215,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,215,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,136,176,176,176,176,176,176,176,176,176,137,95,95"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); + +obj.createentity(game, 24, 168, 10, 1, 439510); // (savepoint) +obj.createentity(game, 280, 48, 10, 0, 439511); // (savepoint) +obj.createentity(game, 80, 88, 1, 3, 3); // Enemy +obj.createentity(game, 224 - 16, 128, 1, 2, 3); // Enemy + +obj.createentity(game, 256-4, 200, 20, 1); // (terminal) +obj.createblock(5, 256-8, 200, 20, 16, 6); +roomname = "Linear Collider"; +break; + +case rn(52,39): + +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,290,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,411,7,7,7,7,7,7,7,7,7,7,7,7,7,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289"); +tmap.push("450,450,450,450,450,450,450,291,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,449,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,681,841,841,841,841,841,841,682,680,680,680,680,680,680,680,802,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,369,370,371,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,409,289,411,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,409,289,411,0,0,0,0,0,0,0"); +tmap.push("370,370,371,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,409,289,330,370,370,370,370,370,370,370"); +tmap.push("289,289,411,0,0,0,0,409,289,411,680,680,680,680,680,680,802,0,0,0,0,0,0,800,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,411,0,0,0,0,449,450,451,680,680,680,680,680,680,721,761,761,761,761,761,761,722,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,411,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,411,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,411,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,411,0,0,0,0,0,800,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,330,370,370,370,370,370,370,370,370,370,370,370,370,370,371,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,680,680,680,680,680,680,680,680,680,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,6,6,6,6,6,6,6,6,6,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,330,370,370,370,370,370,370,370,370,371,680,680,680,680,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,841,841,841,841,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289,289,289,289,289,289,289"); +tmap.push("289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,411,0,0,0,0,409,289,289,289,289,289,289,289,289,289"); + +obj.createentity(game, 192, 48, 10, 0, 439520); // (savepoint) +obj.createentity(game, 112, 160, 10, 1, 439521); // (savepoint) +roomname = "Atmospheric Filtering Unit"; +break; + +case rn(53,39): + +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,484,644,644,644,644,485,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483"); +tmap.push("644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,695,695,695,695,643,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,485,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("0,0,0,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("564,564,564,564,565,0,0,815,695,563,564,564,564,564,564,564,564,564,564,564,564,564,564,564,565,695,695,695,695,563,564,565,695,695,695,695,695,603,483,483"); +tmap.push("483,483,483,483,605,0,0,815,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,605,695,695,695,695,695,603,483,483"); +tmap.push("483,483,483,483,605,0,0,815,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,605,695,695,695,695,695,603,483,483"); +tmap.push("483,483,483,483,605,0,0,815,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,605,695,695,695,695,695,603,483,483"); +tmap.push("483,483,483,483,605,0,0,815,695,603,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,603,483,605,695,695,695,695,695,603,483,483"); +tmap.push("483,483,483,483,524,564,564,564,564,525,483,483,483,483,483,483,483,483,483,483,483,483,483,483,524,564,564,564,564,525,483,605,695,695,695,695,695,603,483,483"); +tmap.push("483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,605,695,695,695,695,695,603,483,483"); +tmap.push("483,483,484,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,644,645,695,695,695,695,695,603,483,483"); +tmap.push("483,483,605,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("483,483,605,0,0,0,0,815,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,603,483,483"); +tmap.push("483,483,605,0,0,0,0,855,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,603,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483"); +tmap.push("483,483,605,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,603,483,483"); + +roomname = "Traffic Jam"; + +obj.createentity(game, 45, 118, 1, 1, 4); +obj.createentity(game, 205, 118, 1, 1, 4); +obj.createentity(game, 125, 18, 1, 0, 4); + +obj.createentity(game, 232, 184, 10, 0, 1); +break; + +case rn(53,40): + +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,772,773,773,773,773,773,773,773,773,773,773,773,773,773,773,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,852,853,853,853,853,694,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,773,773,773,773,773,773,774,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +tmap.push("310,310,432,692,692,692,692,692,692,814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,812,692,692,692,692,692,692,692,692,692,430,310,310"); +roomname = "Leap of Faith"; +break; + +case rn(53,41): + +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,686,686,686,686,686,686,686,686,686,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,846,847,847,847,847,847,847,847,847,847,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("286,286,408,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("286,286,327,367,367,367,367,367,367,367,367,367,367,367,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("447,447,447,447,447,447,447,447,288,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,406,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,406,286,286,286,286,286,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,446,447,447,447,447,447,448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("686,686,686,686,686,686,686,686,686,808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,406,286,286"); +tmap.push("367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,367,328,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); +tmap.push("286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286"); + +obj.createentity(game, 152, 168, 10, 1, 441530); // (savepoint) + +if(!game.nocutscenes){ + obj.createblock(1, 72, 0, 320, 240, 30); +} + +roomname = "Solitude"; +break; + +case rn(52,41): + +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680,680"); +tmap.push("164,164,164,164,164,164,164,164,164,164,164,164,165,680,680,680,680,680,680,680,680,680,680,680,680,680,680,163,164,164,164,164,164,164,164,164,164,164,164,164"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,205,6,6,6,6,6,6,6,6,6,6,6,6,6,6,203,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,124,164,164,164,164,164,164,164,164,164,164,164,164,164,164,125,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83,83"); + +roomname = "Conundrum"; + +if(!game.nocutscenes){ + obj.createblock(1, 10, 0, 60, 240, 22); + obj.createblock(1, 280, 0, 320, 240, 21); +} +break; + +case rn(51,41): + +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("87,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,88,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,699,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,859,700,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,820,0,778,779,779,779,779,779,779,779,779,779,779,779,779,780,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,820,0,818,699,859,859,859,859,859,859,859,859,859,859,700,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,820,0,818,820,0,0,0,0,0,0,0,0,0,0,818,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,820,0,818,820,0,778,779,779,779,779,779,779,780,0,818,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,820,0,818,820,0,818,699,859,859,859,859,700,820,0,818,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,820,0,818,820,0,818,820,0,0,0,0,818,820,0,818,820,0,818,820,0,818,820,0,818,206,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("208,698,820,0,818,820,0,818,820,0,778,780,0,818,820,0,818,820,0,818,820,0,818,820,0,818,246,247,247,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("208,698,820,0,818,820,0,818,820,0,858,860,0,818,820,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,820,0,818,820,0,818,820,0,0,0,0,818,820,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,820,0,818,820,0,818,739,779,779,779,779,740,820,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,820,0,818,820,0,858,859,859,859,859,859,859,860,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,820,0,818,820,0,0,0,0,0,0,0,0,0,0,818,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,820,0,818,739,779,779,779,779,779,779,779,779,779,779,740,820,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,820,0,858,859,859,859,859,859,859,859,859,859,859,859,859,860,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,818,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,739,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,779,740,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("208,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,820,0,818,820,0,818,698,820,0,818,698,698,820,0,818,698,698,698,698,698"); +tmap.push("127,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + +roomname = "Welcome Aboard"; +break; + +case rn(52,40): + +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,90,250,250,250,250,250,250,250,91,89,89,89,90,250,250,250,251,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,90,251,9,9,9,9,9,9,9,249,250,250,250,251,9,9,9,9,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,90,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,90,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("90,250,250,250,250,250,251,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,776,209,89,89,89,89,89,89,89,89,89"); +tmap.push("211,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89,89,89,89,89"); +tmap.push("211,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89,89,89,89,89"); +tmap.push("211,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,209,89,89,89,89,89,89,89,89,89"); +tmap.push("211,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,856,209,89,89,89,89,89,89,89,89,89"); +tmap.push("211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("211,0,0,0,0,0,0,0,0,0,169,170,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,89,89,89,89,89,89,89,89,89"); +tmap.push("130,170,170,170,171,8,8,8,8,8,209,89,89,89,211,8,8,8,8,8,8,8,8,169,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,130,170,170,170,170,170,131,89,89,89,130,170,170,170,170,170,170,170,170,131,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); + +obj.createentity(game, 216, 144, 10, 1, 440520); // (savepoint) +obj.createentity(game, 16, 136, 9, 0); // (shiny trinket) + +roomname = "It's a Secret to Nobody"; +break; + + + + default: + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + roomname = "Outer Space"; + obj.fatal_bottom(); + break; + } + } + + public var roomname:String; + } +} \ No newline at end of file diff --git a/mobile_version/levels/towerclass.as b/mobile_version/levels/towerclass.as new file mode 100644 index 00000000..a7c542d8 --- /dev/null +++ b/mobile_version/levels/towerclass.as @@ -0,0 +1,1174 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class towerclass extends Sprite { + public function towerclass():void { + minitowermode = false; + //We init the lookup table: + for (i = 0; i < 700; i++) { + vmult.push(int(i * 40)); + } + //We create a blank map + for (j = 0; j < 700; j++) { + for (i = 0; i < 40; i++) { + contents.push(0); + } + } + for (j = 0; j < 120; j++) { + for (i = 0; i < 40; i++) { + back.push(0); + minitower.push(0); + } + } + + loadbackground(); + loadmap(); + } + + public function backat(xp:int, yp:int, yoff:int):int { + yp = yp * 8; + yp += yoff; + yoff = yp % 8; + yp = (yp - yoff) / 8; + + if (xp >= 0 && xp < 40) { + while (yp < 0) yp += 120; while (yp >= 120) yp -= 120; + return back[xp + vmult[yp]]; + } + return 0; + } + + public function at(xp:int, yp:int, yoff:int):int { + if (minitowermode) { + return miniat(xp, yp, yoff); + }else{ + yp = yp * 8; + yp += yoff; + yoff = yp % 8; + yp = (yp - yoff) / 8; + + while (yp < 0) yp += 700; while (yp >= 700) yp -= 700; + if (xp >= 0 && xp < 40) { + return contents[xp + vmult[yp]]; + }else if (xp == -1) { + return contents[vmult[yp]]; + }else if (xp == 40) { + return contents[39 + vmult[yp]]; + } + return 0; + } + } + + public function miniat(xp:int, yp:int, yoff:int):int { + yp = yp * 8; + yp += yoff; + yoff = yp % 8; + yp = (yp - yoff) / 8; + + while (yp < 0) yp += 100; while (yp >= 100) yp -= 100; + if (xp >= 0 && xp < 40) { + return minitower[xp + vmult[yp]]; + }else if (xp == -1) { + return minitower[vmult[yp]]; + }else if (xp == 40) { + return minitower[39 + vmult[yp]]; + } + return 0; + } + + public function fillbackground(realtmap:Array):void { + var maprow:Array; + + for (j = 0; j < 120; j++) { + maprow = new Array(); + maprow = realtmap[j].split(","); + for (i = 0; i < 40; i++) { + back[i + vmult[j]] = maprow[i]; + } + } + } + + public function fillminitower(realtmap:Array):void { + var maprow:Array; + + for (j = 0; j < 100; j++) { + maprow = new Array(); + maprow = realtmap[j].split(","); + for (i = 0; i < 40; i++) { + minitower[i + vmult[j]] = maprow[i]; + } + } + } + + public function loadminitower1():void { + //Loads the first minitower into the array. + realtmap = new Array(); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,14,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,22,14,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,22,14,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,22,14,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,28,28,28,22,14,12,12,12,12,12"); +realtmap.push("23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("6,6,6,6,6,6,6,6,28,28,28,28,28,28,28,28,28,28,28,28,6,6,6,6,6,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("18,18,18,18,18,18,18,19,28,28,28,28,28,28,28,28,28,28,28,28,17,18,18,18,19,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,15,19,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,15,19,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,15,19,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,15,19,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,15,19,28,28,28,17,18,16,12,12,12,12,12,12,12,12,12,15,19,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,15,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,15,19,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,22,14,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,22,14,12,12,12"); +realtmap.push("12,12,13,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,20,12,12,12,13,23,24,7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12"); +realtmap.push("12,12,21,28,28,28,17,19,28,28,28,22,23,23,23,24,7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,21,28,28,28,7,7,7,7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,13,23,23,23,23,14,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,12,12,13,23,24,7,7,7,7,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,15,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,13,23,24,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,19,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,21,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,16,12,12,21,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,13,23,24,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,24,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,24,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,18,18,18,16,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,23,14,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,17,19,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,22,24,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,23,23,23,23,23,23,23,23"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,6,6,6,6,6,6"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,17,18,18,18,18,18"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,17,19,28,28,28,28,28,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,22,24,28,28,28,28,28,0,0,28,28,28,28,28,28,28,28,28,0,0,0,20,13,23,23,23,23"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,20,21,28,28,17,18"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,20,21,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,17,19,0,0,0,20,21,28,28,22,23"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,22,24,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,15,18,18,18,18"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + + fillminitower(realtmap); + } + + public function loadminitower2():void { + realtmap = new Array(); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,20,13,23,23,23,23,23,23,23,23,23"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,22,24,28,28,0,0,0,0,0,0,0"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,20,21,28,28,28,28,28,28,0,0,0,0,0,0,0"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,22,24,28,28,28,28,28,28,0,0,0,0,0,0,0"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,20,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,22,24,28,28,28,28,28,28,28,28,28,28,0,17,18,18,18,18,18"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,28,28,28,28,28,28,28,28,28,28,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,28,28,28,28,28,28,28,28,28,28,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,11,20,21,10,0,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,11,22,24,10,0,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("18,18,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("23,23,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("18,18,18,18,18,19,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,13,23,23,23,23,23,23,14,13,23,23,23,23,23,23,23,14,12,12,12,12,21,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,9,9,9,9,9,9,22,24,9,9,9,9,9,9,9,22,23,23,23,23,24,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,28,28,28,28,28,6,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,25,27,0,0,0,0,0,0,0,28,28,28,28,28,26,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,28,28,28,28,28,7,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,21,8,8,8,8,8,8,17,18,18,18,19,8,8,8,6,17,18,18,18,18,19,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,15,18,18,18,18,18,18,16,12,12,12,15,18,18,18,18,16,12,12,12,12,21,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,6,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,19,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,13,23,23,23,24,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,21,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,21,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,22,24,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,25,27,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,17,19,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,20,21,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,20,21,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,21,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,24,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,0,0,28,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,28,17,19,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,24,0,28,28,28,28,28,28,28,20,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,13,24,0,0,28,28,28,28,28,28,17,16,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,13,24,0,0,0,28,28,28,28,28,28,20,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,24,0,0,0,0,28,28,28,28,28,17,16,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,13,24,0,0,0,0,0,28,28,28,28,28,20,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,13,24,0,0,0,0,0,0,28,28,28,28,17,16,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,13,24,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,13,24,0,0,0,0,0,0,28,28,28,28,28,17,16,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,13,24,0,0,0,0,0,0,0,28,28,28,28,28,20,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,13,24,0,0,0,0,0,0,0,0,28,28,28,28,17,16,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("23,23,24,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,17,16,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,20,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,28,28,17,16,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); + + fillminitower(realtmap); + } + + + public function loadbackground():void { + //Loads the background into the array. + realtmap = new Array(); + realtmap.push("1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,4,0,0"); + realtmap.push("2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,4,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4"); + realtmap.push("0,5,4,0,0,0,0,0,0,5,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,2"); + realtmap.push("5,1,1,4,0,0,0,0,5,1,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,2,0"); + realtmap.push("1,1,1,1,4,0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,5,1,1,1,1,1,2,0,0"); + realtmap.push("1,1,1,1,1,4,5,1,1,1,1,1,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,3,1,1,1,1,1,4,0,0"); + realtmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,3,1,1,1,1,1,4,0"); + realtmap.push("1,1,1,1,1,1,1,1,2,3,1,1,2,3,1,4,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,3,1,1,1,1,1,4"); + realtmap.push("1,1,1,1,1,1,1,2,0,0,3,2,0,0,3,2,0,0,0,0,0,0,5,4,5,1,1,4,0,0,0,0,0,0,3,1,1,1,1,1"); + realtmap.push("1,1,1,1,1,1,2,0,5,4,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,0,0,0,3,1,1,1,1"); + realtmap.push("1,1,1,1,1,1,4,5,1,2,0,0,0,0,0,0,0,0,0,0,0,3,1,1,1,2,3,1,1,4,0,0,0,0,0,0,3,1,1,1"); + realtmap.push("1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,1,1,4,0,3,1,1,4,0,0,0,0,0,0,3,1,1"); + realtmap.push("3,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,2,0,5,1,1,1,4,0,0,0,0,0,0,3,1"); + realtmap.push("0,3,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,5,4,5,1,1,2,0,0,3,1,1,1,2,0,0,0,0,0,0,0,3"); + realtmap.push("0,0,3,1,1,1,4,0,0,0,0,0,5,4,0,0,0,0,5,1,1,1,1,2,0,0,0,0,3,1,2,0,5,4,0,0,0,0,0,0"); + realtmap.push("0,0,0,3,1,1,1,4,0,0,0,5,1,2,0,0,0,0,3,1,1,1,1,4,5,4,0,0,5,1,4,5,1,1,4,0,0,0,0,0"); + realtmap.push("0,0,0,0,3,1,1,1,4,0,0,3,1,4,0,0,0,0,5,1,1,1,1,1,1,1,4,5,1,1,1,1,1,1,2,0,0,0,0,0"); + realtmap.push("0,0,0,0,5,1,1,1,1,4,0,0,3,1,4,5,4,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0"); + realtmap.push("0,0,0,5,1,1,1,1,1,1,4,0,0,3,1,1,1,1,1,1,1,1,2,3,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,5"); + realtmap.push("0,0,5,1,1,1,2,3,1,1,1,4,0,0,3,1,1,1,1,1,1,2,0,0,3,1,1,1,1,1,1,1,4,0,0,0,0,0,5,1"); + realtmap.push("0,0,3,1,1,2,0,0,3,1,1,1,4,0,0,3,1,1,1,1,1,4,0,0,0,3,2,3,1,1,1,1,1,4,0,0,0,0,3,1"); + realtmap.push("0,0,0,3,2,0,0,0,0,3,2,3,1,4,0,0,3,1,1,1,1,1,4,0,0,0,0,0,3,1,1,2,3,1,4,0,0,0,0,3"); + realtmap.push("0,0,0,0,0,0,5,4,0,0,0,0,3,1,4,0,0,3,2,3,1,1,1,4,0,0,0,0,0,3,2,0,0,3,1,4,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,3,1,4,0,0,0,0,3,1,4,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0,0,3,2,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,5,1,1,4,5,4,0,0,3,2,0,0,0,3,1,1,2,0,0,5,4,0,0,0,0,5,4,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,5,1,1,1,1,1,2,0,0,0,0,0,0,0,0,3,1,4,0,0,3,1,4,0,0,5,1,1,4,0,0,5,4,0,0"); + realtmap.push("0,0,0,0,5,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,3,1,4,0,0,3,1,4,5,1,2,3,1,4,5,1,1,4,0"); + realtmap.push("0,0,0,5,1,1,1,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,3,1,4,0,0,3,1,1,2,0,0,3,1,1,1,1,1,4"); + realtmap.push("0,0,0,3,1,1,2,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,3,1,4,0,0,3,2,0,0,0,0,3,1,1,1,1,1"); + realtmap.push("4,0,0,0,3,2,0,0,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,5,1,1,1,1,1"); + realtmap.push("1,4,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,5,4,0,0,0,0,0,3,1,4,0,5,4,0,0,5,1,1,1,1,1,1"); + realtmap.push("3,1,4,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,3,1,4,5,4,0,0,5,1,2,0,3,1,4,5,1,1,1,2,3,1,1"); + realtmap.push("0,3,1,4,0,0,5,1,1,1,2,3,1,1,2,0,0,0,0,3,1,1,1,4,5,1,2,0,0,0,3,1,1,1,1,2,0,5,1,1"); + realtmap.push("0,5,1,1,4,5,1,1,1,2,0,0,3,2,0,0,0,0,0,5,1,1,1,1,1,2,0,0,0,0,0,3,1,1,2,0,5,1,1,1"); + realtmap.push("5,1,1,1,1,1,1,1,1,4,5,4,0,0,0,0,0,0,0,3,1,1,1,1,1,4,0,0,0,0,0,5,1,2,0,0,3,1,1,1"); + realtmap.push("1,1,1,2,3,1,1,1,1,1,1,1,4,5,4,0,0,5,4,0,3,1,1,1,1,1,4,0,0,0,5,1,2,0,0,0,0,3,1,1"); + realtmap.push("1,1,2,0,0,3,1,1,1,1,1,1,1,1,1,4,5,1,2,0,5,1,1,1,2,3,2,0,0,0,3,1,4,0,0,0,0,0,3,1"); + realtmap.push("1,2,0,0,0,0,3,1,1,2,3,1,1,1,1,1,1,2,0,5,1,1,1,1,4,0,0,5,4,0,0,3,1,4,0,0,0,0,0,3"); + realtmap.push("2,0,0,0,0,0,5,1,2,0,0,3,1,1,1,1,2,0,5,1,1,1,1,1,1,4,5,1,1,4,0,0,3,1,4,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,5,1,2,0,0,0,0,3,1,1,1,4,5,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,3,2,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,3,2,0,0,0,0,0,0,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("0,5,4,0,0,0,0,5,4,0,0,0,0,0,3,1,1,1,1,2,3,1,1,1,1,1,1,2,0,0,5,4,0,0,5,4,0,0,0,5"); + realtmap.push("5,1,1,4,0,0,5,1,2,0,0,0,0,0,0,3,1,1,2,0,0,3,1,1,1,1,2,0,0,5,1,1,4,5,1,2,0,0,5,1"); + realtmap.push("1,1,1,1,4,5,1,2,0,0,0,0,0,0,0,0,3,2,0,0,0,0,3,1,1,2,0,0,5,1,1,1,1,1,2,0,0,5,1,1"); + realtmap.push("1,1,1,1,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,4,0,0,3,1,1,1,1,2,0,0,5,1,1,1"); + realtmap.push("1,1,1,1,1,1,1,2,0,5,4,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,3,1,1,2,0,0,5,1,1,1,1"); + realtmap.push("1,1,1,1,1,1,1,4,5,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,3,1,4,0,0,3,1,1,1,1"); + realtmap.push("1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,2,0,0,5,1,1,4,0,0,3,1,1,1"); + realtmap.push("1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,2,0,0,5,1,1,1,2,0,0,5,1,1,1"); + realtmap.push("3,1,1,1,1,1,1,2,0,0,0,0,0,5,4,0,0,5,1,1,1,1,1,1,1,2,0,0,5,1,1,1,2,0,0,5,1,1,1,1"); + realtmap.push("0,3,1,1,1,1,1,4,0,0,5,4,5,1,1,4,5,1,1,1,1,1,1,1,2,0,0,5,1,1,1,2,0,0,5,1,1,1,1,1"); + realtmap.push("0,0,3,1,1,1,1,1,4,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,3,1,1,2,0,0,5,1,1,1,1,1,1"); + realtmap.push("0,0,0,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,3,2,0,0,5,1,1,1,1,1,1,1"); + realtmap.push("0,0,0,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,0,0,0,3,1,1,1,1,1,1,1"); + realtmap.push("0,0,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,1,4,0,0,0,0,0,3,1,1,1,1,1,1"); + realtmap.push("0,5,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,1,1,1,1,1,1,2,0,0,3,1,4,0,0,0,0,5,1,2,3,1,1,1"); + realtmap.push("5,1,1,1,1,1,1,1,1,1,1,1,2,3,2,0,0,3,1,1,1,1,2,0,0,0,0,3,1,4,0,0,5,1,2,0,0,3,1,1"); + realtmap.push("1,1,1,1,1,1,1,1,1,1,1,1,4,0,0,5,4,0,3,1,1,2,0,0,0,0,0,0,3,1,4,5,1,2,0,0,0,0,3,1"); + realtmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,4,5,1,1,4,0,3,1,4,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,3"); + realtmap.push("3,1,1,1,1,2,3,1,1,2,3,1,1,1,1,1,1,1,4,0,3,1,4,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0"); + realtmap.push("0,3,1,1,2,0,0,3,2,0,0,3,1,1,1,1,1,1,2,0,0,3,2,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0"); + realtmap.push("0,0,3,2,0,0,0,0,0,0,0,0,3,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,5,1,2,3,1,1,1,4,0,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0,5,1,2,0,0,3,1,1,1,4,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,0,5,1,1,1,2,3,1,4,0,0,0,0,0,3,2,0,0,0,0,3,1,1,1,4,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,3,1,4,0,0,0,0,0,0,0,0,0,0,0,3,1,1,1,4,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,3,1,4,0,0,0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,3,1,4,0,0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,4,0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,5,1,1,1,2,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("0,5,1,1,1,2,3,1,4,0,0,0,0,0,0,5,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("5,1,1,1,2,0,0,3,1,4,0,0,0,0,5,1,1,1,2,3,2,3,2,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("1,1,1,2,0,0,0,5,1,2,0,0,0,5,1,1,1,2,0,0,0,0,0,0,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("1,1,2,0,0,0,5,1,2,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,3,1,1,1,4,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("1,2,0,0,0,0,3,1,4,0,0,5,1,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0,0,0,0"); + realtmap.push("2,0,0,0,0,0,0,3,1,4,5,1,1,1,1,1,1,4,0,0,0,0,0,0,5,1,2,3,1,1,1,4,0,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,3,1,1,1,1,1,1,1,1,1,4,5,4,0,0,0,3,2,0,0,3,1,1,1,4,0,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,5,1,2,3,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,5,1,1,4,0,3,1,1,1,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,1,1,1,2,0,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,3,1,1,1,4,0,3,1,1,1,1,2,0,0,0,5,4,0,0,5,1,1,1,1,1,1,1,2,0,5,4,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,3,1,1,2,0,5,1,1,1,1,4,0,0,5,1,2,0,5,1,1,1,1,1,1,1,2,0,5,1,1,4,0,0"); + realtmap.push("0,0,0,0,0,0,0,5,1,2,0,5,1,1,1,1,1,1,4,0,3,1,4,5,1,1,1,1,1,1,1,2,0,5,1,1,1,1,4,0"); + realtmap.push("0,0,0,0,0,0,5,1,2,0,5,1,1,1,1,1,1,1,1,4,0,3,1,1,1,1,1,1,1,1,2,0,5,1,1,1,1,1,1,4"); + realtmap.push("0,0,0,0,0,0,3,2,0,0,3,1,1,1,1,2,3,1,1,1,4,0,3,1,1,1,1,1,1,1,4,0,3,1,1,1,1,1,1,1"); + realtmap.push("0,0,5,4,0,0,0,0,0,0,0,3,1,1,2,0,5,1,1,1,2,0,0,3,1,1,1,1,1,1,1,4,0,3,1,1,1,1,1,1"); + realtmap.push("0,5,1,1,4,0,0,0,0,0,0,0,3,2,0,5,1,1,1,1,4,0,0,0,3,1,1,1,1,1,1,1,4,0,3,1,1,1,1,2"); + realtmap.push("0,3,1,1,1,4,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,3,1,1,1,1,1,1,1,4,5,1,1,1,2,0"); + realtmap.push("0,0,3,1,1,1,4,0,0,0,0,0,0,0,3,1,1,1,1,1,1,2,0,5,4,0,3,1,1,1,1,1,1,1,1,1,1,2,0,0"); + realtmap.push("0,0,0,3,1,1,1,4,0,0,0,0,0,0,0,3,1,1,1,1,2,0,5,1,2,0,5,1,1,1,1,1,1,1,1,1,2,0,0,0"); + realtmap.push("0,0,0,5,1,1,1,2,0,0,0,0,0,0,0,5,1,1,1,1,4,5,1,2,0,5,1,2,3,1,1,1,1,1,1,1,4,0,0,0"); + realtmap.push("0,0,5,1,1,1,2,0,5,4,0,0,0,0,5,1,1,1,1,1,1,1,2,0,0,3,2,0,5,1,1,1,1,1,1,1,1,4,0,0"); + realtmap.push("0,5,1,1,1,2,0,0,3,1,4,0,0,5,1,1,1,1,1,1,1,2,0,5,4,0,0,0,3,1,1,1,1,1,1,1,1,1,4,0"); + realtmap.push("5,1,1,1,2,0,5,4,0,3,1,4,0,3,1,1,1,1,1,1,2,0,5,1,1,4,5,4,0,3,1,1,1,1,2,3,1,1,1,4"); + realtmap.push("1,1,1,2,0,5,1,1,4,0,3,1,4,0,3,1,1,1,1,2,0,5,1,1,1,1,1,1,4,5,1,1,1,2,0,0,3,1,1,1"); + realtmap.push("1,1,1,4,5,1,1,1,1,4,5,1,1,4,0,3,1,1,1,4,0,3,1,1,1,1,1,1,1,1,1,1,1,4,0,0,0,3,1,1"); + realtmap.push("1,1,1,1,1,1,2,3,1,1,1,1,1,1,4,0,3,1,1,1,4,0,3,1,1,1,1,1,1,1,1,1,1,1,4,0,0,5,1,1"); + realtmap.push("3,1,1,1,1,1,4,0,3,1,1,1,1,1,1,4,0,3,1,1,1,4,0,3,1,1,1,1,1,2,3,1,1,1,2,0,5,1,1,1"); + realtmap.push("0,3,1,1,1,1,1,4,0,3,1,1,1,1,1,1,4,0,3,1,1,2,0,5,1,1,1,1,1,4,0,3,1,1,4,5,1,1,1,1"); + realtmap.push("0,0,3,1,1,1,1,1,4,0,3,1,1,1,1,1,1,4,0,3,2,0,5,1,1,1,1,1,1,1,4,0,3,1,1,1,1,1,1,2"); + realtmap.push("0,0,0,3,1,1,1,1,1,4,0,3,1,1,1,1,1,1,4,0,0,5,1,1,1,1,1,1,1,1,2,0,5,1,1,1,1,1,2,0"); + realtmap.push("0,0,0,0,3,1,1,1,1,2,0,0,3,1,1,1,1,1,1,4,5,1,1,1,1,1,1,1,1,2,0,5,1,1,1,1,1,2,0,0"); + realtmap.push("4,0,0,0,0,3,1,1,2,0,5,4,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,5,1,1,1,1,1,2,0,0,0"); + realtmap.push("1,4,0,0,0,0,3,2,0,5,1,1,1,2,3,1,1,1,1,1,1,1,1,2,3,1,1,2,0,5,1,1,1,1,1,2,0,0,0,0"); + realtmap.push("1,1,4,0,0,0,0,0,5,1,1,1,2,0,5,1,1,1,1,1,1,1,1,4,0,3,2,0,5,1,1,1,1,1,2,0,0,0,0,0"); + realtmap.push("1,1,1,4,0,0,0,5,1,1,1,2,0,5,1,2,3,2,3,1,1,1,1,1,4,0,0,0,3,1,1,1,1,2,0,0,0,0,0,0"); + realtmap.push("1,1,1,2,0,0,5,1,1,1,2,0,5,1,2,0,0,0,0,3,1,1,1,1,1,4,0,0,0,3,1,1,2,0,0,0,0,0,0,5"); + realtmap.push("1,1,2,0,0,5,1,1,1,1,4,0,3,2,0,0,0,0,0,5,1,1,1,1,1,1,4,0,0,0,3,2,0,0,0,0,0,0,5,1"); + realtmap.push("1,2,0,0,5,1,1,1,1,1,1,4,0,0,0,0,0,0,5,1,2,3,1,1,1,1,2,0,0,0,0,0,0,0,0,0,0,5,1,1"); + realtmap.push("1,4,0,0,3,1,1,1,1,1,1,1,4,0,0,0,0,5,1,2,0,0,3,1,1,2,0,0,5,4,0,0,0,0,0,0,5,1,1,1"); + realtmap.push("1,1,4,0,0,3,1,1,1,1,1,1,1,4,0,0,5,1,2,0,0,0,0,3,2,0,0,5,1,1,4,0,0,0,0,5,1,1,1,1"); + realtmap.push("1,1,1,4,0,0,3,1,1,1,1,2,3,1,4,5,1,2,0,0,0,0,0,0,0,0,5,1,1,1,1,4,0,0,5,1,1,1,1,1"); + realtmap.push("1,1,1,1,4,0,0,3,1,1,2,0,0,3,1,1,2,0,0,0,0,0,0,0,0,5,1,1,1,1,1,1,4,5,1,1,1,2,3,1"); + realtmap.push("1,1,1,1,2,0,0,0,3,2,0,0,0,0,3,2,0,0,0,0,0,0,0,0,5,1,2,3,1,1,1,1,1,1,1,1,2,0,0,3"); + realtmap.push("1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,3,1,1,2,3,1,1,2,0,0,0,0"); + realtmap.push("1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,1,2,0,0,0,0,3,2,0,0,3,2,0,0,0,0,0"); + fillbackground(realtmap); + } + + public function fillcontents(realtmap:Array):void { + var maprow:Array; + + for (j = 0; j < 700; j++) { + maprow = new Array(); + maprow = realtmap[j].split(","); + for (i = 0; i < 40; i++) { + contents[i + vmult[j]] = maprow[i]; + } + } + } + + public function loadmap():void { + //Loads the map into the array. + realtmap = new Array(); + realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,19,28,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,24,28,28,28,28,22,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,28,28,28,28,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,28,28,28,28,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,23,23,24,28,0,0,17,18,18,19,0,0,28,22,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,22,23,23,24,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,19,0,0,28,28,0,0,17,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,24,0,0,28,28,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,17,18,18,19,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,22,14,13,24,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,22,24,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,19,10,0,28,28,0,11,17,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,24,0,0,28,28,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,19,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,24,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,17,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,22,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,19,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,24,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,17,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,22,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,19,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,28,28,0,11,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,0,28,28,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,24,0,0,0,28,28,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,11,17,18,18,18,18,19,10,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,22,23,23,23,23,24,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,19,10,0,28,28,0,11,17,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,24,0,0,28,28,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,11,17,18,18,19,10,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,22,23,23,24,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,10,0,28,28,0,0,0,28,28,0,0,0,28,28,0,11,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,18,18,19,28,0,0,0,28,28,0,0,0,28,17,18,18,16,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,0,28,28,0,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,0,0,28,28,28,28,0,0,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,19,28,28,28,28,17,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,24,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,13,23,23,24,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,21,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,12,12,12,21,0,0,0,0,0,0,0,8,8,0,0,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,21,28,28,28,20,12,13,23,23,24,0,0,0,0,0,0,8,17,19,0,0,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("23,23,23,23,23,24,28,28,28,20,12,21,28,28,28,0,0,0,0,0,8,17,16,21,0,0,28,28,22,23,23,23,23,23,23,23,23,23,23,23"); +realtmap.push("28,28,28,28,28,28,28,28,28,20,12,21,28,28,28,0,0,0,0,8,17,16,12,21,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,20,12,21,28,28,28,0,0,0,8,17,16,12,12,21,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,20,12,21,28,28,28,0,0,8,17,16,12,12,12,21,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("18,18,18,18,18,18,18,18,18,16,12,21,28,28,28,0,0,17,16,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,7,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,7,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,9,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,7,22,14,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,28,7,22,14,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,0,0,28,28,0,28,28,0,28,28,28,28,7,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,6,28,28,0,0,28,28,0,28,28,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,19,6,28,0,0,17,18,19,28,28,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,15,19,6,0,0,20,12,21,28,28,0,28,28,28,28,28,22,23,23,23,23,14,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,0,20,12,21,28,28,0,28,28,28,28,28,28,28,0,0,0,20,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,20,12,21,28,28,0,28,28,28,28,28,28,28,0,0,0,20,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,16,12,21,28,28,0,28,28,28,0,0,0,0,0,0,0,22,14,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,0,28,28,28,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,28,0,28,28,28,0,0,0,0,0,0,0,0,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,6,0,17,18,18,19,0,0,0,0,0,0,0,22,14,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,20,12,12,21,0,0,0,0,0,0,0,28,20,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,16,12,12,21,10,0,0,0,0,0,0,28,22,14,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,0,28,28,22,14,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,28,28,28,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,28,28,28,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,0,0,0,28,28,28,28,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,0,0,0,28,28,28,28,17,16,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,10,0,0,0,28,28,28,28,17,16,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,20,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,24,0,0,0,0,28,28,28,28,17,16,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,0,0,0,28,28,28,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,7,0,0,0,28,28,28,0,0,0,0,28,28,28,28,28,17,16,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,7,28,0,0,0,28,28,28,0,0,0,0,28,28,28,28,28,20,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,13,24,7,28,28,0,0,0,28,28,28,0,0,0,0,28,28,28,28,17,16,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,13,24,9,28,28,28,0,0,0,28,28,28,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,9,0,28,28,28,0,0,0,28,28,28,0,0,0,0,28,28,28,17,16,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,28,28,28,0,0,0,28,28,28,0,0,0,0,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,23,23,23,24,0,0,28,28,28,0,0,0,28,28,28,0,0,0,17,18,18,18,16,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,28,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,28,0,0,8,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,28,0,8,17,16,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,28,8,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,28,6,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,6,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,0,28,28,28,0,0,0,28,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,17,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,0,8,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,8,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,17,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("23,23,23,23,23,14,12,12,21,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23"); +realtmap.push("28,28,28,28,28,20,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,20,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,20,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,20,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("18,19,28,28,28,20,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18"); +realtmap.push("12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("23,24,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23"); +realtmap.push("7,7,28,28,28,28,28,28,28,28,28,28,28,28,28,28,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28"); +realtmap.push("28,28,0,0,0,0,0,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28"); +realtmap.push("28,28,0,0,0,0,0,17,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28"); +realtmap.push("0,0,0,0,0,0,0,22,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,8,8,8,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,17,18,19,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,22,23,24,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,28,28,28,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,28,28,28,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,28,28,28,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,28,28,28,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0"); +realtmap.push("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,0,0"); +realtmap.push("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,24,0,0"); +realtmap.push("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0"); +realtmap.push("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0"); +realtmap.push("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0"); +realtmap.push("0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0,28,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,0,0,0,0,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,24,0,0,0,0,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,17,18,18,18,18,18,18,19,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,22,23,23,23,23,23,23,24,10,0,0,0,0,0,0,0,0,0,0,28,28,0,0,28,28,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,7,7,7,7,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,28,28,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,28,28,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,28,28,28,28,28,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,17,18,18,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,22,23,23,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,24,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,17,18,18,19,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,22,23,23,24,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,8,8,8,8,8,8,8,8"); +realtmap.push("18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,17,18,18,18,18,18,18,18"); +realtmap.push("12,21,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,22,23,23,23,23,23,14,12"); +realtmap.push("12,15,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,28,28,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,21,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,28,28,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,15,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,28,28,28,28,28,28,20,12"); +realtmap.push("23,23,14,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,0,0,28,28,28,28,28,28,22,23"); +realtmap.push("28,28,20,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,28,28,28,28,28,28"); +realtmap.push("28,28,22,23,23,23,23,14,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,20,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,20,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,20,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,28,28"); +realtmap.push("28,28,28,28,28,28,28,22,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,28,28"); +realtmap.push("0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +realtmap.push("8,8,8,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8"); +realtmap.push("18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,18"); +realtmap.push("12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +realtmap.push("12,12,21,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +realtmap.push("12,12,21,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +realtmap.push("12,12,21,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +realtmap.push("12,12,21,6,6,6,6,6,6,28,28,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12"); +realtmap.push("12,12,15,18,18,18,18,18,19,28,28,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,8,8,8,8,8,8,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,17,18,18,18,18,18,16,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,17,18,16,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,22,23,14,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,28,28,28,0,0,28,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,28,0,0,0,0,0,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,15,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,8,8,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,15,18,19,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,23,24,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,8,8,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,20,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,8,8,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,15,18,19,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,23,24,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,8,8,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,17,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,13,23,23,23,23,23,14,21,0,0,0,20,12,12,12,13,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,21,9,9,9,9,9,20,21,0,0,0,20,12,12,12,21,9,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,21,0,0,0,0,0,20,21,0,0,0,20,12,12,12,21,0,9,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,21,0,0,0,0,0,20,21,0,0,0,22,23,23,23,24,0,0,9,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,21,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0,0,9,20,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,14,12"); +realtmap.push("23,24,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,22,23"); +realtmap.push("0,0,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,22,24,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,23,23,14,12,12,12,12,12,12,21,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,21,0,0,0,0,0,0"); +realtmap.push("18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,15,19,0,0,17,18,18"); +realtmap.push("12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,13,24,0,0,20,12,12"); +realtmap.push("12,12,12,15,18,18,18,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,21,0,0,0,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,21,0,0,0,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,21,8,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,23,23,14,12,21,0,0,0,20,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,15,19,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,21,0,0,17,16,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,0,0,17,18,18,18,19,0,0,0,0,0,0,0,0,11,20,12,21,0,0,22,23,23,14"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,0,20,12,12,12,21,0,0,0,0,0,0,0,0,11,20,12,21,0,0,0,0,0,20"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,8,20,12,12,12,21,8,8,8,8,0,0,0,0,11,20,12,21,0,0,0,0,0,20"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,16,12,12,12,15,18,18,18,19,10,0,0,0,11,20,12,21,0,0,0,0,0,20"); +realtmap.push("23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,21,0,0,0,0,0,22"); +realtmap.push("9,9,9,9,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,21,0,0,0,0,0,9"); +realtmap.push("0,0,0,0,11,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,21,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,15,18,18,19,0,0,0"); +realtmap.push("0,0,0,0,0,11,22,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,11,20,12,12,12,13,24,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,13,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,21,10,0,0,0,11,20,12,12,13,24,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,13,24,9,9,9,9,9,9,9,9,20,12,12,12,12,12,12,21,10,0,0,0,11,20,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,21,10,0,0,0,11,20,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,22,23,23,23,23,23,23,24,10,0,0,0,11,20,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,21,10,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,11,20,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,21,10,0,0,0,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,17,16,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,21,10,0,28,28,28,28,28,28,28,28,28,0,0,17,18,18,18,18,18,18,18,16,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,17,16,21,10,0,28,28,28,28,28,28,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,17,16,12,21,10,0,28,28,28,28,28,28,28,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,22,14,12,15,19,8,6,6,6,6,6,6,6,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,22,14,12,15,18,18,18,18,18,18,18,19,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,28,28,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,12,12,12,12,12,12,12,12,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,12,12,12,12,13,23,23,23,24,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,13,23,23,23,24,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,15,19,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,21,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,15,18,19,0,0"); +realtmap.push("18,18,19,0,0,0,11,20,12,21,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,13,23,23,23,23,14,12,12,15,18,18"); +realtmap.push("12,12,21,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12,12,21,28,28,28,28,22,23,23,23,14,12"); +realtmap.push("23,23,24,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,22,23"); +realtmap.push("0,0,0,0,0,0,11,20,12,21,28,28,28,28,17,18,18,19,0,0,0,0,20,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,21,28,28,28,28,20,12,12,15,18,18,18,18,16,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,21,28,28,28,28,22,23,23,23,14,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,22,23,23,23,14,12,12,12,12,12,12,21,28,28,28,28,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,28,28,0,0,22,23,23,23,14,12,12,21,28,28,28,28,17,18,18,19,0,0"); +realtmap.push("18,19,0,0,0,0,11,20,12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,21,28,28,28,28,20,12,12,15,18,18"); +realtmap.push("12,15,18,18,18,18,18,16,12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,21,28,28,28,28,20,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,21,28,28,28,28,22,23,23,23,14,12"); +realtmap.push("23,23,14,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,21,28,28,28,28,0,0,0,0,22,23"); +realtmap.push("0,0,22,23,23,23,14,12,12,12,12,12,12,21,28,28,28,28,6,6,8,8,0,0,0,0,20,12,12,21,28,28,28,28,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,22,23,23,23,14,12,12,21,28,28,28,28,17,18,18,19,0,0,0,0,20,12,12,21,28,28,28,28,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,28,28,22,23,23,24,28,28,28,28,20,12,12,21,0,0,0,0,20,12,12,21,28,28,28,28,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,0,0,0,0,20,12,12,21,6,6,6,6,0,0,0,0,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,20,12,12,15,18,18,18,19,8,8,8,8,0,0"); +realtmap.push("8,8,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,20,12,12,12,12,12,12,15,18,18,18,19,8,8"); +realtmap.push("18,19,8,8,8,8,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,22,23,23,23,14,12,12,12,12,12,12,15,18,18"); +realtmap.push("12,15,18,18,18,19,0,0,28,28,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,0,0,0,0,22,23,23,23,14,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,15,18,18,18,19,28,28,28,28,28,28,28,28,20,12,12,21,28,28,0,0,0,0,0,0,28,28,28,28,22,23,23,23,14,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,20,12,12,21,28,28,0,0,0,0,0,0,28,28,28,28,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,16,12,12,21,28,28,0,0,0,0,0,0,0,0,28,28,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,6,8,8,0,0,0,0,0,0,28,28,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,19,8,8,8,8,0,0,28,28,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,19,0,0,28,28,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12"); +realtmap.push("23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,21,28,28,28,28,22,23"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,11,20,21,28,28,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,11,20,21,28,28,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,21,28,28,28,28,0,0"); +realtmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,21,28,28,28,28,0,0"); +realtmap.push("18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,28,28,0,0,11,20,15,18,18,18,18,18,18"); +realtmap.push("12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,28,28,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,22,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,24,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,17,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,22,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,22,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23,23,14,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,13,23,23,23,23,23,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,6,6,6,6,6,6,6,6,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,17,18,18,18,18,18,18,18,18,18,19,0,0,0,0,0,0,17,18,18,19,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,22,23,23,24,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,13,23,23,23,23,23,23,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,17,18,16,12,12,12,12,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,22,23,23,23,23,23,14,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,6,6,6,6,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,17,18,18,19,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,22,23,23,24,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,20,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,22,23,24,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,17,18,19,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,22,23,24,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,28,28,28,28,28,28,28,17,19,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,21,28,28,28,28,28,28,28,28,28,28,28,20,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,20,12,12,12"); +realtmap.push("12,15,18,18,18,18,18,18,18,18,18,18,18,16,21,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,6,6,6,6,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,19,28,28,28,28,28,17,19,28,28,28,28,28,28,28,0,0,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,6,6,6,6,6,20,21,28,28,28,28,28,28,28,0,0,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,16,21,28,28,28,28,28,28,28,0,0,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,17,18,18,18,18,18,16,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,22,23,14,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,20,12,12,12,12,12,12,12"); +realtmap.push("23,23,23,23,23,14,13,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,22,14,13,23,23,23,23,23"); +realtmap.push("28,28,28,28,28,22,24,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,22,24,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,7,7,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,7,7,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28"); +realtmap.push("18,18,18,18,18,18,18,18,19,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,22,23,23,23,23,23,14,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,22,24,28,28,28,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,7,7,28,28,28,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,6,6,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,28,28,28,28,28,17,19,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,15,18,18,18,18,18,16,15,18,18,18,18,18,18,19,10,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,0,0,11,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,17,18,18,18,16,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,10,0,0,0,0,0,22,23,23,23,14,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,0,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,13,23,23,23,14,12,13,23,23,23,23,23,23,23,23,23,24,10,0,0,0,0,0,0,0,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,24,9,9,9,20,12,21,7,7,7,7,7,7,7,7,9,9,0,0,0,0,0,0,0,0,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,22,23,24,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,28,28,28,28,20,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,22,14,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,0,0,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,10,0,0,0,17,18,19,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,15,19,8,8,8,20,12,21,6,6,6,6,6,6,6,6,8,8,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,15,18,18,18,16,12,15,18,18,18,18,18,18,18,18,18,19,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,24,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,24,7,7,7,7,7,9,9,9,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,13,24,0,0,0,0,28,28,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,11,20,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,17,16,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,6,6,6,6,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,17,18,18,18,16,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,21,10,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,15,19,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,22,23,23,23,23,14,13,23,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,20,21,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,28,28,22,24,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,28,28,28,28,28,28,0,0,0,0,0,0,20,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,14,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,15,18,18,18,18,19,0,0,0,0,0,0,0,0,0,0,17,19,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,0,0,0,0,0,0,0,0,0,20,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,18,18,18,16,21,0,0,0,0,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,0,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,19,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,13,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,0,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,20,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,22,23,23,23,23,23,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,22,23,23,23,14,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,22,23,23,23,14,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,19,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,15,18,18,18,18,18,18,18,19,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,13,23,23,23,14,12,12,12,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,22,23,23,14,12,12,12,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,21,28,28,28,28,28,28,22,23,23,14,12,12,21,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,13,24,28,28,28,28,28,28,28,28,28,22,23,23,24,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("23,23,23,23,23,14,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,20,12,12,12,12,12,21,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,22,23,23,23,23,23,24,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,0,28,28,28,28,28,20,12,12,12,12,12,12,12,12,12"); +realtmap.push("18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,16,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); +realtmap.push("12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"); + +fillcontents(realtmap); + } + + public var back:Array = new Array(); + public var contents:Array = new Array(); + public var minitower:Array = new Array(); + public var vmult:Array = new Array(); + public var minitowermode:Boolean; + + public var realtmap:Array = new Array(); + public var i:int, j:int, k:int; + } +} \ No newline at end of file diff --git a/mobile_version/levels/warpclass.as b/mobile_version/levels/warpclass.as new file mode 100644 index 00000000..648e5065 --- /dev/null +++ b/mobile_version/levels/warpclass.as @@ -0,0 +1,1005 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class warpclass extends Sprite { + public function rn(rx:int, ry:int):int { + return rx + (ry * 100); + } + + public function loadlevel(rx:int, ry:int, game:gameclass, obj:entityclass):void { + var t:int; + + rx -= 100; ry -= 100; + rx += 50 - 14; ry += 49; //warp + + t = rx + (ry * 100); + tmap.reset(); + coin = 0; rcol = 0; + warpx = false; warpy = false; + + roomname = "Untitled room ["+String(rx) + "," + String(ry)+"]"; + + switch(t) { +case rn(50,50): + +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("161,161,161,161,161,161,161,161,161,161,161,161,161,122,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,162,160,161,161,161,161,161,161,162,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,80,80,80,80,80,80,202,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("241,241,241,241,241,241,241,241,241,241,241,241,241,82,80,202,200,80,80,80,80,80,80,202,200,80,121,161,161,161,161,161,161,161,161,161,161,161,161,161"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,200,80,80,80,80,80,80,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,240,241,241,241,241,241,241,242,240,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,160,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,81,241,241,241,241,241,241,241,241,241,241,241,241,241"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); +tmap.push("120,120,120,120,120,120,120,120,120,120,120,120,120,200,80,202,0,0,0,0,0,0,0,0,200,80,202,120,120,120,120,120,120,120,120,120,120,120,120,120"); + +obj.createentity(game, 288, 168, 10, 1, 50500); // (savepoint) + +if(game.intimetrial) { + obj.createblock(0, 0, 0, 8, 240); +} + +rcol = 0; +warpy = true; +roomname = "This is how it is"; +break; + +case rn(51,50): + +tmap.push("247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,86,208,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("167,167,167,167,167,168,166,167,167,167,167,168,0,0,0,0,206,86,208,0,0,0,0,166,167,167,167,167,167,167,167,167,168,166,167,167,167,167,167,167"); +tmap.push("247,247,247,247,247,248,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86,208,246,247,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,87,247,247,247,247,88,86,208,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,208,126,126,126,126,206,86,208,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,208,126,126,126,126,206,86,208,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,246,247,247,247,247,248,0,0,0,0,206,86,208,0,0,0,0,206,86,208,126,126,126,126,206,86,208,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,166,167,167,167,167,168,0,0,0,0,206,86,208,0,0,0,0,206,86,208,126,126,126,126,206,86,208,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,127,167,167,167,167,128,86,208,0,0,0,0,0,0,0"); +tmap.push("167,167,168,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,86,86,86,86,86,86,86,208,0,0,0,0,166,167,167"); +tmap.push("247,247,248,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,246,247,247,247,247,247,247,247,247,248,0,0,0,0,246,247,247"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,246,247,248,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,206,86,86,86,86,208,0,0,0,0,206,86,208,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,246,247,247,247,247,248,0,0,0,0,246,247,248,0,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("167,167,167,167,167,168,0,0,0,0,0,0,0,0,0,0,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); +tmap.push("86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,0,206,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); +tmap.push("247,247,247,88,86,208,0,0,0,0,0,0,0,0,0,0,206,86,87,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126"); +tmap.push("126,126,126,206,86,208,0,0,0,0,166,167,167,167,167,168,206,86,208,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126"); +tmap.push("126,126,126,206,86,208,0,0,0,0,206,86,86,86,86,208,206,86,208,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126"); +rcol = 2; +warpx = true; +roomname = "A Bisected Spiral"; +break; + + +case rn(51,51): + +tmap.push("83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83"); +tmap.push("83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83"); +tmap.push("244,244,244,244,244,245,0,0,0,0,243,244,244,244,244,244,244,245,0,0,0,0,243,244,244,244,244,244,244,245,0,0,0,0,243,244,244,244,244,244"); +tmap.push("164,164,164,165,0,0,0,0,0,0,0,0,163,164,164,165,0,0,0,0,0,0,0,0,163,164,164,165,0,0,0,0,0,0,0,0,163,164,164,164"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,243,244,244,244"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,163,164,164,164,164,164,164,164,164,164,164,165"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,243,244,244,245,243,244,244,244,244,244,244,244,244,244,244,245"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,164,164"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,163,164,164,164,164,164,164,164,164,164,164,165,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,243,244,244,245,243,244,244,244,244,244,244,244,244,244,244,245,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,164,164,164,165,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,83,205,0,0,0,0,0,0,0,0,203,83,83,83"); +tmap.push("244,244,244,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,244,244,244,245,0,0,0,0,0,0,0,0,243,244,244,244"); +tmap.push("164,164,164,164,164,165,0,0,0,0,163,164,164,164,164,164,164,165,0,0,0,0,163,164,164,164,164,164,164,165,0,0,0,0,163,164,164,164,164,164"); +tmap.push("83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83"); +tmap.push("83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83"); + +obj.createentity(game, 248, 80, 10, 1, 51510); // (savepoint) +obj.createentity(game, 136, 128, 1, 3, 3, 128, 120, 288, 152); // Enemy, bounded +obj.createentity(game, 104, 192, 10, 1, 51511); // (savepoint) +rcol = 1; warpy = true; +roomname = "Take the Red Pill"; +break; + +case rn(52,51): + +tmap.push("95,95,95,95,95,217,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("256,256,256,256,256,257,0,0,0,0,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("176,176,176,176,176,176,176,176,176,177,175,176,177,0,0,0,0,175,176,177,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176"); +tmap.push("256,256,256,256,256,256,256,256,256,257,215,95,217,0,0,0,0,215,95,217,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,255,256,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,175,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("176,176,176,176,176,177,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,175,176,176,177,175,176,176,176,177,175,176,176,176,176,176,176"); +tmap.push("95,95,95,95,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,215,95,95,95,217,215,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,215,95,95,95,217,215,95,95,95,95,95,95"); +tmap.push("95,95,95,95,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,215,95,95,95,217,215,95,95,95,95,95,95"); +tmap.push("256,256,256,256,256,257,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,255,256,256,256,257,255,256,256,256,256,256,256"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,215,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,255,256,257,0,0,0,0,215,95,217,0,0,0,0,255,256,256,257,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,255,256,257,0,0,0,0,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176"); +tmap.push("95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95"); +tmap.push("256,256,256,256,256,256,256,256,256,256,97,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,96,256,256,256,256,256,256,256,256,256,256,256,256,256"); +tmap.push("135,135,135,135,135,135,135,135,135,135,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); +tmap.push("135,135,135,135,135,135,135,135,135,135,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); +tmap.push("135,135,135,135,135,135,135,135,135,135,215,95,217,175,176,176,176,176,176,176,176,176,176,177,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); +tmap.push("135,135,135,135,135,135,135,135,135,135,215,95,217,215,95,95,95,95,95,95,95,95,95,217,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); +tmap.push("135,135,135,135,135,135,135,135,135,135,215,95,217,215,95,95,95,95,95,95,95,95,95,217,215,95,217,135,135,135,135,135,135,135,135,135,135,135,135,135"); + +obj.createentity(game, 32, 24, 1, 3, 4, -56, -40, 384, 312); // Enemy, bounded +obj.createentity(game, 96, 24, 1, 3, 4, -56, -40, 384, 312); // Enemy, bounded +obj.createentity(game, 160, 24, 1, 3, 4, -56, -40, 384, 312); // Enemy, bounded +obj.createentity(game, 224, 24, 1, 3, 4, -56, -40, 384, 312); // Enemy, bounded +obj.createentity(game, 232, 152, 10, 1, 51520); // (savepoint) +rcol = 5; warpx = true; +roomname = "Short Circuit"; +break; + +case rn(52,50): + +tmap.push("213,212,92,214,172,174,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,252,254,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,252,254,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,252,254,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,7,7,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,253"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,173"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,172,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,174,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,6,6,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,0,0,0,0,0,0,0,0,212,214,0,0,0,0,0,0,172,174,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,172,174,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); +tmap.push("213,212,92,214,252,254,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,214,0,0,0,0,0,0,212,92,92,92"); + +obj.createentity(game, 32, 16, 10, 0, 50520); // (savepoint) +rcol = 4; warpy = true; +roomname = "As you like it"; +break; + + +case rn(53,50): + +tmap.push("250,250,250,250,250,250,251,0,0,0,209,211,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("170,170,170,170,170,170,170,170,170,171,209,211,0,0,0,169,170,170,170,170,170,170,170,171,169,171,169,170,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("250,250,250,250,250,250,250,250,250,251,209,211,0,0,0,249,250,250,250,250,250,250,250,251,209,211,249,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("170,170,170,170,171,169,171,0,0,0,209,211,169,170,170,170,170,170,170,170,170,171,0,0,209,211,0,0,169,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("89,89,89,89,211,209,211,0,0,0,209,211,209,89,89,89,89,89,89,89,89,211,0,0,209,211,0,0,209,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("250,250,250,250,251,209,211,0,0,0,209,211,249,250,250,250,250,250,250,250,250,251,0,0,209,211,0,0,249,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,0,0,169,171,0,0,209,211,0,0,169,171,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,169,171,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,0,0,0,0,0,0,0"); +tmap.push("170,170,170,170,171,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,169,171,169,170,170,170,170"); +tmap.push("89,89,89,89,211,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,209,211,0,0,209,211,0,0,0,209,211,209,89,89,89,89"); +tmap.push("250,250,250,250,251,249,251,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,249,251,0,0,209,211,0,0,0,209,211,249,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0,0,209,211,0,0,0,209,211,0,0,0,0,0"); +tmap.push("170,170,170,170,170,170,170,170,170,171,209,211,0,0,0,209,211,0,0,0,209,211,169,170,170,170,170,171,209,211,0,0,0,209,211,0,0,0,169,170"); +tmap.push("250,250,250,250,250,250,250,250,250,251,249,251,0,0,0,209,211,0,0,0,249,251,249,250,250,250,250,251,249,251,0,0,0,209,211,0,0,0,249,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,209,211,0,0,0,0,0"); +tmap.push("170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,209,211,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,209,211,169,170,170,170,170"); + +obj.createentity(game, 16, 120, 10, 1, 50530); // (savepoint) +rcol = 3; warpx = true; +roomname = "Maze With No Entrance"; +break; + +case rn(53,49): + +tmap.push("126,126,126,126,206,86,208,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86"); +tmap.push("126,126,126,126,206,86,208,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,166,167,168,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,166,167,167,167,167,168,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,166,167"); +tmap.push("126,126,126,126,206,86,208,206,86,86,86,86,208,6,6,6,6,206,86,208,6,6,6,6,6,6,6,6,6,6,6,206,86,208,6,6,6,6,206,86"); +tmap.push("126,126,126,126,206,86,208,206,86,86,86,86,208,166,167,167,168,206,86,208,166,167,167,168,166,167,168,166,167,167,168,206,86,208,166,167,167,168,206,86"); +tmap.push("126,126,126,126,206,86,208,206,86,86,86,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86"); +tmap.push("126,126,126,126,206,86,208,206,86,86,86,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86"); +tmap.push("126,126,126,126,206,86,208,206,86,86,86,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86,208,206,86,86,208,206,86"); +tmap.push("126,126,126,126,206,86,208,206,86,86,86,86,208,246,247,247,248,246,247,248,246,247,247,248,206,86,208,246,247,247,248,246,247,248,246,247,247,248,206,86"); +tmap.push("126,126,126,126,206,86,208,206,86,86,86,86,208,7,7,7,7,7,7,7,7,7,7,7,206,86,208,7,7,7,7,7,7,7,7,7,7,7,206,86"); +tmap.push("126,126,126,126,206,86,208,246,247,247,247,247,248,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,246,247"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("126,126,126,126,206,86,208,0,0,0,166,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,167"); +tmap.push("126,126,126,126,206,86,208,0,0,0,206,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86"); + +obj.createentity(game, 64, 152, 10, 0, 49530); // (savepoint) +rcol = 2; warpy = true; +roomname = "As we go up, we go down"; +break; + +case rn(54,49): + +tmap.push("80,80,80,202,200,202,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,202,200,80"); +tmap.push("241,241,241,242,200,202,240,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,242,200,202,240,241"); +tmap.push("0,0,0,0,200,202,7,7,7,7,7,7,160,161,161,162,7,7,7,7,7,7,7,160,161,161,162,7,7,7,7,7,7,7,7,7,200,202,0,0"); +tmap.push("0,0,0,0,200,202,0,0,0,0,0,0,240,241,241,242,0,0,0,0,0,0,0,240,241,241,242,0,0,0,0,0,0,0,0,0,240,242,0,0"); +tmap.push("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,240,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("161,161,161,161,161,162,0,0,0,0,160,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,161,161,161,161,161"); +tmap.push("80,80,80,80,80,202,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,80,80,80,80"); +tmap.push("80,80,80,80,80,202,0,0,0,0,200,202,6,6,6,6,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,200,80,80,80,80,80"); +tmap.push("80,80,80,80,80,202,0,0,0,0,200,202,160,161,161,162,0,0,0,0,0,0,0,160,161,161,162,0,0,0,0,0,0,0,200,80,80,80,80,80"); +tmap.push("80,80,80,80,80,202,0,0,0,0,200,202,200,80,80,202,0,0,0,0,0,0,0,200,80,80,202,0,0,0,0,0,0,0,200,80,80,80,80,80"); +tmap.push("80,80,80,80,80,202,0,0,0,0,200,202,240,241,241,242,0,0,0,0,0,0,0,240,241,241,242,0,0,0,0,0,0,0,200,80,80,80,80,80"); +tmap.push("80,80,80,80,80,202,0,0,0,0,200,202,7,7,7,7,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,200,80,80,80,80,80"); +tmap.push("80,80,80,80,80,202,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,80,80,80,80"); +tmap.push("241,241,241,241,241,242,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,241,241,241,241,241"); +tmap.push("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,0,0,0,0,0,0,0,160,161,161,162,0,0,0,0,0,0,0,0,0,160,162,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,200,202,0,0,0,0,6,6,6,6,6,6,6,240,241,241,242,6,6,6,6,6,6,6,6,6,200,202,0,0"); +tmap.push("161,161,161,161,161,161,161,161,161,162,200,202,0,0,0,0,160,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,162,200,202,160,161"); +tmap.push("80,80,80,80,80,80,80,80,80,202,200,202,0,0,0,0,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,200,202,200,80"); + +obj.createentity(game, 296, 64, 10, 1, 49540); // (savepoint) +obj.createentity(game, 152-4-15+8, 32, 1, 0, 6, 128, 32, 288, 200); // Enemy, bounded +obj.createentity(game, 240-4-15+8, 186, 1, 1, 6, 128, 32, 288, 200); // Enemy, bounded +obj.createentity(game, 296, 152, 10, 0, 49541); // (savepoint) +rcol = 0; warpx = true; +roomname = "Time to get serious"; +break; + + +case rn(54,50): + +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,247"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,167,168,166,167,167"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,247,248,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,166,167,167,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,246,247,247,247,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +tmap.push("86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,86,86"); +if(!game.intimetrial){ + obj.createentity(game, (7 * 8) + 4, (6 * 8), 14); //Teleporter! +} +rcol = 2; warpy = true; +roomname = "Wheeler's Wormhole"; +break; + +case rn(55,50): + +tmap.push("212,92,92,214,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,0,0,0,0,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,0,0,0,0,0,0,0,0,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,252,253,253,254,212,92,92,214,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,252,253,253,254,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214"); +tmap.push("252,253,253,254,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,252,253,253,254"); +tmap.push("0,0,0,0,0,0,0,0,172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,252,253,253,254,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,174,0,0,0,0,212,92,92,214,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,0,0,0,0,212,92,92,214,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0"); +tmap.push("172,173,173,174,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,172,173,173,174"); +tmap.push("252,253,253,254,172,173,173,174,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,174,0,0,0,0,0,0,0,0,252,253,253,254"); +tmap.push("0,0,0,0,252,253,253,254,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,252,253,253,254,172,173,173,174,0,0,0,0,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,172,173,173,174,0,0,0,0,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,253,254,172,173,173,174,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,172,173,173,174,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,172,173,173,174,0,0,0,0"); +tmap.push("172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,172,173,173,174"); +tmap.push("212,92,92,214,172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,212,92,92,214,172,173,173,174,0,0,0,0,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); +tmap.push("212,92,92,214,212,92,92,214,212,92,92,214,172,173,173,174,0,0,0,0,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214,212,92,92,214"); + +obj.createentity(game, 96, 72, 1, 3, 8, 64, 56, 256, 152); // Enemy, bounded +obj.createentity(game, 240, 120, 1, 2, 8, 64, 56, 256, 152); // Enemy, bounded +obj.createentity(game, 72, 16, 10, 0, 50550); // (savepoint) +obj.createentity(game, 264, 176, 10, 1, 50551); // (savepoint) +rcol = 4; warpx = true; +roomname = "Ascending and Descending"; +break; + +case rn(55,51): + +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83"); +tmap.push("244,244,244,245,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,203,83"); +tmap.push("0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("0,0,0,0,0,0,0,0,203,205,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("164,164,164,165,0,0,0,0,203,205,0,0,0,0,163,164,165,163,164,164,164,164,164,164,164,164,164,164,164,164,165,163,164,165,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,243,245,0,0,0,0,203,83,205,203,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,205,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,243,244,245,243,244,244,244,244,244,244,244,244,244,244,244,244,245,243,244,245,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,163,164,164,164,164,164,164,164,164,165,7,7,7,7,7,7,7,7,163,165,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,243,244,244,244,244,244,244,244,244,245,0,0,0,0,0,0,0,0,243,245,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,163,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,163,165,0,0,0,0,0,0,0,0,163,164,164,164,164,164,164,164,164,165,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,243,245,6,6,6,6,6,6,6,6,243,244,244,244,244,244,244,244,244,245,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,163,164,165,163,164,164,164,164,164,164,164,164,164,164,164,164,165,163,164,165,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83,205,203,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,205,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,243,244,245,243,244,244,244,244,244,244,244,244,244,244,244,244,245,243,244,245,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,163,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,165,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,203,205,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83"); + +obj.createentity(game, 280, 24, 1, 2, 3, 128, 16, 304, 216); // Enemy, bounded +obj.createentity(game, 136, 192, 1, 3, 3, 128, 16, 304, 216); // Enemy, bounded +obj.createentity(game, 40, 8, 1, 0, 10, 24, -56, 120, 280); // Enemy, bounded +obj.createentity(game, 88, 8, 1, 0, 10, 24, -40, 120, 272); // Enemy, bounded +obj.createentity(game, 256, 128, 10, 1, 51550); // (savepoint) +obj.createentity(game, 136, 32, 10, 1, 51551); // (savepoint) +rcol = 1; warpy = true; +roomname = "Shockwave Rider"; +break; + +case rn(54,51): + +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,209,89,89,211,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,249,250,250,251,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,169,170,170,171,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,209,89,89,211,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,209,89,89,211,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,0,0,0,209,89,89,211,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,0,0,0,209,89,89,211,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,0,0,0,209,89,89,211,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,209,89,89,211,0,0,0,169,170,170,170,170,170,170,170,170,170,170,170,170,170,170"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,209,89,89,211,0,0,0,209,89,89,89,89,89,89,89,89,89,89,89,89,89,89"); +tmap.push("250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,251,249,250,250,251,0,0,0,249,250,250,250,250,250,250,250,250,250,250,250,250,250,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,171,169,170,170,171,169,170,170,170,170,170,170,170,170,171,0,0,0,0,169,170,170,170"); +tmap.push("89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,211,209,89,89,211,209,89,89,89,89,89,89,89,89,211,0,0,0,0,209,89,89,89"); + +obj.createentity(game, 296, 32, 10, 1, 51540); // (savepoint) +obj.createentity(game, 184, 192, 1, 18, 48, -800, -24, 4000, 264); // Enemy, bounded +obj.createentity(game, 88, 136, 1, 17, 48, -800, -32, 4000, 272); // Enemy, bounded +obj.createentity(game, 184, 80, 1, 18, 48, -800, -32, 4000, 272); // Enemy, bounded + + +obj.createentity(game, 8, 32, 20, 1); // (terminal) +obj.createblock(5, 8-8, 32, 20, 16, 17); + +rcol = 3; warpx = true; +roomname = "Sweeney's Maze"; +break; + +case rn(54,52): + +tmap.push("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,177,0,0,0,0,215,95,95,95"); +tmap.push("256,256,256,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,257,0,0,0,0,255,256,256,256"); +tmap.push("176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,176"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("256,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,256"); +tmap.push("176,176,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,177,0,0,0,0,175,176,176,176"); +tmap.push("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,257,0,0,0,0,215,95,95,95"); + +obj.createentity(game, 288, 200, 10, 1, 52540); // (savepoint) +obj.createentity(game, 48, 16, 1, 1, 10, 0, -40, 320, 296); // Enemy, bounded +obj.createentity(game, 64, 16+8+4+2, 1, 1, 10, 0, -48, 320, 280); // Enemy, bounded +obj.createentity(game, 80, 16+16+8+4, 1, 1, 10, 0, -40, 320, 280); // Enemy, bounded +obj.createentity(game, 96, 16+24+12+6, 1, 1, 10, 0, -40, 320, 304); // Enemy, bounded +obj.createentity(game, 112, 16+32+16+8, 1, 1, 10, 0, -48, 320, 288); // Enemy, bounded +obj.createentity(game, 128, 16+40+20+10, 1, 1, 10, 0, -40, 320, 280); // Enemy, bounded +obj.createentity(game, 144, 16+48+24+12, 1, 1, 10, 0, -56, 320, 296); // Enemy, bounded +obj.createentity(game, 160, 16+56+28+14, 1, 1, 10, 0, -48, 320, 288); // Enemy, bounded +obj.createentity(game, 176, 16+64+32+16, 1, 1, 10, 0, -48, 320, 296); // Enemy, bounded +obj.createentity(game, 192, 16+72+36+18, 1, 1, 10, 0, -40, 320, 280); // Enemy, bounded +obj.createentity(game, 208, 16+80+40+20, 1, 1, 10, 0, -48, 320, 280); // Enemy, bounded +rcol = 5; warpy = true; +roomname = "Mind The Gap"; +break; + +case rn(53,52): + +tmap.push("207,207,207,207,207,207,207,207,207,207,207,207,207,206,86,208,206,208,0,0,0,0,206,208,206,86,208,207,207,207,207,206,86,208,246,247,247,248,206,86"); +tmap.push("207,207,207,207,207,207,207,207,207,207,207,207,207,206,86,208,206,208,0,0,0,0,206,208,206,86,208,207,207,207,207,206,86,208,0,0,0,0,206,86"); +tmap.push("167,167,167,167,167,167,167,167,167,167,167,167,167,128,86,208,206,208,0,0,0,0,206,208,206,86,127,167,167,167,167,128,86,208,0,0,0,0,206,86"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,208,206,208,0,0,0,0,206,208,206,86,86,86,86,86,86,86,86,208,0,0,0,0,206,86"); +tmap.push("247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,208,0,0,0,0,206,208,246,247,247,247,247,247,247,247,247,248,0,0,0,0,246,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,166,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("166,168,0,0,0,0,166,168,166,167,167,167,167,167,167,168,206,208,0,0,0,0,206,208,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); +tmap.push("246,248,0,0,0,0,246,248,246,247,247,247,247,247,247,248,206,208,0,0,0,0,206,208,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,166,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,206,208,0,0,0,0,206,208,166,167,167,167,167,167,167,168,166,168,0,0,0,0,166,168"); +tmap.push("247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,208,0,0,0,0,206,208,246,247,247,247,247,247,247,248,246,248,0,0,0,0,246,248"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,166,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("166,168,0,0,0,0,166,168,166,167,167,167,167,167,167,168,206,208,0,0,0,0,206,208,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); +tmap.push("246,248,0,0,0,0,246,248,246,247,247,247,247,247,247,248,246,248,0,0,0,0,246,248,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167"); +tmap.push("86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86"); + +obj.createentity(game, 152, 200, 10, 1, 52530); // (savepoint) +obj.createentity(game, 248, 48, 1, 3, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 152, 48, 1, 3, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 152, 96, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 56, 96, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 104, 144, 1, 3, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 200, 144, 1, 3, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 280, 16, 9, 12); //Shiny Trinket + + +obj.createentity(game, 24, 200, 20, 1); // (terminal) +obj.createblock(5, 24-8, 200, 20, 16, 18); +rcol = 2; warpx = true; +roomname = "Edge Games"; +break; + +case rn(53,51): + +tmap.push("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); +tmap.push("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); +tmap.push("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); +tmap.push("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); +tmap.push("244,244,245,0,0,0,0,243,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,244,244"); +tmap.push("0,0,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,164,164,164,164,164,164,165,0,0,0,0,163,165,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,244,244,244,244,244,244,245,0,0,0,0,243,245,0,0,0,0,0,0,0,0"); +tmap.push("164,164,164,164,164,164,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,164,164,164,164"); +tmap.push("83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83"); +tmap.push("83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83"); +tmap.push("244,244,244,244,244,244,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,244,244,244,244"); +tmap.push("0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0"); +tmap.push("0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0"); +tmap.push("0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0"); +tmap.push("0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0"); +tmap.push("0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,0,0,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,0"); +tmap.push("0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0"); +tmap.push("0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,0"); +tmap.push("0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,0,0,0,0,0,0,243,245,0,0,0,0,243,245,0,0,0,0,0"); +tmap.push("164,164,164,165,0,0,0,0,163,165,0,0,0,0,163,164,164,164,164,164,164,164,164,164,164,164,164,165,0,0,0,0,163,165,0,0,0,0,163,164"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83"); +tmap.push("83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,205,0,0,0,0,203,83"); +tmap.push("244,244,244,245,0,0,0,0,243,245,0,0,0,0,243,244,244,244,244,244,244,244,244,244,244,244,244,245,0,0,0,0,243,245,0,0,0,0,243,244"); +tmap.push("164,164,165,0,0,0,0,163,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,165,0,0,0,0,163,165,0,0,0,0,163,164,164"); +tmap.push("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); +tmap.push("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); +tmap.push("83,83,205,0,0,0,0,203,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,205,0,0,0,0,203,205,0,0,0,0,203,83,83"); + +obj.createentity(game, 152, 112, 13); +rcol = 1; warpx = true; warpy = true; +roomname = "The Brown Gate"; +break; + +case rn(55,49): + +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,252,253,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,253,254,0,0"); +tmap.push("6,6,172,173,174,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0,172,173,174,6,6"); +tmap.push("173,174,212,92,214,0,0,0,0,0,0,172,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,174,0,0,0,0,212,92,214,172,173"); +tmap.push("253,254,252,253,254,0,0,0,0,0,0,252,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,254,0,0,0,0,252,253,254,252,253"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,0,0,0,0,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,173,174,0,0,0,0,172,173,173,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,172,173,173,174,0,0,0,0,0,212,92,92,214,0,0,0,0,212,92,92,214,0,0,0,0,0,172,173,173,174,0,0,0,0,0"); +tmap.push("6,6,6,6,6,252,253,253,254,6,6,6,6,6,252,253,253,254,0,0,0,0,252,253,253,254,6,6,6,6,6,252,253,253,254,6,6,6,6,6"); +tmap.push("173,173,173,173,173,173,173,173,173,173,173,173,173,174,172,173,174,0,0,0,0,0,0,172,173,174,172,173,173,173,173,173,173,173,173,173,173,173,173,173"); +tmap.push("92,92,92,92,92,92,92,92,92,92,92,92,92,214,212,92,214,0,0,0,0,0,0,212,92,214,212,92,92,92,92,92,92,92,92,92,92,92,92,92"); +tmap.push("253,253,253,253,253,253,253,253,253,253,253,253,253,254,212,92,214,0,0,0,0,0,0,212,92,214,252,253,253,253,253,253,253,253,253,253,253,253,253,253"); +tmap.push("7,7,172,173,174,7,7,7,7,7,7,7,7,7,212,92,214,0,0,0,0,0,0,212,92,214,7,7,7,7,7,7,7,7,7,172,173,174,7,7"); +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,212,92,214,172,173,173,173,173,174,212,92,214,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,252,253,254,0,0,0,0,0,0,0,0,0,252,253,254,252,253,253,253,253,254,252,253,254,0,0,0,0,0,0,0,0,0,252,253,254,0,0"); +tmap.push("0,0,172,173,174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,173,174,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,172,173,173,173,173,173,174,0,0,0,0,0,0,0,0,172,173,173,173,173,173,174,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,252,253,253,253,253,253,254,0,0,0,0,0,0,0,0,252,253,253,253,253,253,254,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); +tmap.push("0,0,212,92,214,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,92,214,0,0"); + +obj.createentity(game, 152, 112, 13); +obj.createentity(game, 152, 152, 10, 0, 49550); // (savepoint) +rcol = 4; warpx = true; warpy = true; +roomname = "To The Batcave!"; +break; + +case rn(55,52): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,209,89,89,89,89,89,89,211,6,6,6,6,6,6,6,6,0,0,0,0,0,0,6,6"); +tmap.push("170,170,170,170,170,170,170,170,171,169,170,170,170,170,170,171,209,89,89,89,89,89,89,211,169,170,170,170,170,170,170,171,0,0,0,0,0,0,169,170"); +tmap.push("89,89,89,89,89,89,89,89,211,249,250,250,250,250,250,251,209,89,89,89,89,89,89,211,249,250,250,250,250,250,250,251,0,0,0,0,0,0,209,89"); +tmap.push("89,89,89,89,89,89,89,89,211,7,7,7,7,7,7,7,209,89,89,89,89,89,89,211,7,7,7,7,7,7,7,7,0,0,0,0,0,0,209,89"); +tmap.push("250,250,250,250,250,250,250,250,251,0,0,0,0,0,0,0,249,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,249,250"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,170,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,169,170,170,170,170,170,170,171,0"); +tmap.push("6,6,6,6,6,6,6,6,6,6,209,89,89,89,89,89,211,6,6,6,6,6,6,6,6,6,6,6,6,6,6,209,89,89,89,89,89,89,211,6"); +tmap.push("170,171,169,170,170,170,170,170,170,171,209,89,89,89,89,89,211,169,170,170,170,170,170,170,170,170,170,170,170,170,171,209,89,89,89,89,89,89,211,169"); +tmap.push("250,251,209,89,89,89,89,89,89,211,249,250,250,250,250,250,251,249,250,250,250,250,250,250,250,250,250,250,250,250,251,249,250,250,250,250,250,250,251,249"); +tmap.push("7,7,209,89,89,89,89,89,89,211,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7"); +tmap.push("0,0,249,250,250,250,250,250,250,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 152, 112, 13); +obj.createentity(game, 136, 40, 10, 1, 52550); // (savepoint) +rcol = 3; warpx = true; warpy = true; +roomname = "This will make you flip"; +break; + +case rn(52,52): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,175,176,176,177,0,0,0,0,0,0,0,0,0,0"); +tmap.push("176,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,215,95,95,217,0,0,0,0,0,0,0,0,175,176"); +tmap.push("95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,136,176,176,176,176,137,95,217,215,95,95,217,0,0,0,0,0,0,0,0,215,95"); +tmap.push("95,95,217,6,6,6,6,6,6,6,6,6,0,0,0,0,215,95,95,95,95,95,95,95,95,217,215,95,95,217,6,6,6,6,6,6,6,6,215,95"); +tmap.push("95,95,217,175,176,176,176,176,176,176,176,177,0,0,0,0,255,256,256,256,256,256,256,256,256,257,215,95,95,217,175,176,176,176,177,175,176,177,215,95"); +tmap.push("256,256,257,255,256,256,256,256,256,256,256,257,0,0,0,0,175,177,7,7,7,7,7,175,176,177,215,95,95,217,215,95,95,95,217,255,256,257,255,256"); +tmap.push("176,177,0,0,0,0,0,0,0,175,176,177,0,0,0,0,255,257,0,0,0,0,0,215,95,217,215,95,95,217,215,95,95,95,217,7,7,7,175,176"); +tmap.push("256,257,0,0,0,0,0,0,0,215,95,217,0,0,0,0,7,7,0,0,0,0,0,255,256,257,255,256,256,257,255,256,256,256,257,0,0,0,255,256"); +tmap.push("0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,175,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("176,177,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,0,0,0,175,176,176,176,176,176,176"); +tmap.push("95,217,0,0,0,0,0,0,0,255,256,257,0,0,0,0,0,0,0,0,0,0,0,215,95,217,0,0,0,0,6,6,6,215,95,95,95,95,95,95"); +tmap.push("95,217,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,0,215,95,217,0,0,0,0,175,176,177,215,95,95,95,95,95,95"); +tmap.push("256,257,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,6,6,6,6,6,255,256,257,0,0,0,0,255,256,257,255,256,256,256,256,256,256"); +tmap.push("7,7,7,7,7,7,7,7,7,175,176,176,176,176,176,177,175,176,176,176,176,176,176,176,176,177,0,0,0,0,175,176,176,177,7,7,7,7,7,7"); +tmap.push("0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,217,215,95,95,95,95,95,95,95,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,255,256,256,256,256,256,257,215,95,96,256,256,256,256,97,95,217,0,0,0,0,215,95,95,217,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,255,256,256,257,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,217,216,216,216,216,215,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + +obj.createentity(game, 152, 112, 13); +obj.createentity(game, 288, 120, 10, 1, 52520); // (savepoint) +rcol = 5; warpx = true; warpy = true; +roomname = "Twisty Little Passages"; +break; + +case rn(50,51): + +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,205,243,244,244,244,244,244,244,244,244,244,244,245,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,205,163,164,165,163,164,164,164,164,164,164,164,165,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); +tmap.push("244,244,244,244,244,244,244,244,244,244,244,244,244,245,203,83,205,243,244,244,244,244,244,244,244,245,0,0,0,0,243,244,244,244,244,244,244,244,244,244"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("164,164,164,164,164,164,165,49,50,163,165,0,0,0,203,83,205,163,164,164,164,164,164,164,164,165,0,0,0,0,163,164,165,49,50,163,164,165,163,164"); +tmap.push("83,83,83,83,83,83,205,49,50,203,205,0,0,0,203,83,205,203,83,83,83,83,83,83,83,205,0,0,0,0,203,83,205,49,50,203,83,205,203,83"); +tmap.push("244,244,244,244,244,244,245,49,50,243,245,0,0,0,203,83,205,243,244,244,244,244,244,244,244,245,0,0,0,0,203,83,205,49,50,203,83,205,243,244"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,163,164,165,0,0,0,0,203,83,205,49,50,203,83,205,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,163,164,164,165,203,83,205,49,50,203,83,205,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,203,83,83,205,203,83,205,49,50,203,83,205,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,203,83,83,205,203,83,205,49,50,203,83,205,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,243,244,244,245,203,83,205,49,50,203,83,205,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,0,0,0,0,203,83,205,49,50,203,83,205,0,0"); +tmap.push("164,164,164,164,164,164,165,49,50,163,165,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,0,0,0,0,203,83,205,49,50,203,83,205,163,164"); +tmap.push("83,83,83,83,83,83,205,49,50,203,205,0,0,0,203,83,205,0,0,0,0,0,0,203,83,205,0,0,0,0,203,83,205,49,50,203,83,205,203,83"); +tmap.push("244,244,244,244,244,244,245,49,50,243,245,0,0,0,203,83,205,0,0,0,0,0,0,243,244,245,0,0,0,0,243,244,245,49,50,243,244,245,243,244"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("164,164,164,164,164,164,164,164,164,164,164,164,164,165,203,83,205,163,164,164,164,164,164,164,164,165,0,0,0,0,163,164,164,164,164,164,164,164,164,164"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,205,243,244,245,243,244,244,244,244,244,244,244,245,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,205,163,164,164,164,164,164,164,164,164,164,164,165,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); +tmap.push("83,83,83,83,83,83,83,83,83,83,83,83,83,205,203,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,203,83,83,83,83,83,83,83,83,83"); + +obj.createentity(game, 152, 112, 13); +obj.createentity(game, 24, 128, 10, 1, 52510); // (savepoint) +obj.createentity(game, 56, 48, 1, 0, 10, -16, -16, 336, 256); // Enemy, bounded +obj.createentity(game, 264, 48, 1, 0, 10, -16, -16, 336, 256); // Enemy, bounded +obj.createentity(game, 152, 48, 1, 2, 8, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 152, 176, 1, 2, 8, -24, -16, 344, 256); // Enemy, bounded +rcol = 1; warpx = true; warpy = true; +roomname = "That's Why I Have To Kill You"; +break; + +case rn(52,49): + +tmap.push("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); +tmap.push("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); +tmap.push("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); +tmap.push("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); +tmap.push("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); +tmap.push("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); +tmap.push("247,247,247,247,247,248,0,0,0,0,246,248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,248,0,0,0,0,246,247,247,247,247,247"); +tmap.push("7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,7,7,7,7,7,7"); +tmap.push("6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,6,6,6,6,6,6"); +tmap.push("167,167,167,167,167,168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,166,168,0,0,0,0,166,167,167,168,166,167"); +tmap.push("86,86,86,86,86,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,208,206,86"); +tmap.push("86,86,86,86,86,208,166,168,49,50,166,168,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,206,208,0,0,0,0,246,247,247,248,206,86"); +tmap.push("247,247,247,247,247,248,246,248,49,50,246,248,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,208,0,0,0,0,7,7,7,7,246,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("167,167,167,167,167,167,167,168,49,50,166,168,166,167,167,167,167,167,167,167,167,167,167,167,167,167,167,168,206,208,0,0,0,0,166,167,167,167,167,167"); +tmap.push("247,247,247,247,247,247,247,248,49,50,206,208,246,247,247,247,247,247,247,247,247,247,247,247,247,247,247,248,206,208,0,0,0,0,246,247,247,247,247,247"); +tmap.push("0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0"); +tmap.push("6,6,6,6,166,168,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,166,168,6,6,6,6"); +tmap.push("167,167,167,168,206,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,208,166,167,167,167"); +tmap.push("247,247,247,248,246,248,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,246,248,246,247,247,247"); +tmap.push("167,167,167,167,167,168,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,166,167,167,167,167,167"); +tmap.push("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); +tmap.push("86,86,86,86,86,208,0,0,0,0,206,208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,206,208,0,0,0,0,206,86,86,86,86,86"); + +obj.createentity(game, 152, 112, 13); +obj.createentity(game, 248, 16, 1, 0, 10, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 64, 16, 1, 0, 10, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 200, 56, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 152, 56, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 104, 56, 1, 2, 5, -24, -24, 344, 256); // Enemy, bounded +obj.createentity(game, 152, 152, 10, 0, 49520); // (savepoint) +rcol = 2; warpx = true; warpy = true; +roomname = "I Love You"; +break; + +case rn(50,49): + +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,83,83,83,83,83,205,203,83,83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,243,244,244,244,244,244,244,244,244,245,203,83,83,83,205,0,0,0,0,0,243,244,244,244,245,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,243,244,244,244,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,163,164,164,164,165,0,0,0,0,0,163,164,164,164,164,164,164,164,164,164,164,164,164,164,165,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,83,83,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("244,244,245,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,84,244,244,244,244,244,244,244,244,244,85,83,205,0,0,0,0,0,243,244"); +tmap.push("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,205,123,123,123,123,123,123,123,123,123,203,83,205,0,0,0,0,0,0,0"); +tmap.push("164,164,165,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,124,164,164,164,164,164,164,164,164,164,125,83,205,0,0,0,0,0,163,164"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83,83,83,83,83,83,83,83,83,83,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,243,244,244,244,244,244,244,244,244,244,244,244,244,244,245,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,164,164,164,165,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,163,164,164,164,164,164,164,164,164,165,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); +tmap.push("83,83,205,0,0,0,0,0,203,83,83,83,205,203,83,83,83,83,83,83,83,83,205,0,0,0,0,0,203,83,83,83,205,0,0,0,0,0,203,83"); +rcol = 1; warpy = true; +roomname = "Green Dudes Can't Flip"; +break; + + +case rn(51,49): + +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0"); +tmap.push("176,176,176,177,0,0,0,0,0,0,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,0,0,0,0,0,0,175,176,176,176"); +tmap.push("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95"); +tmap.push("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95"); +tmap.push("256,256,256,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,256,256,256"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("176,176,176,177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,176,176,176"); +tmap.push("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95"); +tmap.push("95,95,95,217,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,95,95,95"); +tmap.push("256,256,256,257,0,0,0,0,0,0,175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,177,0,0,0,0,0,0,255,256,256,256"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,215,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,217,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,255,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,257,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +warpx = true; warpy = true; +rcol = 5; + +obj.entities[obj.nentity].active = true; +obj.nentity++; +obj.createentity(game, 14 * 8, (8 * 8) + 4, 14); //Teleporter! +obj.entities[obj.nentity - 2].active = false; + +if(game.intimetrial) { + obj.createblock(1, 20, 0, 32, 240, 82); +} + +roomname = "Murdering Twinmaker"; +break; + +case rn(49,49): + +tmap.push("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,202,0,160,161,161,161,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,202,0,240,241,241,241,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,202,0,160,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,202,0,200,202,0,160,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,121,161,161,161,161,161,161,161,161,161,161,161,161,161,161"); +tmap.push("80,202,0,200,202,0,240,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80"); +tmap.push("80,202,0,200,202,0,160,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241"); +tmap.push("80,202,0,200,202,0,200,202,0,160,161,161,161,161,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("80,202,0,200,202,0,200,202,0,240,241,241,241,241,241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("80,202,0,200,202,0,200,202,0,160,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("80,202,0,200,202,0,200,202,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("80,202,0,200,202,0,200,202,0,200,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("80,202,0,200,202,0,200,202,0,240,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("80,202,0,200,202,0,200,202,0,160,161,161,161,161,161,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); +tmap.push("80,202,0,200,202,0,200,202,0,240,241,241,241,241,241,242,0,0,0,0,0,0,0,160,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161"); +tmap.push("80,202,0,200,202,0,240,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80"); +tmap.push("80,202,0,200,202,0,160,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,81,241,241,241,241,241,241,241,241,241,241,241,241,241,241"); +tmap.push("80,202,0,200,202,0,240,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,202,0,240,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,202,0,160,161,161,161,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,202,0,240,241,241,241,241,241,241,241,241,241,241,241,242,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("241,242,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,162,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +tmap.push("80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,202,0,0,0,0,0,0,0,200,80,202,201,201,201,201,201,201,201,201,201,201,201,201,201,201"); +rcol = 0; warpy = true; + +if(!game.intimetrial) { + if(game.companion==0 && obj.flags[11]==0 && !game.crewstats[4]){ //also need to check if he's rescued in a previous game + obj.createentity(game, 255, 121, 15, 0); + obj.createblock(1, 215, 0, 160, 240, 35); + } +} +roomname = "It's Not Easy Being Green"; +break; + + +default: + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + tmap.push("0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); + //roomname = "Outer Space"; + + game.test = true; + game.teststring = "ERROR: Map not found in Warp Area"; + break; + } + } + + public var roomname:String; + public var coin:int; + public var rcol:int; + public var warpx:Boolean, warpy:Boolean; + } +} \ No newline at end of file diff --git a/mobile_version/readme.MD b/mobile_version/readme.MD new file mode 100644 index 00000000..ca17f4df --- /dev/null +++ b/mobile_version/readme.MD @@ -0,0 +1,5 @@ +This is the source code for the adobe air mobile version of VVVVVV, which is forked from the original flash source code. + +The mobile version needs a different data.zip folder, which [can be downloaded from here](https://thelettervsixtim.es/opensource/vvvvvv%20mobile%20data%20folder.zip). Just like the asset contents from the C++ version, the contents of this folder are still under a proprietary license. + +Requires Adobe AIR, targeting SWF version 36. diff --git a/mobile_version/src/EditorDataclass.as b/mobile_version/src/EditorDataclass.as new file mode 100644 index 00000000..ad88845e --- /dev/null +++ b/mobile_version/src/EditorDataclass.as @@ -0,0 +1,28 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class EditorDataclass{ + public function EditorDataclass():void { + clear(); + } + + public function clear():void { + numedentities = 0; + title = ""; + creator = ""; + modifier = ""; + timeCreated = ""; + timeModified = ""; + } + + public var numedentities:int; + public var title:String; + public var creator:String; + public var modifier:String; + public var timeCreated:String; + public var timeModified:String; + } +}; \ No newline at end of file diff --git a/mobile_version/src/LevelMetaData.as b/mobile_version/src/LevelMetaData.as new file mode 100644 index 00000000..bea5ef71 --- /dev/null +++ b/mobile_version/src/LevelMetaData.as @@ -0,0 +1,42 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class LevelMetaData{ + public function LevelMetaData():void { + clear(); + } + + public function clear():void { + title = ""; + creator = ""; + Desc1 = ""; + Desc2 = ""; + Desc3 = ""; + website = ""; + filename = ""; + file_num = 0; + modifier = ""; + timeCreated = ""; + timeModified = ""; + version = 0; + } + + + public var title:String; + public var creator:String; + public var Desc1:String; + public var Desc2:String; + public var Desc3:String; + public var website:String; + public var filename:String; + public var file_num:int; + public var modifier:String; + public var timeCreated:String; + public var timeModified:String; + + public var version:int; + } +}; diff --git a/mobile_version/src/Main.as b/mobile_version/src/Main.as new file mode 100644 index 00000000..a010f250 --- /dev/null +++ b/mobile_version/src/Main.as @@ -0,0 +1,1036 @@ +package{ + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + import flash.media.*; + import flash.text.*; + import flash.ui.ContextMenu; + import flash.ui.ContextMenuItem; + import flash.events.ContextMenuEvent; + import flash.ui.Keyboard; + import flash.ui.Mouse; + import bigroom.input.KeyPoll; + import flash.system.fscommand; + import flash.system.Capabilities; + import flash.utils.getTimer; + import flash.utils.Timer; + //import com.mesmotronic.ane.AndroidFullScreen; + + //import com.sociodox.theminer.TheMiner; //Profiler + + //Real value + //[SWF(width = "1136", height = "768", frameRate = "30", backgroundColor = "#000000")] //Set the size and color of the Flash file + //Big frame for big androids! + //[SWF(width = "3000", height = "2000", frameRate = "30", backgroundColor = "#000000")] //Set the size and color of the Flash file + [SWF(frameRate = "30", backgroundColor = "#000000")] //Set the size and color of the Flash file + //iPad test + //[SWF(width = "1024", height = "768", frameRate="60", backgroundColor = "#000000")] //Set the size and color of the Flash file + //iPhone test + //[SWF(width = "480", height = "320", frameRate="30", backgroundColor = "#000000")] //Set the size and color of the Flash file + //[SWF(width = "960", height = "640", frameRate="30", backgroundColor = "#000000")] //Set the size and color of the Flash file + + public class Main extends Sprite { + static public var BLOCK:Number = 0; + static public var TRIGGER:Number = 1; + static public var DAMAGE:Number = 2; + + include "includes/logic.as"; + include "includes/input.as"; + include "includes/render.as"; + public var GAMEMODE:int = 0; + public var TITLEMODE:int = 1; + public var CLICKTOSTART:int = 2; + public var FOCUSMODE:int = 3; + public var MAPMODE:int = 4; + public var TELEPORTERMODE:int = 5; + public var GAMECOMPLETE:int = 6; + public var GAMECOMPLETE2:int = 7; + public var EDITORMODE:int = 8; + public var CONTROLTUTORIALMODE:int = 9; + + public function Main():void { + if (stage) gameinit(); + else addEventListener(Event.ADDED_TO_STAGE, gameinit); + } + + private function gameinit(e:Event = null):void { + removeEventListener(Event.ADDED_TO_STAGE, gameinit); + // entry point + var tempbmp:Bitmap; + + this.mouseEnabled = false; + this.mouseChildren = false; + + //Ok: quick security check to make sure it doesn't get posted about + if (sitelock()) { + key = new KeyPoll(stage); + + //ANDROID SPECIFIC CODE HERE + /* + if (AndroidFullScreen.isSupported) { + if (!AndroidFullScreen.immersiveMode()){ + stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; + device.xres = flash.system.Capabilities.screenResolutionX; + device.yres = flash.system.Capabilities.screenResolutionY; + immersivemode = false; + }else { + device.xres = stage.stageWidth; + device.yres = stage.stageHeight; + immersivemode = true; + } + }else { + */ + stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; + device.xres = flash.system.Capabilities.screenResolutionX; + device.yres = flash.system.Capabilities.screenResolutionY; + immersivemode = false; + //} + + /* + if (immersivemode) { + stage.addEventListener(Event.RESIZE, androidresize); + } + */ + /* + trace("NOTE: REMEMBER TO FIX RESOLUTION SUPPORT BEFORE BUILDING"); + device.xres = 1024; + device.yres = 768; + device.deviceresolution = device.IPAD; + */ + //Testing:Let's be an ipad + /* + device.xres = 1024; + device.yres = 768; + device.deviceresolution = device.IPAD; + */ + /* + device.xres = 480; + device.yres = 320; + device.deviceresolution = device.IPHONE; + */ + /* + device.xres = 960; + device.yres = 640; + device.deviceresolution = device.IPHONE; + */ + + editor.init(); //Load in all the levels + + if (device.xres < device.yres) { + //Switch them! + t = device.yres; + device.yres = device.xres; + device.xres = t; + } + + if (device.yres < 768) { + device.deviceresolution = device.IPHONE; + }else { + device.deviceresolution = device.IPAD; + } + + //Manually enable androids here! Mostly just changed buttons sizes + // device.deviceresolution = device.ANDROID; + + //General game variables + obj.init(); + help.init(); + + /*obj.createblock(BLOCK,20,200,128,16); + obj.createblock(BLOCK,130,170,128,16); + obj.createblock(BLOCK,240,150,128,16); + obj.createblock(BLOCK,240,20,128,16); + obj.createblock(BLOCK,130,40,128,16); + obj.createblock(BLOCK,20,60,128,16);*/ + + //Input + key.definestickrange(device.xres / 2, 0, 6); + + SoundMixer.soundTransform = new SoundTransform(1); + + music.currentsong = -1; music.musicfade = 0;//no music, no amb + music.initefchannels(); music.currentefchan = 0; + music.nicechange = -1; + + music.numplays = 0; + music.musicchan.push(new music_1()); // 0: Level Complete + music.musicchan.push(new vmaintheme_hq()); // 1: VVVVVV Main Theme (Pushing Forward) + music.musicchan.push(new vtempo_hq()); // 2: VVVVVV Tempo Theme (Positive Force) + music.musicchan.push(new vpfa_hq()); // 3: Potential for Anything + music.musicchan.push(new passionforexploring()); // 4: UU Brothers Instrumental + music.musicchan.push(new souleye_intermission()); // 5: Jingle: Intermission + music.musicchan.push(new presentingvvvvvv()); // 6: Jingle: Menu Loop + music.musicchan.push(new music_2()); // 7: Jingle: Game Complete + music.musicchan.push(new configmegamix_hq()); // 8: Config Megamix + music.musicchan.push(new posreverse()); // 9: Tempo Theme, Reversed + music.musicchan.push(new poppot()); // 10: Extra + music.musicchan.push(new pipedream_hq()); // 11: Highscore + music.musicchan.push(new pressurecooker_hq()); // 12: Pressure Cooker + music.musicchan.push(new pacedenergy()); // NEW 13: Paced Energy + music.musicchan.push(new piercingthesky()); // NEW 14: Piercing the Sky + music.musicchan.push(new predestinedfateremix()); // NEW 15: Predestined Fate Remix + + music.efchan.push(new ef_0()); + music.efchan.push(new ef_1()); + music.efchan.push(new ef_2()); + music.efchan.push(new ef_3()); + music.efchan.push(new ef_4()); + music.efchan.push(new ef_5()); + music.efchan.push(new ef_6()); + music.efchan.push(new ef_7()); + music.efchan.push(new ef_8()); + music.efchan.push(new ef_9()); + music.efchan.push(new ef_10()); + music.efchan.push(new ef_11()); + music.efchan.push(new ef_12()); + music.efchan.push(new ef_13()); + music.efchan.push(new ef_14()); + music.efchan.push(new ef_15()); + music.efchan.push(new ef_16()); + music.efchan.push(new ef_17()); + music.efchan.push(new ef_18()); + music.efchan.push(new ef_19()); + music.efchan.push(new ef_20()); + music.efchan.push(new ef_21()); + music.efchan.push(new ef_22()); + music.efchan.push(new ef_23()); + music.efchan.push(new ef_24()); + music.efchan.push(new ef_25()); + music.efchan.push(new ef_26()); + music.efchan.push(new ef_27()); + + /* + Graphics Init + */ + //First we init the class and add its display list to the main display list + + dwgfx.buttonimg.push(new BitmapData(92, 30, true, 0x00000000)); + dwgfx.buttonimg.push(new BitmapData(92, 30, true, 0x00000000)); + dwgfx.buttonimg.push(new BitmapData(40, 40, true, 0x00000000)); + dwgfx.buttonimg.push(new BitmapData(40, 40, true, 0x00000000)); + tempbmp = new im_button_0(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_1(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_2(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_3(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_4(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_5(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_6(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_7(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_8(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_9(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_10(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_11(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + tempbmp = new im_button_12(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addbutton(); + + dwgfx.init(); + + //We load all our graphics in: + tempbmp = new im_tiles(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.maketilearray(); + tempbmp = new im_tiles2(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.maketile2array(); + tempbmp = new im_tiles3(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.maketile3array(); + tempbmp = new im_sprites(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.makespritearray(); + tempbmp = new im_flipsprites(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.makeflipspritearray(); + tempbmp = new im_bfont(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.makebfont(); + tempbmp = new im_bfontmask(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.makebfontmask(); + tempbmp = new im_teleporter(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.maketelearray(); + tempbmp = new im_entcolours(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.makeentcolourarray(); + //Load in the images + tempbmp = new im_image0(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 0 + tempbmp = new im_image1(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 1 (this is the minimap!) + tempbmp = new im_image2(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 2 + tempbmp = new im_image3(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 3 + tempbmp = new im_image4(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 4 + tempbmp = new im_image5(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 5 + tempbmp = new im_image6(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 6 + tempbmp = new im_image7(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 7 + tempbmp = new im_image8(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 8 + tempbmp = new im_image9(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 9 + tempbmp = new im_image10(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // 10 + + tempbmp = new im_image1(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // Minimap + tempbmp = new im_image1(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addimage(); // Minimap + + tempbmp = new im_mobileimage1(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + tempbmp = new im_mobileimage2(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + tempbmp = new im_mobileimage3(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + tempbmp = new im_mobileimage4(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + tempbmp = new im_mobileimage5(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + tempbmp = new im_mobileimage6(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + tempbmp = new im_mobileimage7(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + tempbmp = new im_mobileimage8(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + tempbmp = new im_mobileimage9(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addmobileimage(); + + tempbmp = new im_imgplayerlevel0(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel1(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel2(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel3(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel4(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel5(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel6(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel7(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel8(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel9(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel10(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel11(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel12(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel13(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel14(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel15(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + tempbmp = new im_imgplayerlevel16(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.addplayerlevelimage(); + + //Now that the graphics are loaded, init the background buffer + dwgfx.buffer=new BitmapData(320,240,false,0x000000); + + stage.scaleMode = StageScaleMode.NO_SCALE; + stage.align = StageAlign.TOP_LEFT; + stage.quality = StageQuality.LOW; + + //EXACT FIT + dwgfx.screensizemultiplier = device.yres / 240; + dwgfx.screen.width = 320 * dwgfx.screensizemultiplier; + dwgfx.screen.height = device.yres; + + dwgfx.screen.x = (device.xres / 2) - (320 * dwgfx.screensizemultiplier / 2); + dwgfx.screen.y = 0; + + dwgfx.initbuttonpositions(); + + //PIXEL PERFECT + /* + dwgfx.screensizemultiplier = int(device.yres / 240); + dwgfx.screen.width = 320 * dwgfx.screensizemultiplier; + dwgfx.screen.height = 240 * dwgfx.screensizemultiplier; + + dwgfx.screenoffx = (device.xres / 2) - (320 * dwgfx.screensizemultiplier / 2); + dwgfx.screenoffy = (device.yres / 2) - (240 * dwgfx.screensizemultiplier / 2); + dwgfx.screen.x = dwgfx.screenoffx; + dwgfx.screen.y = dwgfx.screenoffy; + */ + + addChild(dwgfx); + //stage.addChild(new TheMiner()); //Profiler + + + //Iphone orientation fix + var startOrientation:String = stage.orientation; + if (startOrientation == StageOrientation.DEFAULT || startOrientation == StageOrientation.UPSIDE_DOWN){ + //stage.setOrientation(StageOrientation.ROTATED_RIGHT); + stage.setAspectRatio(StageAspectRatio.LANDSCAPE); + }else{ + stage.setOrientation(startOrientation); + } + stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener); + + game = new gameclass(dwgfx, map, obj, help, music); + + + map.ypos = (700-29) * 8; + map.bypos = map.ypos / 2; + map.cameramode = 0; + + + ///Test Start: + //-- Comment this for real start + /* + gamestate = GAMEMODE; + /*map.finalmode = true; //Enable final level mode + //map.finalx = 41; map.finaly = 52; //Midpoint + //map.finalx = 48; map.finaly = 52; //Just before the tower + map.finalx = 46; map.finaly = 54; //Current + //map.finalstretch = true; + map.final_colormode = true; + map.final_mapcol = 0; + map.final_colorframe = 0; + */ + /* + game.starttest(obj, music); + obj.createentity(game, game.savex, game.savey, 0); //In this game, constant, never destroyed + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + music.play(1); + */ + //game.crewstats[1] = true; + //game.crewstats[2] = true; + //game.crewstats[3] = true; + //game.crewstats[4] = true; + //game.crewstats[5] = true; + //script.load("intro"); + + //crew member test + //obj.createentity(game, game.savex - 10, game.savey - 10, 14); + //game.companion = 6; //different rules for different members + + + + //-- + //Uncomment this if testing the final level + /* + map.finalmode = true; //Enable final level mode + map.finalx = 46; map.finaly = 54; //Current + //map.finalx = 41; map.finaly = 52; //Midpoint + map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + */ + //And this if after the midpoint: + /* + map.finalx = 52; map.finaly = 53; //Current + map.finalstretch = true; + map.final_colormode = true; + map.final_mapcol = 0; + map.final_colorframe = 0; + //map.background = 6; + */ + //-- Jumping right in + /* + game.gamestate = GAMEMODE; + game.starttest(obj, music); + //game.loadquick(map, obj, music); + obj.createentity(game, game.savex, game.savey, 0); //In this game, constant, never destroyed + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + music.play(4); + //fscommand("quit"); + + game.crewstats[1] = true; + //game.crewstats[2] = true; + game.crewstats[3] = true; + game.crewstats[4] = true; + //game.crewstats[5] = true; + + map.showtargets = true; + map.showteleporters = true; + //map.showtrinkets = true; + + //obj.flags[34] = 1; + //obj.flags[20] = 1; + //obj.flags[67] = 1; //Game complete + for (i = 0; i < 20; i++) { + obj.collect[i] = true; + } + game.trinkets = 19; obj.collect[18] = false; + game.stat_trinkets = 20; + //obj.altstates = 1; + + //initilise map info + for (j = 0; j < 20; j++) { + for (i = 0; i < 20; i++) { + map.explored[i + (j * 20)] = 1; + } + } + */ + //obj.entities[obj.getplayer()].size = 13; + + //game.gamestate = 6; + + //game.intimetrail = true; game.timetrialcountdown = 0; + //game.nodeathmode = true; + //dwgfx.flipmode = true; + //game.nocutscenes = true; + //map.invincibility = true; + //stage.frameRate = 24; + //game.colourblindmode = true; + //game.noflashingmode = true; + //for intermission 2 test + //game.lastsaved = 3; + /* + game.swnmode = true; + game.swngame = 2; + game.swndelay = 120; + game.swntimer = 60 * 30; + */ + //script.load("intermission_2"); + + + //for intermission 1 test + /* + game.companion = 11; + game.supercrewmate = true; + game.scmprogress = 0; + game.scmprogress = 10; + game.lastsaved = 4; + music.play(8); + */ + //game.sfpsmode = true; //Run at 60 FPS + //stage.frameRate = 60; // doesn't work, it's a bit more complex than this - will have to do a double sized window instead... + + //dwgfx.flipmode = true; + + //Testing some unlock stuff + /* + game.unlock[9] = true; //Space Station Intro Time Trial + game.unlock[10] = true; //Lab Time Trial + game.unlock[11] = true; //Tower Time Trial + game.unlock[12] = true; //Space Station 2 Time Trial + game.unlock[13] = true; //Warp Zone Time Trial + game.unlock[14] = true; //Final Level Time Trial + + game.unlock[17] = true; //No death mode + game.unlock[18] = true; //Flip Mode + + */ + //-- Normal start, with no fancy stuff! + + /* + game.gamestate = CLICKTOSTART; + dwgfx.createtextbox(" Click to Start ", 96, 107, 164, 164, 255); + dwgfx.textboxcenter(); + */ + //No click to start any more! Instead go right to the menu + + //INIT GRAPHIC MODE HERE + game.loadstats(map, dwgfx); + + //updategraphicsmode(game, dwgfx); + + game.gamestate = TITLEMODE; + + game.menustart = false; + game.mainmenu = 0; + + /*if (game.quicksummary != "") { + game.mainmenu = 2; + } + if (game.telesummary != "") { + game.mainmenu = 1; + }*/ //what the hell is that for + + + /* + game.gamestate = 6; + game.menustart = true; + map.ypos = (700-29) * 8; + map.bypos = map.ypos / 2; + map.cameramode = 0; + */ + //--Everything after this is screen recording + + //ok, screenrecording here + //don't record anything (comment both next parts) + + game.recording = 0; + + if(game.recording==1){ + trace("warning! recording input!"); + }else if(game.recording==2){ + trace("playing back input!"); + game.recordstring = "blahblahblah"; + help.toclipboard(game.recordstring); + + game.initplayback(); + game.playbackpos = 5; + game.savex = game.playback[0]; game.savey = game.playback[1]; + game.saverx = game.playback[2]; game.savery = game.playback[3]; + game.savegc = game.playback[4]; game.savedir = 1; + } + + //addEventListener(Event.ENTER_FRAME, mainloop); + + // start the tick-timer, which updates roughly every 4 milliseconds + _timer.addEventListener(TimerEvent.TIMER, mainloop); + _timer.start(); + }else { + dwgfx.init(); + addChild(dwgfx); + //We load the font in: + tempbmp = new im_bfont(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.makebfont(); + tempbmp = new im_bfontmask(); dwgfx.buffer = tempbmp.bitmapData; dwgfx.makebfontmask(); + //Now that the graphics are loaded, init the background buffer + dwgfx.buffer = new BitmapData(320, 240, false, 0x000000); + + addEventListener(Event.ENTER_FRAME, lockedloop); + } + } + + public function visit_distractionware(e:Event):void{ + var distractionware_link:URLRequest = new URLRequest( "http://www.distractionware.com" ); + navigateToURL( distractionware_link, "_blank" ); + } + + public function visit_sponsor(e:Event):void{ + var sponsor_link:URLRequest = new URLRequest( "http://www.kongregate.com/?gamereferral=dontlookback" ); + navigateToURL( sponsor_link, "_blank" ); + } + + public function visit_sponsor_logo():void{ + var sponsor_link:URLRequest = new URLRequest( "http://www.kongregate.com/?gamereferral=dontlookback" ); + navigateToURL( sponsor_link, "_blank" ); + } + + /* + public function androidresize(e:Event):void { + if (immersivemode) { + device.xres = stage.stageWidth; + device.yres = stage.stageHeight; + }else{ + device.xres = flash.system.Capabilities.screenResolutionX; + device.yres = flash.system.Capabilities.screenResolutionY; + } + if (device.xres < device.yres) { + //Switch them! + t = device.yres; + device.yres = device.xres; + device.xres = t; + } + + key.definestickrange(device.xres / 2, 0, 6); + + dwgfx.screensizemultiplier = device.yres / 240; + dwgfx.screen.width = 320 * dwgfx.screensizemultiplier; + dwgfx.screen.height = device.yres; + + dwgfx.screen.x = (device.xres / 2) - (320 * dwgfx.screensizemultiplier / 2); + dwgfx.screen.y = 0; + + dwgfx.initbuttonpositions(); + } + */ + + public function orientationChangeListener(e:StageOrientationEvent):void{ + if (e.afterOrientation == StageOrientation.DEFAULT || e.afterOrientation == StageOrientation.UPSIDE_DOWN) { + e.preventDefault(); + } + } + + public function lockedloop(e:Event):void { + dwgfx.backbuffer.lock(); + + dwgfx.bprint(5, 110, "Sorry! This game can only be", 196-help.glow, 196-help.glow, 255-help.glow, true); + dwgfx.bprint(5, 120, "played on thelettervsixtim.es", 196-help.glow, 196-help.glow, 255-help.glow, true); + dwgfx.render(); + dwgfx.backbuffer.unlock(); + + help.updateglow(); + } + + public function setstage(w:int, h:int):void { + //stage.stageWidth = w; + //stage.stageHeight = h; + } + + public function sitelock():Boolean { + //No preloader for Kong version + var currUrl:String = stage.loaderInfo.url.toLowerCase(); + //chat.kongregate.com + if ((currUrl.indexOf("ile:///") <= 0) || (currUrl.indexOf("http") == 0)){ + //if ((currUrl.indexOf("distractionware.com/games") <= 0) && (currUrl.indexOf("thelettervsixtim.es/secretarea") <= 0)){ + return true; + //return false; + }else{ + return true; + } + } + + public function input():void { + if (!game.infocus) { + }else { + switch(game.gamestate){ + case TITLEMODE: + titleinput(key, dwgfx, map, game, obj, help, music); + break; + case GAMEMODE: + if (map.towermode) { + if(game.recording==1){ + recordinput(key, dwgfx, game, map, obj, help, music); + }else { + gameinput(key, dwgfx, game, map, obj, help, music); + } + }else{ + if (game.recording == 1) { + recordinput(key, dwgfx, game, map, obj, help, music); + }else { + if (script.running) { + script.run(key, dwgfx, game, map, obj, help, music); + } + gameinput(key, dwgfx, game, map, obj, help, music); + } + } + break; + case CONTROLTUTORIALMODE: + controltutorialinput(key, dwgfx, game, map, obj, help, music); + break; + case MAPMODE: + if (game.recording == 1) { + //recordinput(key, dwgfx, game, map, obj, help, music); //will implement this later if it's actually needed + }else{ + mapinput(key, dwgfx, game, map, obj, help, music); + } + break; + case TELEPORTERMODE: + if (game.recording == 1) { + recordinput(key, dwgfx, game, map, obj, help, music); + }else { + if(game.useteleporter) { + teleporterinput(key, dwgfx, game, map, obj, help, music); + }else { + if (script.running) { + script.run(key, dwgfx, game, map, obj, help, music); + } + gameinput(key, dwgfx, game, map, obj, help, music); + } + } + break; + case GAMECOMPLETE: + gamecompleteinput(key, dwgfx, game, map, obj, help, music); + break; + case GAMECOMPLETE2: + gamecompleteinput2(key, dwgfx, game, map, obj, help, music); + break; + case CLICKTOSTART: + if (key.click) { + dwgfx.textboxremove(); + } + break; + } + + //Mute button + if (key.isDown(77) && game.mutebutton<=0) { + game.mutebutton = 8; if (game.muted) { game.muted = false; }else { game.muted = true;} + } + if(game.mutebutton>0) game.mutebutton--; + + } + //Stupid event listeners! + if (key.hasclicked) key.click = false; + } + + public function logic():void { + if (!game.infocus) { + if (game.globalsound > 0) { + game.globalsound = 0; + SoundMixer.soundTransform = new SoundTransform(0); + } + music.processmusic(); + help.updateglow(); + }else { + switch(game.gamestate){ + case TITLEMODE: + titlelogic(key, dwgfx, game, obj, help, music); + break; + case GAMEMODE: + if (map.towermode) { + towerlogic(key, dwgfx, game, map, obj, help, music); + }else{ + gamelogic(key, dwgfx, game, map, obj, help, music); + } + break; + case MAPMODE: + maplogic(key, dwgfx, game, map, obj, help, music); + break; + case CONTROLTUTORIALMODE: + controltutoriallogic(key, dwgfx, game, map, obj, help, music); + break; + case TELEPORTERMODE: + maplogic(key, dwgfx, game, map, obj, help, music); + break; + case GAMECOMPLETE: + gamecompletelogic(key, dwgfx, game, map, obj, help, music); + break; + case GAMECOMPLETE2: + gamecompletelogic2(key, dwgfx, game, map, obj, help, music); + break; + case CLICKTOSTART: + help.updateglow(); + if (dwgfx.ntextbox == 0) { + //music.play(6); + map.ypos = (700-29) * 8; + map.bypos = map.ypos / 2; + map.cameramode = 0; + + game.gamestate = TITLEMODE; + } + break; + } + if (game.platform.wakeupcall > 0) { + game.platform.wakeupcall--; + if (game.platform.wakeupcall == 0) { + if(immersivemode){ + //AndroidFullScreen.immersiveMode(); + } + } + } + + music.processmusic(); + dwgfx.processfade(); + game.gameclock(); + dwgfx.trinketcolset = false; //Reset this in every frame, used for a new standard random colour each frame + if (game.savemystats) { + game.savemystats = false; + game.savestats(map, dwgfx); + } + + if (game.muted) { + if (game.globalsound == 1) { + game.globalsound = 0; SoundMixer.soundTransform = new SoundTransform(0); + } + } + + if (!game.muted && game.globalsound == 0) { + game.globalsound = 1; SoundMixer.soundTransform = new SoundTransform(1); + } + } + } + + public function render():void { + if (!game.infocus) { + dwgfx.backbuffer.lock(); + /* + dwgfx.bprint(5, 110, "Game paused", 196 - help.glow, 255 - help.glow, 196 - help.glow, true); + dwgfx.bprint(5, 120, "[click to resume]", 196 - help.glow, 255 - help.glow, 196 - help.glow, true); + dwgfx.bprint(5, 230, "Press M to mute in game", 164 - help.glow, 196 - help.glow, 164 - help.glow, true); + */ + dwgfx.render(); + dwgfx.backbuffer.unlock(); + }else { + switch(game.gamestate){ + case TITLEMODE: + titlerender(key, dwgfx, map, game, obj, help); + break; + case GAMEMODE: + if (map.towermode) { + towerrender(key, dwgfx, game, map, obj, help); + }else{ + gamerender(key, dwgfx, game, map, obj, help); + } + break; + case CONTROLTUTORIALMODE: + controltutorialrender(key, dwgfx, game, map, obj, help); + break; + case MAPMODE: + maprender(key, dwgfx, game, map, obj, help); + break; + case TELEPORTERMODE: + teleporterrender(key, dwgfx, game, map, obj, help); + break; + case GAMECOMPLETE: + gamecompleterender(key, dwgfx, game, obj, help); + break; + case GAMECOMPLETE2: + gamecompleterender2(key, dwgfx, game, obj, help); + break; + case CLICKTOSTART: + dwgfx.backbuffer.lock(); + //dwgfx.bprint(5, 115, "[Click to start]", 196 - help.glow, 196 - help.glow, 255 - help.glow, true); + dwgfx.drawgui(help); + dwgfx.render(); + dwgfx.backbuffer.unlock(); + break; + } + } + } + + public function mainloop(e:TimerEvent):void { + _current = getTimer(); + if (_last < 0) _last = _current; + _delta += _current - _last; + _last = _current; + if (_delta >= _rate){ + _delta %= _skip; + while (_delta >= _rate){ + _delta -= _rate; + input(); + logic(); + if (key.hasclicked) key.click = false; + } + render(); + e.updateAfterEvent(); + } + } + + public function setzoom(t:int, dwgfx:dwgraphicsclass):void { + /* + switch(t) { + case 1: + dwgfx.screen.width = 320; + dwgfx.screen.height = 240; + dwgfx.screen.x = (640 - 320) / 2; + dwgfx.screen.y = (480 - 240) / 2; + break; + case 2: + dwgfx.screen.width = 640; + dwgfx.screen.height = 480; + dwgfx.screen.x = 0; + dwgfx.screen.y = 0; + break; + case 3: + dwgfx.screen.width = 960; + dwgfx.screen.height = 720; + dwgfx.screen.x = (640 - 960) / 2; + dwgfx.screen.y = (480 - 720) / 2; + break; + case 4: + dwgfx.screen.width = 1280; + dwgfx.screen.height = 960; + dwgfx.screen.x = (640 - 1280) / 2; + dwgfx.screen.y = (480 - 960) / 2; + break; + } + */ + } + + public function updategraphicsmode(game:gameclass, dwgfx:dwgraphicsclass):void { + /* + swfStage = stage; + + if (game.advanced_mode) { //advanced graphics mode + //Screen Smooting + dwgfx.screen.smoothing = game.advanced_smoothing; + + //Scaling + if(game.advanced_scaling==0){ + swfStage.scaleMode = StageScaleMode.SHOW_ALL; + setzoom(2, dwgfx); + }else{ + swfStage.scaleMode = StageScaleMode.NO_SCALE; //Turn Scaling off + setzoom(game.advanced_scaling, dwgfx); + } + + stage.fullScreenSourceRect = null; + //Fullscreen + if (game.fullscreen) { + stage.displayState = StageDisplayState.FULL_SCREEN; + Mouse.hide(); + }else { + stage.displayState = StageDisplayState.NORMAL; + Mouse.show(); + } + }else{ + swfStage.scaleMode = StageScaleMode.SHOW_ALL; + if (game.fullscreen) { + dwgfx.screen.smoothing = true; + stage.fullScreenSourceRect = new Rectangle(0, 0, 640, 480); + stage.displayState = StageDisplayState.FULL_SCREEN; + Mouse.hide(); + }else { + dwgfx.screen.smoothing = false; + stage.displayState = StageDisplayState.NORMAL; + Mouse.show(); + } + } + */ + } + + // Timer information (a shout out to ChevyRay for the implementation) + public static const TARGET_FPS:Number = 30; // the fixed-FPS we want the game to run at + private var _rate:Number = 1000 / TARGET_FPS; // how long (in seconds) each frame is + private var _skip:Number = _rate * 10; // this tells us to allow a maximum of 10 frame skips + private var _last:Number = -1; + private var _current:Number = 0; + private var _delta:Number = 0; + private var _timer:Timer = new Timer(4); + + public var dwgfx:dwgraphicsclass = new dwgraphicsclass(); + public var music:musicclass = new musicclass(); + public var help:helpclass = new helpclass(); + public var map:mapclass = new mapclass(); + public var game:gameclass; + public var obj:entityclass = new entityclass(); + public var key:KeyPoll; + public var script:scriptclass = new scriptclass(); + + public var slogo:MovieClip; + public var logoposition:Matrix; + public var pixel:uint; public var pixel2:uint; + public var pi:uint, pj:uint; + public var i:int, j:int, k:int, temp:int, tempx:int, tempy:int, tempstring:String; + public var tr:int, tg:int, tb:int, t:int; + public var tvel:Number; + public var swfStage:Stage; + public var immersivemode:Boolean; + //Embedded resources: + //Graphics + [Embed(source = '../data/graphics/tiles.png')] private var im_tiles:Class; + [Embed(source = '../data/graphics/tiles2.png')] private var im_tiles2:Class; + [Embed(source = '../data/graphics/tiles3.png')] private var im_tiles3:Class; + [Embed(source = '../data/graphics/sprites.png')] private var im_sprites:Class; + [Embed(source = '../data/graphics/flipsprites.png')] private var im_flipsprites:Class; + [Embed(source = '../data/graphics/font.png')] private var im_bfont:Class; + [Embed(source = '../data/graphics/fontmask.png')] private var im_bfontmask:Class; + [Embed(source = '../data/graphics/teleporter.png')] private var im_teleporter:Class; + [Embed(source = '../data/graphics/entcolours.png')] private var im_entcolours:Class; + + [Embed(source = '../data/graphics/levelcomplete.png')] private var im_image0:Class; + [Embed(source = '../data/graphics/minimap.png')] private var im_image1:Class; + [Embed(source = '../data/graphics/covered.png')] private var im_image2:Class; + [Embed(source = '../data/graphics/elephant.png')] private var im_image3:Class; + [Embed(source = '../data/graphics/gamecomplete.png')] private var im_image4:Class; + [Embed(source = '../data/graphics/fliplevelcomplete.png')] private var im_image5:Class; + [Embed(source = '../data/graphics/flipgamecomplete.png')] private var im_image6:Class; + [Embed(source = '../data/graphics/site.png')] private var im_image7:Class; + [Embed(source = '../data/graphics/site2.png')] private var im_image8:Class; + [Embed(source = '../data/graphics/site3.png')] private var im_image9:Class; + [Embed(source = '../data/graphics/ending.png')] private var im_image10:Class; + + [Embed(source = '../data/graphics/controls/touchscreen.png')] private var im_mobileimage1:Class; + [Embed(source = '../data/graphics/controls/lefthand_off.png')] private var im_mobileimage2:Class; + [Embed(source = '../data/graphics/controls/lefthand_near.png')] private var im_mobileimage3:Class; + [Embed(source = '../data/graphics/controls/lefthand_far.png')] private var im_mobileimage4:Class; + [Embed(source = '../data/graphics/controls/righthand_off.png')] private var im_mobileimage5:Class; + [Embed(source = '../data/graphics/controls/righthand_near.png')] private var im_mobileimage6:Class; + [Embed(source = '../data/graphics/controls/righthand_far.png')] private var im_mobileimage7:Class; + [Embed(source = '../data/graphics/controls/arrowleft.png')] private var im_mobileimage8:Class; + [Embed(source = '../data/graphics/controls/arrowright.png')] private var im_mobileimage9:Class; + //Playerlevel images + [Embed(source = '../data/graphics/playerlevels/playerlevel_0.png')] private var im_imgplayerlevel0:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_1.png')] private var im_imgplayerlevel1:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_2.png')] private var im_imgplayerlevel2:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_3.png')] private var im_imgplayerlevel3:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_4.png')] private var im_imgplayerlevel4:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_5.png')] private var im_imgplayerlevel5:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_6.png')] private var im_imgplayerlevel6:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_7.png')] private var im_imgplayerlevel7:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_8.png')] private var im_imgplayerlevel8:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_9.png')] private var im_imgplayerlevel9:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_10.png')] private var im_imgplayerlevel10:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_11.png')] private var im_imgplayerlevel11:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_12.png')] private var im_imgplayerlevel12:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_13.png')] private var im_imgplayerlevel13:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_14.png')] private var im_imgplayerlevel14:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_15.png')] private var im_imgplayerlevel15:Class; + [Embed(source = '../data/graphics/playerlevels/playerlevel_16.png')] private var im_imgplayerlevel16:Class; + //iOS Buttons + [Embed(source = '../data/graphics/mobilebuttons/map.png')] private var im_button_0:Class; + [Embed(source = '../data/graphics/mobilebuttons/back.png')] private var im_button_1:Class; + [Embed(source = '../data/graphics/mobilebuttons/talk_1.png')] private var im_button_2:Class; + [Embed(source = '../data/graphics/mobilebuttons/talk_2.png')] private var im_button_3:Class; + [Embed(source = '../data/graphics/mobilebuttons/use_1.png')] private var im_button_4:Class; + [Embed(source = '../data/graphics/mobilebuttons/use_2.png')] private var im_button_5:Class; + [Embed(source = '../data/graphics/mobilebuttons/teleport_1.png')] private var im_button_6:Class; + [Embed(source = '../data/graphics/mobilebuttons/teleport_2.png')] private var im_button_7:Class; + [Embed(source = '../data/graphics/mobilebuttons/controls_1.png')] private var im_button_8:Class; + [Embed(source = '../data/graphics/mobilebuttons/controls_2.png')] private var im_button_9:Class; + [Embed(source = '../data/graphics/mobilebuttons/gamecenter.png')] private var im_button_10:Class; + [Embed(source = '../data/graphics/mobilebuttons/button_left.png')] private var im_button_11:Class; + [Embed(source = '../data/graphics/mobilebuttons/button_right.png')] private var im_button_12:Class; + + //Music + [Embed(source = '../data/music/levelcomplete.mp3')] private var music_1:Class; + [Embed(source = '../data/music/endgame.mp3')] private var music_2:Class; + //Sound effects + [Embed(source = '../data/sounds/jump.mp3')] private var ef_0:Class; + [Embed(source = '../data/sounds/jump2.mp3')] private var ef_1:Class; + [Embed(source = '../data/sounds/hurt.mp3')] private var ef_2:Class; + [Embed(source = '../data/sounds/souleyeminijingle.mp3')] private var ef_3:Class; + [Embed(source = '../data/sounds/coin.mp3')] private var ef_4:Class; + [Embed(source = '../data/sounds/save.mp3')] private var ef_5:Class; + [Embed(source = '../data/sounds/crumble.mp3')] private var ef_6:Class; + [Embed(source = '../data/sounds/vanish.mp3')] private var ef_7:Class; + [Embed(source = '../data/sounds/blip.mp3')] private var ef_8:Class; + [Embed(source = '../data/sounds/preteleport.mp3')] private var ef_9:Class; + [Embed(source = '../data/sounds/teleport.mp3')] private var ef_10:Class; + [Embed(source = '../data/sounds/crew1.mp3')] private var ef_11:Class; + [Embed(source = '../data/sounds/crew2.mp3')] private var ef_12:Class; + [Embed(source = '../data/sounds/crew3.mp3')] private var ef_13:Class; + [Embed(source = '../data/sounds/crew4.mp3')] private var ef_14:Class; + [Embed(source = '../data/sounds/crew5.mp3')] private var ef_15:Class; + [Embed(source = '../data/sounds/crew6.mp3')] private var ef_16:Class; + [Embed(source = '../data/sounds/terminal.mp3')] private var ef_17:Class; + [Embed(source = '../data/sounds/gamesaved.mp3')] private var ef_18:Class; + [Embed(source = '../data/sounds/crashing.mp3')] private var ef_19:Class; + [Embed(source = '../data/sounds/blip2.mp3')] private var ef_20:Class; + [Embed(source = '../data/sounds/countdown.mp3')] private var ef_21:Class; + [Embed(source = '../data/sounds/go.mp3')] private var ef_22:Class; + [Embed(source = '../data/sounds/crash.mp3')] private var ef_23:Class; + [Embed(source = '../data/sounds/combine.mp3')] private var ef_24:Class; + [Embed(source = '../data/sounds/newrecord.mp3')] private var ef_25:Class; + [Embed(source = '../data/sounds/trophy.mp3')] private var ef_26:Class; + [Embed(source = '../data/sounds/rescue.mp3')] private var ef_27:Class; + } +} \ No newline at end of file diff --git a/mobile_version/src/Preloader.as b/mobile_version/src/Preloader.as new file mode 100644 index 00000000..286678d1 --- /dev/null +++ b/mobile_version/src/Preloader.as @@ -0,0 +1,310 @@ +//Big thanks to Muku for his help with working out how to do a preloader in FlashDevelop! + +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + import flash.utils.getDefinitionByName; + import flash.system.fscommand; + import flash.ui.ContextMenu; + import flash.ui.ContextMenuItem; + //import com.kongregate.as3.client.KongregateAPI; + + //Mochi and Kongregate stuff is more or less ready here + + public dynamic class Preloader extends MovieClip { + public function Preloader() { + fscommand("trapallkeys", "true"); + if (stage.root.loaderInfo.url.search(/.swf$/) >= 0) { + //fscommand("showmenu", "false"); + } + stage.showDefaultContextMenu = (stage.root.loaderInfo.url.search(/.swf$/) >= 0); + + //For the offline version, manually change this + if (checksite()) { + adson = false; + }else{ + adson = true; + } + adson = false; + + //Let's assume the kong API is clever enough to do its own checking + //var kongregate:KongregateAPI = new KongregateAPI(); + //this.addChild ( kongregate ); + + //stage.showDefaultContextMenu = false; + + + //show c64 intro (30, 0), set to (-10, 100) to not show + //transition = -10; fakepercent = 100; + transition = 30; fakepercent = 0; + + + var rc_menu:ContextMenu = new ContextMenu(); + rc_menu.hideBuiltInItems(); + this.contextMenu = rc_menu; + ct = new ColorTransform(0, 0, 0, 1, 255, 255, 255, 1); //Set to white + + darkcol = 0x000000; lightcol = 0x000000; curcol = 0; + offset = 0; coltimer = 0; + + frontrect = new Rectangle(30, 20, 260, 200); + temprect = new Rectangle(0, 0, 320, 24); + + tl = new Point(0, 0); + tpoint = new Point(0, 0); + bfont_rect=new Rectangle(0,0,8,8); + var tempbmp:Bitmap; + tempbmp = new im_bfont(); buffer = tempbmp.bitmapData; + makebfont(); + + backbuffer=new BitmapData(320, 240,false,0x000000); + screenbuffer = new BitmapData(320, 240, false, 0x000000); + screen = new Bitmap(screenbuffer); + screen.width = 640;//320;//;640; + screen.height = 480;// 240;//480; + + addChild(screen); + + addEventListener(Event.ENTER_FRAME, checkFrame); + + if (!adson) { + /* + loading = new im_loading(); + loading.x = 320 - (loading.width / 2); + loading.y = 316; + addChild(loading); + */ + } + + showctp = false; + startgame = false; + } + + public function visit_distractionware(e:Event):void{ + var distractionware_link:URLRequest = new URLRequest( "http://www.distractionware.com" ); + navigateToURL( distractionware_link, "_blank" ); + } + + public function visit_sponsor(e:Event):void{ + var sponsor_link:URLRequest = new URLRequest( "http://www.kongregate.com/?gamereferral=dontlookback" ); + navigateToURL( sponsor_link, "_blank" ); + } + + public function print(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean = false):void { + if (r < 0) r = 0; if (g < 0) g = 0; if (b < 0) b = 0; + if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + if (cen) x = x - (len(t)); + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + tpoint.x = x + bfontpos; tpoint.y = y; + bfont[cur].colorTransform(bfont_rect, ct); + backbuffer.copyPixels(bfont[cur], bfont_rect, tpoint); + bfontpos+=bfontlen[cur]; + } + } + + public function checkFrame(e:Event):void { + var p:Number = this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal; + + //if (stage.root.loaderInfo.url.search(/.swf$/) >= 0) p = 0; //Not for the demo! + transition = -10; fakepercent = 100; + + if (transition < 30) transition--; + if(transition>=30){ + if (int(p * 100) >= fakepercent) fakepercent++; + if (fakepercent >= 100) { + fakepercent = 100; + startgame = true; + } + + offset = (offset + 4 + int(Math.random()*5))%32; + coltimer--; + if (coltimer <= 0) { + curcol = (curcol + int(Math.random() * 5)) % 6; + coltimer = 8; + } + switch(curcol) { + case 0: + lightcol = 0xBF596F; + darkcol = 0x883E53; + break; + case 1: + lightcol = 0x6CBC5C; + darkcol = 0x508640; + break; + case 2: + lightcol = 0x5D57AA; + darkcol = 0x2F2F6C; + break; + case 3: + lightcol = 0xB7BA5E; + darkcol = 0x848342; + break; + case 4: + lightcol = 0x5790AA; + darkcol = 0x2F5B6C; + break; + case 5: + lightcol = 0x9061B1; + darkcol = 0x583D71; + break; + } + + for (var i:int = 0; i < 18; i++) { + temprect.y = (i * 16) -offset; + if (i % 2 == 0) { + backbuffer.fillRect(temprect, lightcol); + }else{ + backbuffer.fillRect(temprect, darkcol); + } + } + + backbuffer.fillRect(frontrect, 0x3E31A2); + + + tempstring = "LOADING... " + String(int(fakepercent))+"%"; + print(282, 204, tempstring, 124, 112, 218, true); + + //Render + screenbuffer.lock(); + screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); + screenbuffer.unlock(); + + backbuffer.lock(); + backbuffer.fillRect(backbuffer.rect, 0x000000); + backbuffer.unlock(); + if (currentFrame >= totalFrames){ + if (startgame) { + transition = 29; + } + } + }else if (transition <= -10) { + if (currentFrame >= totalFrames){ + startup(); + } + }else if (transition < 5) { + backbuffer.fillRect(backbuffer.rect, 0x000000); + //Render + screenbuffer.lock(); + screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); + screenbuffer.unlock(); + + backbuffer.lock(); + backbuffer.fillRect(backbuffer.rect, 0x000000); + backbuffer.unlock(); + }else if (transition < 20) { + temprect.y = 0; + temprect.height = 240; + backbuffer.fillRect(temprect, 0x000000); + backbuffer.fillRect(frontrect, 0x3E31A2); + + tempstring = "LOADING... 100%"; + print(282, 204, tempstring, 124, 112, 218, true); + //Render + screenbuffer.lock(); + screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); + screenbuffer.unlock(); + + backbuffer.lock(); + backbuffer.fillRect(backbuffer.rect, 0x000000); + backbuffer.unlock(); + } + } + + private function startup():void { + // hide loader + //stop(); + removeChild(screen); + removeEventListener(Event.ENTER_FRAME, checkFrame); + //loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progress); + var mainClass:Class = getDefinitionByName("Main") as Class; + addChild(new mainClass() as DisplayObject); + //stage.removeChild(this); + } + + public function checksite():Boolean { + //Returns true if on a site that doesn't use mochiads + var currUrl:String = stage.loaderInfo.url.toLowerCase(); + //chat.kongregate.com + if ((currUrl.indexOf("distractionware.com") <= 0) && + (currUrl.indexOf("flashgamelicense.com") <= 0) && + (currUrl.indexOf("kongregate.com") <= 0) && + (currUrl.indexOf("chat.kongregate.com") <= 0)){ + //return true; + return false; + }else{ + return true; + } + } + + public function len(t:String):int { + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + bfontpos+=bfontlen[cur]; + } + return bfontpos; + } + + public function RGB(red:Number,green:Number,blue:Number):Number{ + return (blue | (green << 8) | (red << 16)) + } + + public function makebfont():void { + for (var j:Number = 0; j < 16; j++) { + for (var i:Number = 0; i < 16; i++) { + var t:BitmapData = new BitmapData(8, 8, true, 0x000000); + var t2emprect:Rectangle = new Rectangle(i * 8, j * 8, 8, 8); + t.copyPixels(buffer, t2emprect, tl); + bfont.push(t); + } + } + + //Ok, now we work out the lengths (this data string cortesy of a program I wrote!) + for (i = 0; i < 256; i++) bfontlen.push(6); + var maprow:Array; + var tstring:String="4,3,5,7,6,7,6,3,4,4,7,7,3,5,2,5,6,5,6,6,6,6,6,6,6,6,2,3,5,5,5,6,7,6,6,6,6,5,5,6,6,3,6,6,5,7,7,6,6,6,6,6,5,6,7,7,7,7,5,4,5,4,5,6,4,6,6,6,6,5,5,6,6,3,6,6,5,7,7,6,6,6,6,6,5,6,7,7,7,7,5,5,3,5,6,4"; + + maprow = new Array(); + maprow = tstring.split(","); + for(var k:int = 0; k < 96; k++) { + bfontlen[k + 32] = 8;// int(maprow[k]); + } + } + + public var darkcol:int, lightcol:int, curcol:int, coltimer:int; + public var offset:int; + + public var buffer:BitmapData; + public var backbuffer:BitmapData; + public var screenbuffer:BitmapData; + public var screen:Bitmap; + + public var frontrect:Rectangle; + public var temprect:Rectangle; + + public var showctp:Boolean; + public var startgame:Boolean; + public var adson:Boolean; + + [Embed(source = '../data/graphics/font.png')] private var im_bfont:Class; + public var bfontlen:Array = new Array(); + public var bfont:Array = new Array(); + public var bfont_rect:Rectangle; + public var tl:Point, tpoint:Point; + public var bfontpos:int; + public var cur:int; + public var ct:ColorTransform; + + public var tempstring:String; + public var fakepercent:int; + + public var transition:int; + + public var statcookie:SharedObject; + } +} \ No newline at end of file diff --git a/mobile_version/src/bigroom/input/KeyPoll.as b/mobile_version/src/bigroom/input/KeyPoll.as new file mode 100644 index 00000000..5a43a35f --- /dev/null +++ b/mobile_version/src/bigroom/input/KeyPoll.as @@ -0,0 +1,371 @@ +/** + * Key polling class + * + * To create: + * var key:KeyPoll = new KeyPoll( displayObject ); + * + * the display object will usually be the stage. + * + * Full example: + * package + * { + * import flash.display.Sprite; + * import flash.events.Event; + * import flash.ui.Keyboard; + * import fgc.input.KeyPoll; + * + * public class Test + * { + * var key:KeyPoll; + * + * public function Test() + * { + * key = new KeyPoll( this.stage ); + * addEventListener( Event.ENTER_FRAME, enterFrame ); + * } + * + * public function enterFrame( ev:Event ):void + * { + * if( key.isDown( Keyboard.LEFT ) ) + * { + * trace( "left key is down" ); + * } + * if( key.isDown( Keyboard.RIGHT ) ) + * { + * trace( "right key is down" ); + * } + * } + * } + * } + * + * Author: Richard Lord + * Copyright (c) FlashGameCode.net 2007 + * Version 1.0.2 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +package bigroom.input +{ + import flash.events.KeyboardEvent; + import flash.events.Event; + import flash.display.DisplayObject; + import flash.utils.ByteArray; + import flash.events.TouchEvent; + import flash.ui.Multitouch; + import flash.ui.MultitouchInputMode; + + import flash.ui.*; + import flash.events.MouseEvent; + + import flash.net.*; + + public class KeyPoll + { + private var states:ByteArray; + private var dispObj:DisplayObject; + public var click:Boolean = false; + public var clickheld:Boolean = false; + public var hasclicked:Boolean = false; + public var press:Boolean = false; + public var onscreen:Boolean=true; + public var gotosite:String = ""; + public var touchx:Vector. = new Vector.; + public var touchy:Vector. = new Vector.; + public var touchid:Vector. = new Vector.; + public var temptouchid:int = 0; + + public var controlstick:int = -1; + public var controlstick_x:int = 0; + public var controlstick_y:int = 0; + public var pushleft:Boolean = false; + public var pushright:Boolean = false; + public var controlstick_xrange:int = 0; + public var controlstick_yrange:int = 0; + public var deadzone:int = 0, deadzone_inner:int = 0; + public var firstmove:Boolean = false; + + public var touchPoints : uint; + + + public function KeyPoll( obj:DisplayObject ) + { + states = new ByteArray(); + states.writeUnsignedInt( 0 ); + states.writeUnsignedInt( 0 ); + states.writeUnsignedInt( 0 ); + states.writeUnsignedInt( 0 ); + states.writeUnsignedInt( 0 ); + states.writeUnsignedInt( 0 ); + states.writeUnsignedInt( 0 ); + states.writeUnsignedInt( 0 ); + + touchPoints = 0; + for (var i:int = 0; i < 20; i++) { + touchx.push(0); + touchy.push(0); + touchid.push(-1); + } + + Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; + dispObj = obj; + dispObj.addEventListener( KeyboardEvent.KEY_DOWN, keyDownListener, false, 0, true ); + dispObj.addEventListener( KeyboardEvent.KEY_UP, keyUpListener, false, 0, true ); + dispObj.addEventListener( Event.ACTIVATE, activateListener, false, 0, true ); + dispObj.addEventListener( Event.DEACTIVATE, deactivateListener, false, 0, true ); + + /* + dispObj.addEventListener( MouseEvent.MOUSE_DOWN, mouseDownListener); + dispObj.addEventListener( MouseEvent.MOUSE_UP, mouseUpListener ); + */ + + + dispObj.addEventListener( TouchEvent.TOUCH_BEGIN, touchbeginlistener); + dispObj.addEventListener( TouchEvent.TOUCH_MOVE, touchmovelistener); + dispObj.addEventListener( TouchEvent.TOUCH_END, touchendlistener ); + + + //dispObj.addEventListener( TouchEvent.TOUCH_TAP, mouseclicker); + } + + public function definestickrange(x:int, y:int, d:int):void { + /* + if (device.deviceresolution == device.ANDROID) { + //Turn d into a sensible value + d = 6; + }else { + //Ignore it and just use 6 + d = 6; + } + */ + controlstick_xrange = x; + controlstick_yrange = y; + deadzone = d; + deadzone_inner = Math.min(int(d * 0.5), 1); + } + + public function gettouchx():int { + if (touchPoints == 0) { + return touchx[0]; + }else { + return touchx[touchPoints - 1]; + } + } + + public function gettouchy():int { + if (touchPoints == 0) { + return touchy[0]; + }else { + return touchy[touchPoints - 1]; + } + } + + /* + public function mouseUpListener( e:MouseEvent ):void { + //Identify the point that's been removed, and take it away from the array + touchPoints = 0; + + if (touchPoints == 0){ + press = false; + + click = false; + clickheld = false; + hasclicked = false; + } + } + + public function mouseDownListener( e:MouseEvent ):void { + touchx[0] = e.stageX; + touchy[0] = e.stageY; + touchid[0] = 1; + + touchPoints=1; + press = true; + + click = true; + clickheld = true; + hasclicked = true; + } + */ + + public function touchbeginlistener( e:TouchEvent ):void { + touchx[touchPoints] = e.stageX; + touchy[touchPoints] = e.stageY; + touchid[touchPoints] = e.touchPointID; + + if (controlstick == -1) { + //Consider this for the controlstick point + if (touchx[touchPoints] < controlstick_xrange) { + if (touchy[touchPoints] > controlstick_yrange) { + controlstick = touchid[touchPoints]; + controlstick_x = touchx[touchPoints]; + controlstick_y = touchy[touchPoints]; + pushleft = false; + pushright = false; + firstmove = true; + } + } + } + + touchPoints++; + press = true; + + click = true; + clickheld = true; + hasclicked = true; + } + + public function touchendlistener( e:TouchEvent ):void { + //Identify the point that's been removed, and take it away from the array + temptouchid = e.touchPointID; + + if (temptouchid == controlstick) { + controlstick = -1; + pushleft = false; + pushright = false; + firstmove = false; + controlstick_x = -1; + controlstick_y = -1; + } + + for (var i:int = 0; i < touchPoints; i++) { + if (touchid[i] == temptouchid) { + for (var j:int = i; j < touchPoints; j++) { + touchx[j] = touchx[j + 1]; + touchy[j] = touchy[j + 1]; + touchid[j] = touchid[j + 1]; + } + i = touchPoints + 1; + touchPoints--; + } + } + + if (touchPoints == 0){ + press = false; + + click = false; + clickheld = false; + hasclicked = false; + } + } + + public function touchmovelistener(e:TouchEvent):void { + //Identify the touch point that's moving, and update it's coordinates + temptouchid = e.touchPointID; + for (var i:int = 0; i < touchPoints; i++) { + if (touchid[i] == temptouchid) { + touchx[i] = e.stageX; + touchy[i] = e.stageY; + + if (touchid[i] == controlstick) { + if (firstmove) { + if (touchx[i] < controlstick_x) { + pushleft = true; pushright = false; + firstmove = false; + controlstick_x = touchx[i] + deadzone; + controlstick_y = touchy[i]; + }else if (touchx[i] > controlstick_x) { + pushleft = false; pushright = true; + firstmove = false; + controlstick_x = touchx[i] - deadzone; + controlstick_y = touchy[i]; + } + }else{ + if (touchx[i] < controlstick_x - deadzone) { + pushleft = true; pushright = false; + controlstick_x = touchx[i] + deadzone; + controlstick_y = touchy[i]; + }else if (touchx[i] > controlstick_x + deadzone) { + pushleft = false; pushright = true; + controlstick_x = touchx[i] - deadzone; + controlstick_y = touchy[i]; + }else if (touchx[i] >= controlstick_x - deadzone_inner && + touchx[i] <= controlstick_x + deadzone_inner) { + pushleft = false; pushright = false; + } + } + } + } + } + } + + public function visitsite(t:String):void { + gotosite = t; + } + + /* + public function mouseclicker(e:TouchEvent):void { + touchx = e.stageX; + touchy = e.stageY; + if (gotosite == "NG") { + //API.loadNewgrounds(); + gotosite = ""; + }else if (gotosite != "") { + var link:URLRequest = new URLRequest(gotosite); + navigateToURL(link, "_blank"); + gotosite = ""; + } + } + */ + + private function keyDownListener( ev:KeyboardEvent ):void + { + states[ ev.keyCode >>> 3 ] |= 1 << (ev.keyCode & 7); + + if (ev.keyCode == 27){ + ev.preventDefault(); + }else if (ev.keyCode == Keyboard.BACK) { + // user hit the back button on Android device + ev.preventDefault(); + ev.stopImmediatePropagation(); + } + } + + private function keyUpListener( ev:KeyboardEvent ):void + { + states[ ev.keyCode >>> 3 ] &= ~(1 << (ev.keyCode & 7)); + } + + private function activateListener( ev:Event ):void + { + for( var i:int = 0; i < 8; ++i ) + { + states[ i ] = 0; + } + } + + private function deactivateListener( ev:Event ):void + { + for( var i:int = 0; i < 8; ++i ) + { + states[ i ] = 0; + } + } + + public function isDown( keyCode:uint ):Boolean + { + return ( states[ keyCode >>> 3 ] & (1 << (keyCode & 7)) ) != 0; + } + + public function isUp( keyCode:uint ):Boolean + { + return ( states[ keyCode >>> 3 ] & (1 << (keyCode & 7)) ) == 0; + } + } +} \ No newline at end of file diff --git a/mobile_version/src/blockclass.as b/mobile_version/src/blockclass.as new file mode 100644 index 00000000..23801faf --- /dev/null +++ b/mobile_version/src/blockclass.as @@ -0,0 +1,36 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class blockclass extends Sprite { + public function blockclass():void { + rect = new Rectangle(); + clear(); + } + + public function clear():void{ + active = false; + type = 0; trigger=0; + + xp = 0; yp = 0; wp = 0; hp = 0; + rect.x = xp; rect.y = yp; rect.width = wp; rect.height = hp; + + prompt = ""; script = ""; r = 0; g = 0; b = 0; + } + + public function rectset(xi:int, yi:int, wi:int, hi:int):void { + rect.x = xi; rect.y = yi; rect.width = wi; rect.height = hi; + } + + //Fundamentals + public var active:Boolean; + public var rect:Rectangle; + public var type:int; + public var trigger:int; + public var xp:int, yp:int, wp:int, hp:int; + public var script:String, prompt:String; + public var r:int, g:int, b:int; + } +}; diff --git a/mobile_version/src/device.as b/mobile_version/src/device.as new file mode 100644 index 00000000..0f2e1564 --- /dev/null +++ b/mobile_version/src/device.as @@ -0,0 +1,57 @@ +package { + public class device { + public static var DESKTOP:int = 0; + public static var MOBILE:int = 1; + public static var CONSOLE:int = 2; + + public static var IPHONE:int = 1; + public static var IPHONERETINA:int = 2; + public static var IPAD:int = 3; + public static var IPADRETINA:int = 4; + public static var IPHONE5:int = 5; + public static var ANDROID:int = 6; + public static var OUYA:int = 7; + + public static function init(t:int, r:int):void { + for (var i:int = 0; i < 20; i++) devicetext.push(""); + if (t == 0) { // PC/MAC DESKTOP + devicetext[0] = "BACK - MENU"; + devicetext[1] = "PRESS ACTION TO START"; + devicetext[2] = "ACTION - STAGE SELECT"; + devicetext[3] = "PRESS LEFT AND RIGHT KEYS"; + devicetext[4] = "TO MOVE AROUND THE HEXAGON"; + devicetext[5] = "PRESS ACTION TO CONTINUE"; + devicetext[6] = "PRESS LEFT OR RIGHT TO RETRY"; + devicetext[7] = "BACK - CREDITS"; + devicetext[8] = "BACK - CANCEL"; + devicetext[9] = "PRESS ACTION TO CONFIRM"; + devicetext[10] = "C - CLEAR RECORDS"; + + devicetype = DESKTOP; + deviceresolution = DESKTOP; + }else if (t == 1) { //Mobile + devicetext[0] = "MAIN MENU"; + devicetext[1] = "TAP TO START"; + devicetext[2] = "STAGE SELECT"; + devicetext[3] = "TOUCH THE LEFT AND RIGHT"; + devicetext[4] = "SIDES OF THE SCREEN TO MOVE"; + devicetext[5] = "TAP TO CONTINUE"; + devicetext[6] = "TAP THE SCREEN TO RETRY"; + devicetext[7] = "CREDITS"; + devicetext[8] = "CANCEL"; + devicetext[9] = "TAP TO CONFIRM"; + devicetext[10] = "CLEAR RECORDS"; + + devicetype = MOBILE; + deviceresolution = r; + } + + } + + public static var devicetext:Vector. = new Vector.; + public static var devicetype:int; + + public static var deviceresolution:int; + public static var xres:int, yres:int; + } +} diff --git a/mobile_version/src/dwgraphicsclass.as b/mobile_version/src/dwgraphicsclass.as new file mode 100644 index 00000000..a66536a9 --- /dev/null +++ b/mobile_version/src/dwgraphicsclass.as @@ -0,0 +1,2874 @@ +package{ + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class dwgraphicsclass extends Sprite { + public var BUTTON_BLANK:int = 0; + public var BUTTON_MENU:int = 1; + public var BUTTON_BACK:int = 2; + public var BUTTON_TALK:int = 3; + public var BUTTON_USE:int = 4; + public var BUTTON_TELEPORT:int = 5; + public var BUTTON_GAMECENTER:int = 6; + public var BUTTON_CONTROLS:int = 7; + public var BUTTON_DPAD:int = 8; + + public function init():void { + //We initialise a few things + updatebackground = true; + tiles_rect=new Rectangle(0,0,8,8); + sprites_rect=new Rectangle(0,0,32,32); + bfont_rect=new Rectangle(0,0,8,8); + bfontmask_rect=new Rectangle(0,0,9,9); + bg_rect = new Rectangle(0, 0, 320, 240); + footerrect = new Rectangle(0, 230, 320, 10); + prect = new Rectangle(0, 0, 4, 4); + line_rect = new Rectangle(); + tl = new Point(0, 0); tpoint = new Point(0, 0); trect = new Rectangle(); + ct = new ColorTransform(0, 0, 0, 1, 255, 255, 255, 1); //Set to white + madpoint = new Point; + madrect = new Rectangle; + + tele_rect = new Rectangle(0, 0, 96, 96); + trinketcolset = false; + + showcutscenebars = false; + cutscenebarspos = 0; + + flipmode = false; setflipmode = false; + flipmatrix.scale(1, -1); + flipmatrix.translate(0, 240); + flipfontmatrix.scale(1, -1); flipfontmatrix.translate(0, 8); + flipfontmatrix2.scale(1, -1); flipfontmatrix2.translate(0, 9); + + //Background inits + for (i = 0; i < 50; i++) { + var s:Rectangle = new Rectangle(Math.random() * 320, Math.random() * 240, 2, 2); + var s2:int = 4+(Math.random()*4); + stars.push(s); starsspeed.push(s2); + + var bb:Rectangle; + var bvx:int = 0; var bvy:int = 0; + if(Math.random()*100 > 50){ + bvx = 9 - (Math.random() * 19); if (bvx > -6 && bvx < 6) bvx = 6; + bvx = bvx * 1.5; + bb = new Rectangle(Math.random() * 320, Math.random() * 240, 32, 12); + }else { + bvy = 9 - (Math.random() * 19); if (bvy > -6 && bvy < 6) bvy = 6; + bvy = bvy * 1.5; + bb = new Rectangle(Math.random() * 320, Math.random() * 240, 12, 32); + } + var bint:Number = 0.5 + ((Math.random() * 100) / 200); + backboxes.push(bb); + backboxvx.push(bvx); backboxvy.push(bvy); + backboxint.push(bint); + } + backboxrect = new Rectangle(); + backoffset = 0; backgrounddrawn = false; + + warpskip = 0; + warpfcol = 0x000000; warpbcol = 0x000000; + warprect = new Rectangle(0, 0, 0, 0); + + spcol = 0; spcoldel = 0; + + crewframe = 0; crewframedelay = 4; + menuoffset = 0; resumegamemode = false; + + //Textboxes! + for (i = 0; i < 30; i++) { + var t:textboxclass = new textboxclass; + textbox.push(t); + } + ntextbox = 0; + + //Fading stuff + for (i = 0; i < 15; i++) { + fadebars.push(0); + } + fadeamount = 0; + fademode = 0; + + bigbuffer = new BitmapData(320, 32, true, 0x000000); + bigbufferscreen = new Bitmap(bigbuffer); + bigbufferscreen.width = 640; + bigbufferscreen.height = 20; + + towerbuffer = new BitmapData(320, 240, true, 0x000000); + frontbuffer = new BitmapData(320, 240, true, 0x000000); + + menubuffer = new BitmapData(320, 240, false, 0x000000); //yeah yeah I know this is lazy + + backbuffer=new BitmapData(320, 240,false,0x000000); + screenbuffer = new BitmapData(320,240,false,0x000000); + + temptile = new BitmapData(8, 8, false, 0x000000); + tempsprite = new BitmapData(32, 32, false, 0x000000); + screen = new Bitmap(screenbuffer); + + //screen.width = 640;//320;//;640; + //screen.height = 480;// 240;//480; + screen.smoothing = true; + + addChild(screen); + + buttonscreen.push(new Bitmap(buttonimg[0])); + buttonscreen.push(new Bitmap(buttonimg[1])); + buttonscreen.push(new Bitmap(buttonimg[2])); + buttonscreen.push(new Bitmap(buttonimg[3])); + + /* + if (device.deviceresolution == device.IPAD) { + buttonsize = 90; + buttonyspacing = buttonsize / 3; + buttonxspacing = 40; + buttonscreen[0].width = 92*3; buttonscreen[0].height = buttonsize; + buttonscreen[1].width = 92*3; buttonscreen[1].height = buttonsize; + buttonscreen[2].width = 40*3; buttonscreen[2].height = 40*3; + buttonscreen[3].width = 40 * 3; buttonscreen[3].height = 40 * 3; + buttonydiff = buttonscreen[2].height / 2; + }else if (device.deviceresolution == device.ANDROID) { + */ + + /* + }else { + buttonsize = 30; + buttonyspacing = buttonsize / 3; + buttonxspacing = 20; + buttonscreen[0].width = 92; buttonscreen[0].height = buttonsize; + buttonscreen[1].width = 92; buttonscreen[1].height = buttonsize; + buttonscreen[2].width = 40; buttonscreen[2].height = 40; + buttonscreen[3].width = 40; buttonscreen[3].height = 40; + buttonydiff = buttonscreen[2].height / 2; + } + */ + + /*buttonscreen.push(new Bitmap(buttonimg[1])); + buttonscreen[1].width = buttonsize; buttonscreen[1].height = buttonsize; + buttonscreen.push(new Bitmap(buttonimg[2])); + buttonscreen[2].width = buttonsize; buttonscreen[2].height = buttonsize; + buttonscreen.push(new Bitmap(buttonimg[3])); + buttonscreen[3].width = buttonsize; buttonscreen[3].height = buttonsize; + */ + + for (i = 0; i < 10; i++) { + buttonlerp.push(int(0)); + buttonstate.push(int(0)); + currentbuttontype.push(int(-1)); + newbuttontype.push(int(-1)); + buttonframe.push(int(-1)); + } + + buttonactive.push(false); + buttonactive.push(false); + buttonactive.push(false); + buttonactive.push(false); + buttonhighlight.push(0); buttonhighlight.push(0); buttonhighlight.push(0); buttonhighlight.push(0); + buttonpos.push(new Point(0, 0)); buttonpos.push(new Point(0, 0)); + buttonpos.push(new Point(0, 0)); buttonpos.push(new Point(0, 0)); + //So, 0-4 are buffers that can be overwritten. 5+ contains graphics for each button. + + initbuttonpositions(); + + /* + buttonscreen[0].x = buttonxspacing; + buttonscreen[0].y = device.yres - buttonsize-buttonyspacing-buttonydiff; + buttonpos.push(new Point(buttonscreen[0].x, buttonscreen[0].y)); + + buttonscreen[1].x = buttonxspacing + buttonsize + buttonxspacing; + buttonscreen[1].y = device.yres - buttonsize-buttonyspacing; + buttonpos.push(new Point(buttonscreen[1].x, buttonscreen[1].y)); + + buttonscreen[2].x = device.xres - buttonxspacing - buttonsize; + buttonscreen[2].y = buttonsize / 4; + buttonpos.push(new Point(buttonscreen[2].x, buttonscreen[2].y)); + + buttonscreen[3].x = device.xres - buttonxspacing - buttonsize - buttonxspacing - buttonsize; + buttonscreen[3].y = device.yres - buttonsize-buttonyspacing; + buttonpos.push(new Point(buttonscreen[3].x, buttonscreen[3].y)); + */ + drawonscreenbutton(0, -1); + drawonscreenbutton(1, -1); + drawonscreenbutton(2, -1); + drawonscreenbutton(3, -1); + addChild(buttonscreen[0]); + addChild(buttonscreen[1]); + addChild(buttonscreen[2]); + addChild(buttonscreen[3]); + /* + drawonscreenbutton(0, 0); + drawonscreenbutton(1, 0); + drawonscreenbutton(2, 0); + drawonscreenbutton(3, 0); + showarrows(); + */ + } + + public function initbuttonpositions():void { + devicex = device.xres; + devicey = device.yres; + + buttonsize = device.yres / (32 / 3); + buttonyspacing = buttonsize / 3; + buttonxspacing = (buttonsize * 3) / 3; + buttonscreen[0].width = (buttonsize * 46) / 15; buttonscreen[0].height = buttonsize; + buttonscreen[1].width = (buttonsize * 46) / 15; buttonscreen[1].height = buttonsize; + buttonscreen[2].width = (buttonsize * 5) / 3; buttonscreen[2].height = (buttonsize * 5) / 3; + buttonscreen[3].width = (buttonsize * 5) / 3; buttonscreen[3].height = (buttonsize * 5) / 3; + buttonydiff = buttonscreen[2].height / 2; + + buttonscreen[0].x = device.xres + 1; + buttonscreen[0].y = 0; + buttonpos[0].setTo(buttonscreen[0].x, buttonscreen[0].y); + + buttonscreen[1].x = 0; + buttonscreen[1].y = 0; + buttonpos[1].setTo(buttonscreen[1].x, buttonscreen[1].y); + + buttonscreen[2].x = (buttonxspacing / 2); + buttonscreen[2].y = device.yres - buttonsize-buttonyspacing - buttonydiff; + buttonpos[2].setTo(buttonscreen[2].x, buttonscreen[2].y); + + buttonscreen[3].x = (buttonxspacing/2) + buttonsize + buttonxspacing; + buttonscreen[3].y = device.yres - buttonsize-buttonyspacing; + buttonpos[3].setTo(buttonscreen[3].x, buttonscreen[3].y); + } + + public function mobile_changebutton(t:int):void { + if (newbuttontype[0] != t) { + if (currentbuttontype[0] != t) { + newbuttontype[0] = t; + buttonstate[0] = 1; + } + } + } + + public function mobile_changeleftbutton(t:int):void { + if (newbuttontype[1] != t) { + if (currentbuttontype[1] != t) { + newbuttontype[1] = t; + buttonstate[1] = 1; + } + } + } + + public function mobile_hidearrows():void { + if (newbuttontype[2] != BUTTON_BLANK) { + if (currentbuttontype[2] != BUTTON_BLANK) { + newbuttontype[2] = BUTTON_BLANK; + buttonstate[2] = 1; + } + } + } + + public function mobile_showarrows(t:int):void { + if (t == 2) { + if (newbuttontype[2] != BUTTON_DPAD) { + if (currentbuttontype[2] != BUTTON_DPAD) { + newbuttontype[2] = BUTTON_DPAD; + buttonstate[2] = 1; + } + } + } + } + + public function drawbutton(game:gameclass, help:helpclass):void { + //Called every frame, this function controls what buttons appear and when, + //and lerps them in and out in a nice way. + //buttonstate[0]: + // 0 - Normal, slide in if not in + // 1 - Sliding out, change to new button state + for (i = 0; i < 3; i++){ + switch(buttonstate[i]) { + case 0: + if (buttonlerp[i] > 60) { + buttonlerp[i] = 60; + } + if (buttonlerp[i] > 0) { + buttonlerp[i] -= 20; + if (buttonlerp[i] < 0) { + buttonlerp[i] = 0; + } + } + break; + case 1: + if (buttonlerp[i] < 100) { + buttonlerp[i] += 20; + } + if (buttonlerp[i] >= 60) buttonlerp[i] = 100; + + if (buttonlerp[i] >= 100) { + buttonlerp[i] = 100; + buttonstate[i] = 0; + currentbuttontype[i] = newbuttontype[i]; + newbuttontype[i] = -1; + } + break; + } + } + + switch(currentbuttontype[2]) { + case BUTTON_BLANK: + changebuttonframe(2, -1); + changebuttonframe(3, -1); + break; + case BUTTON_DPAD: + changebuttonframe(2, 11); + changebuttonframe(3, 12); + + if (game.press_left) { + changebuttonpos(2, buttonxspacing/2, devicey - buttonsize-buttonyspacing - buttonydiff+10); + }else{ + changebuttonpos(2, buttonxspacing/2, devicey - buttonsize-buttonyspacing - buttonydiff); + } + + if (game.press_right) { + changebuttonpos(3, (buttonxspacing/2)+ buttonsize + buttonxspacing, devicey - buttonsize-buttonyspacing - buttonydiff+10); + }else{ + changebuttonpos(3, (buttonxspacing/2) + buttonsize + buttonxspacing, devicey - buttonsize-buttonyspacing - buttonydiff); + } + break; + } + + switch(currentbuttontype[1]) { + case BUTTON_BLANK: + //Blank + changebuttonframe(1, -1); + changebuttonpos(1, 0 - ((buttonscreen[1].width * (buttonlerp[1])) / 100), 0); + break; + case BUTTON_CONTROLS: + //Controls button + if (game.menupage >= 30) { + changebuttonframe(1, 9); + }else{ + changebuttonframe(1, 8); + } + if (flipmode) { + changebuttonpos(1, 0 - ((buttonscreen[1].width * (buttonlerp[1])) / 100), devicey-buttonyspacing-buttonscreen[1].height); + }else { + changebuttonpos(1, 0 - ((buttonscreen[1].width * (buttonlerp[1])) / 100), buttonyspacing); + } + + break; + case BUTTON_GAMECENTER: + changebuttonframe(1, 10); + changebuttonpos(1, 0 - ((buttonscreen[1].width * (buttonlerp[1])) / 100), 5); + break; + } + + switch(currentbuttontype[0]) { + case BUTTON_BLANK: + //Blank + changebuttonframe(0, -1); + changebuttonpos(0, devicex - ((buttonscreen[0].width * (100-buttonlerp[0])) / 100), 0); + break; + case BUTTON_MENU: + //Menu button + changebuttonframe(0, 0); + changebuttonpos(0, devicex - ((buttonscreen[0].width * (100-buttonlerp[0])) / 100), 0); + break; + case BUTTON_BACK: + //Back button + changebuttonframe(0, 1); + if (flipmode) { + changebuttonpos(0, devicex - ((buttonscreen[0].width * (100 - buttonlerp[0])) / 100), devicey - buttonyspacing - buttonscreen[0].height); + }else{ + changebuttonpos(0, devicex - ((buttonscreen[0].width * (100 - buttonlerp[0])) / 100), buttonyspacing); + } + break; + case BUTTON_USE: + //Use button + if (help.slowsine % 16 > 8) { + changebuttonframe(0, 4); + }else { + changebuttonframe(0, 5); + } + changebuttonpos(0, devicex - ((buttonscreen[0].width * (100-buttonlerp[0])) / 100), buttonyspacing); + break; + case BUTTON_TALK: + //Talk button + if (help.slowsine % 16 > 8) { + changebuttonframe(0, 2); + }else { + changebuttonframe(0, 3); + } + changebuttonpos(0, devicex - ((buttonscreen[0].width * (100-buttonlerp[0])) / 100), buttonyspacing); + break; + case BUTTON_TELEPORT: + //Teleport button + if (help.slowsine % 16 > 8) { + changebuttonframe(0, 6); + }else { + changebuttonframe(0, 7); + } + changebuttonpos(0, devicex - ((buttonscreen[0].width * (100-buttonlerp[0])) / 100), buttonyspacing); + break; + } + + /* + if (game.press_left) { drawonscreenbutton(0, 1); + }else{ drawonscreenbutton(0, 0);} + + if (game.press_right) { drawonscreenbutton(1, 1); + }else { drawonscreenbutton(1, 0); } + + if (game.press_map) { drawonscreenbutton(2, 1); + }else { drawonscreenbutton(2, 0); } + */ + //Draw circle pad! + //if (key.controlstick != -1) { + /* + backbuffer.copyPixels(dwgfx.buttonimg[13], dwgfx.buttonimg[13].rect, new Point(key.controlstick_x - 18+18, key.controlstick_y - 18+18)); + for (i = 0; i < key.touchPoints; i++) { + if (key.touchid[i] == key.controlstick) { + dwgfx.backbuffer.copyPixels(dwgfx.buttonimg[14], dwgfx.buttonimg[14].rect, new Point(key.touchx[i] - 18, key.touchy[i] - 18)); + } + } + */ + //} + } + + public function addbutton():void { + var t:BitmapData = new BitmapData(buffer.width, buffer.height, true, 0x00000000); + t.copyPixels(buffer, new Rectangle(0,0,buffer.width, buffer.height), new Point(0,0)); + buttonimg.push(t); + } + + public function drawonscreenbutton(t:int, t2:int):void { + //Draw button t with frame t2 + if (t2 == -1) { + buttonimg[t].fillRect(buttonimg[t].rect, 0x00000000); + } + if (buttonframe[t] != t2) { + buttonframe[t] = t2; + buttonimg[t].fillRect(buttonimg[t].rect, 0x00000000); + buttonimg[t].copyPixels(buttonimg[4 + t2], buttonimg[t].rect, tl); + } + } + + public function changebuttonframe(t:int, t2:int):void { + //Draw button t with frame t2 + if (buttonframe[t] != t2) { + buttonframe[t] = t2; + if (t2 == -1) { + buttonimg[t].fillRect(buttonimg[t].rect, 0x00000000); + }else{ + buttonimg[t].fillRect(buttonimg[t].rect, 0x00000000); + buttonimg[t].copyPixels(buttonimg[4 + t2], buttonimg[t].rect, tl); + } + } + } + + public function changebuttonpos(t:int, xp:int, yp:int):void { + buttonscreen[t].x = xp; + buttonscreen[t].y = yp; + } + + public function changebuttonxpos(t:int, xp:int):void { + buttonscreen[t].x = xp; + } + + public function showarrows():void { + if (buttonactive[0] == false) { + buttonhighlight[0] = 120; + buttonactive[0] = true; + addChild(buttonscreen[0]); + addChild(buttonscreen[1]); + addChild(buttonscreen[2]); + } + } + + public function hidearrows():void { + if (buttonactive[0] == true) { + buttonactive[0] = false; + removeChild(buttonscreen[0]); + removeChild(buttonscreen[1]); + removeChild(buttonscreen[2]); + } + } + + + public function drawspritesetcol(x:int, y:int, t:int, c:int, help:helpclass):void { + tpoint.x = x; tpoint.y = y; + setcol(c, help); + sprites[t].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[t], sprites_rect, tpoint); + } + + + public function makebfont():void { + for (var j:Number = 0; j < 16; j++) { + for (var i:Number = 0; i < 16; i++) { + var t:BitmapData = new BitmapData(8, 8, true, 0x000000); + var t2:BitmapData = new BitmapData(8, 8, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 8, j * 8, 8, 8); + t.copyPixels(buffer, temprect, tl); + t2.draw(t, flipfontmatrix); + bfont.push(t); + flipbfont.push(t2); + } + } + + //Ok, now we work out the lengths (this data string cortesy of a program I wrote!) + for (i = 0; i < 256; i++) bfontlen.push(6); + var maprow:Array; + var tstring:String="4,3,5,7,6,7,6,3,4,4,7,7,3,5,2,5,6,5,6,6,6,6,6,6,6,6,2,3,5,5,5,6,7,6,6,6,6,5,5,6,6,3,6,6,5,7,7,6,6,6,6,6,5,6,7,7,7,7,5,4,5,4,5,6,4,6,6,6,6,5,5,6,6,3,6,6,5,7,7,6,6,6,6,6,5,6,7,7,7,7,5,5,3,5,6,4"; + + maprow = new Array(); + maprow = tstring.split(","); + for(var k:int = 0; k < 96; k++) { + bfontlen[k + 32] = 8;// int(maprow[k]); + } + } + + public function makebfontmask():void { + for (var j:Number = 0; j < 16; j++) { + for (var i:Number = 0; i < 16; i++) { + var t:BitmapData = new BitmapData(9, 9, true, 0x000000); + var t2:BitmapData = new BitmapData(9, 9, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 9, j * 9, 9, 9); + t.copyPixels(buffer, temprect, tl); + t2.draw(t, flipfontmatrix2); + bfontmask.push(t); + flipbfontmask.push(t2); + } + } + } + + public function makeentcolourarray():void { + for (var j:Number = 0; j < 60; j++) { + for (var i:Number = 0; i < 12; i++) { + var t:BitmapData = new BitmapData(8, 8, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 8, j * 8, 8, 8); + t.copyPixels(buffer, temprect, tl); + entcolours.push(t); + } + } + } + + public function maketilearray():void { + for (var j:Number = 0; j < 30; j++) { + for (var i:Number = 0; i < 40; i++) { + var t:BitmapData = new BitmapData(8, 8, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 8, j * 8, 8, 8); + t.copyPixels(buffer, temprect, tl); + tiles.push(t); + } + } + } + + public function maketile2array():void { + for (var j:Number = 0; j < 30; j++) { + for (var i:Number = 0; i < 40; i++) { + var t:BitmapData = new BitmapData(8, 8, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 8, j * 8, 8, 8); + t.copyPixels(buffer, temprect, tl); + tiles2.push(t); + } + } + } + + public function maketile3array():void { + for (var j:Number = 0; j < 30; j++) { + for (var i:Number = 0; i < 30; i++) { + var t:BitmapData = new BitmapData(8, 8, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 8, j * 8, 8, 8); + t.copyPixels(buffer, temprect, tl); + tiles3.push(t); + } + } + } + + public function makespritearray():void { + for (var j:Number = 0; j < 16; j++) { + for (var i:Number = 0; i < 12; i++) { + var t:BitmapData = new BitmapData(32, 32, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 32, j * 32, 32, 32); + t.copyPixels(buffer, temprect, tl); + sprites.push(t); + } + } + } + + public function makeflipspritearray():void { + for (var j:Number = 0; j < 16; j++) { + for (var i:Number = 0; i < 12; i++) { + var t:BitmapData = new BitmapData(32, 32, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 32, j * 32, 32, 32); + t.copyPixels(buffer, temprect, tl); + flipsprites.push(t); + } + } + } + + public function maketelearray():void { + for (var i:Number = 0; i < 10; i++) { + var t:BitmapData = new BitmapData(96, 96, true, 0x000000); + var temprect:Rectangle = new Rectangle(i * 96, 0, 96, 96); + t.copyPixels(buffer, temprect, tl); + tele.push(t); + } + } + + public function drawmobilebutton(game:gameclass, xp:int, yp:int, wp:int, hp:int, t:String, cr:int, cg:int, cb:int, xoff:int = -8, yoff:int = -10):void { + xp = xp + xoff; + yp = yp + yoff; + drawfillrect(xp + 4, yp + 4, wp, hp, cr * 0.25, cg * 0.25, cb * 0.25); + drawfillrect(xp, yp, wp, hp, cr, cg, cb); + drawfillrect(xp + 2, yp + 2, wp - 4, hp - 4, cr * 0.75, cg * 0.75, cb * 0.75); + xp = xp + (wp / 2) - (t.length * 4); + print(xp, yp + 9, t, 255, 255, 255); + } + + public function drawmenu(game:gameclass, cr:int, cg:int, cb:int, help:helpclass, division:int = 30):void { + if (game.mobilemenu) { + for (i = 0; i < game.nummenuoptions; i++) { + /* + if (i == game.currentmenuoption) { + //Draw it highlighted + if (game.menuoptionsactive[i]) { + tempstring = game.menuoptions[i]; tempstring = "[ " + tempstring.toUpperCase() + " ]"; + print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); + }else { + tempstring = game.menuoptions[i]; tempstring = "[ " + tempstring + " ]"; + //Draw it in gray + print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); + } + }else { + */ + //Draw it normally + if (game.menuoptionslayout[i] == 0) { + //Normal Buttons + if (game.menuoptionsactive[i]) { + drawfillrect(160 - 70 + 4, 140 + (i * b_gap) + game.menuyoff - 6 + 4, 140, b_size, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(160 - 70, 140 + (i * b_gap) + game.menuyoff - 6, 140, b_size, cr, cg, cb); + drawfillrect(160 - 70 + 2, 140 + (i * b_gap) + game.menuyoff - 6 + 2, 140 - 4, b_size - 4, cr*0.75, cg*0.75, cb*0.75); + print(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) + game.menuyoff+3, game.menuoptions[i], 255, 255, 255, true); + }else { + drawfillrect(160 - 70 + 4, 140 + (i * b_gap) + game.menuyoff - 6 + 4, 140, b_size, 128*0.25, 128*0.25, 128*0.25); + drawfillrect(160 - 70, 140 + (i * b_gap) + game.menuyoff - 6, 140, b_size, 128, 128, 128); + drawfillrect(160 - 70 + 2, 140 + (i * b_gap) + game.menuyoff - 6 + 2, 140 - 4, b_size - 4, 128*0.75, 128*0.75, 128*0.75); + print(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) + game.menuyoff+3, "LOCKED", 255, 255, 255, true); + } + }else if (game.menuoptionslayout[i] == 1) { + //Super big button for main menu play + drawfillrect(160 - 70 + 4, 140 + (i * b_gap) -10+ game.menuyoff - 6 + 4, 140, b_size*2, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(160 - 70, 140 + (i * b_gap)-10 + game.menuyoff - 6, 140, b_size*2, cr, cg, cb); + drawfillrect(160 - 70 + 2, 140 + (i * b_gap)-10 + game.menuyoff - 6 + 2, 140 - 4, (b_size*2) - 4, cr*0.75, cg*0.75, cb*0.75); + bigprint(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) -10 + game.menuyoff + 10, game.menuoptions[i], 255, 255, 255, true); + }else if (game.menuoptionslayout[i] == 2) { + //Main menu: Player levels and super gravitron + if (game.menuoptionsactive[i]) { + drawfillrect(160 - 70 + 4, 140 + (i * b_gap)+20 + game.menuyoff - 6 + 4, 140, b_size, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(160 - 70, 140 + (i * b_gap)+20 + game.menuyoff - 6, 140, b_size, cr, cg, cb); + drawfillrect(160 - 70 + 2, 140 + (i * b_gap) +20+ game.menuyoff - 6 + 2, 140 - 4, b_size - 4, cr*0.75, cg*0.75, cb*0.75); + print(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) + 20 + game.menuyoff+3, game.menuoptions[i], 255, 255, 255, true); + }else { + drawfillrect(160 - 70 + 4, 140 + (i * b_gap)+20 + game.menuyoff - 6 + 4, 140, 20, 128*0.25, 128*0.25, 128*0.25); + drawfillrect(160 - 70, 140 + (i * b_gap)+20 + game.menuyoff - 6, 140, 20, 128, 128, 128); + drawfillrect(160 - 70 + 2, 140 + (i * b_gap) +20+ game.menuyoff - 6 + 2, 140 - 4, 20 - 4, 128*0.75, 128*0.75, 128*0.75); + print(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) + 20 + game.menuyoff+3, "LOCKED", 255, 255, 255, true); + } + }else if (game.menuoptionslayout[i] == 3) { + //Back Button + drawfillrect(-4, 230 - 6 + 4, 70, b_size, cr*0.10, cg*0.10, cb*0.10); + drawfillrect(-8, 230 - 6, 70, b_size, cr*0.5, cg*0.5, cb*0.5); + drawfillrect(-8+2, 230 - 6 + 2, 70 - 4, b_size - 4, cr*0.4, cg*0.4, cb*0.4); + print(8, 230, game.menuoptions[i], 196, 196, 196); + }else if (game.menuoptionslayout[i] == 4) { + //Normal Buttons except wider for longer text + if (game.menuoptionsactive[i]) { + drawfillrect(160 - 90 + 4, 140 + (i * b_gap) + game.menuyoff - 6 + 4, 180, b_size, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(160 - 90, 140 + (i * b_gap) + game.menuyoff - 6, 180, b_size, cr, cg, cb); + drawfillrect(160 - 90 + 2, 140 + (i * b_gap) + game.menuyoff - 6 + 2, 180 - 4, b_size - 4, cr*0.75, cg*0.75, cb*0.75); + print(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) + game.menuyoff+3, game.menuoptions[i], 255, 255, 255, true); + }else { + drawfillrect(160 - 90 + 4, 140 + (i * b_gap) + game.menuyoff - 6 + 4, 180, b_size, 128*0.25, 128*0.25, 128*0.25); + drawfillrect(160 - 90, 140 + (i * b_gap) + game.menuyoff - 6, 180, b_size, 128, 128, 128); + drawfillrect(160 - 90 + 2, 140 + (i * b_gap) + game.menuyoff - 6 + 2, 180 - 4, b_size - 4, 128*0.75, 128*0.75, 128*0.75); + print(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) + game.menuyoff+3, "LOCKED", 255, 255, 255, true); + } + }else if (game.menuoptionslayout[i] == 5) { + //Time trial button, left + + if (game.menuoptionsactive[i]) { + drawfillrect(10, 140 + (i * 68) -10+ game.menuyoff - 6 + 4, 140, 40, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(10, 140 + (i * 68)-10 + game.menuyoff - 6, 140, 40, cr, cg, cb); + drawfillrect(12, 140 + (i * 68)-10 + game.menuyoff - 6 + 2, 140 - 4, 40 - 4, cr*0.75, cg*0.75, cb*0.75); + print(18, 140 + (i * 68) -10 + game.menuyoff + 20, game.menuoptions[i], 255, 255, 255); + + if (game.besttimes[i] == -1) { + print( 18, 140 + (i * 68) -10 + game.menuyoff + 3, "Not attempted", 196, 196, 196, false); + }else { + print( 18, 140 + (i * 68) -10 + game.menuyoff + 3, game.timetstring(game.besttimes[i], help), 196, 196, 196); + + print( 18+72, 140 + (i * 68) -10 + game.menuyoff + 3, "Rank: ", 196, 196, 196); + switch(game.bestrank[i]) { + case 0: print( 18+116, 140 + (i * 68) -10 + game.menuyoff + 3, "B", 255, 255, 255); break; + case 1: print( 18+116, 140 + (i * 68) -10 + game.menuyoff + 3, "A", 255, 255, 255); break; + case 2: print( 18+116, 140 + (i * 68) -10 + game.menuyoff + 3, "S", 255, 255, 255); break; + case 3: print( 18+116, 140 + (i * 68) -10 + game.menuyoff + 3, "V", 255, 255, 255); break; + } + } + }else { + drawfillrect(10, 140 + (i * 68) -10+ game.menuyoff - 6 + 4, 140, 40, 128*0.25, 128*0.25, 128*0.25); + drawfillrect(10, 140 + (i * 68)-10 + game.menuyoff - 6, 140, 40, 128, 128, 128); + drawfillrect(12, 140 + (i * 68)-10 + game.menuyoff - 6 + 2, 140 - 4, 40 - 4, 128*0.75, 128*0.75, 128*0.75); + + print( 18, 140 + (i * 68) -10 + game.menuyoff + 12, "Locked...", 255, 255, 255, false); + } + + }else if (game.menuoptionslayout[i] == 6) { + //Time trial button, right + + if (game.menuoptionsactive[i]) { + drawfillrect(170, 140 + ((i-3) * 68) -10+ game.menuyoff - 6 + 4, 140, 40, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(170, 140 + ((i-3) * 68)-10 + game.menuyoff - 6, 140, 40, cr, cg, cb); + drawfillrect(172, 140 + ((i-3) * 68)-10 + game.menuyoff - 6 + 2, 140 - 4, 40 - 4, cr*0.75, cg*0.75, cb*0.75); + print(178, 140 + ((i - 3) * 68) -10 + game.menuyoff + 20, game.menuoptions[i], 255, 255, 255); + + if (game.besttimes[i] == -1) { + print( 178, 140 + ((i - 3) * 68) -10 + game.menuyoff + 3, "Not attempted", 196, 196, 196, false); + }else { + print( 178, 140 + ((i - 3) * 68) -10 + game.menuyoff + 3, game.timetstring(game.besttimes[i], help), 196, 196, 196); + + print( 178+72, 140 + ((i - 3) * 68) -10 + game.menuyoff + 3, "Rank: ", 196, 196, 196); + switch(game.bestrank[i]) { + case 0: print( 178+116, 140 + ((i - 3) * 68) -10 + game.menuyoff + 3, "B", 255, 255, 255); break; + case 1: print( 178+116, 140 + ((i - 3) * 68) -10 + game.menuyoff + 3, "A", 255, 255, 255); break; + case 2: print( 178+116, 140 + ((i - 3) * 68) -10 + game.menuyoff + 3, "S", 255, 255, 255); break; + case 3: print( 178+116, 140 + ((i - 3) * 68) -10 + game.menuyoff + 3, "V", 255, 255, 255); break; + } + } + }else { + drawfillrect(170, 140 + ((i-3) * 68) -10+ game.menuyoff - 6 + 4, 140, 40, 128*0.25, 128*0.25, 128*0.25); + drawfillrect(170, 140 + ((i-3) * 68)-10 + game.menuyoff - 6, 140, 40, 128, 128, 128); + drawfillrect(172, 140 + ((i - 3) * 68) - 10 + game.menuyoff - 6 + 2, 140 - 4, 40 - 4, 128 * 0.75, 128 * 0.75, 128 * 0.75); + + print( 178, 140 + ((i - 3) * 68) -10 + game.menuyoff + 12, "Locked...", 255, 255, 255, false); + } + }else if (game.menuoptionslayout[i] == 7) { + //Options button on the main menu - don't draw anything, just have a detection zone + }else if (game.menuoptionslayout[i] == 8) { + //credits button on the main menu - don't draw anything, just have a detection zone + }else if (game.menuoptionslayout[i] == 9) { + //For unlocking and relocking things + if (game.menuoptionsactive[i]) { + drawfillrect(160 - 90 + 4, 140 + (i * b_gap) + game.menuyoff - 6 + 4, 180, b_size, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(160 - 90, 140 + (i * b_gap) + game.menuyoff - 6, 180, b_size, cr, cg, cb); + drawfillrect(160 - 90 + 2, 140 + (i * b_gap) + game.menuyoff - 6 + 2, 180 - 4, b_size - 4, cr*0.75, cg*0.75, cb*0.75); + print(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) + game.menuyoff+3, game.menuoptions[i], 255, 255, 255, true); + }else { + print(110 + (i * division) +game.menuxoff, 140 + (i * b_gap) + game.menuyoff+3, game.menuoptions_alt[i], 255, 255, 255, true); + } + }else if (game.menuoptionslayout[i] == 10) { + //Player level menu next page button + if (game.menuoptionsactive[i]) { + drawfillrect(160 - 70 + 4, 240 - b_gap + 4, 140, b_size, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(160 - 70, 240 - b_gap, 140, b_size, cr, cg, cb); + drawfillrect(160 - 70 + 2, 240 - b_gap + 2, 140 - 4, b_size - 4, cr*0.75, cg*0.75, cb*0.75); + print(110 + (i * division) +game.menuxoff, 240 - b_gap+3+6, game.menuoptions[i], 255, 255, 255, true); + }else { + drawfillrect(160 - 70 + 4, 240 - b_gap + 4, 140, 20, 128*0.25, 128*0.25, 128*0.25); + drawfillrect(160 - 70, 240 - b_gap, 140, 20, 128, 128, 128); + drawfillrect(160 - 70 + 2, 240 - b_gap + 2, 140 - 4, 20 - 4, 128*0.75, 128*0.75, 128*0.75); + print(110 + (i * division) +game.menuxoff, 240 - b_gap +3+6, "LOCKED", 255, 255, 255, true); + } + }else if (game.menuoptionslayout[i] == 11) { + //Player level + drawfillrect(160 - 140 + 4, 140 + (i * 65) -10+ game.menuyoff - 6 + 4, 280, (b_size*2)+5, cr*0.25, cg*0.25, cb*0.25); + drawfillrect(160 - 140, 140 + (i * 65)-10 + game.menuyoff - 6, 280, (b_size*2)+5, cr, cg, cb); + drawfillrect(160 - 140 + 2, 140 + (i * 65)-10 + game.menuyoff - 6 + 2, 280 - 4, (b_size*2) - 4+5, cr*0.75, cg*0.75, cb*0.75); + print(120, 140 + (i * 65) -10 + game.menuyoff, editor.ListOfMetaData[int(game.menuoptions[i])].title, 255, 255, 255); + print(120, 140 + (i * 65) -10 + game.menuyoff + 10, editor.ListOfMetaData[int(game.menuoptions[i])].creator, 196, 196, 196); + + print(120, 140 + (i * 65) -10 + game.menuyoff + 35+3, "spikyness: ", 196, 196, 196); + for (var tiii:int = 0; tiii < editor.playerlevel_spikyness[int(game.menuoptions[i])]; tiii++){ + drawtile(120 + (8 * 11)+(8*tiii), 140 + (i * 65) -10 + game.menuyoff + 35+3, 8); + } + + if (int(game.menuoptions_alt[i]) == 3) { + drawsprite(280-20, 140 + (i * 65) -10 + game.menuyoff + 30-3, 188, 255, 255, 255); + drawsprite(280, 140 + (i * 65) -10 + game.menuyoff + 30, 184, 255, 255, 255); + }else if (int(game.menuoptions_alt[i]) == 1) { + drawsprite(280, 140 + (i * 65) -10 + game.menuyoff + 30, 184, 255, 255, 255); + } + + drawplayerlevelimage(int(game.menuoptions[i]), 160 - 140 + 4+2, 140 + (i * 65) -10 + game.menuyoff - 6 + 4+2); + }else if (game.menuoptionslayout[i] == 12) { + //more games button on the main menu - don't draw anything, just have a detection zone + } + } + }else { + for (i = 0; i < game.nummenuoptions; i++) { + if (i == game.currentmenuoption) { + //Draw it highlighted + if (game.menuoptionsactive[i]) { + tempstring = game.menuoptions[i]; tempstring = "[ " + tempstring.toUpperCase() + " ]"; + print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); + }else { + tempstring = game.menuoptions[i]; tempstring = "[ " + tempstring + " ]"; + //Draw it in gray + print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); + } + }else { + //Draw it normally + if (game.menuoptionsactive[i]) { + print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i], cr, cg, cb); + }else { + //Draw it in gray + print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i], 128, 128, 128); + } + } + } + } + } + + public function drawlevelmenu(game:gameclass, cr:int, cg:int, cb:int, division:int = 30):void { + for (var i:int = 0; i < game.nummenuoptions; i++){ + if (i == game.currentmenuoption){ + if(game.nummenuoptions-i<=2){ + //Draw it highlighted + if (game.menuoptionsactive[i]) { + tempstring = game.menuoptions[i]; tempstring = "[ " + tempstring.toUpperCase() + " ]"; + print(110 + (i * division) - 16 +game.menuxoff, 140 + 8 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); + }else{ + tempstring = game.menuoptions[i]; + tempstring = "[ " + tempstring + " ]"; + //Draw it in gray + print(110 + (i * division) - 16 +game.menuxoff, 140 + 8 + (i * 12) + game.menuyoff, tempstring, 128, 128, 128); + } + }else{ + //Draw it highlighted + if (game.menuoptionsactive[i]){ + tempstring = game.menuoptions[i]; tempstring = "[ " + tempstring.toUpperCase() + " ]"; + print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12) +game.menuyoff, tempstring, cr, cg, cb); + }else{ + tempstring = game.menuoptions[i]; + tempstring = "[ " + tempstring + " ]"; + //Draw it in gray + print(110 + (i * division) - 16 +game.menuxoff, 140 + (i * 12)+game.menuyoff, tempstring, 128, 128, 128); + } + } + }else{ + if(game.nummenuoptions-i<=2){ + //Draw it normally + if (game.menuoptionsactive[i]){ + print(110 + (i * division) +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, game.menuoptions[i], cr, cg, cb); + }else{ + //Draw it in gray + print(110 + (i * division) +game.menuxoff, 140+8 + (i * 12)+game.menuyoff, game.menuoptions[i], 128, 128, 128); + } + }else{ + //Draw it normally + if (game.menuoptionsactive[i]){ + print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i], cr, cg, cb); + }else{ + //Draw it in gray + print(110 + (i * division) +game.menuxoff, 140 + (i * 12)+game.menuyoff, game.menuoptions[i], 128, 128, 128); + } + } + } + } + } + + //Fade functions + public function processfade():void { + if (fademode > 1) { + if (fademode == 2) { + //prepare fade out + for (i = 0; i < 15; i++) { + fadebars[i] = -int(Math.random() * 12) * 8; + } + fadeamount = 0; + fademode = 3; + }else if (fademode == 3) { + fadeamount += 24; + if (fadeamount > 416) { + fademode = 1; //faded + } + }else if (fademode == 4) { + //prepare fade in + for (i = 0; i < 15; i++) { + fadebars[i] = 320 + int(Math.random() * 12) * 8; + } + fadeamount = 416; + fademode = 5; + }else if (fademode == 5) { + fadeamount -= 24; + if (fadeamount <= 0) { + fademode = 0; //normal + } + } + } + } + + public function drawfade():void { + if (fademode == 1) { + backbuffer.fillRect(backbuffer.rect, 0x000000); + }else if(fademode==3){ + for (i = 0; i < 15; i++) { + setmadrect(fadebars[i], i * 16, fadeamount, 16); + backbuffer.fillRect(madrect, 0x000000); + } + }else if(fademode==5){ + for (i = 0; i < 15; i++) { + setmadrect(fadebars[i]-fadeamount, i * 16, 500, 16); + backbuffer.fillRect(madrect, 0x000000); + } + } + } + + public function setwarprect(a:int, b:int, c:int, d:int):void { + warprect.x = a; warprect.y = b; + warprect.width = c; warprect.height = d; + } + + public function createtextbox(t:String, xp:int, yp:int, r:int = 255, g:int = 255, b:int = 255):void { + if(ntextbox == 0) { + //If there are no active textboxes, Z=0; + m = 0; ntextbox++; + }else { + /*i = 0; m = -1; + while (i < ntextbox) { + if (!textbox[i].active) { m = i; i = ntextbox;} + i++; + } + if (m == -1) {m = ntextbox; ntextbox++;} + */ + m = ntextbox; ntextbox++; + } + + if(m<20){ + textbox[m].clear(); + textbox[m].line[0] = t; + textbox[m].xp = xp; + if (xp == -1) textbox[m].xp = 160 - (((t.length / 2) + 1) * 8); + textbox[m].yp = yp; + textbox[m].initcol(r, g, b); + textbox[m].resize(); + } + } + + public function textboxcleanup():void { + i = ntextbox - 1; while (i >= 0 && !textbox[i].active) { ntextbox--; i--; } + } + + public function textboxcenter():void { + textbox[m].centerx(); textbox[m].centery(); + } + + public function textboxcenterx():void { + textbox[m].centerx(); + } + + public function textboxwidth():int { + return textbox[m].w; + } + + public function textboxmove(xo:int, yo:int):void { + textbox[m].xp += xo; textbox[m].yp += yo; + } + + public function textboxmoveto(xo:int):void { + textbox[m].xp = xo; + } + + public function textboxcentery():void { + textbox[m].centery(); + } + + public function textboxadjust():void { + textbox[m].adjust(); + } + + public function addline(t:String):void { + textbox[m].addline(t); + } + + public function textboxtimer(t:int):void { + textbox[m].timer=t; + } + + public function textboxremove():void { + //Remove all textboxes + for (i = 0; i < ntextbox; i++) { + textbox[i].remove(); + } + } + + public function textboxremovefast():void { + //Remove all textboxes + for (i = 0; i < ntextbox; i++) { + textbox[i].removefast(); + } + } + + public function textboxactive():void { + //Remove all but the most recent textbox + for (i = 0; i < ntextbox; i++) { + if (m != i) textbox[i].remove(); + } + } + + public function setmadrect(x:int, y:int, w:int, h:int):void { + madrect.x = x; madrect.y = y; madrect.width = w; madrect.height = h; + } + + public function drawtextbox(x:int, y:int, w:int, h:int, r:int, g:int, b:int):void { + //given these parameters, draw a textbox + madrect.x = x; madrect.y = y; madrect.width = w*8; madrect.height = h*8; + backbuffer.fillRect(madrect, RGB(r / 6, g / 6, b / 6)); + drawcoloredtile(x, y, 40, r, g, b); + drawcoloredtile(x + (w*8) - 8, y, 42, r, g, b); + drawcoloredtile(x, y + (h*8) - 8, 45, r, g, b); + drawcoloredtile(x + (w*8) - 8, y + (h*8) - 8, 47, r, g, b); + + for (k = 0; k < w-2; k++) { + drawcoloredtile(x + 8 + (k * 8), y, 41, r, g, b); + drawcoloredtile(x + 8 + (k * 8), y + (h * 8) - 8, 46, r, g, b); + } + + for (k = 0; k < h-2; k++) { + drawcoloredtile(x, y + 8 + (k * 8), 43, r, g, b); + drawcoloredtile(x + (w * 8) - 8, y + 8 + (k * 8), 44, r, g, b); + } + } + + public function drawpixeltextbox(x:int, y:int, w:int, h:int, w2:int, h2:int, r:int, g:int, b:int, xo:int=0, yo:int=0):void { + //given these parameters, draw a textbox with a pixel width + madrect.x = x; madrect.y = y; madrect.width = w; madrect.height = h; + backbuffer.fillRect(madrect, RGB(r / 6, g / 6, b / 6)); + + for (k = 0; k < w2-2; k++) { + drawcoloredtile(x + 8-xo + (k * 8), y, 41, r, g, b); + drawcoloredtile(x + 8-xo + (k * 8), y + (h) - 8, 46, r, g, b); + } + + for (k = 0; k < h2-2; k++) { + drawcoloredtile(x, y + 8-yo + (k * 8), 43, r, g, b); + drawcoloredtile(x + (w) - 8, y + 8-yo + (k * 8), 44, r, g, b); + } + + drawcoloredtile(x, y, 40, r, g, b); + drawcoloredtile(x + (w) - 8, y, 42, r, g, b); + drawcoloredtile(x, y + (h) - 8, 45, r, g, b); + drawcoloredtile(x + (w) - 8, y + (h) - 8, 47, r, g, b); + } + + public function drawcustompixeltextbox(x:int, y:int, w:int, h:int, w2:int, h2:int, r:int, g:int, b:int, xo:int=0, yo:int=0):void { + //given these parameters, draw a textbox with a pixel width + + //madrect.x = x; madrect.y = y; madrect.w = w; madrect.h = h; + //backbuffer.fillRect(madrect, RGB(r / 6, g / 6, b / 6)); + madrect.x = x; madrect.y = y; madrect.width = w; madrect.height = h; + backbuffer.fillRect(madrect, RGB(r / 6, g / 6, b / 6)); + + for (k = 0; k < w2-2; k++){ + drawcoloredtile(x + 8-xo + (k * 8), y, 41, r, g, b); + drawcoloredtile(x + 8-xo + (k * 8), y + (h) - 8, 46, r, g, b); + } + + drawcoloredtile(x + (w) - 16, y, 41, r, g, b); + drawcoloredtile(x + (w) - 16, y + (h) - 8, 46, r, g, b); + drawcoloredtile(x + (w) - 24, y, 41, r, g, b); + drawcoloredtile(x + (w) - 24, y + (h) - 8, 46, r, g, b); + + for (k = 0; k < h2-2; k++){ + drawcoloredtile(x, y + 8-yo + (k * 8), 43, r, g, b); + drawcoloredtile(x + (w) - 8, y + 8-yo + (k * 8), 44, r, g, b); + } + + drawcoloredtile(x, y + (h) - 16, 43, r, g, b); + drawcoloredtile(x + (w) - 8, y + (h) - 16, 44, r, g, b); + drawcoloredtile(x, y + (h) - 24, 43, r, g, b); + drawcoloredtile(x + (w) - 8, y + (h) - 24, 44, r, g, b); + + drawcoloredtile(x, y, 40, r, g, b); + drawcoloredtile(x + (w) - 8, y, 42, r, g, b); + drawcoloredtile(x, y + (h) - 8, 45, r, g, b); + drawcoloredtile(x + (w) - 8, y + (h) - 8, 47, r, g, b); + } + + public function drawpartimage(t:int, xp:int, yp:int, wp:int, hp:int):void { + tpoint.x = xp; tpoint.y = yp; + madrect.x = 0; madrect.y = 0; madrect.width = wp; madrect.height = hp; + + backbuffer.copyPixels(images[t], madrect, tpoint); + } + + public function cutscenebars():void { + if (showcutscenebars) { + cutscenebarspos += 25; + if (cutscenebarspos >= 360) cutscenebarspos = 360; + setmadrect(0, 0, cutscenebarspos, 16); + backbuffer.fillRect(madrect, 0x000000); + setmadrect(360-cutscenebarspos, 224, cutscenebarspos, 16); + backbuffer.fillRect(madrect, 0x000000); + }else { + //disappearing + if (cutscenebarspos > 0) { + cutscenebarspos -= 25; + //draw + setmadrect(0, 0, cutscenebarspos, 16); + backbuffer.fillRect(madrect, 0x000000); + setmadrect(360-cutscenebarspos, 224, cutscenebarspos, 16); + backbuffer.fillRect(madrect, 0x000000); + } + } + } + + public function drawgui(help:helpclass):void { + textboxcleanup(); + //Draw all the textboxes to the screen + for (i = 0; i 0) drawtile3(i * 8, (j * 8) - (map.ypos % 8), temp, map.colstate); + } + } + } + + public function drawtowermap_nobackground(map:mapclass):void { + for (j = 0; j < 30; j++) { + for (i = 0; i < 40; i++) { + temp = map.tower.at(i, j, map.ypos); + if (temp > 0 && temp<28) drawtile3(i * 8, (j * 8) - (map.ypos % 8), temp, map.colstate); + } + } + } + + public function drawtowerspikes(map:mapclass):void { + for (i = 0; i < 40; i++) { + drawtile3(i * 8, -8+map.spikeleveltop, 9, map.colstate); + drawtile3(i * 8, 230-map.spikelevelbottom, 8, map.colstate); + } + } + + public function drawtowerentities(map:mapclass, obj:entityclass, help:helpclass):void { + //Update line colours! + if (linedelay <= 0) { + linestate++; + if (linestate >= 10) linestate = 0; + linedelay = 2; + }else { + linedelay--; + } + + var j:int, k:int; + for (var i:int = 0; i < obj.nentity; i++) { + if (!obj.entities[i].invis && obj.entities[i].active) { + if (obj.entities[i].size == 0) { // Sprites + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp-map.ypos; + setcol(obj.entities[i].colour, help); + sprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + //screenwrapping! + if (!map.minitowermode) { + if ( map.ypos >= 500 && map.ypos <= 5000) { //The "wrapping" area of the tower + if (tpoint.x < 0) { + tpoint.x += 320; + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + if (tpoint.x > 300) { + tpoint.x -= 320; + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + } + } + }else if (obj.entities[i].size == 1) { // Tiles + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp-map.ypos; + backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + }else if (obj.entities[i].size == 2) { // Special: Moving platform, 4 tiles + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp-map.ypos; + backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + }else if (obj.entities[i].size == 3) { // Big chunky pixels! + prect.x = obj.entities[i].xp; prect.y = obj.entities[i].yp-map.ypos; + //A seperate index of colours, for simplicity + if(obj.entities[i].colour==1){ + backbuffer.fillRect(prect, RGB(196 - (Math.random() * 64), 10, 10)); + }else if (obj.entities[i].colour == 2) { + backbuffer.fillRect(prect, RGB(160- help.glow/2 - (Math.random()*20), 200- help.glow/2, 220 - help.glow)); + } + }else if (obj.entities[i].size == 4) { // Small pickups + drawhuetile(obj.entities[i].xp, obj.entities[i].yp-map.ypos, obj.entities[i].tile, obj.entities[i].colour); + }else if (obj.entities[i].size == 5) { //Horizontal Line + line_rect.x = obj.entities[i].xp; line_rect.y = obj.entities[i].yp-map.ypos; + line_rect.width = obj.entities[i].w; line_rect.height = 1; + drawgravityline(i, obj); + }else if (obj.entities[i].size == 6) { //Vertical Line + line_rect.x = obj.entities[i].xp; line_rect.y = obj.entities[i].yp-map.ypos; + line_rect.width = 1; line_rect.height = obj.entities[i].h; + drawgravityline(i, obj); + } + } + } + } + + public function drawbackground(t:int, map:mapclass):void { + switch(t) { + case 1: + //Starfield + backbuffer.fillRect(backbuffer.rect, 0x000000); + for (i = 0; i < 50; i++) { + if (starsspeed[i] <= 6) { + backbuffer.fillRect(stars[i], 0x222222); + }else { + backbuffer.fillRect(stars[i], 0x555555); + } + stars[i].x -= starsspeed[i]; + if (stars[i].x < -10) { + stars[i].x += 340; + stars[i].y = Math.random() * 240; + starsspeed[i] = 4+(Math.random()*4); + } + } + break; + case 2: + //Lab + switch(rcol) { + //Akward ordering to match tileset + case 0: bcol2 = RGB(0, 16*backboxint[i], 16*backboxint[i]); break; //Cyan + case 1: bcol2 = RGB(16*backboxint[i], 0, 0); break; //Red + case 2: bcol2 = RGB(16*backboxint[i], 0, 16*backboxint[i]); break; //Purple + case 3: bcol2 = RGB(0, 0, 16*backboxint[i]); break; //Blue + case 4: bcol2 = RGB(16*backboxint[i], 16*backboxint[i], 0); break; //Yellow + case 5: bcol2 = RGB(0, 16 * backboxint[i], 0); break; //Green + case 6: + //crazy case + spcoldel--; + if (spcoldel <= 0) { + spcoldel = 15; + spcol++; + if (spcol >= 12) spcol = 0; + } + switch(spcol) { + case 0: bcol2 = RGB(0, 16*backboxint[i], 16*backboxint[i]); break; //Cyan + case 1: bcol2 = RGB(0, (spcoldel+1)*backboxint[i], 16*backboxint[i]); break; //Cyan + case 2: bcol2 = RGB(0, 0, 16*backboxint[i]); break; //Blue + case 3: bcol2 = RGB((16-spcoldel)*backboxint[i], 0, 16*backboxint[i]); break; //Blue + case 4: bcol2 = RGB(16*backboxint[i], 0, 16*backboxint[i]); break; //Purple + case 5: bcol2 = RGB(16*backboxint[i], 0, (spcoldel+1)*backboxint[i]); break; //Purple + case 6: bcol2 = RGB(16*backboxint[i], 0, 0); break; //Red + case 7: bcol2 = RGB(16*backboxint[i], (16-spcoldel)*backboxint[i], 0); break; //Red + case 8: bcol2 = RGB(16*backboxint[i], 16*backboxint[i], 0); break; //Yellow + case 9: bcol2 = RGB((spcoldel+1)*backboxint[i], 16*backboxint[i], 0); break; //Yellow + case 10: bcol2 = RGB(0, 16 * backboxint[i], 0); break; //Green + case 11: bcol2 = RGB(0, 16 * backboxint[i], (16-spcoldel)*backboxint[i]); break; //Green + } + break; + } + backbuffer.fillRect(backbuffer.rect, bcol2); + for (i = 0; i < 18; i++) { + switch(rcol) { + //Akward ordering to match tileset + case 0: bcol = RGB(16, 128*backboxint[i], 128*backboxint[i]); break; //Cyan + case 1: bcol = RGB(128*backboxint[i], 16, 16); break; //Red + case 2: bcol = RGB(128*backboxint[i], 16, 128*backboxint[i]); break; //Purple + case 3: bcol = RGB(16, 16, 128*backboxint[i]); break; //Blue + case 4: bcol = RGB(128*backboxint[i], 128*backboxint[i], 16); break; //Yellow + case 5: bcol = RGB(16, 128 * backboxint[i], 16); break; //Green + case 6: + //crazy case + switch(spcol) { + case 0: bcol = RGB(16, 128*backboxint[i], 128*backboxint[i]); break; //Cyan + case 1: bcol = RGB(16, ((spcoldel+1)*8)*backboxint[i], 128*backboxint[i]); break; //Cyan + case 2: bcol = RGB(16, 16, 128*backboxint[i]); break; //Blue + case 3: bcol = RGB((128-(spcoldel*8))*backboxint[i], 16, 128*backboxint[i]); break; //Blue + case 4: bcol = RGB(128*backboxint[i], 16, 128*backboxint[i]); break; //Purple + case 5: bcol = RGB(128*backboxint[i], 16, ((spcoldel+1)*8)*backboxint[i]); break; //Purple + case 6: bcol = RGB(128*backboxint[i], 16, 16); break; //Red + case 7: bcol = RGB(128*backboxint[i], (128-(spcoldel*8))*backboxint[i], 16); break; //Red + case 8: bcol = RGB(128*backboxint[i], 128*backboxint[i], 16); break; //Yellow + case 9: bcol = RGB(((spcoldel+1)*8)*backboxint[i], 128*backboxint[i], 16); break; //Yellow + case 10: bcol = RGB(16, 128 * backboxint[i], 16); break; //Green + case 11: bcol = RGB(16, 128 * backboxint[i], (128-(spcoldel*8))*backboxint[i]); break; //Green + } + break; + } + backbuffer.fillRect(backboxes[i], bcol); + + backboxrect.x = backboxes[i].x + 1; backboxrect.y = backboxes[i].y + 1; + backboxrect.width = backboxes[i].width - 2; backboxrect.height = backboxes[i].height - 2; + backbuffer.fillRect(backboxrect, bcol2); + + backboxes[i].x += backboxvx[i]; + backboxes[i].y += backboxvy[i]; + if (backboxes[i].x < -40) { backboxes[i].x = 320; backboxes[i].y = Math.random() * 240; } + if (backboxes[i].x > 320) { backboxes[i].x = -32; backboxes[i].y = Math.random() * 240; } + if (backboxes[i].y < -40) { backboxes[i].y = 240; backboxes[i].x = Math.random() * 320; } + if (backboxes[i].y > 260) { backboxes[i].y = -32; backboxes[i].x = Math.random() * 320; } + } + break; + case 3: //Warp zone (horizontal) + backoffset+=3; if (backoffset >= 16) backoffset -= 16; + + if (backgrounddrawn) { + towerbuffer.scroll( -3, 0); + for (j = 0; j < 15; j++) { + temp = 680 + (rcol * 3); + drawtowertile(317 - backoffset, (j * 16), temp+40); //20*16 = 320 + drawtowertile(317 - backoffset + 8, (j * 16), temp + 41); + drawtowertile(317 - backoffset, (j * 16) + 8, temp + 80); + drawtowertile(317 - backoffset + 8, (j * 16) + 8, temp + 81); + } + }else { + //draw the whole thing for the first time! + backoffset = 0; + towerbuffer.fillRect(towerbuffer.rect, 0x000000); + for (j = 0; j < 15; j++) { + for (i = 0; i < 21; i++) { + temp = 680 + (rcol * 3); + drawtowertile((i * 16) - backoffset, (j * 16), temp+40); + drawtowertile((i * 16) - backoffset + 8, (j * 16), temp + 41); + drawtowertile((i * 16) - backoffset, (j * 16) + 8, temp + 80); + drawtowertile((i * 16) - backoffset + 8, (j * 16) + 8, temp + 81); + } + } + backgrounddrawn = true; + } + + backbuffer.copyPixels(towerbuffer, towerbuffer.rect, tl); + break; + case 4: //Warp zone (vertical) + backoffset+=3; if (backoffset >= 16) backoffset -= 16; + + if (backgrounddrawn) { + towerbuffer.scroll(0, -3); + for (i = 0; i < 21; i++) { + temp = 760 + (rcol * 3); + drawtowertile((i * 16), 237 - backoffset, temp + 40); //14*17=240 - 3 + drawtowertile((i * 16) + 8, 237 - backoffset, temp + 41); + drawtowertile((i * 16), 237 - backoffset + 8, temp + 80); + drawtowertile((i * 16) + 8, 237 - backoffset + 8, temp + 81); + } + }else { + //draw the whole thing for the first time! + backoffset = 0; + towerbuffer.fillRect(towerbuffer.rect, 0x000000); + for (j = 0; j < 15; j++) { + for (i = 0; i < 21; i++) { + temp = 760 + (rcol * 3); + drawtowertile((i * 16), (j * 16)- backoffset, temp+40); + drawtowertile((i * 16)+ 8, (j * 16)- backoffset, temp + 41); + drawtowertile((i * 16), (j * 16)- backoffset + 8, temp + 80); + drawtowertile((i * 16)+ 8, (j * 16)- backoffset + 8, temp + 81); + } + } + backgrounddrawn = true; + } + + backbuffer.copyPixels(towerbuffer, towerbuffer.rect, tl); + break; + case 5: + //Warp zone, central + switch(rcol) { + //Akward ordering to match tileset + case 0: warpbcol = 0x0A100E; warpfcol = 0x102221; break; //Cyan + case 1: warpbcol = 0x11090B; warpfcol = 0x221011; break; //Red + case 2: warpbcol = 0x0F0A10; warpfcol = 0x221022; break; //Purple + case 3: warpbcol = 0x0A0B10; warpfcol = 0x101022; break; //Blue + case 4: warpbcol = 0x100D0A; warpfcol = 0x221E10; break; //Yellow + case 5: warpbcol = 0x0D100A; warpfcol = 0x142210; break; //Green + case 6: warpbcol = 0x0A0A0A; warpfcol = 0x121212; break; //Gray + } + + backoffset += 1; + if (backoffset >= 16) { + backoffset -= 16; + warpskip = (warpskip + 1) % 2; + } + + for (i = 10 ; i >= 0; i--) { + temp = (i << 4) + backoffset; + setwarprect(160 - temp, 120 - temp, temp * 2, temp * 2); + if (i % 2 == warpskip) { + backbuffer.fillRect(warprect, warpbcol); + }else { + backbuffer.fillRect(warprect, warpfcol); + } + } + break; + case 6: + //Final Starfield + backbuffer.fillRect(backbuffer.rect, 0x000000); + for (i = 0; i < 50; i++) { + if (starsspeed[i] <= 8) { + backbuffer.fillRect(stars[i], 0x222222); + }else { + backbuffer.fillRect(stars[i], 0x555555); + } + stars[i].y -= starsspeed[i]; + if (stars[i].y < -10) { + stars[i].y += 260; + stars[i].x = Math.random() * 320; + starsspeed[i] = 5+(Math.random()*5); + } + } + break; + case 7: + //Static, unscrolling section of the tower + for (j = 0; j < 30; j++) { for (i = 0; i < 40; i++) { drawtile3(i * 8, j * 8, map.tower.backat(i, j, 200), 15); } } + break; + case 8: + //Static, unscrolling section of the tower + for (j = 0; j < 30; j++) { for (i = 0; i < 40; i++) { drawtile3(i * 8, j * 8, map.tower.backat(i, j, 200), 10); } } + break; + case 9: + //Static, unscrolling section of the tower + for (j = 0; j < 30; j++) { for (i = 0; i < 40; i++) { drawtile3(i * 8, j * 8, map.tower.backat(i, j, 600), 0); } } + break; + default: + backbuffer.fillRect(backbuffer.rect, 0x000000); + //backbuffer.copyPixels(backgrounds[t], bg_rect, tl); + break; + } + } + + public function drawimage(t:int, xp:int, yp:int, cent:Boolean=false):void { + if (cent) { + tpoint.x = 160 - int(images[t].width / 2); tpoint.y = yp; + trect.x = 0; trect.y = 0; trect.width = images[t].width; trect.height = images[t].height; + backbuffer.copyPixels(images[t], trect, tpoint); + }else { + tpoint.x = xp; tpoint.y = yp; + trect.x = 0; trect.y = 0; trect.width = images[t].width; trect.height = images[t].height; + backbuffer.copyPixels(images[t], trect, tpoint); + } + } + + public function drawmobileimage(t:int, xp:int, yp:int, cent:Boolean=false):void { + if (cent) { + tpoint.x = 160 - int(mobileimages[t].width / 2); tpoint.y = yp; + trect.x = 0; trect.y = 0; trect.width = mobileimages[t].width; trect.height = mobileimages[t].height; + backbuffer.copyPixels(mobileimages[t], trect, tpoint); + }else { + tpoint.x = xp; tpoint.y = yp; + trect.x = 0; trect.y = 0; trect.width = mobileimages[t].width; trect.height = mobileimages[t].height; + backbuffer.copyPixels(mobileimages[t], trect, tpoint); + } + } + + public function drawmobilehands(t:int, xp:int, yp:int):void { + tpoint.x = xp; tpoint.y = yp; + trect.x = 0; trect.y = 0; trect.width = mobileimages[t].width; trect.height = 70; + backbuffer.copyPixels(mobileimages[t], trect, tpoint); + } + + public function drawplayerlevelimage(t:int, xp:int, yp:int):void { + tpoint.x = xp; tpoint.y = yp; + trect.x = 0; trect.y = 0; trect.width = playerlevelimages[t].width; trect.height = playerlevelimages[t].height; + backbuffer.copyPixels(playerlevelimages[t], trect, tpoint); + } + + public function drawimagecol(t:int, xp:int, yp:int, r:int, g:int, b:int, cent:Boolean = false):void { + setcolreal(RGB(r,g,b)); + if (cent) { + tpoint.x = 160 - int(images[t].width / 2); tpoint.y = yp; + trect.x = 0; trect.y = 0; trect.width = images[t].width; trect.height = images[t].height; + images[t].colorTransform(trect, ct); + backbuffer.copyPixels(images[t], trect, tpoint); + }else { + tpoint.x = xp; tpoint.y = yp; + trect.x = 0; trect.y = 0; trect.width = images[t].width; trect.height = images[t].height; + images[t].colorTransform(trect, ct); + backbuffer.copyPixels(images[t], trect, tpoint); + } + } + + public function crewcolour(t:int):int { + //given crewmate t, return colour in setcol + if (t == 0) return 0; + if (t == 1) return 20; + if (t == 2) return 14; + if (t == 3) return 15; + if (t == 4) return 13; + if (t == 5) return 16; + return 0; + } + + public function setcol(t:int, help:helpclass):void { + //Setup predefinied colours as per our zany palette + switch(t) { + //Player Normal + case 0: ct.color = RGB(160- help.glow/2 - (Math.random()*20), 200- help.glow/2, 220 - help.glow); break; + //Player Hurt + case 1: ct.color = RGB(196 - (Math.random() * 64), 10, 10); break; + //Enemies and stuff + case 2: ct.color = RGB(225-(help.glow/2), 75, 30); break; + case 3: //Trinket + if (!trinketcolset) { + trinketr = 200 - (Math.random() * 64); + trinketg = 200 - (Math.random() * 128); + trinketb = 164 + (Math.random() * 60); + trinketcolset = true; + } + ct.color = RGB(trinketr, trinketg, trinketb); + break; + case 4: //Inactive savepoint + temp = (help.glow/2) + (Math.random() * 8); + ct.color = RGB(80 + temp, 80 + temp, 80 + temp); + break; + case 5: //Active savepoint + ct.color = RGB(164+(Math.random()*64),164+(Math.random()*64), 255-(Math.random()*64)) + break; + case 6: //Enemy : Red + ct.color = RGB(250 - help.glow/2, 60- help.glow/2, 60 - help.glow/2); + break; + case 7: //Enemy : Green + ct.color = RGB(100 - help.glow/2 - (Math.random()*30), 250 - help.glow/2, 100 - help.glow/2 - (Math.random()*30)); + break; + case 8: //Enemy : Purple + ct.color = RGB(250 - help.glow/2, 20, 128 - help.glow/2 + (Math.random()*30)); + break; + case 9: //Enemy : Yellow + ct.color = RGB(250 - help.glow/2, 250 - help.glow/2, 20); + break; + case 10: //Warp point (white) + ct.color = RGB(255 - (Math.random() * 64), 255 - (Math.random() * 64), 255 - (Math.random() * 64)); + break; + case 11: //Enemy : Cyan + ct.color = RGB(20, 250 - help.glow/2, 250 - help.glow/2); + break; + case 12: //Enemy : Blue + ct.color = RGB(90- help.glow/2, 90 - help.glow/2, 250 - help.glow/2); + break; + //Crew Members + //green + case 13: ct.color = RGB(120- help.glow/4 - (Math.random()*20), 220 - help.glow/4, 120- help.glow/4); break; + //Yellow + case 14: ct.color = RGB(220- help.glow/4 - (Math.random()*20), 210 - help.glow/4, 120- help.glow/4); break; + //pink + case 15: ct.color = RGB(255 - help.glow/8, 70 - help.glow/4, 70 - help.glow / 4); break; + //Blue + case 16: ct.color = RGB(75, 75, 255- help.glow/4 - (Math.random()*20)); break; + + + case 17: //Enemy : Orange + ct.color = RGB(250 - help.glow/2, 130 - help.glow/2, 20); + break; + case 18: //Enemy : Gray + ct.color = RGB(130- help.glow/2, 130 - help.glow/2, 130 - help.glow/2); + break; + case 19: //Enemy : Dark gray + ct.color = RGB(60- help.glow/8, 60 - help.glow/8, 60 - help.glow/8); + break; + //Purple + case 20: ct.color = RGB(220 - help.glow / 4 - (Math.random() * 20), 120 - help.glow / 4, 210 - help.glow / 4); break; + + case 21: //Enemy : Light Gray + ct.color = RGB(180- help.glow/2, 180 - help.glow/2, 180 - help.glow/2); + break; + case 22: //Enemy : Indicator Gray + ct.color = RGB(230- help.glow/2, 230- help.glow/2, 230- help.glow/2); + break; + case 23: //Enemy : Indicator Gray + ct.color = RGB(255- help.glow/2 - (Math.random() * 40) , 255- help.glow/2 - (Math.random() * 40), 255- help.glow/2 - (Math.random() * 40)); + break; + + //Trophies + //cyan + case 30: ct.color = RGBf(160, 200, 220); break; + //Purple + case 31: ct.color = RGBf(220, 120, 210); break; + //Yellow + case 32: ct.color = RGBf(220, 210, 120); break; + //red + case 33: ct.color = RGBf(255, 70, 70); break; + //green + case 34: ct.color = RGBf(120, 220, 120); break; + //Blue + case 35: ct.color = RGBf(75, 75, 255); break; + //Gold + case 36: ct.color = RGB(180, 120, 20); break; + case 37: //Trinket + if (!trinketcolset) { + trinketr = 200 - (Math.random() * 64); + trinketg = 200 - (Math.random() * 128); + trinketb = 164 + (Math.random() * 60); + trinketcolset = true; + } + ct.color = RGBf(trinketr, trinketg, trinketb); + break; + //Silver + case 38: ct.color = RGBf(196, 196, 196); break; + //Bronze + case 39: ct.color = RGBf(128, 64, 10); break; + //Awesome + case 40: //Teleporter in action! + temp = Math.random() * 150; + if(temp<33){ + ct.color = RGBf(255 - (Math.random() * 64), 64 + (Math.random() * 64), 64 + (Math.random() * 64)); + }else if (temp < 66) { + ct.color = RGBf(64 + (Math.random() * 64), 255 - (Math.random() * 64), 64 + (Math.random() * 64)); + }else if (temp < 100) { + ct.color = RGBf(64 + (Math.random() * 64), 64 + (Math.random() * 64), 255 - (Math.random() * 64)); + }else { + ct.color = RGBf(164+(Math.random()*64),164+(Math.random()*64), 255-(Math.random()*64)) + } + break; + + case 100: //Inactive Teleporter + temp = (help.glow/2) + (Math.random() * 8); + ct.color = RGB(42 + temp, 42 + temp, 42 + temp); + break; + case 101: //Active Teleporter + ct.color = RGB(164+(Math.random()*64),164+(Math.random()*64), 255-(Math.random()*64)) + break; + case 102: //Teleporter in action! + temp = Math.random() * 150; + if(temp<33){ + ct.color = RGB(255 - (Math.random() * 64), 64 + (Math.random() * 64), 64 + (Math.random() * 64)); + }else if (temp < 66) { + ct.color = RGB(64 + (Math.random() * 64), 255 - (Math.random() * 64), 64 + (Math.random() * 64)); + }else if (temp < 100) { + ct.color = RGB(64 + (Math.random() * 64), 64 + (Math.random() * 64), 255 - (Math.random() * 64)); + }else { + ct.color = RGB(164+(Math.random()*64),164+(Math.random()*64), 255-(Math.random()*64)) + } + break; + + default: ct.color = 0xFFFFFF; break; + } + } + + public function setcolreal(t:int):void { + ct.color = t; + } + + public function drawcoloredtile(x:int, y:int, t:int, r:int, g:int, b:int):void { + tpoint.x = x; tpoint.y = y; + setcolreal(RGB(r,g,b)); + tiles[t].colorTransform(tiles_rect, ct); + backbuffer.copyPixels(tiles[t], tiles_rect, tpoint); + } + + public function drawhuetile(x:int, y:int, t:int, c:int):void { + tpoint.x = x; tpoint.y = y; + switch(c) { + case 0:setcolreal(RGB(250-(Math.random()*32), 250-(Math.random()*32), 10)); break; + case 1:setcolreal(RGB(250-(Math.random()*32), 250-(Math.random()*32), 10)); break; + + default:setcolreal(RGB(250-(Math.random()*32), 250-(Math.random()*32), 10)); break; + } + + tiles[t].colorTransform(tiles_rect, ct); + backbuffer.copyPixels(tiles[t], tiles_rect, tpoint); + } + + public function drawcrewman(x:int, y:int, t:int, act:Boolean, help:helpclass, noshift:Boolean=false):void { + if (!act) { + if (noshift) { + if (flipmode) { drawspritesetcol(x, y, 14, 19, help); + }else{ drawspritesetcol(x, y, 12, 19, help); } + }else{ + if (flipmode) { drawspritesetcol(x - 8, y, 14, 19, help); + }else{ drawspritesetcol(x - 8, y, 12, 19, help); } + } + }else { + if (flipmode) crewframe += 6; + + switch(t) { + case 0: drawspritesetcol(x, y, crewframe, 0, help); break; + case 1: drawspritesetcol(x, y, crewframe, 20, help); break; + case 2: drawspritesetcol(x, y, crewframe, 14, help); break; + case 3: drawspritesetcol(x, y, crewframe, 15, help); break; + case 4: drawspritesetcol(x, y, crewframe, 13, help); break; + case 5: drawspritesetcol(x, y, crewframe, 16, help); break; + } + + if (flipmode) crewframe -= 6; + } + } + + public function drawtrophytext(obj:entityclass, help:helpclass):void { + if (obj.trophytext < 15) { + temp = (196 * obj.trophytext) / 15; temp2 = (196 * obj.trophytext) / 15; temp3 = ((255 - help.glow) * obj.trophytext) / 15; + }else { temp = 196; temp2 = 196; temp3 = 255 - help.glow; } + switch(obj.trophytype) { + case 1: + print( -1, 6, "SPACE STATION 1 MASTERED", temp, temp2, temp3, true); + print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 2: + print( -1, 6, "LABORATORY MASTERED", temp, temp2, temp3, true); + print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 3: + print( -1, 6, "THE TOWER MASTERED", temp, temp2, temp3, true); + print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 4: + print( -1, 6, "SPACE STATION 2 MASTERED", temp, temp2, temp3, true); + print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 5: + print( -1, 6, "WARP ZONE MASTERED", temp, temp2, temp3, true); + print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 6: + print( -1, 6, "FINAL LEVEL MASTERED", temp, temp2, temp3, true); + print( -1, 16, "Obtain a V Rank in this Time Trial", temp, temp2, temp3, true); + break; + case 7: + print( -1, 6, "GAME COMPLETE", temp, temp2, temp3, true); + print( -1, 16, "Complete the game", temp, temp2, temp3, true); + break; + case 8: + print( -1, 6, "FLIP MODE COMPLETE", temp, temp2, temp3, true); + print( -1, 16, "Complete the game in flip mode", temp, temp2, temp3, true); + break; + case 9: + print( -1, 11, "Win with less than 50 deaths", temp, temp2, temp3, true); + break; + case 10: + print( -1, 11, "Win with less than 100 deaths", temp, temp2, temp3, true); + break; + case 11: + print( -1, 11, "Win with less than 250 deaths", temp, temp2, temp3, true); + break; + case 12: + print( -1, 11, "Win with less than 500 deaths", temp, temp2, temp3, true); + break; + case 13: + print( -1, 11, "Last 5 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 14: + print( -1, 11, "Last 10 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 15: + print( -1, 11, "Last 15 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 16: + print( -1, 11, "Last 20 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 17: + print( -1, 11, "Last 30 seconds on the Super Gravitron", temp, temp2, temp3, true); + break; + case 18: + print( -1, 11, "Last 1 minute on the Super Gravitron", temp, temp2, temp3, true); + break; + case 20: + print( -1, 6, "MASTER OF THE UNIVERSE", temp, temp2, temp3, true); + print( -1, 16, "Complete the game in no death mode", temp, temp2, temp3, true); + break; + } + } + + public function drawsprite(x:int, y:int, t:int, r:int, g:int, b:int):void { + tpoint.x = x; tpoint.y = y; + setcolreal(RGB(r,g,b)); + sprites[t].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[t], sprites_rect, tpoint); + } + + public function drawgravityline(t:int, obj:entityclass):void { + if (obj.entities[t].life == 0) { + /* + switch(linestate) { + case 0: backbuffer.fillRect(line_rect, RGB(0, 200, 0)); break; + case 1: backbuffer.fillRect(line_rect, RGB(16, 245, 0)); break; + case 2: backbuffer.fillRect(line_rect, RGB(0, 245, 16)); break; + case 3: backbuffer.fillRect(line_rect, RGB(16, 200, 0)); break; + case 4: backbuffer.fillRect(line_rect, RGB(24, 255, 16)); break; + case 5: backbuffer.fillRect(line_rect, RGB(16, 235, 0)); break; + case 6: backbuffer.fillRect(line_rect, RGB(0, 164, 16)); break; + case 7: backbuffer.fillRect(line_rect, RGB(16, 245, 24)); break; + case 8: backbuffer.fillRect(line_rect, RGB(0, 255, 16)); break; + case 9: backbuffer.fillRect(line_rect, RGB(96, 245, 96)); break; + } + */ + switch(linestate) { + case 0: backbuffer.fillRect(line_rect, RGB(200 - 20, 200 - 20, 200 - 20)); break; + case 1: backbuffer.fillRect(line_rect, RGB(225 - 30, 245 - 30, 245 - 30)); break; + case 2: backbuffer.fillRect(line_rect, RGB(245 - 30, 245 - 30, 225 - 30)); break; + case 3: backbuffer.fillRect(line_rect, RGB(164 - 10, 200 - 20, 200 - 20)); break; + case 4: backbuffer.fillRect(line_rect, RGB(224 - 20, 255 - 30, 196 - 20)); break; + case 5: backbuffer.fillRect(line_rect, RGB(205 - 20, 235 - 30, 196 - 20)); break; + case 6: backbuffer.fillRect(line_rect, RGB(164 - 10, 164 - 10, 164 - 10)); break; + case 7: backbuffer.fillRect(line_rect, RGB(225 - 30, 245 - 30, 205 - 20)); break; + case 8: backbuffer.fillRect(line_rect, RGB(205 - 20, 255 - 30, 225 - 30)); break; + case 9: backbuffer.fillRect(line_rect, RGB(245 - 30, 245 - 30, 245 - 30)); break; + } + }else{ + backbuffer.fillRect(line_rect, RGB(96, 96, 96)); + } + } + + public function drawentities(map:mapclass, obj:entityclass, help:helpclass):void { + //Update line colours! + if (linedelay <= 0) { + linestate++; + if (linestate >= 10) linestate = 0; + linedelay = 2; + }else { + linedelay--; + } + + var j:int, k:int; + for (var i:int = obj.nentity - 1; i >= 0; i--) { + if (!obj.entities[i].invis && obj.entities[i].active) { + if (obj.entities[i].size == 0) { // Sprites + if (flipmode) { + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + if (map.warpx) { + //screenwrapping! + if (tpoint.x < 0) { + tpoint.x += 320; + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + if (tpoint.x > 300) { + tpoint.x -= 320; + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + }else if (map.warpy) { + if (tpoint.y < 0) { + tpoint.y += 230; + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + if (tpoint.y > 210) { + tpoint.y -= 230; + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + } + }else{ + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + sprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + if (map.warpx) { + //screenwrapping! + if (tpoint.x < 0) { + tpoint.x += 320; + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + if (tpoint.x > 300) { + tpoint.x -= 320; + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + }else if (map.warpy) { + if (tpoint.y < 0) { + tpoint.y += 230; + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + if (tpoint.y > 210) { + tpoint.y -= 230; + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + } + } + } + }else if (obj.entities[i].size == 1) { // Tiles + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + }else if (obj.entities[i].size == 2) { // Special: Moving platform, 4 tiles + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + if(map.custommode){ + backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + }else{ + backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + } + }else if (obj.entities[i].size == 3) { // Big chunky pixels! + prect.x = obj.entities[i].xp; prect.y = obj.entities[i].yp; + //A seperate index of colours, for simplicity + if(obj.entities[i].colour==1){ + backbuffer.fillRect(prect, RGB(196 - (Math.random() * 64), 10, 10)); + }else if (obj.entities[i].colour == 2) { + backbuffer.fillRect(prect, RGB(160- help.glow/2 - (Math.random()*20), 200- help.glow/2, 220 - help.glow)); + } + }else if (obj.entities[i].size == 4) { // Small pickups + drawhuetile(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].tile, obj.entities[i].colour); + }else if (obj.entities[i].size == 5) { //Horizontal Line + line_rect.x = obj.entities[i].xp; line_rect.y = obj.entities[i].yp; + line_rect.width = obj.entities[i].w; line_rect.height = 1; + drawgravityline(i, obj); + }else if (obj.entities[i].size == 6) { //Vertical Line + line_rect.x = obj.entities[i].xp; line_rect.y = obj.entities[i].yp; + line_rect.width = 1; line_rect.height = obj.entities[i].h; + drawgravityline(i, obj); + }else if (obj.entities[i].size == 7) { //Teleporter + drawtele(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].drawframe, obj.entities[i].colour, help); + }else if (obj.entities[i].size == 8) { // Special: Moving platform, 8 tiles + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + if (map.custommode) { + backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(entcolours[obj.entities[i].drawframe], tiles_rect, tpoint); + }else{ + backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + tpoint.x += 8; backbuffer.copyPixels(tiles[obj.entities[i].drawframe], tiles_rect, tpoint); + } + }else if (obj.entities[i].size == 9) { // Really Big Sprite! (2x2) + if (flipmode) { + setcol(obj.entities[i].colour, help); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + + tpoint.x = obj.entities[i].xp+32; tpoint.y = obj.entities[i].yp; + flipsprites[obj.entities[i].drawframe+1].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe+1], sprites_rect, tpoint); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp+32; + flipsprites[obj.entities[i].drawframe+12].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe+12], sprites_rect, tpoint); + + tpoint.x = obj.entities[i].xp+32; tpoint.y = obj.entities[i].yp+32; + flipsprites[obj.entities[i].drawframe+13].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe + 13], sprites_rect, tpoint); + }else{ + setcol(obj.entities[i].colour, help); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + sprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + + tpoint.x = obj.entities[i].xp+32; tpoint.y = obj.entities[i].yp; + sprites[obj.entities[i].drawframe+1].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe+1], sprites_rect, tpoint); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp+32; + sprites[obj.entities[i].drawframe+12].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe+12], sprites_rect, tpoint); + + tpoint.x = obj.entities[i].xp+32; tpoint.y = obj.entities[i].yp+32; + sprites[obj.entities[i].drawframe+13].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe + 13], sprites_rect, tpoint); + } + }else if (obj.entities[i].size == 10) { // 2x1 Sprite + if (flipmode) { + setcol(obj.entities[i].colour, help); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + + tpoint.x = obj.entities[i].xp+32; tpoint.y = obj.entities[i].yp; + flipsprites[obj.entities[i].drawframe+1].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe + 1], sprites_rect, tpoint); + }else{ + setcol(obj.entities[i].colour, help); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + sprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + + tpoint.x = obj.entities[i].xp+32; tpoint.y = obj.entities[i].yp; + sprites[obj.entities[i].drawframe+1].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe + 1], sprites_rect, tpoint); + } + }else if (obj.entities[i].size == 11) { //The fucking elephant + setcol(obj.entities[i].colour, help); + images[3].colorTransform(images[3].rect, ct); + drawimage(3, obj.entities[i].xp, obj.entities[i].yp); + }else if (obj.entities[i].size == 12) { // Regular sprites that don't wrap + if (flipmode) { + //forget this for a minute; + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, tpoint); + + //if we're outside the screen, we need to draw indicators + if (obj.entities[i].xp < -20 && obj.entities[i].vx > 0) { + if (obj.entities[i].xp < -100) { + tpoint.x = -5 + (int(( -obj.entities[i].xp) / 10)); + }else{ + tpoint.x = 5; + } + + tpoint.y = tpoint.y+4; + setcol(23, help); + tiles[1167].colorTransform(tiles_rect, ct); + backbuffer.copyPixels(tiles[1167], tiles_rect, tpoint); + }else if (obj.entities[i].xp > 340 && obj.entities[i].vx < 0) { + if (obj.entities[i].xp > 420) { + tpoint.x = 320 - (int(( obj.entities[i].xp-320) / 10)); + }else{ + tpoint.x = 310; + } + + tpoint.y = tpoint.y+4; + setcol(23, help); + tiles[1166].colorTransform(tiles_rect, ct); + backbuffer.copyPixels(tiles[1166], tiles_rect, tpoint); + } + }else{ + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + sprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + backbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, tpoint); + + //if we're outside the screen, we need to draw indicators + + if (obj.entities[i].xp < -20 && obj.entities[i].vx > 0) { + if (obj.entities[i].xp < -100) { + tpoint.x = -5 + (int(( -obj.entities[i].xp) / 10)); + }else{ + tpoint.x = 5; + } + + tpoint.y = tpoint.y+4; + setcol(23, help); + tiles[1167].colorTransform(tiles_rect, ct); + backbuffer.copyPixels(tiles[1167], tiles_rect, tpoint); + }else if (obj.entities[i].xp > 340 && obj.entities[i].vx < 0) { + if (obj.entities[i].xp > 420) { + tpoint.x = 320 - (int(( obj.entities[i].xp-320) / 10)); + }else{ + tpoint.x = 310; + } + + tpoint.y = tpoint.y+4; + setcol(23, help); + tiles[1166].colorTransform(tiles_rect, ct); + backbuffer.copyPixels(tiles[1166], tiles_rect, tpoint); + } + } + }else if (obj.entities[i].size == 13) { // Special for epilogue: huge hero! + if (flipmode) { + scaleMatrix = new Matrix(); + scaleMatrix.scale(6, 6); + bigbuffer.fillRect(bigbuffer.rect, 0x000000); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + flipsprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + bigbuffer.copyPixels(flipsprites[obj.entities[i].drawframe], sprites_rect, new Point(0, 0)); + + scaleMatrix.translate(obj.entities[i].xp, obj.entities[i].yp); + backbuffer.draw(bigbufferscreen, scaleMatrix); + scaleMatrix.translate(-obj.entities[i].xp, -obj.entities[i].yp); + }else { + scaleMatrix = new Matrix(); + scaleMatrix.scale(6, 6); + bigbuffer.fillRect(bigbuffer.rect, 0x000000); + + tpoint.x = obj.entities[i].xp; tpoint.y = obj.entities[i].yp; + setcol(obj.entities[i].colour, help); + sprites[obj.entities[i].drawframe].colorTransform(sprites_rect, ct); + bigbuffer.copyPixels(sprites[obj.entities[i].drawframe], sprites_rect, new Point(0, 0)); + + scaleMatrix.translate(obj.entities[i].xp, obj.entities[i].yp); + backbuffer.draw(bigbufferscreen, scaleMatrix); + scaleMatrix.translate(-obj.entities[i].xp, -obj.entities[i].yp); + } + } + } + } + } + + public function drawbuffertile(x:int, y:int, t:int):void { + tpoint.x = x; tpoint.y = y; + buffer.copyPixels(tiles[t], tiles_rect, tpoint); + } + + public function drawforetile(x:int, y:int, t:int):void { + tpoint.x = x; tpoint.y = y; + frontbuffer.copyPixels(tiles[t], tiles_rect, tpoint); + } + + public function drawforetile2(x:int, y:int, t:int):void { + tpoint.x = x; tpoint.y = y; + frontbuffer.copyPixels(tiles2[t], tiles_rect, tpoint); + } + + public function drawforetile3(x:int, y:int, t:int, off:int):void { + tpoint.x = x; tpoint.y = y; + frontbuffer.copyPixels(tiles3[t+(off*30)], tiles_rect, tpoint); + } + + + public function drawtele(x:int, y:int, t:int, c:int, help:helpclass):void { + tpoint.x = x; tpoint.y = y; + + setcolreal(RGB(16,16,16)); + tele[0].colorTransform(tele_rect, ct); + backbuffer.copyPixels(tele[0], tele_rect, tpoint); + + setcol(c, help); + if (t > 9) t = 8; if (t < 0) t = 0; + tele[t].colorTransform(tele_rect, ct); + backbuffer.copyPixels(tele[t], tele_rect, tpoint); + } + + public function drawtile(x:int, y:int, t:int):void { + tpoint.x = x; tpoint.y = y; + backbuffer.copyPixels(tiles[t], tiles_rect, tpoint); + } + + public function drawtile2(x:int, y:int, t:int):void { + tpoint.x = x; tpoint.y = y; + backbuffer.copyPixels(tiles2[t], tiles_rect, tpoint); + } + + public function drawtile3(x:int, y:int, t:int, off:int):void { + tpoint.x = x; tpoint.y = y; + backbuffer.copyPixels(tiles3[t+(off*30)], tiles_rect, tpoint); + } + + public function drawtowertile3(x:int, y:int, t:int, off:int):void { + tpoint.x = x; tpoint.y = y; + towerbuffer.copyPixels(tiles3[t+(off*30)], tiles_rect, tpoint); + } + + public function drawtowertile(x:int, y:int, t:int):void { + tpoint.x = x; tpoint.y = y; + towerbuffer.copyPixels(tiles2[t], tiles_rect, tpoint, null, null, true); + } + + public function drawmap(map:mapclass):void { + if (!foregrounddrawn) { + frontbuffer.fillRect(frontbuffer.rect, 0x000000); + if(map.tileset==0){ + for (j = 0; j < 29+map.extrarow; j++) { + for (i = 0; i < 40; i++) { + if(map.contents[i + map.vmult[j]]>0) drawforetile(i * 8, j * 8, map.contents[i + map.vmult[j]]); + } + } + }else if (map.tileset == 1) { + for (j = 0; j < 29+map.extrarow; j++) { + for (i = 0; i < 40; i++) { + if(map.contents[i + map.vmult[j]]>0) drawforetile2(i * 8, j * 8, map.contents[i + map.vmult[j]]); + } + } + }else if (map.tileset == 2) { + for (j = 0; j < 29+map.extrarow; j++) { + for (i = 0; i < 40; i++) { + if(map.contents[i + map.vmult[j]]>0) drawforetile3(i * 8, j * 8, map.contents[i + map.vmult[j]],map.rcol); + } + } + } + foregrounddrawn=true; + } + + backbuffer.copyPixels(frontbuffer, frontbuffer.rect, tl); + } + + public function drawfinalmap(map:mapclass):void { + //Update colour cycling for final level + if (map.final_colormode) { + map.final_aniframedelay--; + if(map.final_aniframedelay==0) foregrounddrawn=false; + if (map.final_aniframedelay <= 0) { + map.final_aniframedelay = 2; + map.final_aniframe++; + if (map.final_aniframe >= 4) map.final_aniframe = 0; + } + } + + if (!foregrounddrawn) { + frontbuffer.fillRect(frontbuffer.rect, 0x000000); + if(map.tileset==0){ + for (j = 0; j < 29+map.extrarow; j++) { + for (i = 0; i < 40; i++) { + if(map.contents[i + map.vmult[j]]>0) drawforetile(i * 8, j * 8, map.finalat(i,j)); + } + } + }else if (map.tileset == 1) { + for (j = 0; j < 29+map.extrarow; j++) { + for (i = 0; i < 40; i++) { + if(map.contents[i + map.vmult[j]]>0) drawforetile2(i * 8, j * 8, map.finalat(i,j)); + } + } + } + foregrounddrawn=true; + } + + backbuffer.copyPixels(frontbuffer, frontbuffer.rect, tl); + } + + public function drawmaptileat(xp:int, yp:int, mapx:int, mapy:int, map:mapclass):void { + if (mapx < 100) mapx = 119; if (mapy < 100) mapy = 119; + if (mapx > 119) mapx = 100; if (mapy > 119) mapy = 100; + if (map.explored[(mapx - 100) + ((mapy - 100) * 20)] == 1) { + madrect.x = (mapx - 100)*12; madrect.y = (mapy - 100)*9; madrect.width = 12; madrect.height = 9; + madpoint.x = xp; madpoint.y = yp; + backbuffer.copyPixels(images[1], madrect, madpoint); + }else { + drawimage(2, xp, yp); + } + } + + public function drawminimap(game:gameclass, map:mapclass):void { + drawfillrect(272, 8, 40, 31, 196, 196, 196); + drawfillrect(273, 9, 38, 29, 164,164,164); + for (j = 0; j < 3; j++){ + for (i = 0; i < 3; i++) { + drawmaptileat(274 + (i * 12), 10 + (j * 9), game.roomx - 1 + i, game.roomy - 1 + j, map); + } + } + } + + public function drawrect(x:int, y:int, w:int, h:int, r:int, g:int, b:int):void { + //Draw the retangle indicated by that object + madrect.x = x; madrect.y = y; + madrect.width = w; madrect.height = 1; + backbuffer.fillRect(madrect, RGB(r,g,b)); + + madrect.width = 1; madrect.height = h; + backbuffer.fillRect(madrect, RGB(r,g,b)); + + madrect.x = x + w - 1; + madrect.width = 1; madrect.height = h; + backbuffer.fillRect(madrect, RGB(r,g,b)); + + madrect.x = x; madrect.y = y + h - 1; + madrect.width = w; madrect.height = 1; + backbuffer.fillRect(madrect, RGB(r,g,b)); + } + + public function drawfillrect(x:int, y:int, w:int, h:int, r:int, g:int, b:int):void { + //Draw the retangle indicated by that object + madrect.x = x; madrect.y = y; + madrect.width = w; madrect.height = h; + backbuffer.fillRect(madrect, RGB(r,g,b)); + } + + public function printcrewname(x:int, y:int, t:int):void { + //Print the name of crew member t in the right colour + switch(t) { + case 0: print(x, y, "Viridian", 16, 240, 240); break; + case 1: print(x, y, "Violet", 240, 16, 240); break; + case 2: print(x, y, "Vitellary", 240, 240, 16); break; + case 3: print(x, y, "Vermilion", 240, 16, 16); break; + case 4: print(x, y, "Verdigris", 16, 240, 16); break; + case 5: print(x, y, "Victoria", 16, 16, 240); break; + } + } + + public function printcrewnamestatus(x:int, y:int, t:int):void { + //Print the status of crew member t in the right colour + switch(t) { + case 0: print(x, y, "(that's you!)", 12, 140, 140); break; + case 1: print(x, y, "Rescued!", 140, 12, 140); break; + case 2: print(x, y, "Rescued!", 140, 140, 12); break; + case 3: print(x, y, "Rescued!", 140, 12, 12); break; + case 4: print(x, y, "Rescued!", 12, 140, 12); break; + case 5: print(x, y, "Rescued!", 12, 12, 140); break; + } + } + + public function printcrewnamedark(x:int, y:int, t:int):void { + //Print the name of crew member t as above, but in black and white + switch(t) { + case 0: print(x, y, "Viridian", 128,128,128); break; + case 1: print(x, y, "Violet", 128,128,128); break; + case 2: print(x, y, "Vitellary", 128,128,128); break; + case 3: print(x, y, "Vermilion", 128,128,128); break; + case 4: print(x, y, "Verdigris", 128,128,128); break; + case 5: print(x, y, "Victoria", 128,128,128); break; + } + } + + public function printmask(x:int, y:int, t:String, cen:Boolean = false):void { + if (cen) x = 160 - (len(t) / 2); + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + tpoint.x = x + bfontpos-1; tpoint.y = y; + if (flipmode) { + backbuffer.copyPixels(flipbfontmask[cur], bfont_rect, tpoint); + }else{ + backbuffer.copyPixels(bfontmask[cur], bfont_rect, tpoint); + } + bfontpos+=bfontlen[cur]; + } + } + + public function print(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean = false):void { + if (r < 0) r = 0; if (g < 0) g = 0; if (b < 0) b = 0; + if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + if (cen) x = 160 - (len(t) / 2); + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + tpoint.x = x + bfontpos; tpoint.y = y; + if (flipmode) { + flipbfont[cur].colorTransform(bfont_rect, ct); + backbuffer.copyPixels(flipbfont[cur], bfont_rect, tpoint); + }else { + bfont[cur].colorTransform(bfont_rect, ct); + backbuffer.copyPixels(bfont[cur], bfont_rect, tpoint); + } + bfontpos+=bfontlen[cur]; + } + } + + public function rprint(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean = false):void { + if (r < 0) r = 0; if (g < 0) g = 0; if (b < 0) b = 0; + if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + if (cen) x = 308 - (len(t)); + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + tpoint.x = x + bfontpos; tpoint.y = y; + if (flipmode) { + flipbfont[cur].colorTransform(bfont_rect, ct); + backbuffer.copyPixels(flipbfont[cur], bfont_rect, tpoint); + }else{ + bfont[cur].colorTransform(bfont_rect, ct); + backbuffer.copyPixels(bfont[cur], bfont_rect, tpoint); + } + bfontpos+=bfontlen[cur]; + } + } + + public function printoff(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean = false):void { + if (r < 0) r = 0; if (g < 0) g = 0; if (b < 0) b = 0; + if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + if (cen) x = (160 - (len(t) / 2))+x; + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + tpoint.x = x + bfontpos; tpoint.y = y; + if (flipmode) { + flipbfont[cur].colorTransform(bfont_rect, ct); + backbuffer.copyPixels(flipbfont[cur], bfont_rect, tpoint); + }else{ + bfont[cur].colorTransform(bfont_rect, ct); + backbuffer.copyPixels(bfont[cur], bfont_rect, tpoint); + } + bfontpos+=bfontlen[cur]; + } + } + + public function bprint(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean=false):void { + //printmask(x, y, t, cen); + print(x, y - 1, t, 0, 0, 0, cen); + if (cen) { + printoff(-1, y, t, 0, 0, 0, cen); //kludge :i + printoff(1, y, t, 0, 0, 0, cen); + }else{ + print(x-1, y, t, 0, 0, 0, cen); + print(x+1, y, t, 0, 0, 0, cen); + } + print(x, y+1, t, 0, 0, 0, cen); + + print(x, y, t, r, g, b, cen); + } + + public function printmasktemptile(x:int, y:int, t:String, cen:Boolean = false):void { + if (cen) x = 160- (len(t) / 2); + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + tpoint.x = x + bfontpos - 1; tpoint.y = y; + if (flipmode) { + temptile.copyPixels(flipbfontmask[cur], bfont_rect, tpoint); + }else{ + temptile.copyPixels(bfontmask[cur], bfont_rect, tpoint); + } + bfontpos+=bfontlen[cur]; + } + } + + public function printtemptile(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean = false):void { + if (r < 0) r = 0; if (g < 0) g = 0; if (b < 0) b = 0; + if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + if (cen) x = 160 - (len(t) / 2); + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + tpoint.x = x + bfontpos; tpoint.y = y; + if (flipmode) { + flipbfont[cur].colorTransform(bfont_rect, ct); + temptile.copyPixels(flipbfont[cur], bfont_rect, tpoint); + }else{ + bfont[cur].colorTransform(bfont_rect, ct); + temptile.copyPixels(bfont[cur], bfont_rect, tpoint); + } + bfontpos+=bfontlen[cur]; + } + } + + public function onscreen(t:int):Boolean { + if (t >= -40 && t <= 280) return true; + return false; + } + + public function bigrprint(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean = false, sc:Number = 2):void { + if (r < 0) r = 0; if (g < 0) g = 0; if (b < 0) b = 0; + if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + + scaleMatrix = new Matrix(); + scaleMatrix.scale(sc, sc); + + bigbuffer.fillRect(bigbuffer.rect, 0x000000); + + x = x / sc; + + x -= (len(t)); + + //if (r < -1) r = -1; if (g < 0) g = 0; if (b < 0) b = 0;? + //if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + if(sc==2){ + if (cen) x = 80 - (len(t)/2); + }else if (sc == 3) { + if (cen) x = 160/3 - (len(t) / 2); + }else if (sc == 4) { + if (cen) x = 40 - (len(t) / 2); + } + bfontpos = 0; + for (i = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + if (flipmode) { + flipbfont[cur].colorTransform(bfont_rect, ct); + bigbuffer.copyPixels(flipbfont[cur], bfont_rect, new Point(x + bfontpos, 0)); + }else { + bfont[cur].colorTransform(bfont_rect, ct); + bigbuffer.copyPixels(bfont[cur], bfont_rect, new Point(x + bfontpos, 0)); + } + bfontpos+=bfontlen[cur]; + } + + scaleMatrix.translate(0, y); + backbuffer.draw(bigbufferscreen, scaleMatrix); + scaleMatrix.translate(0, -y); + } + + public function bigprint(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean = false, sc:Number = 2):void { + if (r < 0) r = 0; if (g < 0) g = 0; if (b < 0) b = 0; + if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + + scaleMatrix = new Matrix(); + scaleMatrix.scale(sc, sc); + + bigbuffer.fillRect(bigbuffer.rect, 0x000000); + + x = x / sc; + + //if (r < -1) r = -1; if (g < 0) g = 0; if (b < 0) b = 0;? + //if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; + ct.color = RGB(r, g, b); + if(sc==2){ + if (cen) x = 80 - (len(t)/2); + }else if (sc == 3) { + if (cen) x = 160/3 - (len(t) / 2); + }else if (sc == 4) { + if (cen) x = 40 - (len(t) / 2); + } + bfontpos = 0; + for (var ti:int = 0; ti < t.length; ti++) { + cur = t.charCodeAt(ti); + if (flipmode) { + flipbfont[cur].colorTransform(bfont_rect, ct); + bigbuffer.copyPixels(flipbfont[cur], bfont_rect, new Point(x + bfontpos, 0)); + }else { + bfont[cur].colorTransform(bfont_rect, ct); + bigbuffer.copyPixels(bfont[cur], bfont_rect, new Point(x + bfontpos, 0)); + } + bfontpos+=bfontlen[cur]; + } + + scaleMatrix.translate(0, y); + backbuffer.draw(bigbufferscreen, scaleMatrix); + scaleMatrix.translate(0, -y); + } + + public function bprinttemptile(x:int, y:int, t:String, r:int, g:int, b:int, cen:Boolean=false):void { + printmasktemptile(x, y, t, cen); + printtemptile(x, y, t, r, g, b, cen); + } + + public function len(t:String):int { + bfontpos = 0; + for (var i:int = 0; i < t.length; i++) { + cur = t.charCodeAt(i); + bfontpos+=bfontlen[cur]; + } + return bfontpos; + } + + public function flashlight():void { + backbuffer.fillRect(backbuffer.rect, 0xBBBBBB); + } + + public function screenshake():void { + screenbuffer.lock(); + if(flipmode){ + tpoint.x = int((Math.random() * 7) - 4); tpoint.y = int((Math.random() * 7) - 4); + flipmatrix.translate(tpoint.x, tpoint.y); + screenbuffer.draw(backbuffer, flipmatrix); + flipmatrix.translate(-tpoint.x, -tpoint.y); + }else{ + screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); + tpoint.x = (Math.random() * 7) - 4; tpoint.y = (Math.random() * 7) - 4; + screenbuffer.copyPixels(backbuffer, backbuffer.rect, tpoint, null, null, false); + } + screenbuffer.unlock(); + + backbuffer.lock(); + backbuffer.fillRect(backbuffer.rect, 0x000000); + backbuffer.unlock(); + } + + public function render():void { + screenbuffer.lock(); + if(flipmode){ + screenbuffer.draw(backbuffer, flipmatrix); + }else{ + screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); + } + screenbuffer.unlock(); + + backbuffer.lock(); + backbuffer.fillRect(backbuffer.rect, 0x000000); + backbuffer.unlock(); + } + + public function menuoffrender():void { + screenbuffer.lock(); + screenbuffer.copyPixels(menubuffer, menubuffer.rect, tl, null, null, false); + + if(flipmode){ + flipmatrix.translate(0, menuoffset); + screenbuffer.draw(backbuffer, flipmatrix); + flipmatrix.translate(0, -menuoffset); + }else { + tpoint.x = 0; + tpoint.y = menuoffset; + screenbuffer.copyPixels(backbuffer, backbuffer.rect, tpoint, null, null, false); + } + + screenbuffer.unlock(); + + backbuffer.lock(); + backbuffer.fillRect(backbuffer.rect, 0x000000); + backbuffer.unlock(); + } + + public var backgrounds:Vector. = new Vector.; + public var images:Vector. = new Vector.; + public var playerlevelimages:Vector. = new Vector.; + public var mobileimages:Vector. = new Vector.; + public var tele:Vector. = new Vector.; + public var tele_rect:Rectangle; + public var tiles:Vector. = new Vector.; + public var tiles2:Vector. = new Vector.; + public var tiles3:Vector. = new Vector.; + public var sprites:Vector. = new Vector.; + public var flipsprites:Vector. = new Vector.; + public var entcolours:Vector. = new Vector.; + public var bfont:Vector. = new Vector.; + public var bfontmask:Vector. = new Vector.; + public var flipbfont:Vector. = new Vector.; + public var flipbfontmask:Vector. = new Vector.; + public var bfontlen:Vector. = new Vector.; + public var bfontpos:int; + public var cur:int; + public var ct:ColorTransform; + public var tiles_rect:Rectangle; + public var sprites_rect:Rectangle; + public var bfont_rect:Rectangle; + public var bfontmask_rect:Rectangle; + public var images_rect:Rectangle; + public var tl:Point; //The point at (0,0) + public var bg_rect:Rectangle, prect:Rectangle; + public var line_rect:Rectangle; + + public var temp:int; + public var temp2:int; + public var temp3:int; + public var tempstring:String; + public var alphamult:uint; + public var stemp:String; + public var buffer:BitmapData; + public var i:int, j:int, k:int, m:int; + public var tpoint:Point, trect:Rectangle; + public var madrect:Rectangle, madpoint:Point; + + public var temptile:BitmapData; + public var tempsprite:BitmapData; + public var footerrect:Rectangle; + //Actual backgrounds + public var backbuffer:BitmapData; + public var frontbuffer:BitmapData; + public var towerbuffer:BitmapData; + public var screenbuffer:BitmapData; + public var menubuffer:BitmapData; + public var screen:Bitmap; + public var updatebackground:Boolean; + //Textbox Stuff + public var ntextbox:int; + public var textbox:Vector. = new Vector.; + //Cutscene bars + public var showcutscenebars:Boolean; + public var cutscenebarspos:int; + //Background Stuff + public var stars:Vector. = new Vector.; + public var starsspeed:Vector. = new Vector.; + + //special for weird lab rooms + public var spcol:int, spcoldel:int; + //Menu stuff + public var crewframe:int, crewframedelay:int; + public var menuoffset:int, resumegamemode:Boolean; + //More Background Stuff + public var backboxes:Vector. = new Vector.; + public var backboxvx:Vector. = new Vector.; + public var backboxvy:Vector. = new Vector.; + public var backboxint:Vector. = new Vector.; + public var bcol:int, bcol2:int, rcol:int; + public var backboxrect:Rectangle; + public var linestate:int, linedelay:int; + public var backoffset:int, backgrounddrawn:Boolean; + public var foregrounddrawn:Boolean; + + public var warpskip:int; + public var warpfcol:int, warpbcol:int; + public var warprect:Rectangle; + //Fade effect + public var fademode:int; + public var fadeamount:int; + public var fadebars:Vector. = new Vector.; + //Single trinket colour + public var trinketcolset:Boolean, trinketr:int, trinketg:int, trinketb:int; + //Flipmode Stuff + public var flipmode:Boolean, setflipmode:Boolean; + public var flipmatrix:Matrix = new Matrix(); + public var flipfontmatrix:Matrix = new Matrix(); + public var flipfontmatrix2:Matrix = new Matrix(); + + public var scaleMatrix:Matrix = new Matrix(); + public var bigbuffer:BitmapData; + public var bigbufferscreen:Bitmap; + + //Mobile stuff + public var screensizemultiplier:Number; + + public var screenoffx:int, screenoffy:int; + + public var buttonimg:Vector. = new Vector.; + public var buttonscreen:Vector. = new Vector.; + public var buttonactive:Vector. = new Vector.; + public var buttonhighlight:Vector. = new Vector.; + + public var buttonpos:Vector. = new Vector.; + public var currentbuttontype:Vector. = new Vector.; + public var newbuttontype:Vector. = new Vector.; + public var buttonstate:Vector. = new Vector.; + public var buttonlerp:Vector. = new Vector.; + public var buttonframe:Vector. = new Vector.; + public var buttonsize:int, buttonyspacing:int, buttonxspacing:int, buttonydiff:int; + + public var b_gap:int = 40, b_size:int = 26; + public var devicex:int, devicey:int; + } +} \ No newline at end of file diff --git a/mobile_version/src/edentitiesclass.as b/mobile_version/src/edentitiesclass.as new file mode 100644 index 00000000..493eaf33 --- /dev/null +++ b/mobile_version/src/edentitiesclass.as @@ -0,0 +1,22 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class edentitiesclass { + public function edentitiesclass():void { + clear(); + } + + public function clear():void{ + x = 0; y = 0; t = 0; + p1 = 0; p2 = 0; p3 = 0; p4 = 0; p5 = 0; p6 = 0; + scriptname = ""; + } + + public var x:int, y:int, t:int; + public var scriptname:String; + public var p1:int, p2:int, p3:int, p4:int, p5:int, p6:int; + } +}; diff --git a/mobile_version/src/editor.as b/mobile_version/src/editor.as new file mode 100644 index 00000000..6dbe5828 --- /dev/null +++ b/mobile_version/src/editor.as @@ -0,0 +1,1499 @@ +package { + import flash.display.*; + import flash.display3D.textures.RectangleTexture; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class editor { + public static function init():void { + for (var i:int = 0 ; i < 3000; i++) { + edentity.push(new edentitiesclass); + } + + for (i = 0; i < 500; i++) { + hooklist.push(""); + sb.push(""); + } + + for (i = 0; i < 400; i++) { + level.push(new edlevelclass); + } + + //m_editorSavePath = FileSystemUtils::GetInstance().GetUserDocuments(); + m_editorSavePath = ""; + + maxwidth=20; + maxheight = 20; + + //We create a blank map + for (var j:int = 0; j < 30 * maxwidth; j++){ + for (i = 0; i < 40 * maxheight; i++){ + contents.push(int(0)); + } + } + + for (j = 0; j < 30; j++){ + for (i = 0; i < 40; i++){ + swapmap.push(int(0)); + } + } + + for (i = 0; i < 30 * maxheight; i++){ + vmult.push(int(i * 40 * maxwidth)); + } + + reset(); + + playerlevel.push(new XML( new lvl_pyramid )); playerlevel_spikyness.push(int(1)); + playerlevel.push(new XML( new lvl_seasons )); playerlevel_spikyness.push(int(1)); + playerlevel.push(new XML( new lvl_victuals )); playerlevel_spikyness.push(int(1)); + playerlevel.push(new XML( new lvl_4kvvvv )); playerlevel_spikyness.push(int(2)); + playerlevel.push(new XML( new lvl_quantumtunnel12 )); playerlevel_spikyness.push(int(2)); + playerlevel.push(new XML( new lvl_variationventure )); playerlevel_spikyness.push(int(2)); + playerlevel.push(new XML( new lvl_vertexvortex )); playerlevel_spikyness.push(int(2)); + playerlevel.push(new XML( new lvl_333333_easy )); playerlevel_spikyness.push(int(3)); + playerlevel.push(new XML( new lvl_linewrap )); playerlevel_spikyness.push(int(3)); + playerlevel.push(new XML( new lvl_soulsearching )); playerlevel_spikyness.push(int(3)); + playerlevel.push(new XML( new lvl_towerofpower )); playerlevel_spikyness.push(int(3)); + playerlevel.push(new XML( new lvl_varietyshow )); playerlevel_spikyness.push(int(3)); + playerlevel.push(new XML( new lvl_a_new_dimension )); playerlevel_spikyness.push(int(4)); + playerlevel.push(new XML( new lvl_roadtrip )); playerlevel_spikyness.push(int(4)); + playerlevel.push(new XML( new lvl_the_dual_challenge )); playerlevel_spikyness.push(int(4)); + playerlevel.push(new XML( new lvl_vertiginousviridian )); playerlevel_spikyness.push(int(4)); + playerlevel.push(new XML( new lvl_vvvvvvgoldenspiral )); playerlevel_spikyness.push(int(5)); + + getDirectoryData(); + + /* + trace("loading level data:"); + getDirectoryData(); + for (i = 0; i < ListOfMetaData.length; i++) { + trace(ListOfMetaData[i].title, ListOfMetaData[i].creator); + } + + trace("done!"); + */ + } + + // comparison, not case sensitive. + public static function compare_nocase(first:String, second:String):Boolean { + //Not used + //For alphabetical sorting of two strings + return true; + } + + public static function getDirectoryData():void { + ListOfMetaData.length = 0; + + for (var i:int = 0; i < playerlevel.length; i++) { + ListOfMetaData.push(getLevelMetaData(i)); + } + /* + var ts:String = ""; + for(i = 0; i < ListOfMetaData.length; i++){ + for(var k:int = 0; k < ListOfMetaData.length; k++){ + if (compare_nocase(ListOfMetaData[i].title, ListOfMetaData[k].title)) { + ts = ListOfMetaData[i]; + ListOfMetaData[i] = ListOfMetaData[k]; + ListOfMetaData[k] = ts; + } + } + } + */ + } + + public static function getLevelMetaData(t:int):LevelMetaData { + var temp:LevelMetaData = new LevelMetaData; + + temp.timeCreated = playerlevel[t].Data.MetaData.Created.text(); + temp.creator = playerlevel[t].Data.MetaData.Creator.text(); + temp.title = playerlevel[t].Data.MetaData.Title.text(); + temp.timeModified = playerlevel[t].Data.MetaData.Modified.text(); + temp.modifier = playerlevel[t].Data.MetaData.Modifiers.text(); + temp.Desc1 = playerlevel[t].Data.MetaData.Desc1.text(); + temp.Desc2 = playerlevel[t].Data.MetaData.Desc2.text(); + temp.Desc3 = playerlevel[t].Data.MetaData.Desc3.text(); + temp.website = playerlevel[t].Data.MetaData.website.text(); + + temp.filename = String(t); + temp.file_num = t; + temp.version = 2; //All these files are version 2 + + return temp; + } + + public static function reset():void { + version = 2; //New smaller format change is 2 + + mapwidth=5; + mapheight = 5; + + editordata.title = "Untitled Level"; + editordata.creator = "Unknown"; + Desc1=""; + Desc2=""; + Desc3=""; + website = ""; + + roomnamehide=0; + zmod=false; + xmod=false; + spacemod=false; + spacemenu=0; + shiftmenu=false; + shiftkey=false; + saveandquit=false; + note=""; + notedelay=0; + roomnamemod=false; + textentry=false; + savemod=false; + loadmod=false; + //deletekeyheld = false; + + titlemod=false; + creatormod=false; + desc1mod=false; + desc2mod=false; + desc3mod=false; + websitemod=false; + settingsmod=false; + warpmod=false; //Two step process + warpent = -1; + + boundarymod=0; + boundarytype=0; + boundx1=0; + boundx2=0; + boundy1=0; + boundy2 = 0; + + scripttextmod=false; + scripttextent=0; + scripttexttype = 0; + + drawmode=0; + dmtile=0; + dmtileeditor=0; + entcol = 0; + + tilex=0; + tiley=0; + levx=0; + levy=0; + keydelay=0; + lclickdelay=0; + savekey=false; + loadkey=false; + updatetiles=true; + changeroom=true; + levmusic = 0; + + entframe=0; + entframedelay = 0; + + numtrinkets=0; + numcrewmates = 0; + + editordata.numedentities=0; + levmusic = 0; + + roomtextmod=false; + roomtextent = 0; + + for (var j:int = 0; j < maxheight; j++){ + for (var i:int = 0; i < maxwidth; i++){ + level[i + (j * maxwidth)].tileset = 0; + level[i + (j * maxwidth)].tilecol = (i + j) % 32; + level[i + (j * maxwidth)].roomname = "" + level[i + (j * maxwidth)].warpdir = 0; + level[i + (j * maxwidth)].platx1 = 0; + level[i + (j * maxwidth)].platy1 = 0; + level[i + (j * maxwidth)].platx2 = 320; + level[i + (j * maxwidth)].platy2 = 240; + level[i + (j * maxwidth)].platv = 4; + level[i + (j * maxwidth)].enemyx1 = 0; + level[i + (j * maxwidth)].enemyy1 = 0 + level[i + (j * maxwidth)].enemyx2 = 320; + level[i + (j * maxwidth)].enemyy2 = 240; + } + } + + for (j = 0; j < 30 * maxwidth; j++){ + for (i = 0; i < 40 * maxheight; i++) { + contents[i + (j * 30 * maxwidth)] = 0; + } + } + + if(numhooks>0){ + for (i = 0; i < numhooks; i++) { + removehook(hooklist[i]); + } + } + + for (i = 0; i < 500; i++){ + sb[i]=""; + } + + for (i = 0; i < 500; i++){ + hooklist[i] = ""; + } + + clearscriptbuffer(); + sblength=1; + sbx=0; + sby=0; + pagey=0; + scripteditmod=false; + sbscript="null"; + scripthelppage=0; + scripthelppagedelay = 0; + + hookmenupage=0; + hookmenu=0; + numhooks=0; + customscript.length = 0; + } + + public static function gethooks():void { + //Scan through the script and create a hooks list based on it + numhooks=0; + var tstring:String; + var tstring2:String; + for (var i:int = 0; i < customscript.length; i++){ + tstring = customscript[i]; + if(tstring.length-1>=0){ + tstring = tstring.substr(tstring.length - 1, 1); + }else{ + tstring=""; + } + + if(tstring==":"){ + tstring2=""; + tstring=customscript[i]; + tstring2 = tstring.substr(0, tstring.length - 1); + hooklist[numhooks] = tstring2; + numhooks++; + } + } + } + + public static function loadhookineditor(t:String):void{ + //Find hook t in the scriptclass, then load it into the editor + clearscriptbuffer(); + + var tstring:String; + + var removemode:Boolean = false; + + for (var i:int = 0; i < customscript.length; i++){ + if (customscript[i] == t + ":") { + removemode=true; + }else if (removemode) { + tstring = customscript[i]; + if (tstring != "") { + tstring = tstring[tstring.length() - 1]; + } + if (tstring == ":"){ + //this is a hook + removemode=false; + }else{ + //load in this line + sb[sblength - 1] = customscript[i]; + sblength++; + } + } + } + if(sblength>1) sblength--; + } + + public static function addhooktoscript(t:String):void{ + //Adds hook+the scriptbuffer to the end of the scriptclass + removehookfromscript(t); + customscript.push(t + ":"); + if (sblength >= 1) { + for (var i:int = 0; i < sblength; i++){ + customscript.push(sb[i]); + } + } + } + + public static function removehookfromscript(t:String):void { + //Find hook t in the scriptclass, then removes it (and any other code with it) + var tstring:String; + var removemode:Boolean = false; + + for (var i:int = 0; i < customscript.length; i++) { + if (customscript[i] == t + ":") { + removemode=true; + //Remove this line + for (var j:int = i; j < customscript.length - 1; j++){ + customscript[j] = customscript[j + 1]; + } + customscript.pop(); + i--; + }else if(removemode){ + //If this line is not the start of a new hook, remove it! + tstring = customscript[i]; + tstring = tstring.substr(tstring.length - 1, 1); + if(tstring==":"){ + //this is a hook + removemode=false; + }else{ + //Remove this line + for (j = i; j < customscript.length - 1; j++) { + customscript[j] = customscript[j + 1]; + } + customscript.pop(); + + i--; + } + } + } + } + + public static function removehook(t:String):void { + //Check the hooklist for the hook t. If it's there, remove it from here and the script + for (var i:int = 0; i < numhooks; i++) { + if (hooklist[i] == t) { + removehookfromscript(t); + for (var j:int = i; j < numhooks; j++) { + hooklist[j]=hooklist[j+1]; + } + + hooklist[numhooks] = ""; + numhooks--; + i--; + } + } + } + + public static function addhook(t:String):void{ + //Add an empty function to the list in both editor and script + removehook(t); + hooklist[numhooks] = t; + numhooks++; + addhooktoscript(t); + } + + public static function checkhook(t:String):Boolean { + //returns true if hook t already is in the list + for (var i:int = 0; i < numhooks; i++) { + if(hooklist[i]==t) return true; + } + return false; + } + + public static function clearscriptbuffer():void{ + for (var i:int = 0; i < sblength + 1; i++) { + sb[i] = ""; + } + sblength=1; + } + + public static function removeline(t:int):void{ + //Remove line t from the script + if (sblength > 0) { + if (sblength == t) { + sblength--; + }else{ + for (var i:int = t; i < sblength; i++){ + sb[i] = sb[i + 1]; + } + sb[sblength] = ""; + sblength--; + } + } + } + + public static function insertline(t:int):void{ + //insert a blank line into script at line t + for (var i:int = sblength; i >= t; i--) { + sb[i + 1] = sb[i]; + } + sb[t] = ""; + sblength++; + } + + public static function loadlevel(rxi:int, ryi:int):void { + //Set up our buffer array to be picked up by mapclass + rxi -= 100; + ryi -= 100; + if (rxi < 0) rxi += mapwidth; + if (ryi < 0) ryi += mapheight; + if (rxi >= mapwidth) rxi -= mapwidth; + if (ryi >= mapheight) ryi -= mapheight; + + for (var j:int = 0; j < 30; j++){ + for (var i:int = 0; i < 40; i++) { + swapmap[i + (j * 40)] = contents[i + (rxi * 40) + vmult[j + (ryi * 30)]]; + } + } + } + + public static function getlevelcol(t:int):int{ + if (level[t].tileset == 0) { //Space Station + return level[t].tilecol; + }else if (level[t].tileset == 1) { //Outside + return 32 + level[t].tilecol; + }else if (level[t].tileset == 2) { //Lab + return 40 + level[t].tilecol; + }else if (level[t].tileset == 3) { //Warp Zone + return 46 + level[t].tilecol; + }else if (level[t].tileset == 4) { //Ship + return 52 + level[t].tilecol; + } + return 0; + } + + public static function getenemycol(t:int):int{ + switch(t){ + //RED + case 3: case 7: case 12: case 23: case 28: case 34: case 42: case 48: case 58: + return 6; + break; + //GREEN + case 5: case 9: case 22: case 25: case 29: case 31: case 38: case 46: case 52: case 53: + return 7; + break; + //BLUE + case 1: case 6: case 14: case 27: case 33: case 44: case 50: case 57: + return 12; + break; + //YELLOW + case 4: case 17: case 24: case 30: case 37: case 45: case 51: case 55: + return 9; + break; + //PURPLE + case 2: case 11: case 15: case 19: case 32: case 36: case 49: + return 20; + break; + //CYAN + case 8: case 10: case 13: case 18: case 26: case 35: case 41: case 47: case 54: + return 11; + break; + //PINK + case 16: case 20: case 39: case 43: case 56: + return 8; + break; + //ORANGE + case 21: case 40: + return 17; + break; + default: + return 6; + break; + } + return 0; + } + + public static function getwarpbackground(rx:int, ry:int):int { + var tmp:int = rx + (maxwidth * ry); + switch(level[tmp].tileset){ + case 0: //Space Station + switch(level[tmp].tilecol) { + case 0: return 3; break; + case 1: return 2; break; + case 2: return 1; break; + case 3: return 4; break; + case 4: return 5; break; + case 5: return 3; break; + case 6: return 1; break; + case 7: return 0; break; + case 8: return 5; break; + case 9: return 0; break; + case 10: return 2; break; + case 11: return 1; break; + case 12: return 5; break; + case 13: return 0; break; + case 14: return 3; break; + case 15: return 2; break; + case 16: return 4; break; + case 17: return 0; break; + case 18: return 3; break; + case 19: return 1; break; + case 20: return 4; break; + case 21: return 5; break; + case 22: return 1; break; + case 23: return 4; break; + case 24: return 5; break; + case 25: return 0; break; + case 26: return 3; break; + case 27: return 1; break; + case 28: return 5; break; + case 29: return 4; break; + case 30: return 5; break; + case 31: return 2; break; + default: return 6; break; + } + break; + case 1: //Outside + switch(level[tmp].tilecol) { + case 0: return 3; break; + case 1: return 1; break; + case 2: return 0; break; + case 3: return 2; break; + case 4: return 4; break; + case 5: return 5; break; + case 6: return 2; break; + case 7: return 4; break; + default: return 6; break; + } + break; + case 2: //Lab + switch(level[tmp].tilecol) { + case 0: return 0; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 3; break; + case 4: return 4; break; + case 5: return 5; break; + case 6: return 6; break; + default: return 6; break; + } + break; + case 3: //Warp Zone + switch(level[tmp].tilecol) { + case 0: return 0; break; + case 1: return 1; break; + case 2: return 2; break; + case 3: return 3; break; + case 4: return 4; break; + case 5: return 5; break; + case 6: return 6; break; + default: return 6; break; + } + break; + case 4: //Ship + switch(level[tmp].tilecol) { + case 0: return 5; break; + case 1: return 0; break; + case 2: return 4; break; + case 3: return 2; break; + case 4: return 3; break; + case 5: return 1; break; + case 6: return 6; break; + default: return 6; break; + } + break; + case 5: //Tower + return 6; + break; + default: + return 6; + break; + } + } + + public static function getenemyframe(t:int):int { + switch(t){ + case 0: return 78; break; + case 1: return 88; break; + case 2: return 36; break; + case 3: return 164; break; + case 4: return 68; break; + case 5: return 48; break; + case 6: return 176; break; + case 7: return 168; break; + case 8: return 112; break; + case 9: return 114; break; + default: return 78; break; + } + return 78; + } + + public static function placetile(x:int, y:int, t:int):void { + if (x >= 0 && y >= 0 && x < mapwidth * 40 && y < mapheight * 30) { + contents[x + (levx * 40) + vmult[y + (levy * 30)]] = t; + } + } + + public static function placetilelocal(x:int, y:int, t:int):void { + if (x >= 0 && y >= 0 && x < 40 && y < 30) { + contents[x + (levx * 40) + vmult[y + (levy * 30)]] = t; + } + updatetiles=true; + } + + public static function base(x:int, y:int):int { + //Return the base tile for the given tileset and colour + temp = x + (y * maxwidth); + if(level[temp].tileset==0){ //Space Station + if (level[temp].tilecol >= 22) { + return 483 + ((level[temp].tilecol - 22) * 3); + }else if (level[temp].tilecol >= 11) { + return 283 + ((level[temp].tilecol-11)*3); + }else{ + return 83 + (level[temp].tilecol * 3); + } + }else if (level[temp].tileset == 1) { //Outside + return 480 + (level[temp].tilecol*3); + }else if (level[temp].tileset == 2) { //Lab + return 280 + (level[temp].tilecol*3); + }else if (level[temp].tileset == 3) { //Warp Zone/Intermission + return 80 + (level[temp].tilecol * 3); + }else if (level[temp].tileset == 4) { //SHIP + return 101 + (level[temp].tilecol * 3); + } + return 0; + } + + public static function backbase(x:int, y:int):int { + //Return the base tile for the background of the given tileset and colour + temp = x + (y * maxwidth); + if (level[temp].tileset == 0) { //Space Station + //Pick depending on tilecol + switch(level[temp].tilecol) { + case 0: case 5: case 26: + return 680; //Blue + break; + case 3: case 16: case 23: + return 683; //Yellow + break; + case 9: case 12: case 21: + return 686; //Greeny Cyan + break; + case 4: case 8: case 24: case 28: case 30: + return 689; //Green + break; + case 20: case 29: + return 692; //Orange + break; + case 2: case 6: case 11: case 22: case 27: + return 695; //Red + break; + case 1: case 10: case 15: case 19: case 31: + return 698; //Pink + break; + case 14: case 18: + return 701; //Dark Blue + break; + case 7: case 13: case 17: case 25: + return 704; //Cyan + break; + default: + return 680; + break; + } + }else if (level[temp].tileset == 1) { //outside + return 680 + (level[temp].tilecol * 3); + }else if (level[temp].tileset == 2) { //Lab + return 0; + }else if (level[temp].tileset == 3) { //Warp Zone/Intermission + return 120 + (level[temp].tilecol * 3) + } else if(level[temp].tileset==4) { //SHIP + return 741 + (level[temp].tilecol * 3); + } + return 0; + } + + public static function at(x:int, y:int):int { + if (x < 0) return at(0, y); + if (y < 0) return at(x, 0); + if (x >= 40) return at(39, y); + if (y >= 30) return at(x, 29); + + if (x >= 0 && y >= 0 && x < 40 && y < 30) { + return contents[x + (levx * 40) + vmult[y + (levy * 30)]]; + } + return 0; + } + + public static function freewrap(x:int, y:int):int { + if (x < 0) return freewrap(x + (mapwidth * 40), y); + if (y < 0) return freewrap(x, y + (mapheight * 30)); + if (x >= (mapwidth * 40)) return freewrap(x - (mapwidth * 40), y); + if (y >= (mapheight * 30)) return freewrap(x, y - (mapheight * 30)); + + if (x >= 0 && y >= 0 && x < (mapwidth * 40) && y < (mapheight * 30)) { + if (contents[x + vmult[y]] == 0) { + return 0; + }else{ + if (contents[x + vmult[y]]>= 2 && contents[x + vmult[y]] < 80) { + return 0; + } + if (contents[x + vmult[y]]>= 680) { + return 0; + } + } + } + return 1; + } + + public static function backonlyfree(x:int, y:int):int { + //Returns 1 if tile is a background tile, 0 otherwise + if (x < 0) return backonlyfree(0, y); + if (y < 0) return backonlyfree(x, 0); + if (x >= 40) return backonlyfree(39, y); + if (y >= 30) return backonlyfree(x, 29); + + if (x >= 0 && y >= 0 && x < 40 && y < 30) { + if (contents[x + (levx * 40) + vmult[y + (levy * 30)]]>= 680) { + return 1; + } + } + return 0; + } + + public static function backfree(x:int, y:int):int { + //Returns 0 if tile is not a block or background tile, 1 otherwise + if (x < 0) return backfree(0, y); + if (y < 0) return backfree(x, 0); + if (x >= 40) return backfree(39, y); + if (y >= 30) return backfree(x, 29); + + if (x >= 0 && y >= 0 && x < 40 && y < 30) { + if (contents[x + (levx * 40) + vmult[y + (levy * 30)]] == 0) { + return 0; + }else{ + //if(contents[x+(levx*40)+vmult[y+(levy*30)]]>=2 && contents[x+(levx*40)+vmult[y+(levy*30)]]<80){ + // return 0; + //} + } + } + return 1; + } + + public static function spikefree(x:int, y:int):int { + //Returns 0 if tile is not a block or spike, 1 otherwise + if (x == -1) return free(0, y); + if (y == -1) return free(x, 0); + if (x == 40) return free(39, y); + if (y == 30) return free(x, 29); + + if (x >= 0 && y >= 0 && x < 40 && y < 30) { + if (contents[x + (levx * 40) + vmult[y + (levy * 30)]] == 0) { + return 0; + }else{ + if (contents[x + (levx * 40) + vmult[y + (levy * 30)]]>= 680) { + return 0; + } + } + } + return 1; + } + + public static function free(x:int, y:int):int { + //Returns 0 if tile is not a block, 1 otherwise + if (x == -1) return free(0, y); + if (y == -1) return free(x, 0); + if (x == 40) return free(39, y); + if (y == 30) return free(x, 29); + + if (x >= 0 && y >= 0 && x < 40 && y < 30) { + if (contents[x + (levx * 40) + vmult[y + (levy * 30)]] == 0) { + return 0; + }else { + if (contents[x + (levx * 40) + vmult[y + (levy * 30)]]>= 2 && contents[x + (levx * 40) + vmult[y + (levy * 30)]] < 80) { + return 0; + } + if (contents[x + (levx * 40) + vmult[y + (levy * 30)]]>= 680) { + return 0; + } + } + } + return 1; + } + + public static function absfree(x:int, y:int):int { + //Returns 0 if tile is not a block, 1 otherwise, abs on grid + if (x >= 0 && y >= 0 && x < mapwidth * 40 && y < mapheight * 30) { + if (contents[x + vmult[y]] == 0) { + return 0; + }else{ + if (contents[x + vmult[y]]>= 2 && contents[x + vmult[y]] < 80){ + return 0; + } + if (contents[x + vmult[y]]>= 680) { + return 0; + } + } + } + return 1; + } + + public static function match(x:int, y:int):int { + if (free(x - 1, y) == 0 && free(x, y - 1) == 0 && free(x + 1, y) == 0 && free(x, y + 1) == 0) return 0; + + if (free(x - 1, y) == 0 && free(x, y - 1) == 0) return 10; + if (free(x + 1, y) == 0 && free(x, y - 1) == 0) return 11; + if (free(x - 1, y) == 0 && free(x, y + 1) == 0) return 12; + if (free(x + 1, y) == 0 && free(x, y + 1) == 0) return 13; + + if (free(x, y - 1) == 0) return 1; + if (free(x - 1, y) == 0) return 2; + if (free(x, y + 1) == 0) return 3; + if (free(x + 1, y) == 0) return 4; + if (free(x - 1, y - 1) == 0) return 5; + if (free(x + 1, y - 1) == 0) return 6; + if (free(x - 1, y + 1) == 0) return 7; + if (free(x + 1, y + 1) == 0) return 8; + + return 0; + } + + public static function warpzonematch(x:int, y:int):int { + if (free(x - 1, y) == 0 && free(x, y - 1) == 0 && free(x + 1, y) == 0 && free(x, y + 1) == 0) return 0; + + if (free(x - 1, y) == 0 && free(x, y - 1) == 0) return 10; + if (free(x + 1, y) == 0 && free(x, y - 1) == 0) return 11; + if (free(x - 1, y) == 0 && free(x, y + 1) == 0) return 12; + if (free(x + 1, y) == 0 && free(x, y + 1) == 0) return 13; + + if (free(x, y - 1) == 0) return 1; + if (free(x - 1, y) == 0) return 2; + if (free(x, y + 1) == 0) return 3; + if (free(x + 1, y) == 0) return 4; + if (free(x - 1, y - 1) == 0) return 5; + if (free(x + 1, y - 1) == 0) return 6; + if (free(x - 1, y + 1) == 0) return 7; + if (free(x + 1, y + 1) == 0) return 8; + + return 0; + } + + public static function outsidematch(x:int, y:int):int { + if (backonlyfree(x - 1, y) == 0 && backonlyfree(x + 1, y) == 0) return 2; + if (backonlyfree(x, y - 1) == 0 && backonlyfree(x, y + 1) == 0) return 1; + + return 0; + } + + public static function backmatch(x:int, y:int):int{ + //Returns the first position match for a border + // 5 1 6 + // 2 X 4 + // 7 3 8 + /* + if(at(x-1,y)>=80 && at(x,y-1)>=80) return 10; + if(at(x+1,y)>=80 && at(x,y-1)>=80) return 11; + if(at(x-1,y)>=80 && at(x,y+1)>=80) return 12; + if(at(x+1,y)>=80 && at(x,y+1)>=80) return 13; + + if(at(x,y-1)>=80) return 1; + if(at(x-1,y)>=80) return 2; + if(at(x,y+1)>=80) return 3; + if(at(x+1,y)>=80) return 4; + if(at(x-1,y-1)>=80) return 5; + if(at(x+1,y-1)>=80) return 6; + if(at(x-1,y+1)>=80) return 7; + if(at(x+1,y+1)>=80) return 8; + */ + if (backfree(x - 1, y) == 0 && backfree(x, y - 1) == 0 && backfree(x + 1, y) == 0 && backfree(x, y + 1) == 0) return 0; + + if (backfree(x - 1, y) == 0 && backfree(x, y - 1) == 0) return 10; + if (backfree(x + 1, y) == 0 && backfree(x, y - 1) == 0) return 11; + if (backfree(x - 1, y) == 0 && backfree(x, y + 1) == 0) return 12; + if (backfree(x + 1, y) == 0 && backfree(x, y + 1) == 0) return 13; + + if (backfree(x, y - 1) == 0) return 1; + if (backfree(x - 1, y) == 0) return 2; + if (backfree(x, y + 1) == 0) return 3; + if (backfree(x + 1, y) == 0) return 4; + + if (backfree(x - 1, y - 1) == 0) return 5; + if (backfree(x + 1, y - 1) == 0) return 6; + if (backfree(x - 1, y + 1) == 0) return 7; + if (backfree(x + 1, y + 1) == 0) return 8 + + return 0; + } + + public static function edgetile(x:int, y:int):int { + switch(match(x, y)) { + case 14: return 0; break; + case 10: return 80; break; + case 11: return 82; break; + case 12: return 160; break; + case 13: return 162; break; + case 1: return 81; break; + case 2: return 120; break; + case 3: return 161; break; + case 4: return 122; break; + case 5: return 42; break; + case 6: return 41; break; + case 7: return 2; break; + case 8: return 1; break; + case 0: default: return 0; break; + } + return 0; + } + + public static function warpzoneedgetile(x:int, y:int):int{ + switch(backmatch(x, y)) { + case 14: return 0; break; + case 10: return 80; break; + case 11: return 82; break; + case 12: return 160; break; + case 13: return 162; break; + case 1: return 81; break; + case 2: return 120; break; + case 3: return 161; break; + case 4: return 122; break; + case 5: return 42; break; + case 6: return 41; break; + case 7: return 2; break; + case 8: return 1; break; + case 0: default: return 0; break; + } + return 0; + } + + public static function outsideedgetile(x:int, y:int):int{ + switch(outsidematch(x,y)){ + case 2: return 0; break; + case 1: return 1; break; + case 0: default: return 2; break; + } + return 2; + } + + public static function backedgetile(x:int, y:int):int { + switch(backmatch(x, y)) { + case 14: return 0; break; + case 10: return 80; break; + case 11: return 82; break; + case 12: return 160; break; + case 13: return 162; break; + case 1: return 81; break; + case 2: return 120; break; + case 3: return 161; break; + case 4: return 122; break; + case 5: return 42; break; + case 6: return 41; break; + case 7: return 2; break; + case 8: return 1; break; + case 0: default: return 0; break; + } + return 0; + } + + public static function labspikedir(x:int, y:int, t:int):int{ + // a slightly more tricky case + if (free(x, y + 1) == 1) return 63 + (t * 2); + if (free(x, y - 1) == 1) return 64 + (t * 2); + if (free(x - 1, y) == 1) return 51 + (t * 2); + if (free(x + 1, y) == 1) return 52 + (t * 2); + return 63 + (t * 2); + } + + public static function spikedir(x:int, y:int):int{ + if (free(x, y + 1) == 1) return 8; + if (free(x, y - 1) == 1) return 9; + if (free(x - 1, y) == 1) return 49; + if (free(x + 1, y) == 1) return 50; + return 8; + } + + public static function findstartpoint(game:gameclass):void { + //Ok! Scan the room for the closest checkpoint + var testeditor:int = -1; + //First up; is there a start point on this screen? + for (var i:int = 0; i < editordata.numedentities; i++) { + //if() on screen + if (edentity[i].t == 16 && testeditor == -1){ + testeditor=i; + } + } + + if (testeditor == -1) { + game.edsavex = 160; + game.edsavey = 120; + game.edsaverx = 100; + game.edsavery = 100; + game.edsavegc = 0; + game.edsavey--; + game.edsavedir = 1 - edentity[testeditor].p1; + }else{ + //Start point spawn + var tx:int = (edentity[testeditor].x - (edentity[testeditor].x % 40)) / 40; + var ty:int = (edentity[testeditor].y - (edentity[testeditor].y % 30)) / 30; + game.edsavex = ((edentity[testeditor].x % 40) * 8) - 4; + game.edsavey = (edentity[testeditor].y % 30) * 8; + game.edsaverx = 100 + tx; + game.edsavery = 100 + ty; + game.edsavegc = 0; + game.edsavey--; + game.edsavedir = 1 - edentity[testeditor].p1; + } + } + + public static function saveconvertor():void{ + //In the case of resizing breaking a level, this function can fix it + maxwidth = 20; + maxheight = 20; + var oldwidth:int = 10, oldheight:int = 10; + + var tempcontents:Vector. = new Vector.; + for (var j:int = 0; j < 30 * oldwidth; j++) { + for (var i:int = 0; i < 40 * oldheight; i++) { + tempcontents.push(contents[i + (j * 40 * oldwidth)]); + } + } + + contents.length = 0; + for (j = 0; j < 30 * maxheight; j++) { + for (i = 0; i < 40 * maxwidth; i++){ + contents.push(0); + } + } + + for (j = 0; j < 30 * oldheight; j++){ + for (i = 0; i < 40 * oldwidth; i++){ + contents[i + (j * 40 * oldwidth)] = tempcontents[i + (j * 40 * oldwidth)]; + } + } + + tempcontents.length = 0; + vmult.length = 0; + for (i = 0; i < 30 * maxheight; i++){ + vmult.push(int(i * 40 * maxwidth)); + } + + for (j = 0; j < maxheight; j++) { + for (i = 0; i < maxwidth; i++) { + level[i + (j * maxwidth)].tilecol = (i + j) % 6; + } + } + //contents.length = 0; + } + + public static function findtrinket(t:int):int { + var ttrinket:int = 0; + for (var i:int = 0; i < editordata.numedentities; i++) { + if (i == t) return ttrinket; + if (edentity[i].t == 9) ttrinket++; + } + return 0; + } + + public static function findcrewmate(t:int):int { + var ttrinket:int = 0; + for (var i:int = 0; i < editordata.numedentities; i++) { + if (i == t) return ttrinket; + if (edentity[i].t == 15) ttrinket++; + } + return 0; + } + + public static function findwarptoken(t:int):int { + var ttrinket:int = 0; + for (var i:int = 0; i < editordata.numedentities; i++) { + if (i == t) return ttrinket; + if (edentity[i].t == 13) ttrinket++; + } + return 0; + } + + public static function countstuff():void{ + numtrinkets = 0; + numcrewmates = 0; + for (var i:int = 0; i < editordata.numedentities; i++) { + if (edentity[i].t == 9) numtrinkets++; + if (edentity[i].t == 15) numcrewmates++; + } + } + + public static function weirdloadthing(t:int):void { + load(t); + } + + public static function load(t:int):void { + //Need to dramatically rethink this function + reset(); + + version = 2; + + editordata.creator = playerlevel[t].Data.MetaData.Creator.text(); + editordata.title = playerlevel[t].Data.MetaData.Title.text(); + Desc1 = playerlevel[t].Data.MetaData.Desc1.text(); + Desc2 = playerlevel[t].Data.MetaData.Desc2.text(); + Desc3 = playerlevel[t].Data.MetaData.Desc3.text(); + website = playerlevel[t].Data.MetaData.website.text(); + + mapwidth = int(playerlevel[t].Data.mapwidth.text()); + mapheight = int(playerlevel[t].Data.mapheight.text()); + levmusic = int(playerlevel[t].Data.levmusic.text()); + + var lvlstring:String = playerlevel[t].Data.contents.text(); + var values:Array; + values = new Array; + for (var i:int = 0; i < contents.length; i++) contents[i] = 0; + values = lvlstring.split(","); + var xp:int = 0, yp:int = 0; + for (i = 0; i < values.length; i++) { + contents[xp + (maxwidth * 40 * yp)] = int(values[i]); + xp++; + if(xp == mapwidth*40){ + xp = 0; + yp++; + } + } + + editordata.numedentities = playerlevel[t].Data.edEntities.edentity.length(); + for (i = 0; i < editordata.numedentities; i++) { + edentity[i].x = playerlevel[t].Data.edEntities.edentity[i].@x; + edentity[i].y = playerlevel[t].Data.edEntities.edentity[i].@y; + edentity[i].t = playerlevel[t].Data.edEntities.edentity[i].@t; + edentity[i].p1 = playerlevel[t].Data.edEntities.edentity[i].@p1; + edentity[i].p2 = playerlevel[t].Data.edEntities.edentity[i].@p2; + edentity[i].p3 = playerlevel[t].Data.edEntities.edentity[i].@p3; + edentity[i].p4 = playerlevel[t].Data.edEntities.edentity[i].@p4; + edentity[i].p5 = playerlevel[t].Data.edEntities.edentity[i].@p5; + edentity[i].p6 = playerlevel[t].Data.edEntities.edentity[i].@p6; + + edentity[i].scriptname = playerlevel[t].Data.edEntities.edentity[i].text(); + } + + for (i = 0; i < playerlevel[t].Data.levelMetaData.edLevelClass.length(); i++) { + level[i].roomname = playerlevel[t].Data.levelMetaData.edLevelClass[i].text(); + + level[i].tileset = playerlevel[t].Data.levelMetaData.edLevelClass[i].@tileset; + level[i].tilecol = playerlevel[t].Data.levelMetaData.edLevelClass[i].@tilecol; + level[i].platx1 = playerlevel[t].Data.levelMetaData.edLevelClass[i].@platx1; + level[i].platy1 = playerlevel[t].Data.levelMetaData.edLevelClass[i].@platy1; + level[i].platx2 = playerlevel[t].Data.levelMetaData.edLevelClass[i].@platx2; + level[i].platy2 = playerlevel[t].Data.levelMetaData.edLevelClass[i].@platy2; + level[i].platv = playerlevel[t].Data.levelMetaData.edLevelClass[i].@platv; + level[i].enemyx1 = playerlevel[t].Data.levelMetaData.edLevelClass[i].@enemyx1; + level[i].enemyy1 = playerlevel[t].Data.levelMetaData.edLevelClass[i].@enemyy1; + level[i].enemyx2 = playerlevel[t].Data.levelMetaData.edLevelClass[i].@enemyx2; + level[i].enemyy2 = playerlevel[t].Data.levelMetaData.edLevelClass[i].@enemyy2; + level[i].enemytype = playerlevel[t].Data.levelMetaData.edLevelClass[i].@enemytype; + level[i].warpdir = playerlevel[t].Data.levelMetaData.edLevelClass[i].@warpdir; + level[i].directmode = playerlevel[t].Data.levelMetaData.edLevelClass[i].@directmode; + } + + lvlstring = playerlevel[t].Data.script.text(); + values = new Array; + values = lvlstring.split("|"); + + customscript.length = 0; + for (i = 0; i < values.length; i++) { + customscript.push(values[i]); + } + + gethooks(); + countstuff(); + version=2; + //saveconvertor(); + } + + public static function save(_path:String):void { + //Not used + } + + public static function addedentity(xp:int, yp:int, tp:int, p1:int, p2:int, p3:int, p4:int, p5:int, p6:int):void{ + edentity[editordata.numedentities].x=xp; + edentity[editordata.numedentities].y=yp; + edentity[editordata.numedentities].t=tp; + edentity[editordata.numedentities].p1=p1; + edentity[editordata.numedentities].p2=p2; + edentity[editordata.numedentities].p3=p3; + edentity[editordata.numedentities].p4=p4; + edentity[editordata.numedentities].p5=p5; + edentity[editordata.numedentities].p6=p6; + edentity[editordata.numedentities].scriptname = ""; + + editordata.numedentities++; + } + + public static function naddedentity(xp:int, yp:int, tp:int, p1:int, p2:int, p3:int, p4:int, p5:int, p6:int):void{ + edentity[editordata.numedentities].x=xp; + edentity[editordata.numedentities].y=yp; + edentity[editordata.numedentities].t=tp; + edentity[editordata.numedentities].p1=p1; + edentity[editordata.numedentities].p2=p2; + edentity[editordata.numedentities].p3=p3; + edentity[editordata.numedentities].p4=p4; + edentity[editordata.numedentities].p5=p5; + edentity[editordata.numedentities].p6=p6; + edentity[editordata.numedentities].scriptname=""; + } + + public static function copyedentity(a:int, b:int):void { + edentity[a].x = edentity[b].x; + edentity[a].y = edentity[b].y; + edentity[a].t = edentity[b].t; + edentity[a].p1 = edentity[b].p1; + edentity[a].p2 = edentity[b].p2; + edentity[a].p3 = edentity[b].p3; + edentity[a].p4 = edentity[b].p4; + edentity[a].p5 = edentity[b].p5; + edentity[a].p6 = edentity[b].p6; + edentity[a].scriptname = edentity[b].scriptname; + } + + public static function removeedentity(t:int):void { + if (t == editordata.numedentities - 1) { + editordata.numedentities--; + }else{ + for (var m:int = t; m < editordata.numedentities; m++) copyedentity(m, m + 1); + editordata.numedentities--; + } + } + + public static function edentat(xp:int, yp:int):int{ + for(var i:int=0; i=1){ + //Fill in this pixel + dwgfx.images[12].fillRect(new Rectangle((i2 * 48) + i, (j2 * 36) + j, 1, 1), dwgfx.RGBA(tm, tm, tm)); + } + } + } + } + } + }else if (mapheight <= 10 && mapwidth <= 10) { + //2x map + for (j2 = 0; j2 < mapheight; j2++) { + for (i2 = 0; i2 < mapwidth; i2++) { + //Ok, now scan over each square + tm = 196; + if (level[i2 + (j2 * maxwidth)].tileset == 1) tm = 96; + + for (j = 0; j < 18; j++) { + for (i = 0; i < 24; i++) { + temp = absfree(int(i * 1.6) + (i2 * 40), int(j * 1.6) + (j2 * 30)); + if (temp >= 1) { + //Fill in this pixel + dwgfx.images[12].fillRect(new Rectangle((i2 * 24) + i, (j2 * 18) + j, 1, 1), dwgfx.RGBA(tm, tm, tm)); + } + } + } + } + } + }else { + for (j2 = 0; j2 < mapheight; j2++) { + for (i2 = 0; i2 < mapwidth; i2++) { + //Ok, now scan over each square + tm=196; + if (level[i2 + (j2 * maxwidth)].tileset == 1) tm = 96; + + for (j = 0; j < 9; j++) { + for (i = 0; i < 12; i++) { + temp = absfree(3 + (i * 3) + (i2 * 40), (j * 3) + (j2 * 30)); + if(temp>=1){ + //Fill in this pixel + dwgfx.images[12].fillRect(new Rectangle((i2 * 12) + i, (j2 * 9) + j, 1, 1), dwgfx.RGBA(tm, tm, tm)); + } + } + } + } + } + } + } + + public static function editorrender(dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, obj:entityclass, help:helpclass):void { + //Not used + trace("ERROR: Editorrender called"); + } + + public static function editorlogic(dwgfx:dwgraphicsclass, game:gameclass, obj:entityclass, music:musicclass, map:mapclass, help:helpclass):void { + //Not used + trace("ERROR: Editorlogic called"); + } + + public static function editorinput(dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, obj:entityclass, help:helpclass, music:musicclass):void { + //Not used + trace("ERROR: Editorinput called"); + } + + public static var customscript:Vector. = new Vector.; + + public static var editordata:EditorDataclass = new EditorDataclass; + public static var edentity:Vector. = new Vector.; + + public static var Desc1:String; + public static var Desc2:String; + public static var Desc3:String; + public static var website:String; + + public static var directoryList:Vector. = new Vector.; + public static var ListOfMetaData:Vector. = new Vector.; + + public static var entcol:int; + + public static var swapmap:Vector. = new Vector.; + public static var contents:Vector. = new Vector.; + public static var vmult:Vector. = new Vector.; + public static var numtrinkets:int; + public static var numcrewmates:int; + public static var level:Vector. = new Vector.; + + public static var temp:int; + public static var notedelay:int; + public static var note:String; + public static var keybuffer:String; + public static var filename:String; + + public static var drawmode:int; + public static var tilex:int, tiley:int; + public static var keydelay:int, lclickdelay:int; + public static var savekey:Boolean, loadkey:Boolean; + public static var levx:int, levy:int; + public static var entframe:int, entframedelay:int; + + public static var roomtextmod:Boolean; + public static var roomtextent:int; + + public static var scripttextmod:Boolean; + public static var scripttextent:int; + public static var scripttexttype:int; + + public static var xmod:Boolean, zmod:Boolean, spacemod:Boolean, warpmod:Boolean; + public static var roomnamemod:Boolean, textentry:Boolean, savemod:Boolean, loadmod:Boolean; + public static var titlemod:Boolean, creatormod:Boolean, desc1mod:Boolean; + public static var desc2mod:Boolean, desc3mod:Boolean, websitemod:Boolean; + + public static var roomnamehide:int; + public static var saveandquit:Boolean; + public static var shiftmenu:Boolean, shiftkey:Boolean; + public static var spacemenu:int; + public static var settingsmod:Boolean, settingskey:Boolean; + public static var warpent:int; + public static var updatetiles:Boolean, changeroom:Boolean; + public static var deletekeyheld:int; + + public static var boundarymod:int, boundarytype:int; + public static var boundx1:int, boundx2:int, boundy1:int, boundy2:int; + + public static var levmusic:int; + public static var mapwidth:int, mapheight:int; //Actual width and height of stage + public static var maxwidth:int, maxheight:int; //Special; the physical max the engine allows + + public static var version:int; + + public static var m_editorSavePath:String; + + public static var scripteditmod:Boolean; + public static var scripthelppage:int, scripthelppagedelay:int; + public static var sb:Vector. = new Vector.; + public static var sbscript:String; + public static var sblength:int; + public static var sbx:int, sby:int; + public static var pagey:int; + + public static var author:String; + public static var description:String; + public static var title:String; + + public static var hooklist:Vector. = new Vector.; + public static var numhooks:int; + + public static var hookmenupage:int, hookmenu:int; + + //Direct Mode variables + public static var dmtile:int; + public static var dmtileeditor:int; + + public static var playerlevel:Vector. = new Vector.; + public static var playerlevel_spikyness:Vector. = new Vector.; + + [Embed(source='../data/playerlevels/4kvvvv.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_4kvvvv:Class; + [Embed(source='../data/playerlevels/333333_easy.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_333333_easy:Class; + [Embed(source='../data/playerlevels/a_new_dimension.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_a_new_dimension:Class; + [Embed(source='../data/playerlevels/linewrap.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_linewrap:Class; + [Embed(source='../data/playerlevels/pyramid.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_pyramid:Class; + [Embed(source='../data/playerlevels/quantumtunnel12.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_quantumtunnel12:Class; + [Embed(source='../data/playerlevels/roadtrip.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_roadtrip:Class; + [Embed(source='../data/playerlevels/seasons.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_seasons:Class; + [Embed(source='../data/playerlevels/soulsearching.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_soulsearching:Class; + [Embed(source='../data/playerlevels/the_dual_challenge.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_the_dual_challenge:Class; + [Embed(source='../data/playerlevels/towerofpower.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_towerofpower:Class; + [Embed(source='../data/playerlevels/variationventure.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_variationventure:Class; + [Embed(source='../data/playerlevels/varietyshow.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_varietyshow:Class; + [Embed(source='../data/playerlevels/vertexvortex.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_vertexvortex:Class; + [Embed(source='../data/playerlevels/vertiginousviridian.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_vertiginousviridian:Class; + [Embed(source='../data/playerlevels/victuals.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_victuals:Class; + [Embed(source='../data/playerlevels/vvvvvvgoldenspiral.vvvvvv', mimeType="application/octet-stream")] + public static const lvl_vvvvvvgoldenspiral:Class; + } +}; diff --git a/mobile_version/src/edlevelclass.as b/mobile_version/src/edlevelclass.as new file mode 100644 index 00000000..19f18a8f --- /dev/null +++ b/mobile_version/src/edlevelclass.as @@ -0,0 +1,28 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class edlevelclass{ + public function edlevelclass():void { + clear(); + } + + public function clear():void { + tileset = 0; tilecol = 0; + roomname = ""; + warpdir = 0; + platx1 = 0; platy1 = 0; platx2 = 320; platy2 = 240; platv = 4; + enemyx1 = 0; enemyy1 = 0; enemyx2 = 320; enemyy2 = 240; enemytype = 0; + directmode = 0; + } + + public var tileset:int, tilecol:int; + public var roomname:String; + public var warpdir:int; + public var platx1:int, platy1:int, platx2:int, platy2:int, platv:int; + public var enemyx1:int, enemyy1:int, enemyx2:int, enemyy2:int, enemytype:int; + public var directmode:int; + } +}; \ No newline at end of file diff --git a/mobile_version/src/entclass.as b/mobile_version/src/entclass.as new file mode 100644 index 00000000..c95c3e6e --- /dev/null +++ b/mobile_version/src/entclass.as @@ -0,0 +1,77 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class entclass extends Sprite { + public function entclass():void { + clear(); + } + + public function clear():void { + //Set all values to a default, required for creating a new entity + active = false; invis = false; + type = 0; size = 0; tile = 0; rule = 0; + state = 0; statedelay = 0; life = 0; colour = 0; para = 0; + behave = 0; animate = 0; + + xp = 0; yp = 0; ax = 0; ay = 0; vx = 0; vy = 0; + w = 16; h = 16; cx = 0; cy = 0; + newxp = 0; newyp = 0; + + x1 = 0; y1 = 0; x2 = 320; y2 = 240; + + jumping = false; gravity = false; onground = 0; onroof = 0; jumpframe = 0; + + onentity = 0; harmful = false; onwall = 0; onxwall = 0; onywall = 0; isplatform = false; + + framedelay = 0; drawframe = 0; walkingframe = 0; dir = 0; actionframe = 0; + } + + public function outside():Boolean { + //returns true if any point of the entity is outside the map. adjusts velocity for a clean collision. + if (xp < x1){ + xp = x1; + return true; + } + if (yp < y1) { + yp = y1; + return true; + } + if (xp + w > x2) { + xp = x2 - w; + return true; + } + if (yp + h > y2) { + yp = y2 - h; + return true; + } + return false; + } + + //Fundamentals + public var active:Boolean, invis:Boolean; + public var type:int, size:int, tile:int, rule:int; + public var state:int, statedelay:int; + public var behave:int, animate:int, para:int; + public var life:int, colour:int; + //Position and velocity + public var xp:Number, yp:Number, oldxp:Number, oldyp:Number; + public var ax:Number, ay:Number, vx:Number, vy:Number; + public var cx:int, cy:int, w:int, h:int; + public var newxp:Number, newyp:Number; //For collision functions + public var isplatform:Boolean; + public var x1:int, y1:int, x2:int, y2:int; + //Collision Rules + public var onentity:int; + public var harmful:Boolean; + public var onwall:int, onxwall:int, onywall:int; + + //Platforming specific + public var jumping:Boolean, gravity:Boolean, onground:int, onroof:int; + public var jumpframe:int; + //Animation + public var framedelay:int, drawframe:int, walkingframe:int, dir:int, actionframe:int; + } +} diff --git a/mobile_version/src/entityclass.as b/mobile_version/src/entityclass.as new file mode 100644 index 00000000..6d7fdba5 --- /dev/null +++ b/mobile_version/src/entityclass.as @@ -0,0 +1,4022 @@ +package { + import bigroom.input.KeyPoll; + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class entityclass extends Sprite { + static public var BLOCK:Number = 0; + static public var TRIGGER:Number = 1; + static public var DAMAGE:Number = 2; + static public var DIRECTIONAL:Number = 3; + static public var SAFE:Number = 4; + static public var ACTIVITY:Number = 5; + + public var opt_useblock:Boolean; + public var opt_usetrigger:Boolean; + public var opt_usedamage:Boolean; + public var opt_usedirectional:Boolean; + public var opt_usesafe:Boolean; + public var opt_useactivity:Boolean; + + public function init():void { + nentity = 0; + nblocks = 0; + temprect = new Rectangle(); + temprect2 = new Rectangle(); + colpoint1 = new Point; colpoint2 = new Point; + + skipdirblocks = false; + customplatformtile=0; + platformtile = 0; vertplatforms = false; horplatforms = false; + + nearelephant = false; + upsetmode = false; upset = 0; + + trophytext = 0 ; trophytype = 0; + altstates = 0; + + for (var i:int = 0; i < 6; i++) { + customcrewmoods.push(1); + } + + for (i = 0; i < 100; i++) { + var t:int = 0; flags.push(t); + } + + for (i = 0; i < 500; i++) { + var block:blockclass = new blockclass; + blocks.push(block); + } + + for (var z:Number = 0; z < 200; z++) { + var entity:entclass = new entclass; + entities.push(entity); + } + + for (i = 0; i < 20; i++) { + var lcross:entclass = new entclass; + linecrosskludge.push(lcross); + collect.push(new int); + customcollect.push(new int(0)); + } + nlinecrosskludge = 0; + } + + public function resetallflags():void { + for (var i:Number = 0; i < 100; i++) { + flags[i] = 0; + } + } + + public function resetflags():void { + for (var i:Number = 0; i < 100; i++) { + if (flags[i] == 2) flags[i] = 0; + } + } + + public function confirmflags():void { + for (var i:Number = 0; i < 100; i++) { + if (flags[i] == 2) flags[i] = 1; + } + } + + public function changecollect(t:int, s:int):void { + collect[t] = s; + } + + public function changecustomcollect(t:int, s:int):void { + customcollect[t] = s; + } + + public function changeflag(t:int, s:int):void { + flags[t] = s; + } + + public function fatal_top():void { createblock(DAMAGE, -8, -8, 384, 16); } + public function fatal_bottom():void { createblock(DAMAGE, -8, 224, 384, 16); } + public function fatal_left():void { createblock(DAMAGE, -8, -8, 16, 260); } + public function fatal_right():void { createblock(DAMAGE, 312, -8, 16, 260); } + + public function setblockcolour(t:int, col:String):void { + if (col == "cyan") { blocks[t].r = 164; blocks[t].g = 164; blocks[t].b = 255; + }else if (col == "red") { blocks[t].r = 255; blocks[t].g = 60; blocks[t].b = 60; + }else if (col == "green") { blocks[t].r = 144; blocks[t].g = 255; blocks[t].b = 144; + }else if (col == "yellow") { blocks[t].r = 255; blocks[t].g = 255; blocks[t].b = 134; + }else if (col == "blue") { blocks[t].r = 95; blocks[t].g = 95; blocks[t].b = 255; + }else if (col == "purple") { blocks[t].r = 255; blocks[t].g = 134; blocks[t].b = 255; + }else if (col == "white") { blocks[t].r = 244; blocks[t].g = 244; blocks[t].b = 244; + }else if (col == "gray") { blocks[t].r = 174; blocks[t].g = 174; blocks[t].b = 174; + }else if (col == "orange") { blocks[t].r = 255; blocks[t].g = 130; blocks[t].b = 20; + }else { + //use a gray + blocks[t].r = 174; blocks[t].g = 174; blocks[t].b = 174; + } + } + + public function swncolour(t:int):int { + //given colour t, return colour in setcol + if (t == 0) return 11; + if (t == 1) return 6; + if (t == 2) return 8; + if (t == 3) return 12; + if (t == 4) return 9; + if (t == 5) return 7; + return 0; + } + + public function swnenemiescol(t:int):void { + //change the colour of all SWN enemies to the current one + for (i = 0; i < nentity; i++) { + if (entities[i].active) { + if (entities[i].type == 23) { + entities[i].colour = swncolour(t); + } + } + } + } + + public function gravcreate(game:gameclass, ypos:int, dir:int, xoff:int = 0, yoff:int = 0):void { + if (dir == 0) { + createentity(game, -150 - xoff, 58 + (ypos * 20)+yoff, 23, 0, 0); + }else{ + createentity(game, 320+150 + xoff, 58 + (ypos * 20)+yoff, 23, 1, 0); + } + } + + public function generateswnwave(game:gameclass, help:helpclass, t:int):void { + //generate a wave for the SWN game + if(game.swndelay<=0){ + if (t == 0) { //game 0, survive for 30 seconds + switch(game.swnstate) { + case 0: + //Decide on a wave here + //default case + game.swnstate = 1; game.swndelay = 5; + + if (game.swntimer <= 150) { //less than 5 seconds + game.swnstate = 9; game.swndelay = 8; + }else if (game.swntimer <= 300) { //less than 10 seconds + game.swnstate = 6; game.swndelay = 12; + }else if (game.swntimer <= 360) { //less than 12 seconds + game.swnstate = 5+game.swnstate2; game.swndelay = 15; + }else if (game.swntimer <= 420) { //less than 14 seconds + game.swnstate = 7+game.swnstate2; game.swndelay = 15; + }else if (game.swntimer <= 480) { //less than 16 seconds + game.swnstate = 5+game.swnstate2; game.swndelay = 15; + }else if (game.swntimer <= 540) { //less than 18 seconds + game.swnstate = 7+game.swnstate2; game.swndelay = 15; + }else if (game.swntimer <= 600) { //less than 20 seconds + game.swnstate = 5+game.swnstate2; game.swndelay = 15; + }else if (game.swntimer <= 900) { //less than 30 seconds + game.swnstate = 4; game.swndelay = 20; + }else if (game.swntimer <= 1050) { //less than 35 seconds + game.swnstate = 3; game.swndelay = 10; + }else if (game.swntimer <= 1200) { //less than 40 seconds + game.swnstate = 3; game.swndelay = 20; + }else if (game.swntimer <= 1500) { //less than 50 seconds + game.swnstate = 2; game.swndelay = 10; + }else if (game.swntimer <= 1650) { //less than 55 seconds + game.swnstate = 1; game.swndelay = 15; + }else if (game.swntimer <= 1800) { //less than 60 seconds + game.swnstate = 1; game.swndelay = 25; + } + + if (game.deathcounts - game.swndeaths > 7) game.swndelay += 2; + if (game.deathcounts - game.swndeaths > 15) game.swndelay += 2; + if (game.deathcounts - game.swndeaths > 25) game.swndelay += 4; + break; + case 1: + createentity(game, -150, 58 + (int(Math.random() * 6) * 20), 23, 0, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + break; + case 2: + if(game.swnstate3==0){ + game.swnstate2++; + if (game.swnstate2 >= 6) { + game.swnstate3 = 1; + game.swnstate2--; + } + }else { + game.swnstate2--; + if (game.swnstate2 < 0) { + game.swnstate3 = 0; + game.swnstate2++; + } + } + createentity(game, -150, 58 + (int(game.swnstate2) * 20), 23, 0, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + break; + case 3: + createentity(game, 320+150, 58 + (int(Math.random() * 6) * 20), 23, 1, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + break; + case 4: + //left and right compliments + game.swnstate2 = int(Math.random() * 6); + createentity(game, -150, 58 + (game.swnstate2 * 20), 23, 0, 0); + createentity(game, 320+150, 58 + ((5-game.swnstate2) * 20), 23, 1, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + game.swnstate2 = 0; + break; + case 5: + //Top and bottom + createentity(game, -150, 58, 23, 0, 0); + createentity(game, -150, 58 + (5 * 20), 23, 0, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + game.swnstate2 = 1; + break; + case 6: + //Middle + createentity(game, -150, 58 + (2 * 20), 23, 0, 0); + createentity(game, -150, 58 + (3 * 20), 23, 0, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + game.swnstate2 = 0; + break; + case 7: + //Top and bottom + createentity(game, 320+150, 58, 23, 1, 0); + createentity(game, 320+150, 58 + (5 * 20), 23, 1, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + game.swnstate2 = 1; + break; + case 8: + //Middle + createentity(game, 320+150, 58 + (2 * 20), 23, 1, 0); + createentity(game, 320+150, 58 + (3 * 20), 23, 1, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + game.swnstate2 = 0; + break; + case 9: + if(game.swnstate3==0){ + game.swnstate2++; + if (game.swnstate2 >= 6) { + game.swnstate3 = 1; + game.swnstate2--; + } + }else { + game.swnstate2--; + if (game.swnstate2 < 0) { + game.swnstate3 = 0; + game.swnstate2++; + } + } + createentity(game, 320 + 150, 58 + (int(game.swnstate2) * 20), 23, 1, 0); + game.swnstate = 0; game.swndelay = 0; //return to decision state + break; + } + }else if (t == 1) { + //Game 2, super gravitron + switch(game.swnstate) { + case 0: + //Choose either simple or filler + game.swnstate2 = 0; game.swnstate3 = 0; game.swnstate4 = 0; + + game.swnstate2 = int(Math.random() * 100); + if (game.swnstate2 < 25) { + //simple + game.swnstate = 2; game.swndelay = 0; + }else { + //filler + game.swnstate = 4; game.swndelay = 0; + } + game.swnstate2 = 0; + break; + case 1: + //complex chain + game.swnstate2 = int(Math.random() * 8); + if (game.swnstate2 == 0) { game.swnstate = 10; game.swndelay = 0; + }else if (game.swnstate2 == 1) { game.swnstate = 12; game.swndelay = 0; + }else if (game.swnstate2 == 2) { game.swnstate = 14; game.swndelay = 0; + }else if (game.swnstate2 == 3) { game.swnstate = 20; game.swndelay = 0; + }else if (game.swnstate2 == 4) { game.swnstate = 21; game.swndelay = 0; + }else if (game.swnstate2 == 5) { game.swnstate = 22; game.swndelay = 0; + }else if (game.swnstate2 == 6) { game.swnstate = 22; game.swndelay = 0; + }else if (game.swnstate2 == 7) { game.swnstate = 14; game.swndelay = 0; + } + + game.swnstate2 = 0; + break; + case 2: + //simple chain + game.swnstate2 = int(Math.random() * 6); + if (game.swnstate2 == 0) { game.swnstate = 23; game.swndelay = 0; + }else if (game.swnstate2 == 1) { game.swnstate = 24; game.swndelay = 0; + }else if (game.swnstate2 == 2) { game.swnstate = 25; game.swndelay = 0; + }else if (game.swnstate2 == 3) { game.swnstate = 26; game.swndelay = 0; + }else if (game.swnstate2 == 4) { game.swnstate = 27; game.swndelay = 0; + }else if (game.swnstate2 == 5) { game.swnstate = 14; game.swndelay = 0; + } + + game.swnstate2 = 0; + break; + case 3: + //Choose a major action + game.swnstate2 = int(Math.random() * 100); + if (game.swnstate2 < 25) { + //complex + game.swnstate = 1; game.swndelay = 0; + }else { + //simple + game.swnstate = 2; game.swndelay = 0; + } + break; + case 4: + //filler chain + game.swnstate2 = int(Math.random() * 6); + if (game.swnstate2 == 0) { game.swnstate = 28; game.swndelay = 0; + }else if (game.swnstate2 == 1) { game.swnstate = 29; game.swndelay = 0; + }else if (game.swnstate2 == 2) { game.swnstate = 28; game.swndelay = 0; + }else if (game.swnstate2 == 3) { game.swnstate = 29; game.swndelay = 0; + }else if (game.swnstate2 == 4) { game.swnstate = 30; game.swndelay = 0; + }else if (game.swnstate2 == 5) { game.swnstate = 31; game.swndelay = 0; + } + + game.swnstate2 = 0; + break; + case 10: + gravcreate(game, 0, 0); + gravcreate(game, 1, 0); + gravcreate(game, 2, 0); + game.swnstate++; game.swndelay = 10; //return to decision state + break; + case 11: + gravcreate(game, 3, 0); + gravcreate(game, 4, 0); + gravcreate(game, 5, 0); + game.swnstate2++; + if(game.swnstate2==3){ + game.swnstate = 0; game.swndelay = 30; //return to decision state + }else { + game.swnstate--; game.swndelay = 10; //return to decision state + } + break; + case 12: + gravcreate(game, 0, 1); + gravcreate(game, 1, 1); + gravcreate(game, 2, 1); + game.swnstate++; game.swndelay = 10; //return to decision state + break; + case 13: + gravcreate(game, 3, 1); + gravcreate(game, 4, 1); + gravcreate(game, 5, 1); + game.swnstate2++; + if(game.swnstate2==3){ + game.swnstate = 0; game.swndelay = 30; //return to decision state + }else { + game.swnstate--; game.swndelay = 10; //return to decision state + } + break; + case 14: + gravcreate(game, 0, 0, 0); + gravcreate(game, 5, 1, 0); + + game.swnstate++; game.swndelay = 20; //return to decision state + break; + case 15: + gravcreate(game, 1, 0); + gravcreate(game, 4, 1); + + game.swnstate++; game.swndelay = 20; //return to decision state + break; + case 16: + gravcreate(game, 2, 0); + gravcreate(game, 3, 1); + + game.swnstate++; game.swndelay = 20; //return to decision state + break; + case 17: + gravcreate(game, 3, 0); + gravcreate(game, 2, 1); + + game.swnstate++; game.swndelay = 20; //return to decision state + break; + case 18: + gravcreate(game, 4, 0); + gravcreate(game, 1, 1); + + game.swnstate++; game.swndelay = 20; //return to decision state + break; + case 19: + gravcreate(game, 5, 0); + gravcreate(game, 0, 1); + + game.swnstate=0; game.swndelay = 20; //return to decision state + break; + case 20: + game.swnstate4++; + if(game.swnstate3==0){ + game.swnstate2++; + if (game.swnstate2 >= 6) { + game.swnstate3 = 1; + game.swnstate2--; + } + }else { + game.swnstate2--; + if (game.swnstate2 < 0) { + game.swnstate3 = 0; + game.swnstate2++; + } + } + createentity(game, -150, 58 + (int(game.swnstate2) * 20), 23, 0, 0); + if(game.swnstate4<=6){ + game.swnstate = 20; game.swndelay = 10; //return to decision state + }else { + game.swnstate = 0; game.swndelay = 10; //return to decision state + } + break; + case 21: + game.swnstate4++; + if(game.swnstate3==0){ + game.swnstate2++; + if (game.swnstate2 >= 6) { + game.swnstate3 = 1; + game.swnstate2--; + } + }else { + game.swnstate2--; + if (game.swnstate2 < 0) { + game.swnstate3 = 0; + game.swnstate2++; + } + } + createentity(game, 320+150, 58 + (int(game.swnstate2) * 20), 23, 1, 0); + if(game.swnstate4<=6){ + game.swnstate = 21; game.swndelay = 10; //return to decision state + }else { + game.swnstate = 0; game.swndelay = 10; //return to decision state + } + break; + case 22: + game.swnstate4++; + //left and right compliments + game.swnstate2 = int(Math.random() * 6); + createentity(game, -150, 58 + (game.swnstate2 * 20), 23, 0, 0); + createentity(game, 320 + 150, 58 + ((5 - game.swnstate2) * 20), 23, 1, 0); + if(game.swnstate4<=12){ + game.swnstate = 22; game.swndelay = 18; //return to decision state + }else { + game.swnstate = 0; game.swndelay = 18; //return to decision state + } + game.swnstate2 = 0; + break; + case 23: + gravcreate(game, 1, 0); + gravcreate(game, 2, 0, 15); + gravcreate(game, 2, 0, -15); + gravcreate(game, 3, 0, 15); + gravcreate(game, 3, 0, -15); + gravcreate(game, 4, 0); + game.swnstate = 0; game.swndelay = 15; //return to decision state + break; + case 24: + gravcreate(game, 1, 1); + gravcreate(game, 2, 1, 15); + gravcreate(game, 2, 1, -15); + gravcreate(game, 3, 1, 15); + gravcreate(game, 3, 1, -15); + gravcreate(game, 4, 1); + game.swnstate = 0; game.swndelay = 15; //return to decision state + break; + case 25: + gravcreate(game, 0, 0); + gravcreate(game, 1, 1,0,10); + gravcreate(game, 4, 1,0,-10); + gravcreate(game, 5, 0); + game.swnstate = 0; game.swndelay = 20; //return to decision state + break; + case 26: + gravcreate(game, 0, 1, 0); + gravcreate(game, 1, 1, 10); + gravcreate(game, 4, 1, 40); + gravcreate(game, 5, 1, 50); + game.swnstate = 0; game.swndelay = 20; //return to decision state + break; + case 27: + gravcreate(game, 0, 0, 0); + gravcreate(game, 1, 0, 10); + gravcreate(game, 4, 0, 40); + gravcreate(game, 5, 0, 50); + game.swnstate = 0; game.swndelay = 20; //return to decision state + break; + case 28: + game.swnstate4++; + game.swnstate2 = int(Math.random() * 6); + createentity(game, -150, 58 + (game.swnstate2 * 20), 23, 0, 0); + if(game.swnstate4<=6){ + game.swnstate = 28; game.swndelay = 8; //return to decision state + }else { + game.swnstate = 3; game.swndelay = 15; //return to decision state + } + game.swnstate2 = 0; + break; + case 29: + game.swnstate4++; + game.swnstate2 = int(Math.random() * 6); + gravcreate(game, game.swnstate2, 1); + if(game.swnstate4<=6){ + game.swnstate = 29; game.swndelay = 8; //return to decision state + }else { + game.swnstate = 3; game.swndelay = 15; //return to decision state + } + game.swnstate2 = 0; + break; + case 30: + game.swnstate4++; + game.swnstate2 = int(Math.random() * 3); + gravcreate(game, game.swnstate2, 0); + gravcreate(game, 5-game.swnstate2, 0); + if(game.swnstate4<=2){ + game.swnstate = 30; game.swndelay = 14; //return to decision state + }else { + game.swnstate = 3; game.swndelay = 15; //return to decision state + } + game.swnstate2 = 0; + break; + case 31: + game.swnstate4++; + game.swnstate2 = int(Math.random() * 3); + gravcreate(game, game.swnstate2, 1); + gravcreate(game, 5-game.swnstate2, 1); + if(game.swnstate4<=2){ + game.swnstate = 31; game.swndelay = 14; //return to decision state + }else { + game.swnstate = 3; game.swndelay = 15; //return to decision state + } + game.swnstate2 = 0; + break; + } + } + }else { + game.swndelay--; + } + } + + public function createblock(t:int, xp:int=0, yp:int=0, w:int=0, h:int=0, trig:int=0):void{ + if(nblocks == 0) { + //If there are no active blocks, Z=0; + k = 0; nblocks++; + }else { + i = 0; k = -1; + while (i < nblocks) { + if (!blocks[i].active) { + k = i; i = nblocks; + } + i++; + } + if (k == -1) { + k = nblocks; + nblocks++; + } + } + + blocks[k].clear(); + blocks[k].active = true; + switch(t) { + case BLOCK: //Block + blocks[k].type = BLOCK; + blocks[k].xp = xp; + blocks[k].yp = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + + opt_useblock = true; + break; + case TRIGGER: //Trigger + blocks[k].type = TRIGGER; + blocks[k].x = xp; + blocks[k].y = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + blocks[k].trigger = trig; + + opt_usetrigger = true; + break; + case DAMAGE: //Damage + blocks[k].type = DAMAGE; + blocks[k].x = xp; + blocks[k].y = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + + opt_usedamage = true; + break; + case DIRECTIONAL: //Directional + blocks[k].type = DIRECTIONAL; + blocks[k].x = xp; + blocks[k].y = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + blocks[k].trigger = trig; + + opt_usedirectional = true; + break; + case SAFE: //Safe block + blocks[k].type = SAFE; + blocks[k].xp = xp; + blocks[k].yp = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + + opt_usesafe = true; + break; + case ACTIVITY: //Activity Zone + blocks[k].type = ACTIVITY; + blocks[k].x = xp; + blocks[k].y = yp; + blocks[k].wp = w; + blocks[k].hp = h; + blocks[k].rectset(xp, yp, w, h); + + opt_useactivity = true; + + //Ok, each and every activity zone in the game is initilised here. "Trig" in this case is a variable that + //assigns all the details. + switch(trig) { + case 0: //testing zone + blocks[k].prompt = "Press ENTER to explode"; + if(mobilemenus) blocks[k].prompt = "Explode"; + blocks[k].script = "intro"; + setblockcolour(k, "orange"); + trig=1; + break; + case 1: + blocks[k].prompt = "Press ENTER to talk to Violet"; + if(mobilemenus) blocks[k].prompt = "Talk to Violet"; + blocks[k].script = "talkpurple"; + setblockcolour(k, "purple"); + trig=0; + break; + case 2: + blocks[k].prompt = "Press ENTER to talk to Vitellary"; + if(mobilemenus) blocks[k].prompt = "Talk to Vitellary"; + blocks[k].script = "talkyellow"; + setblockcolour(k, "yellow"); + trig=0; + break; + case 3: + blocks[k].prompt = "Press ENTER to talk to Vermilion"; + if(mobilemenus) blocks[k].prompt = "Talk to Vermilion"; + blocks[k].script = "talkred"; + setblockcolour(k, "red"); + trig=0; + break; + case 4: + blocks[k].prompt = "Press ENTER to talk to Verdigris"; + if(mobilemenus) blocks[k].prompt = "Talk to Verdigris"; + blocks[k].script = "talkgreen"; + setblockcolour(k, "green"); + trig=0; + break; + case 5: + blocks[k].prompt = "Press ENTER to talk to Victoria"; + if(mobilemenus) blocks[k].prompt = "Talk to Victoria"; + blocks[k].script = "talkblue"; + setblockcolour(k, "blue"); + trig=0; + break; + case 6: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_station_1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 7: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_outside_1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 8: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_outside_2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 9: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_outside_3"; + setblockcolour(k, "orange"); + trig=0; + break; + case 10: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_outside_4"; + setblockcolour(k, "orange"); + trig=0; + break; + case 11: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_outside_5"; + setblockcolour(k, "orange"); + trig=0; + break; + case 12: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_outside_6"; + setblockcolour(k, "orange"); + trig=0; + break; + case 13: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_finallevel"; + setblockcolour(k, "orange"); + trig=0; + break; + case 14: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_station_2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 15: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_station_3"; + setblockcolour(k, "orange"); + trig=0; + break; + case 16: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_station_4"; + setblockcolour(k, "orange"); + trig=0; + break; + case 17: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_warp_1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 18: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_warp_2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 19: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_lab_1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 20: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_lab_2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 21: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_secretlab"; + setblockcolour(k, "orange"); + trig=0; + break; + case 22: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_shipcomputer"; + setblockcolour(k, "orange"); + trig=0; + break; + case 23: + blocks[k].prompt = "Press ENTER to activate terminals"; + if(mobilemenus) blocks[k].prompt = "Activate terminals"; + blocks[k].script = "terminal_radio"; + setblockcolour(k, "orange"); + trig=0; + break; + case 24: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "terminal_jukebox"; + setblockcolour(k, "orange"); + trig=0; + break; + case 25: + blocks[k].prompt = "Passion for exploring"; + blocks[k].script = "terminal_juke1"; + setblockcolour(k, "orange"); + trig=0; + break; + case 26: + blocks[k].prompt = "Pushing onwards"; + blocks[k].script = "terminal_juke2"; + setblockcolour(k, "orange"); + trig=0; + break; + case 27: + blocks[k].prompt = "Positive force"; + blocks[k].script = "terminal_juke3"; + setblockcolour(k, "orange"); + trig=0; + break; + case 28: + blocks[k].prompt = "Presenting VVVVVV"; + blocks[k].script = "terminal_juke4"; + setblockcolour(k, "orange"); + trig=0; + break; + case 29: + blocks[k].prompt = "Potential for anything"; + blocks[k].script = "terminal_juke5"; + setblockcolour(k, "orange"); + trig=0; + break; + case 30: + blocks[k].prompt = "Predestined fate"; + blocks[k].script = "terminal_juke6"; + setblockcolour(k, "orange"); + trig=0; + break; + case 31: + blocks[k].prompt = "Pipe Dream"; + blocks[k].script = "terminal_juke7"; + setblockcolour(k, "orange"); + trig=0; + break; + case 32: + blocks[k].prompt = "Popular Potpourri"; + blocks[k].script = "terminal_juke8"; + setblockcolour(k, "orange"); + trig=0; + break; + case 33: + blocks[k].prompt = "Pressure Cooker"; + blocks[k].script = "terminal_juke9"; + setblockcolour(k, "orange"); + trig=0; + break; + case 34: + blocks[k].prompt = "ecrof evitisoP"; + blocks[k].script = "terminal_juke10"; + setblockcolour(k, "orange"); + trig=0; + break; + case 35: + blocks[k].prompt = "Press ENTER to activate terminal"; + if(mobilemenus) blocks[k].prompt = "Activate terminal"; + blocks[k].script = "custom_"+customscript; + setblockcolour(k, "orange"); + trig=0; + break; + } + break; + } + } + + public function removeallblocks():void{ + for(i=0; i= 113 && game.roomx <= 117)) { + setenemy(0, k); + setenemyroom(k, game.roomx, game.roomy); //For colour + }else if (game.roomx == 113 && (game.roomy <= 110 && game.roomy >= 108)) { + setenemy(1, k); + setenemyroom(k, game.roomx, game.roomy); //For colour + }else if (game.roomx == 113 && game.roomy == 107) { + //MAVVERRRICK + entities[k].tile = 96; entities[k].colour = 6; entities[k].size = 9; + entities[k].w = 64; entities[k].h = 44; + entities[k].animate = 4; + }else { + setenemyroom(k, game.roomx, game.roomy); + } + + + //}else{*/ + /* + entities[k].tile = 24; + entities[k].animate = 0; + entities[k].colour = 8; + //for warpzone: + if (game.roomx == 51 && game.roomy == 51) entities[k].colour = 6; + if (game.roomx == 52 && game.roomy == 51) entities[k].colour = 7; + if (game.roomx == 54 && game.roomy == 49) entities[k].colour = 11; + if (game.roomx == 55 && game.roomy == 50) entities[k].colour = 9; + if (game.roomx == 55 && game.roomy == 51) entities[k].colour = 6; + if (game.roomx == 54 && game.roomy == 51) entities[k].colour = 12; + if (game.roomx == 54 && game.roomy == 52) entities[k].colour = 7; + if (game.roomx == 53 && game.roomy == 52) entities[k].colour = 8; + if (game.roomx == 51 && game.roomy == 52) entities[k].colour = 6; + if (game.roomx == 52 && game.roomy == 49) entities[k].colour = 8; + //} + */ + break; + case 2: //A moving platform + entities[k].rule = 2; entities[k].type = 1; + entities[k].size = 2; entities[k].tile = 1; + + if (customplatformtile > 0){ + entities[k].tile = customplatformtile; + }else if (platformtile > 0) { + entities[k].tile = platformtile; + }else{ + //appearance again depends on location + if (gridmatch(p1, p2, p3, p4, 100, 70, 320, 160)) entities[k].tile = 616; + if (gridmatch(p1, p2, p3, p4, 72, 0, 248, 240)) entities[k].tile = 610; + if (gridmatch(p1, p2, p3, p4, -20, 0, 320, 240)) entities[k].tile = 413; + + if (gridmatch(p1, p2, p3, p4, -96, -72, 400, 312)) entities[k].tile = 26; + if (gridmatch(p1, p2, p3, p4, -32, -40, 352, 264)) entities[k].tile = 27; + } + + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 32; entities[k].h = 8; + + if (vx <= 1) vertplatforms = true; + if (vx >= 2 && vx <= 5) horplatforms = true; + if (vx == 14 || vx == 15) horplatforms = true; //special case for last part of Space Station + if (vx >= 6 && vx <= 7) vertplatforms = true; + + if (vx >= 10 && vx <= 11) { + //Double sized threadmills + entities[k].w = 64; entities[k].h = 8; + vx -= 2; entities[k].size = 8; + } + + entities[k].behave = vx; entities[k].para = vy; + + if (vx >= 8 && vx <= 9) { + horplatforms = true; //threadmill! + entities[k].animate = 10; + if(customplatformtile>0){ + entities[k].tile = customplatformtile+4; + if (vx == 8) entities[k].tile += 4; + if (vx == 9) entities[k].animate = 11; + }else{ + settreadmillcolour(k, game.roomx, game.roomy); + if (vx == 8) entities[k].tile += 40; + if (vx == 9) entities[k].animate = 11; + } + + }else { + entities[k].animate = 100; + } + + entities[k].x1 = p1; entities[k].y1 = p2; + entities[k].x2 = p3; entities[k].y2 = p4; + + entities[k].isplatform = true; + + createblock(0, xp, yp, 32, 8); + break; + case 3: //Disappearing platforms + entities[k].rule = 3; entities[k].type = 2; + entities[k].size = 2; + entities[k].tile = 2; + //appearance again depends on location + if(customplatformtile>0){ + entities[k].tile=customplatformtile; + }else if (vx > 0) { + entities[k].tile = int(vx); + }else{ + if(game.roomx==49 && game.roomy==52) entities[k].tile = 18; + if (game.roomx == 50 && game.roomy == 52) entities[k].tile = 22; + } + + entities[k].xp = xp; entities[k].yp = yp; + entities[k].cy = -1; + entities[k].w = 32; entities[k].h = 10; + entities[k].behave = vx; entities[k].para = vy; + entities[k].onentity = 1; + entities[k].animate = 100; + + createblock(0, xp, yp, 32, 8); + break; + case 4: //Breakable blocks + entities[k].rule = 6; entities[k].type = 3; + entities[k].size = 1; + entities[k].tile = 10; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].cy = -1; + entities[k].w = 8; entities[k].h = 10; + entities[k].behave = vx; entities[k].para = vy; + entities[k].onentity = 1; + entities[k].animate = 100; + + createblock(0, xp, yp, 8, 8); + break; + case 5: //Gravity Tokens + entities[k].rule = 3; entities[k].type = 4; + entities[k].size = 0; entities[k].tile = 11; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].behave = vx; entities[k].para = vy; + entities[k].onentity = 1; + entities[k].animate = 100; + break; + case 6: //Decorative particles + entities[k].rule = 2; entities[k].type = 5; //Particles + entities[k].colour = 1; entities[k].size = 3; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].vx = vx; + entities[k].vy = vy; + + entities[k].life = 12; + break; + case 7: //Decorative particles + entities[k].rule = 2; entities[k].type = 5; //Particles + entities[k].colour = 2; entities[k].size = 3; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].vx = vx; + entities[k].vy = vy; + + entities[k].life = 12; + break; + case 8: //Small collectibles + entities[k].rule = 3; entities[k].type = 6; + entities[k].size = 4; entities[k].tile = 48; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 8; entities[k].h = 8; + entities[k].onentity = 1; + entities[k].animate = 100; + + //Check if it's already been collected + entities[k].para = vx; + if (collect[vx] == 1) entities[k].active = false; + break; + case 9: //Something Shiny + entities[k].rule = 3; entities[k].type = 7; + entities[k].size = 0; entities[k].tile = 22; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].colour = 3; + entities[k].onentity = 1; + entities[k].animate = 100; + + //Check if it's already been collected + entities[k].para = vx; + if (collect[vx] == 1) entities[k].active = false; + break; + case 10: //Savepoint + entities[k].rule = 3; entities[k].type = 8; + entities[k].size = 0; entities[k].tile = 20 + vx; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].colour = 4; + entities[k].onentity = 1; + entities[k].animate = 100; + entities[k].para = vy; + + if (game.savepoint == vy) { + entities[k].colour = 5; + entities[k].onentity = 0; + } + + if (game.nodeathmode) { + entities[k].active = false; + } + break; + case 11: //Horizontal Gravity Line + entities[k].rule = 4; entities[k].type = 9; + entities[k].size = 5; entities[k].life = 0; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = vx; entities[k].h = 1; + entities[k].onentity = 1; + break; + case 12: //Vertical Gravity Line + entities[k].rule = 5; entities[k].type = 10; + entities[k].size = 6; entities[k].life = 0; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 1; entities[k].h = vx; + //entities[k].colour = 0; + entities[k].onentity = 1; + break; + case 13: //Warp token + entities[k].rule = 3; entities[k].type = 11; + entities[k].size = 0; entities[k].tile = 18; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].colour = 10; + entities[k].onentity = 1; + entities[k].animate = 2; + + //Added in port, hope it doesn't break anything + entities[k].behave = vx; + entities[k].para = vy; + break; + case 14: // Teleporter + entities[k].rule = 3; entities[k].type = 100; + entities[k].size = 7; entities[k].tile = 1; //inactive + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 96; entities[k].h = 96; + entities[k].colour = 100; + entities[k].onentity = 1; + entities[k].animate = 100; + entities[k].para = vy; + + //we'll init it's activeness here later + /*if (game.savepoint == vy) { + entities[k].colour = 5; + entities[k].onentity = 0; + }*/ + break; + case 15: // Crew Member (warp zone) + entities[k].rule = 6; entities[k].type = 12; //A special case! + entities[k].tile = 144; entities[k].colour = 13; //144 for sad :( + entities[k].xp = xp; entities[k].yp = yp; + entities[k].cx = 6; entities[k].cy = 2; + entities[k].w = 12; entities[k].h = 21; + entities[k].dir = 0; + + entities[k].state = vx; + + entities[k].gravity = true; + break; + case 16: // Crew Member, upside down (space station) + entities[k].rule = 7; entities[k].type = 12; //A special case! + entities[k].tile = 144+6; entities[k].colour = 14; //144 for sad (upside down+12):( + entities[k].xp = xp; entities[k].yp = yp; + entities[k].cx = 6; entities[k].cy = 2; + entities[k].w = 12; entities[k].h = 21; + entities[k].dir = 1; + + entities[k].state = vx; + + entities[k].gravity = true; + break; + case 17: // Crew Member (Lab) + entities[k].rule = 6; entities[k].type = 12; //A special case! + entities[k].tile = 144; entities[k].colour = 16; //144 for sad :( + entities[k].xp = xp; entities[k].yp = yp; + entities[k].cx = 6; entities[k].cy = 2; + entities[k].w = 12; entities[k].h = 21; + entities[k].dir = 1; + + entities[k].state = vx; + + entities[k].gravity = true; + break; + case 18: // Crew Member (Ship) + //This is the scriping crewmember + entities[k].rule = 6; entities[k].type = 12; //A special case! + entities[k].colour = vx; + if (vy == 0) { + entities[k].tile = 0; + }else { + entities[k].tile = 144; + } + entities[k].xp = xp; entities[k].yp = yp; + entities[k].cx = 6; entities[k].cy = 2; + entities[k].w = 12; entities[k].h = 21; + entities[k].dir = 0; + + entities[k].state = p1; + entities[k].para = p2; + + if (p1 == 17) { + entities[k].dir = p2; + } + + entities[k].gravity = true; + break; + case 19: // Crew Member (Ship) More tests! + entities[k].rule = 6; entities[k].type = 12; //A special case! + entities[k].tile = 0; entities[k].colour = 6; //54 for sad :( + entities[k].xp = xp; entities[k].yp = yp; + entities[k].cx = 6; entities[k].cy = 2; + entities[k].w = 12; entities[k].h = 21; + entities[k].dir = 1; + + entities[k].state = vx; + + entities[k].gravity = true; + break; + case 20: //Terminal + entities[k].rule = 3; entities[k].type = 13; + entities[k].size = 0; entities[k].tile = 16 + vx; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].colour = 4; + entities[k].onentity = 1; + entities[k].animate = 100; + entities[k].para = vy; + + /*if (game.savepoint == vy) { + entities[k].colour = 5; + entities[k].onentity = 0; + }*/ + break; + case 21: //as above, except doesn't highlight + entities[k].rule = 3; entities[k].type = 13; + entities[k].size = 0; entities[k].tile = 16 + vx; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].colour = 4; + entities[k].onentity = 0; + entities[k].animate = 100; + entities[k].para = vy; + + /*if (game.savepoint == vy) { + entities[k].colour = 5; + entities[k].onentity = 0; + }*/ + break; + case 22: //Fake trinkets, only appear if you've collected them + entities[k].rule = 3; entities[k].type = 7; + entities[k].size = 0; entities[k].tile = 22; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].colour = 3; + entities[k].onentity = 0; + entities[k].animate = 100; + + //Check if it's already been collected + entities[k].para = vx; + if (collect[vx] == 0) entities[k].active = false; + break; + case 23: //SWN Enemies + //Given a different behavior, these enemies are especially for SWN mode and disappear outside the screen. + entities[k].rule = 1; entities[k].type = 23; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].behave = vx; entities[k].para = vy; + entities[k].w = 16; entities[k].h = 16; + entities[k].cx = 0; entities[k].cy = 0; + + entities[k].x1 = -2000; entities[k].y1 = -100; + entities[k].x2 = 5200; entities[k].y2 = 340; + + entities[k].harmful = true; + + //initilise tiles here based on behavior + entities[k].size = 12; //don't wrap around + entities[k].colour = 21; + entities[k].tile = 78; //default case + entities[k].animate = 1; + if (game.swngame == 1) { + //set colour based on current state + entities[k].colour = swncolour(game.swncolstate); + } + break; + case 24: // Super Crew Member + //This special crewmember is way more advanced than the usual kind, and can interact with game objects + entities[k].rule = 6; entities[k].type = 14; //A special case! + entities[k].colour = vx; + if(vx==16){ + //victoria is sad! + if (vy == 2) vy = 1; + }else { + if (vy == 2) vy = 0; + } + if (vy == 0) { + entities[k].tile = 0; + }else { + entities[k].tile = 144; + } + entities[k].xp = xp; entities[k].yp = yp; + entities[k].cx = 6; entities[k].cy = 2; + entities[k].w = 12; entities[k].h = 21; + entities[k].dir = 1; + + entities[k].x1 = -2000; entities[k].y1 = -100; + entities[k].x2 = 5200; entities[k].y2 = 340; + + entities[k].state = p1; + entities[k].para = p2; + + if (p1 == 17) { + entities[k].dir = p2; + } + + entities[k].gravity = true; + break; + case 25: //Trophies + entities[k].rule = 3; entities[k].type = 15; + entities[k].size = 0; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].colour = 4; + entities[k].onentity = 1; + entities[k].animate = 100; + entities[k].para = vy; + + //Decide tile here based on given achievement: both whether you have them and what they are + //default is just a trophy base: + entities[k].tile = 180 + vx; + switch(vy) { + case 1: if(game.bestrank[0]>=3) { entities[k].tile = 184 + vx; entities[k].colour = 31;} break; + case 2: if(game.bestrank[1]>=3) { entities[k].tile = 186 + vx; entities[k].colour = 35;} break; + case 3: if(game.bestrank[2]>=3) { entities[k].tile = 184 + vx; entities[k].colour = 33;} break; + case 4: if(game.bestrank[3]>=3) { entities[k].tile = 184 + vx; entities[k].colour = 32;} break; + case 5: if(game.bestrank[4]>=3) { entities[k].tile = 184 + vx; entities[k].colour = 34;} break; + case 6: if(game.bestrank[5]>=3) { entities[k].tile = 184 + vx; entities[k].colour = 30;} break; + + case 7: + if(game.unlock[5]){ + entities[k].tile = 188 + vx; + entities[k].colour = 37; + entities[k].h += 3; + } + break; + case 8: + if(game.unlock[19]){ + entities[k].tile = 188 + vx; + entities[k].colour = 37; + entities[k].h += 3; + } + break; + + case 9: + if (game.bestgamedeaths > -1) { + if (game.bestgamedeaths <= 50) { + entities[k].tile = 182 + vx; entities[k].colour = 40; + } + } + break; + case 10: + if (game.bestgamedeaths > -1) { + if (game.bestgamedeaths <= 100) { + entities[k].tile = 182 + vx; entities[k].colour = 36; + } + } + break; + case 11: + if (game.bestgamedeaths > -1) { + if (game.bestgamedeaths <= 250) { + entities[k].tile = 182 + vx; entities[k].colour = 38; + } + } + break; + case 12: + if (game.bestgamedeaths > -1) { + if (game.bestgamedeaths <= 500) { + entities[k].tile = 182 + vx; entities[k].colour = 39; + } + } + break; + + case 13: if(game.swnbestrank>=1) { entities[k].tile = 182 + vx; entities[k].colour = 39;} break; + case 14: if(game.swnbestrank>=2) { entities[k].tile = 182 + vx; entities[k].colour = 39;} break; + case 15: if(game.swnbestrank>=3) { entities[k].tile = 182 + vx; entities[k].colour = 39;} break; + case 16: if(game.swnbestrank>=4) { entities[k].tile = 182 + vx; entities[k].colour = 38;} break; + case 17: if(game.swnbestrank>=5) { entities[k].tile = 182 + vx; entities[k].colour = 36;} break; + case 18: if(game.swnbestrank>=6) { entities[k].tile = 182 + vx; entities[k].colour = 40;} break; + + case 19: + if(game.unlock[20]){ + entities[k].tile = 3; entities[k].colour = 102; + entities[k].size = 13; + entities[k].xp -= 64; entities[k].yp -= 128; + } + break; + + } + + break; + case 26: //Epilogue super warp token + entities[k].rule = 3; entities[k].type = 11; + entities[k].size = 0; entities[k].tile = 18; + entities[k].xp = xp; entities[k].yp = yp; + entities[k].w = 16; entities[k].h = 16; + entities[k].colour = 3; + entities[k].onentity = 0; + entities[k].animate = 100; + entities[k].para = vy; + entities[k].size = 13; + break; + case 51: //Vertical Warp Line + entities[k].rule = 5; + entities[k].type = 51; + entities[k].size = 6; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 1; + entities[k].h = vx; + //entities[k].colour = 0; + entities[k].onentity = 1; + entities[k].invis=true; + break; + case 52: //Vertical Warp Line + entities[k].rule = 5; + entities[k].type = 52; + entities[k].size = 6; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = 1; + entities[k].h = vx; + //entities[k].colour = 0; + entities[k].onentity = 1; + entities[k].invis=true; + break; + case 53: //Horizontal Warp Line + entities[k].rule = 7; + entities[k].type = 53; + entities[k].size = 5; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = vx; + entities[k].h = 1; + entities[k].onentity = 1; + entities[k].invis=true; + break; + case 54: //Horizontal Warp Line + entities[k].rule = 7; + entities[k].type = 54; + entities[k].size = 5; + entities[k].life = 0; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].w = vx; + entities[k].h = 1; + entities[k].onentity = 1; + entities[k].invis=true; + break; + case 55: // Crew Member (custom, collectable) + //1 - position in array + //2 - colour + entities[k].rule = 3; + entities[k].type = 55; + if(customcrewmoods[int(vy)]==1){ + entities[k].tile = 144; + }else{ + entities[k].tile = 0; + } + entities[k].colour = crewcolour(int(vy)); + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].cx = 6; + entities[k].cy = 2; + entities[k].w = 12; + entities[k].h = 21; + entities[k].dir = 0; + + entities[k].state = 0; + entities[k].onentity = 1; + //entities[k].state = vx; + + entities[k].gravity = true; + + //Check if it's already been collected + entities[k].para = vx; + if (customcollect[vx] == 1) entities[k].active = false; + break; + case 56: //Custom enemy + entities[k].rule = 1; + entities[k].type = 1; + entities[k].xp = xp; + entities[k].yp = yp; + entities[k].behave = vx; + entities[k].para = vy; + entities[k].w = 16; + entities[k].h = 16; + entities[k].cx = 0; + entities[k].cy = 0; + + entities[k].x1 = p1; + entities[k].y1 = p2; + entities[k].x2 = p3; + entities[k].y2 = p4; + + entities[k].harmful = true; + + switch(customenemy){ + case 0: setenemyroom(k, 4+100, 0+100); break; + case 1: setenemyroom(k, 2+100, 0+100); break; + case 2: setenemyroom(k, 12+100, 3+100); break; + case 3: setenemyroom(k, 13+100, 12+100); break; + case 4: setenemyroom(k, 16+100, 9+100); break; + case 5: setenemyroom(k, 19+100, 1+100); break; + case 6: setenemyroom(k, 19+100, 2+100); break; + case 7: setenemyroom(k, 18+100, 3+100); break; + case 8: setenemyroom(k, 16+100, 0+100); break; + case 9: setenemyroom(k, 14+100, 2+100); break; + default: setenemyroom(k, 4+100, 0+100); break; + } + + //Set colour based on room tile + //Set custom colours + if(customplatformtile>0){ + var entcol:int = (customplatformtile / 12); + switch(entcol){ + //RED + case 3: case 7: case 12: case 23: case 28: + case 34: case 42: case 48: case 58: + entities[k].colour = 6; break; + //GREEN + case 5: case 9: case 22: case 25: case 29: + case 31: case 38: case 46: case 52: case 53: + entities[k].colour = 7; break; + //BLUE + case 1: case 6: case 14: case 27: case 33: + case 44: case 50: case 57: + entities[k].colour = 12; break; + //YELLOW + case 4: case 17: case 24: case 30: case 37: + case 45: case 51: case 55: + entities[k].colour = 9; break; + //PURPLE + case 2: case 11: case 15: case 19: case 32: + case 36: case 49: + entities[k].colour = 20; break; + //CYAN + case 8: case 10: case 13: case 18: case 26: + case 35: case 41: case 47: case 54: + entities[k].colour = 11; break; + //PINK + case 16: case 20: case 39: case 43: case 56: + entities[k].colour = 8; break; + //ORANGE + case 21: case 40: + entities[k].colour = 17; break; + default: + entities[k].colour = 6; + break; + } + } + break; + } + } + + public function updateentities(i:int, help:helpclass, game:gameclass, music:musicclass):Boolean { + if(entities[i].active){ + if(entities[i].statedelay<=0){ + switch(entities[i].type) { + case 0: //Player + if (entities[i].state == 0) { + } + break; + case 1: //Movement behaviors + //Enemies can have a number of different behaviors: + switch(entities[i].behave) { + case 0: //Bounce, Start moving down + if (entities[i].state == 0) { //Init + entities[i].state = 3; updateentities(i, help, game, music); + }else if (entities[i].state == 1) { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + }else if (entities[i].state == 2) { + entities[i].vy = -entities[i].para; entities[i].onwall = 3; entities[i].state = 1; + }else if (entities[i].state == 3) { + entities[i].vy = entities[i].para; entities[i].onwall = 2; entities[i].state = 1; } + break; + case 1: //Bounce, Start moving up + if (entities[i].state == 0) { //Init + entities[i].state = 2; updateentities(i, help, game, music); + }else if (entities[i].state == 1) { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + }else if (entities[i].state == 2) { + entities[i].vy = -entities[i].para; entities[i].onwall = 3; entities[i].state = 1; + }else if (entities[i].state == 3) { + entities[i].vy = entities[i].para; entities[i].onwall = 2; entities[i].state = 1; } + break; + case 2: //Bounce, Start moving left + if (entities[i].state == 0) { //Init + entities[i].state = 3; updateentities(i, help, game, music); + }else if (entities[i].state == 1) { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + }else if (entities[i].state == 2) { + entities[i].vx = entities[i].para; entities[i].onwall = 3; entities[i].state = 1; + }else if (entities[i].state == 3) { + entities[i].vx = -entities[i].para; entities[i].onwall = 2; entities[i].state = 1; } + break; + case 3: //Bounce, Start moving right + if (entities[i].state == 0) { //Init + entities[i].state = 3; updateentities(i, help, game, music); + }else if (entities[i].state == 1) { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + }else if (entities[i].state == 2) { + entities[i].vx = -entities[i].para; entities[i].onwall = 3; entities[i].state = 1; + }else if (entities[i].state == 3) { + entities[i].vx = entities[i].para; entities[i].onwall = 2; entities[i].state = 1; } + break; + case 4: //Always move left + if (entities[i].state == 0) { //Init + entities[i].vx = entities[i].para; + } + break; + case 5: //Always move right + if (entities[i].state == 0) { //Init + entities[i].vx = entities[i].para; + entities[i].state = 1 + entities[i].onwall = 2; + }else if (entities[i].state == 2) { + entities[i].vx = 0; entities[i].onwall = 0; + entities[i].xp -= entities[i].para; + entities[i].statedelay=8; entities[i].state=0; + } + break; + case 6: //Always move up + if (entities[i].state == 0) { //Init + entities[i].vy = entities[i].para; + entities[i].state = 1; + entities[i].onwall = 2; + }else if (entities[i].state == 2) { + entities[i].vy = -entities[i].para; entities[i].onwall = 0; + entities[i].yp -= entities[i].para; + entities[i].statedelay=8; entities[i].state=0; + } + break; + case 7: //Always move down + if (entities[i].state == 0) { //Init + entities[i].vx = entities[i].para; + } + break; + case 8: case 9: + //Threadmill: don't move, just impart velocity + if (entities[i].state == 0) { //Init + entities[i].vx = 0; + entities[i].state = 1; + entities[i].onwall = 0; + } + break; + case 10: + //Emitter: shoot an enemy every so often + if (entities[i].state == 0) { + createentity(game, entities[i].xp+28, entities[i].yp, 1, 10, 1); + entities[i].state = 1; entities[i].statedelay = 12; + }else if (entities[i].state == 1) { + entities[i].state = 0; + } + break; + case 11: //Always move right, destroy when outside screen + if (entities[i].state == 0) { //Init + entities[i].vx = entities[i].para; + entities[i].state = 1 + }else if (entities[i].state == 1) { + if (entities[i].xp >= 335) entities[i].active = false; + if (game.roomx == 117) { + if (entities[i].xp >= (33*8)-32) entities[i].active = false; + //collector for LIES + } + } + break; + case 12: + //Emitter: shoot an enemy every so often (up) + if (entities[i].state == 0) { + createentity(game, entities[i].xp, entities[i].yp, 1, 12, 1); + entities[i].state = 1; entities[i].statedelay = 16; + }else if (entities[i].state == 1) { + entities[i].state = 0; + } + break; + case 13: //Always move up, destroy when outside screen + if (entities[i].state == 0) { //Init + entities[i].vy = entities[i].para; + entities[i].state = 1 + }else if (entities[i].state == 1) { + if (entities[i].yp <= -60) entities[i].active = false; + if (game.roomy == 108) { + if (entities[i].yp <= 60) entities[i].active = false; + //collector for factory + } + } + break; + case 14: //Very special hack: as two, but doesn't move in specific circumstances + if (entities[i].state == 0) { //Init + for (j = 0; j < nentity; j++) { + if (entities[j].type == 2 && entities[j].state==3 && entities[j].xp==entities[i].xp-32) { + entities[i].state = 3; updateentities(i, help, game, music); + } + } + }else if (entities[i].state == 1) { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + }else if (entities[i].state == 2) { + entities[i].vx = entities[i].para; entities[i].onwall = 3; entities[i].state = 1; + }else if (entities[i].state == 3) { + entities[i].vx = -entities[i].para; entities[i].onwall = 2; entities[i].state = 1; } + break; + case 15: //As above, but for 3! + if (entities[i].state == 0) { //Init + for (j = 0; j < nentity; j++) { + if (entities[j].type == 2 && entities[j].state==3 && entities[j].xp==entities[i].xp+32) { + entities[i].state = 3; updateentities(i, help, game, music); + } + } + }else if (entities[i].state == 1) { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + }else if (entities[i].state == 2) { + entities[i].vx = -entities[i].para; entities[i].onwall = 3; entities[i].state = 1; + }else if (entities[i].state == 3) { + entities[i].vx = entities[i].para; entities[i].onwall = 2; entities[i].state = 1; } + break; + case 16: //MAVERICK BUS FOLLOWS HIS OWN RULES + if (entities[i].state == 0) { //Init + //first, y position + if (entities[getplayer()].yp > 14 * 8) { + entities[i].tile = 120; + entities[i].yp = (28*8)-62; + }else { + entities[i].tile = 96; + entities[i].yp = 24; + } + //now, x position + if (entities[getplayer()].xp > 20 * 8) { + //approach from the left + entities[i].xp = -64; + entities[i].state = 2; updateentities(i, help, game, music); //right + }else { + //approach from the left + entities[i].xp = 320; + entities[i].state = 3; updateentities(i, help, game, music); //left + } + + }else if (entities[i].state == 1) { + if (entities[i].outside()) entities[i].state = entities[i].onwall; + }else if (entities[i].state == 2) { + entities[i].vx = entities[i].para; entities[i].onwall = 3; entities[i].state = 1; + }else if (entities[i].state == 3) { + entities[i].vx = -entities[i].para; entities[i].onwall = 2; entities[i].state = 1; } + break; + case 17: //Special for ASCII Snake (left) + if (entities[i].state == 0) { //Init + entities[i].statedelay = 6; entities[i].xp -= entities[i].para; + } + break; + case 18: //Special for ASCII Snake (right) + if (entities[i].state == 0) { //Init + entities[i].statedelay = 6; entities[i].xp += entities[i].para; + } + break; + } + break; + case 2: //Disappearing platforms + //wait for collision + if (entities[i].state == 1) { + entities[i].life = 12; + entities[i].state = 2; entities[i].onentity = 0; + + music.playef(7,10); + }else if (entities[i].state == 2) { + entities[i].life--; + if (entities[i].life % 3 == 0) entities[i].tile++; + if (entities[i].life <= 0) { + removeblockat(entities[i].xp, entities[i].yp); + entities[i].state = 3;// = false; + entities[i].invis = true; + } + }else if (entities[i].state == 3) { + //wait until recharged! + }else if (entities[i].state == 4) { + //restart! + createblock(0, entities[i].xp, entities[i].yp, 32, 8); + entities[i].state = 4; + entities[i].invis = false; + entities[i].tile--; + entities[i].state++; entities[i].onentity = 1; + }else if (entities[i].state == 5) { + entities[i].life+=3; + if (entities[i].life % 3 == 0) entities[i].tile--; + if (entities[i].life >= 12) { + entities[i].life = 12; + entities[i].state = 0; + entities[i].tile++; + } + } + break; + case 3: //Breakable blocks + //Only counts if vy of player entity is non zero + if (entities[i].state == 1) { + j = getplayer(); + //if (entities[j].vy > 0.5 && (entities[j].yp+entities[j].h<=entities[i].yp+6)) { + entities[i].life = 4; + entities[i].state = 2; entities[i].onentity = 0; + music.playef(6,10); + /*}else if (entities[j].vy <= -0.5 && (entities[j].yp>=entities[i].yp+2)) { + entities[i].life = 4; + entities[i].state = 2; entities[i].onentity = 0; + }else { + entities[i].state = 0; + }*/ + }else if (entities[i].state == 2) { + entities[i].life--; + entities[i].tile++; + if (entities[i].life <= 0) { + removeblockat(entities[i].xp, entities[i].yp); + entities[i].active = false; + } + } + break; + case 4: //Gravity token + //wait for collision + if (entities[i].state == 1) { + entities[i].active = false; + game.gravitycontrol = (game.gravitycontrol + 1) % 2; + + } + break; + case 5: //Particle sprays + if (entities[i].state == 0) { + entities[i].life--; + if (entities[i].life < 0) entities[i].active = false; + } + break; + case 6: //Small pickup + //wait for collision + if (entities[i].state == 1) { + game.coins++; + music.playef(4,10); + collect[entities[i].para] = 1; + + entities[i].active = false; + } + break; + case 7: //Found a trinket + //wait for collision + if (entities[i].state == 1) { + game.trinkets++; + if (game.intimetrial) { + collect[entities[i].para] = 1; + music.playef(25,10); + }else{ + game.state = 1000; + //music.haltdasmusik(); + music.silencedasmusik(); + music.playef(3,10); + collect[entities[i].para] = 1; + if (game.trinkets > game.stat_trinkets) { + game.stat_trinkets = game.trinkets; + } + } + + entities[i].active = false; + } + break; + case 8: //Savepoints + //wait for collision + if (entities[i].state == 1) { + //First, deactivate all other savepoints + for (j = 0; j < nentity; j++) { + if (entities[j].type == 8 && entities[j].active) { + entities[j].colour = 4; entities[j].onentity = 1; + } + } + entities[i].colour = 5; + entities[i].onentity = 0; + game.savepoint = entities[i].para; + music.playef(5,10); + + game.savex = entities[i].xp - 4; + + if (entities[i].tile == 20) { + game.savey = entities[i].yp - 1; + game.savegc = 1; + }else if (entities[i].tile == 21) { + game.savey = entities[i].yp-8; + game.savegc = 0; + } + + game.saverx = game.roomx; game.savery = game.roomy; + game.savedir = entities[getplayer()].dir; + entities[i].state = 0; + + if(!game.mobilequicksave_thisroom){ + game.autoquicksave = true; + game.mobilequicksave_thisroom = true; + } + } + break; + case 9: //Gravity Lines + if (entities[i].state == 1) { + entities[i].life--; + entities[i].onentity = 0; + + if (entities[i].life <= 0) { + entities[i].state = 0; + entities[i].onentity = 1; + } + } + break; + case 10: //Vertical gravity Lines + if (entities[i].state == 1) { + entities[i].onentity = 3; + entities[i].state = 2; + + + music.playef(8,10); + game.gravitycontrol = (game.gravitycontrol + 1) % 2; + game.totalflips++; + temp = getplayer(); + if (game.gravitycontrol == 0) { + if (entities[temp].vy < 3) entities[temp].vy = 3; + }else { + if (entities[temp].vy > -3) entities[temp].vy = -3; + } + }else if (entities[i].state == 2) { + entities[i].life--; + if (entities[i].life <= 0) { + entities[i].state = 0; + entities[i].onentity = 1; + } + }else if (entities[i].state == 3) { + entities[i].state = 2; entities[i].life = 4; + entities[i].onentity = 3; + }else if (entities[i].state == 4) { + //Special case for room initilisations: As state one, except without the reversal + entities[i].onentity = 3; + entities[i].state = 2; + } + break; + case 11: //Warp point + //wait for collision + if (entities[i].state == 1) { + //Depending on the room the warp point is in, teleport to a new location! + entities[i].onentity = 0; + //play a sound or somefink + music.playef(10); + game.teleport = true; + + game.edteleportent = i; + //for the multiple room: + if (int(entities[i].xp) == 12*8) game.teleportxpos = 1; + if (int(entities[i].xp) == 5*8) game.teleportxpos = 2; + if (int(entities[i].xp) == 28*8) game.teleportxpos = 3; + if (int(entities[i].xp) == 21*8) game.teleportxpos = 4; + } + break; + case 12: //Crew member + //Somewhat complex AI: exactly what they do depends on room, location, state etc + //At state 0, do nothing at all. + if (entities[i].state == 1) { + //happy! + if (entities[k].rule == 6) entities[k].tile = 0; + if (entities[k].rule == 7) entities[k].tile = 6; + //Stay close to the hero! + j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + + //Special rules: + if (game.roomx == 110 && game.roomy == 105) { + if (entities[i].xp < 155) { if (entities[i].ax < 0) entities[i].ax = 0; } + } + }else if (entities[i].state == 2) { + //Basic rules, don't change expression + j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + }else if (entities[i].state == 10) { + //Everything from 10 on is for cutscenes + //Basic rules, don't change expression + j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + }else if (entities[i].state == 11) { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + j=getcrewman(1); //purple + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + }else if (entities[i].state == 12) { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + j=getcrewman(2); //yellow + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + }else if (entities[i].state == 13) { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + j=getcrewman(3); //red + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + }else if (entities[i].state == 14) { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + j=getcrewman(4); //green + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + }else if (entities[i].state == 15) { + //11-15 means to follow a specific character, in crew order (cyan, purple, yellow, red, green, blue) + j=getcrewman(5); //blue + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + }else if (entities[i].state == 16) { + //Follow a position: given an x coordinate, seek it out. + if (entities[i].para > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[i].para < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[i].para > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[i].para < entities[i].xp - 45) { entities[i].ax = -3; } + }else if (entities[i].state == 17) { + //stand still + }else if (entities[i].state == 18) { + //Stand still and face the player + j = getplayer(); + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + }else if (entities[i].state == 19) { + //Walk right off the screen after time t + if (entities[i].para <= 0) { + entities[i].dir = 1; + entities[i].ax = 3; + }else { + entities[i].para--; + } + }else if (entities[i].state == 20) { + //Panic! For briefing script + if (entities[i].life == 0) { + //walk left for a bit + entities[i].ax = 0; + if (40 > entities[i].xp + 5) { entities[i].dir = 1; + }else if (40 < entities[i].xp - 5) { entities[i].dir = 0; } + + if (40 > entities[i].xp + 45) { entities[i].ax = 3; + }else if (40 < entities[i].xp - 45) { entities[i].ax = -3; } + if (entities[i].ax == 0) { entities[i].life = 1; entities[i].para = 30;} + }else if (entities[i].life == 1) { + //Stand around for a bit + entities[i].para--; + if (entities[i].para <= 0) { + entities[i].life++; + } + }else if (entities[i].life == 2) { + //walk right for a bit + entities[i].ax = 0; + if (280 > entities[i].xp + 5) { entities[i].dir = 1; + }else if (280 < entities[i].xp - 5) { entities[i].dir = 0; } + + if (280 > entities[i].xp + 45) { entities[i].ax = 3; + }else if (280 < entities[i].xp - 45) { entities[i].ax = -3; } + if (entities[i].ax == 0) { entities[i].life = 3; entities[i].para = 30;} + }else if (entities[i].life == 3) { + //Stand around for a bit + entities[i].para--; + if (entities[i].para <= 0) { + entities[i].life=0; + } + } + } + break; + case 13: //Terminals (very similar to savepoints) + //wait for collision + if (entities[i].state == 1) { + entities[i].colour = 5; + entities[i].onentity = 0; + music.playef(17,10); + + entities[i].state = 0; + } + break; + case 14: //Super Crew member + //Actually needs less complex AI than the scripting crewmember + if (entities[i].state == 0) { + //follow player, but only if he's on the floor! + j = getplayer(); + if(entities[j].onground>0){ + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp>15 && entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + if (entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; + }else if (entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } + if (entities[i].ax < 0 && entities[i].xp < 60) { + entities[i].ax = 0; + } + }else { + if (entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } + + entities[i].ax = 0; + } + + if (entities[i].xp > 240) { + entities[i].ax = 3; entities[i].dir = 1; + } + if (entities[i].xp >= 310) { + game.scmprogress++; + entities[i].active = false; + } + } + break; + case 15: //Trophy + //wait for collision + if (entities[i].state == 1) { + trophytext+=2; if (trophytext > 30) trophytext = 30; + trophytype = entities[i].para; + + entities[i].state = 0; + } + break; + case 23: + //swn game! + switch(entities[i].behave) { + case 0: + if (entities[i].state == 0) { //Init + entities[i].vx = 7; + if (entities[i].xp > 320) entities[i].active = false; + } + break; + case 1: + if (entities[i].state == 0) { //Init + entities[i].vx = -7; + if (entities[i].xp <-20) entities[i].active = false; + } + break; + } + break; + case 51: //Vertical warp line + if (entities[i].state == 2){ + var j:int = getplayer(); + if(entities[j].xp<=307){ + customwarpmodevon=false; + entities[i].state = 0; + } + }else if (entities[i].state == 1){ + entities[i].state = 2; + entities[i].statedelay = 2; + entities[i].onentity = 1; + customwarpmodevon=true; + } + break; + case 52: //Vertical warp line + if (entities[i].state == 2){ + j = getplayer(); + if(entities[j].xp<=307){ + customwarpmodevon=false; + entities[i].state = 0; + } + }else if (entities[i].state == 1){ + entities[i].state = 2; + entities[i].statedelay = 2; + entities[i].onentity = 1; + customwarpmodevon=true; + } + break; + case 53: //Warp lines Horizonal + if (entities[i].state == 2){ + customwarpmodehon=false; + entities[i].state = 0; + }else if (entities[i].state == 1){ + entities[i].state = 2; + entities[i].statedelay = 2; + entities[i].onentity = 1; + customwarpmodehon=true; + } + break; + case 54: //Warp lines Horizonal + ////if (entities[i].state != 0) { + //trace("entity 54 is still here! ", i, ": state = ", entities[i].state, String(int(Math.random()*100)), entities[i].active); + ////} + if (entities[i].state == 2){ + customwarpmodehon=false; + entities[i].state = 0; + }else if (entities[i].state == 1){ + entities[i].state = 2; + entities[i].statedelay = 2; + entities[i].onentity = 1; + customwarpmodehon=true; + } + break; + case 55: //Collectable crewmate + //wait for collision + if (entities[i].state == 0){ + //Basic rules, don't change expression + j = getplayer(); + if (entities[j].xp > entities[i].xp + 5){ + entities[i].dir = 1; + }else if (entities[j].xp < entities[i].xp - 5) { + entities[i].dir = 0; + } + }else if (entities[i].state == 1){ + game.crewmates++; + if (game.intimetrial){ + customcollect[entities[i].para] = 1; + music.playef(27,10); + }else{ + game.state = 1010; + //music.haltdasmusik(); + if(music.currentsong!=-1) music.silencedasmusik(); + music.playef(27,10); + customcollect[entities[i].para] = 1; + } + + entities[i].active = false; + } + break; + case 100: //The teleporter + if (entities[i].state == 1) { + //if inactive, activate! + if (entities[i].tile == 1) { + music.playef(18, 10); + entities[i].onentity = 0; + entities[i].tile = 2; + entities[i].colour = 101; + if(!game.intimetrial && !game.nodeathmode){ + game.state = 2000; game.statedelay = 0; + } + + game.activetele = true; + game.teleblock.x = entities[i].xp - 32; game.teleblock.y = entities[i].yp - 32; + game.teleblock.width = 160; game.teleblock.height = 160; + + + //Alright, let's set this as our savepoint too + //First, deactivate all other savepoints + for (j = 0; j < nentity; j++) { + if (entities[j].type == 8 && entities[j].active) { + entities[j].colour = 4; entities[j].onentity = 1; + } + } + game.savepoint = entities[i].para; + game.savex = entities[i].xp + 44; + game.savey = entities[i].yp + 44; + game.savegc = 0; + + game.saverx = game.roomx; game.savery = game.roomy; + game.savedir = entities[getplayer()].dir; + entities[i].state = 0; + + if(!game.mobilequicksave_thisroom){ + game.autoquicksave = true; + game.mobilequicksave_thisroom = true; + } + } + + entities[i].state = 0; + }else if (entities[i].state == 2) { + //Initilise the teleporter without changing the game state or playing sound + entities[i].onentity = 0; + entities[i].tile = 6; + entities[i].colour = 102; + + game.activetele = true; + game.teleblock.x = entities[i].xp - 32; game.teleblock.y = entities[i].yp - 32; + game.teleblock.width = 160; game.teleblock.height = 160; + + entities[i].state = 0; + } + break; + } + }else { + entities[i].statedelay--; + if (entities[i].statedelay < 0) entities[i].statedelay = 0; + } + } + + return true; + } + + public function animateentities(i:int, game:gameclass, help:helpclass):void { + if(entities[i].active){ + if(entities[i].statedelay<=0){ + switch(entities[i].type) { + case 0: + entities[i].framedelay--; + if(entities[i].dir==1){ + entities[i].drawframe=entities[i].tile; + }else{ + entities[i].drawframe=entities[i].tile+3; + } + + if(entities[i].onground>0 || entities[i].onroof>0){ + if(int(entities[i].vx)!=0){ + //Walking + if(entities[i].framedelay<=0){ + entities[i].framedelay=4; + entities[i].walkingframe++; + } + if (entities[i].walkingframe >=2) entities[i].walkingframe=0; + entities[i].drawframe += entities[i].walkingframe + 1; + } + + if (entities[i].onroof > 0) entities[i].drawframe += 6; + }else { + entities[i].drawframe ++; + if (game.gravitycontrol == 1) { + entities[i].drawframe += 6; + } + } + + if (game.deathseq > -1) { + entities[i].drawframe=13; + if (entities[i].dir == 1) entities[i].drawframe = 12; + if (game.gravitycontrol == 1) entities[i].drawframe += 2; + } + break; + case 1: case 23: + //Variable animation + switch(entities[i].animate) { + case 0: + //Simple oscilation + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 8; + if(entities[i].actionframe==0){ + entities[i].walkingframe++; + if (entities[i].walkingframe == 4) { + entities[i].walkingframe = 2; + entities[i].actionframe = 1; + } + }else { + entities[i].walkingframe--; + if (entities[i].walkingframe == -1) { + entities[i].walkingframe = 1; + entities[i].actionframe = 0; + } + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + break; + case 1: + //Simple Loop + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 8; + entities[i].walkingframe++; + if (entities[i].walkingframe == 4) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + break; + case 2: + //Simpler Loop (just two frames) + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 2; + entities[i].walkingframe++; + if (entities[i].walkingframe == 2) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + break; + case 3: + //Simpler Loop (just two frames, but double sized) + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 2; + entities[i].walkingframe++; + if (entities[i].walkingframe == 2) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += (entities[i].walkingframe*2); + break; + case 4: + //Simpler Loop (just two frames, but double sized) (as above but slower) + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 6; + entities[i].walkingframe++; + if (entities[i].walkingframe == 2) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += (entities[i].walkingframe*2); + break; + case 5: + //Simpler Loop (just two frames) (slower) + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 6; + entities[i].walkingframe++; + if (entities[i].walkingframe == 2) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + break; + case 6: + //Normal Loop (four frames, double sized) + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 4; + entities[i].walkingframe++; + if (entities[i].walkingframe == 4) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += (entities[i].walkingframe*2); + break; + case 7: + //Simpler Loop (just two frames) (slower) (with directions!) + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 6; + entities[i].walkingframe++; + if (entities[i].walkingframe == 2) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + + if (entities[i].vx > 0) entities[i].drawframe += 2; + break; + case 10: + //Threadmill left + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 3;//(6-entities[i].para); + entities[i].walkingframe--; + if (entities[i].walkingframe == -1) { + entities[i].walkingframe = 3; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + break; + case 11: + //Threadmill right + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 3;//(6-entities[i].para); + entities[i].walkingframe++; + if (entities[i].walkingframe == 4) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + break; + case 100: + //Simple case for no animation (platforms, etc) + entities[i].drawframe = entities[i].tile; + break; + default: + entities[i].drawframe = entities[i].tile; + break; + } + break; + case 11: + entities[i].drawframe = entities[i].tile; + if(entities[i].animate==2) { + //Simpler Loop (just two frames) + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 10; + entities[i].walkingframe++; + if (entities[i].walkingframe == 2) { + entities[i].walkingframe = 0; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + } + break; + case 12: case 55: case 14: //Crew member! Very similar to hero + entities[i].framedelay--; + if(entities[i].dir==1){ + entities[i].drawframe=entities[i].tile; + }else{ + entities[i].drawframe=entities[i].tile+3; + } + + if(entities[i].onground>0 || entities[i].onroof>0){ + if(entities[i].vx!=0){ + //Walking + if(entities[i].framedelay<=0){ + entities[i].framedelay=4; + entities[i].walkingframe++; + } + if (entities[i].walkingframe >=2) entities[i].walkingframe=0; + entities[i].drawframe += entities[i].walkingframe + 1; + } + + //if (entities[i].onroof > 0) entities[i].drawframe += 6; + }else { + entities[i].drawframe ++; + //if (game.gravitycontrol == 1) { + // entities[i].drawframe += 6; + //} + } + + if (game.deathseq > -1) { + entities[i].drawframe=13; + if (entities[i].dir == 1) entities[i].drawframe = 12; + if (entities[i].rule == 7) entities[i].drawframe += 2; + //if (game.gravitycontrol == 1) entities[i].drawframe += 2; + } + break; + case 100: //the teleporter! + if (entities[i].tile == 1) { + //it's inactive + entities[i].drawframe = entities[i].tile; + }else if (entities[i].tile == 2){ + entities[i].drawframe = entities[i].tile; + + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 1; + entities[i].walkingframe = int(Math.random() * 6); + if (entities[i].walkingframe >= 4) { + entities[i].walkingframe = -1; + entities[i].framedelay = 4; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + }else if (entities[i].tile == 6) { + //faster! + entities[i].drawframe = entities[i].tile; + + entities[i].framedelay--; + if(entities[i].framedelay<=0){ + entities[i].framedelay = 2; + entities[i].walkingframe = int(Math.random() * 6); + if (entities[i].walkingframe >= 4) { + entities[i].walkingframe = -5; + entities[i].framedelay = 4; + } + } + + entities[i].drawframe = entities[i].tile; + entities[i].drawframe += entities[i].walkingframe; + } + break; + default: + entities[i].drawframe = entities[i].tile; + break; + } + }else { + //entities[i].statedelay--; + if (entities[i].statedelay < 0) entities[i].statedelay = 0; + } + } + } + + public function gettype(t:int):Boolean { + //Returns true is there is an entity of type t onscreen + for (var i:int = 0; i < nentity; i++) { + if(entities[i].type==t){ + return true; + } + } + + return false; + } + + public function getcompanion(t:int):int { + //Returns the index of the companion with rule t + for (var i:int = 0; i < nentity; i++) { + if(entities[i].rule==6 || entities[i].rule==7){ + return i; + } + } + + return -1; + } + + public function getplayer():int { + //Returns the index of the first player entity + for (var i:int = 0; i < nentity; i++) { + if (entities[i].type == 0) { + return i; + } + } + + return -1; + } + + public function getscm():int { + //Returns the supercrewmate + for (var i:int = 0; i < nentity; i++) { + if(entities[i].type==14){ + return i; + } + } + + return 0; + } + + public function getlineat(t:int):int { + //Get the entity which is a horizontal line at height t (for SWN game) + for (var i:int = 0; i < nentity; i++) { + if (entities[i].size == 5) { + if (entities[i].yp == t) { + return i; + } + } + } + + return 0; + } + + public function getcrewman(t:int):int { + //Returns the index of the crewman with colour index given by t + if (t == 0) t = 0; + if (t == 1) t = 20; + if (t == 2) t = 14; + if (t == 3) t = 15; + if (t == 4) t = 13; + if (t == 5) t = 16; + + for (var i:int = 0; i < nentity; i++) { + if (entities[i].rule == 6 || entities[i].rule == 7) { + if(entities[i].colour==t){ + return i; + } + } + } + + return 0; + } + + public function getcustomcrewman(t:int):int { + //Returns the index of the crewman with colour index given by t + if (t == 0) t = 0; + if (t == 1) t = 20; + if (t == 2) t = 14; + if (t == 3) t = 15; + if (t == 4) t = 13; + if (t == 5) t = 16; + + for (var i:int = 0; i < nentity; i++){ + if (entities[i].type == 55){ + if(entities[i].colour==t){ + return i; + } + } + } + + return 0; + } + + public function getteleporter():int { + for (var i:int = 0; i < nentity; i++) { + if(entities[i].type==100 && entities[i].active){ + return i; + } + } + + return -1; + } + + public function rectset(xi:int, yi:int, wi:int, hi:int):void { + temprect.x = xi; temprect.y = yi; temprect.width = wi; temprect.height = hi; + } + + public function rect2set(xi:int, yi:int, wi:int, hi:int):void { + temprect2.x = xi; temprect2.y = yi; temprect2.width = wi; temprect2.height = hi; + } + + public function entitycollide(a:int, b:int):Boolean { + //Do entities a and b collide? + tempx = entities[a].xp + entities[a].cx; tempy = entities[a].yp + entities[a].cy; + tempw = entities[a].w; temph = entities[a].h; + rectset(tempx, tempy, tempw, temph); + + tempx = entities[b].xp + entities[b].cx; tempy = entities[b].yp + entities[b].cy; + tempw = entities[b].w; temph = entities[b].h; + rect2set(tempx, tempy, tempw, temph); + + if (temprect.intersects(temprect2)) return true; + return false; + } + + public function checkdirectional(t:int):Boolean{ + //Returns true if player entity (rule 0) moving in dir t through directional block + if(opt_usedirectional){ + i = getplayer(); + if (i > -1) { + if(entities[i].rule==0){ + tempx = entities[i].xp + entities[i].cx; tempy = entities[i].yp + entities[i].cy; + tempw = entities[i].w; temph = entities[i].h; + rectset(tempx, tempy, tempw, temph); + + for (j = 0; j < nblocks; j++) { + if (blocks[j].type == DIRECTIONAL && blocks[j].active){ + if(blocks[j].rect.intersects(temprect)) { + return true; + } + } + } + } + } + } + return false; + } + + public function checkdamage():Boolean{ + //Returns true if player entity (rule 0) collides with a damagepoint + if(opt_usedamage){ + i = getplayer(); + if (i > -1) { + if(entities[i].rule==0){ + tempx = entities[i].xp + entities[i].cx; tempy = entities[i].yp + entities[i].cy; + tempw = entities[i].w; temph = entities[i].h; + rectset(tempx, tempy, tempw, temph); + + for (j=0; j -1) { + if(entities[i].rule==0){ + tempx = entities[i].xp + entities[i].cx; tempy = entities[i].yp + entities[i].cy; + tempw = entities[i].w; temph = entities[i].h; + rectset(tempx, tempy, tempw, temph); + + for (j=0; j-1){ + if(entities[i].rule==0){ + tempx = entities[i].xp + entities[i].cx; tempy = entities[i].yp + entities[i].cy; + tempw = entities[i].w; temph = entities[i].h; + rectset(tempx, tempy, tempw, temph); + + for (j=0; j 0 && blocks[i].trigger == 0) if (blocks[i].rect.intersects(temprect)) return true; + if (dy <= 0 && blocks[i].trigger == 1) if (blocks[i].rect.intersects(temprect)) return true; + if (dx > 0 && blocks[i].trigger == 2) if (blocks[i].rect.intersects(temprect)) return true; + if (dx <= 0 && blocks[i].trigger == 3) if (blocks[i].rect.intersects(temprect)) return true; + } + } + if (blocks[i].type == BLOCK){ + if (blocks[i].rect.intersects(temprect)) { + return true; + } + } + if (blocks[i].type == SAFE) { + if(dr==1){ + if (blocks[i].rect.intersects(temprect)) { + return true; + } + } + } + } + } + return false; + } + + public function checktowerspikes(t:int, map:mapclass):Boolean { + tempx = entities[t].xp + entities[t].cx; tempy = entities[t].yp + entities[t].cy; + tempw = entities[t].w; temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + tempx = getgridpoint(temprect.x); tempy = getgridpoint(temprect.y); + tempw = getgridpoint(temprect.x + temprect.width - 1); temph = getgridpoint(temprect.y + temprect.height - 1); + if (map.spikecollide(tempx, tempy)) return true; + if (map.spikecollide(tempw, tempy)) return true; + if (map.spikecollide(tempx, temph)) return true; + if (map.spikecollide(tempw, temph)) return true; + if (temprect.height >= 12) { + tpy1 = getgridpoint(temprect.y + 6); + if (map.spikecollide(tempx, tpy1)) return true; + if (map.spikecollide(tempw, tpy1)) return true; + if (temprect.height >= 18) { + tpy1 = getgridpoint(temprect.y + 12); + if (map.spikecollide(tempx, tpy1)) return true; + if (map.spikecollide(tempw, tpy1)) return true; + if (temprect.height >= 24) { + tpy1 = getgridpoint(temprect.y + 18); + if (map.spikecollide(tempx, tpy1)) return true; + if (map.spikecollide(tempw, tpy1)) return true; + } + } + } + if (temprect.width >= 12) { + tpx1 = getgridpoint(temprect.x + 6); + if (map.collide(tpx1, tempy)) return true; + if (map.collide(tpx1, temph)) return true; + } + return false; + } + + public function checkwall(map:mapclass):Boolean{ + //Returns true if entity setup in temprect collides with a wall + //used for proper collision functions; you can't just, like, call it + //whenever you feel like it and expect a response + // + //that won't work at all + if(skipblocks){ + if (checkblocks()) return true; + } + + tempx = getgridpoint(temprect.x); tempy = getgridpoint(temprect.y); + tempw = getgridpoint(temprect.x + temprect.width - 1); temph = getgridpoint(temprect.y + temprect.height - 1); + if (map.collide(tempx, tempy)) return true; + if (map.collide(tempw, tempy)) return true; + if (map.collide(tempx, temph)) return true; + if (map.collide(tempw, temph)) return true; + if (temprect.height >= 12) { + tpy1 = getgridpoint(temprect.y + 6); + if (map.collide(tempx, tpy1)) return true; + if (map.collide(tempw, tpy1)) return true; + if (temprect.height >= 18) { + tpy1 = getgridpoint(temprect.y + 12); + if (map.collide(tempx, tpy1)) return true; + if (map.collide(tempw, tpy1)) return true; + if (temprect.height >= 24) { + tpy1 = getgridpoint(temprect.y + 18); + if (map.collide(tempx, tpy1)) return true; + if (map.collide(tempw, tpy1)) return true; + } + } + } + if (temprect.width >= 12) { + tpx1 = getgridpoint(temprect.x + 6); + if (map.collide(tpx1, tempy)) return true; + if (map.collide(tpx1, temph)) return true; + } + return false; + } + + public function hplatformat():Number { + //Returns first entity of horizontal platform at (px, py), -1000 otherwise. + for (i = 0; i < nentity; i++) { + if (entities[i].active) { + if (entities[i].rule == 2) { + if (entities[i].behave >= 2) { + if (entities[i].xp == px && entities[i].yp == py) { + if (entities[i].behave == 8) { //threadmill! + return entities[i].para; + }else if(entities[i].behave == 9) { //threadmill! + return -entities[i].para; + }else{ + return entities[i].vx; + } + } + } + } + } + } + return -1000; + } + + public function yline(a:int, b:int):int { + if (a < b) return -1; + return 1; + } + + public function entityhlinecollide(t:int, l:int):Boolean { + //Returns true is entity t collided with the horizontal line l. + if(entities[t].xp + entities[t].cx+entities[t].w>=entities[l].xp){ + if(entities[t].xp + entities[t].cx<=entities[l].xp+entities[l].w){ + linetemp = 0; + + linetemp += yline(entities[t].yp, entities[l].yp); + linetemp += yline(entities[t].yp + entities[t].h, entities[l].yp); + linetemp += yline(entities[t].oldyp, entities[l].yp); + linetemp += yline(entities[t].oldyp + entities[t].h, entities[l].yp); + + if (linetemp > -4 && linetemp < 4) return true; + return false; + } + } + return false; + } + + public function entityvlinecollide(t:int, l:int):Boolean { + //Returns true is entity t collided with the vertical line l. + if(entities[t].yp + entities[t].cy+entities[t].h>=entities[l].yp){ + if(entities[t].yp + entities[t].cy<=entities[l].yp+entities[l].h){ + linetemp = 0; + + linetemp += yline(entities[t].xp + entities[t].cx+1, entities[l].xp); + linetemp += yline(entities[t].xp + entities[t].cx+1 + entities[t].w, entities[l].xp); + linetemp += yline(entities[t].oldxp + entities[t].cx+1, entities[l].xp); + linetemp += yline(entities[t].oldxp + entities[t].cx+1 + entities[t].w, entities[l].xp); + + if (linetemp > -4 && linetemp < 4) return true; + return false; + } + } + return false; + } + + public function entitywarphlinecollide(t:int, l:int):Boolean { + //Returns true is entity t collided with the horizontal line l. + if(entities[t].xp + entities[t].cx+entities[t].w>=entities[l].xp){ + if(entities[t].xp + entities[t].cx<=entities[l].xp+entities[l].w){ + linetemp = 0; + if (entities[l].yp < 120) { + //Top line + if (entities[t].vy < 0) { + if (entities[t].yp < entities[l].yp + 10) linetemp++; + if (entities[t].yp + entities[t].h < entities[l].yp + 10) linetemp++; + if (entities[t].oldyp < entities[l].yp + 10) linetemp++; + if (entities[t].oldyp + entities[t].h < entities[l].yp + 10) linetemp++; + } + + if (linetemp > 0) return true; + return false; + }else { + //Bottom line + if (entities[t].vy > 0) { + if (entities[t].yp > entities[l].yp - 10) linetemp++; + if (entities[t].yp + entities[t].h > entities[l].yp - 10) linetemp++; + if (entities[t].oldyp > entities[l].yp - 10) linetemp++; + if (entities[t].oldyp + entities[t].h > entities[l].yp - 10) linetemp++; + } + + if (linetemp > 0) return true; + return false; + } + } + } + return false; + } + + public function entitywarpvlinecollide(t:int, l:int):Boolean { + //Returns true is entity t collided with the vertical warp line l. + if(entities[t].yp + entities[t].cy+entities[t].h>=entities[l].yp){ + if (entities[t].yp + entities[t].cy <= entities[l].yp + entities[l].h) { + linetemp = 0; + if (entities[l].xp < 160) { + //Left hand line + if (entities[t].xp + entities[t].cx + 1 < entities[l].xp + 10) linetemp++; + if (entities[t].xp + entities[t].cx+1 + entities[t].w < entities[l].xp + 10) linetemp++; + if (entities[t].oldxp + entities[t].cx + 1 < entities[l].xp + 10) linetemp++; + if (entities[t].oldxp + entities[t].cx + 1 + entities[t].w < entities[l].xp + 10) linetemp++; + + if (linetemp > 0) return true; + return false; + }else { + //Right hand line + if (entities[t].xp + entities[t].cx + 1 > entities[l].xp - 10) linetemp++; + if (entities[t].xp + entities[t].cx+1 + entities[t].w > entities[l].xp - 10) linetemp++; + if (entities[t].oldxp + entities[t].cx + 1 > entities[l].xp - 10) linetemp++; + if (entities[t].oldxp + entities[t].cx + 1 + entities[t].w > entities[l].xp - 10) linetemp++; + + if (linetemp > 0) return true; + return false; + } + } + } + return false; + } + + public function entitycollideplatformroof(map:mapclass, t:int):Number{ + tempx = entities[t].xp + entities[t].cx; tempy = entities[t].yp + entities[t].cy -1; + tempw = entities[t].w; temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (checkplatform()) { + //px and py now contain an x y coordinate for a platform, find it + return hplatformat(); + } + return -1000; + } + + public function entitycollideplatformfloor(map:mapclass, t:int):Number{ + tempx = entities[t].xp + entities[t].cx; tempy = entities[t].yp + entities[t].cy + 1; + tempw = entities[t].w; temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (checkplatform()) { + //px and py now contain an x y coordinate for a platform, find it + return hplatformat(); + } + return -1000; + } + + public function entitycollidefloor(map:mapclass, t:int):Boolean{ + //see? like here, for example! + tempx = entities[t].xp + entities[t].cx; tempy = entities[t].yp + entities[t].cy + 1; + tempw = entities[t].w; temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (checkwall(map)) return true; + return false; + } + + public function entitycollideroof(map:mapclass, t:int):Boolean{ + //and here! + tempx = entities[t].xp + entities[t].cx; tempy = entities[t].yp + entities[t].cy - 1; + tempw = entities[t].w; temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (checkwall(map)) return true; + return false; + } + + public function testwallsx(t:int, map:mapclass, tx:int, ty:int):Boolean{ + tempx = tx + entities[t].cx; tempy = ty + entities[t].cy; + tempw = entities[t].w; temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (entities[t].rule < 2) { skipblocks = true; } else { skipblocks = false; } + if (entities[t].type == 14) skipblocks = true; + dx = 0; dy = 0; if (entities[t].rule == 0) dx = entities[t].vx; + dr = entities[t].rule; + + //Ok, now we check walls + if (checkwall(map)) { + if (entities[t].vx > 1) { + entities[t].vx--; + entities[t].newxp = int(entities[t].xp + entities[t].vx); + return testwallsx(t, map, entities[t].newxp, entities[t].yp); + }else if (entities[t].vx < -1) { + entities[t].vx++; + entities[t].newxp = int(entities[t].xp + entities[t].vx); + return testwallsx(t, map, entities[t].newxp, entities[t].yp); + }else { + entities[t].vx=0; + return false; + } + } + return true; + } + + public function testwallsy(t:int, map:mapclass, tx:int, ty:int):Boolean { + tempx = tx + entities[t].cx; tempy = ty + entities[t].cy; + tempw = entities[t].w; temph = entities[t].h; + rectset(tempx, tempy, tempw, temph); + + if (entities[t].rule < 2) { skipblocks = true; } else { skipblocks = false; } + if (entities[t].type == 14) skipblocks = true; + + dx = 0; dy = 0; if (entities[t].rule == 0) dy = entities[t].vy; + dr = entities[t].rule; + + //Ok, now we check walls + if (checkwall(map)) { + if (entities[t].vy > 1) { + entities[t].vy--; + entities[t].newyp = int(entities[t].yp + entities[t].vy); + return testwallsy(t, map, entities[t].xp, entities[t].newyp); + }else if (entities[t].vy < -1) { + entities[t].vy++; + entities[t].newyp = int(entities[t].yp + entities[t].vy); + return testwallsy(t, map, entities[t].xp, entities[t].newyp); + }else { + entities[t].vy=0; + return false; + } + } + return true; + } + + public function fixfriction(t:int, xfix:Number, xrate:Number, yrate:Number):void{ + if (entities[t].vx > xfix) entities[t].vx -= xrate; + if (entities[t].vx < xfix) entities[t].vx += xrate; + if (entities[t].vy > 0) entities[t].vy -= yrate; + if (entities[t].vy < 0) entities[t].vy += yrate; + if (entities[t].vy > 10) entities[t].vy = 10; + if (entities[t].vy < -10) entities[t].vy = -10; + if (entities[t].vx > 6) entities[t].vx = 6; + if (entities[t].vx < -6) entities[t].vx = -6; + + if (Math.abs(entities[t].vx-xfix) <= xrate) entities[t].vx = xfix; + if (Math.abs(entities[t].vy) <= yrate) entities[t].vy = 0; + } + + public function applyfriction(t:int, xrate:Number, yrate:Number):void{ + if (entities[t].vx > 0) entities[t].vx -= xrate; + if (entities[t].vx < 0) entities[t].vx += xrate; + if (entities[t].vy > 0) entities[t].vy -= yrate; + if (entities[t].vy < 0) entities[t].vy += yrate; + if (entities[t].vy > 10) entities[t].vy = 10; + if (entities[t].vy < -10) entities[t].vy = -10; + if (entities[t].vx > 6) entities[t].vx = 6; + if (entities[t].vx < -6) entities[t].vx = -6; + + if (Math.abs(entities[t].vx) <= xrate) entities[t].vx = 0; + if (Math.abs(entities[t].vy) <= yrate) entities[t].vy = 0; + } + + public function cleanup():void { + i = nentity - 1; while (i >= 0 && !entities[i].active) { nentity--; i--; } + i = nblocks - 1; while (i >= 0 && !blocks[i].active) { nblocks--; i--; } + } + + public function updateentitylogic(t:int, game:gameclass):void { + entities[t].oldxp = entities[t].xp; entities[t].oldyp = entities[t].yp; + + entities[t].vx = entities[t].vx + entities[t].ax; + entities[t].vy = entities[t].vy + entities[t].ay; + entities[t].ax = 0; + + if (entities[t].gravity) { + if (entities[t].rule == 0) { + if(game.gravitycontrol==0){ + entities[t].ay = 3; + }else { + entities[t].ay = -3; + } + }else if (entities[t].rule == 7) { + entities[t].ay = -3; + }else { + entities[t].ay = 3; + } + applyfriction(t, game.inertia, 0.25); + } + + entities[t].newxp = entities[t].xp + entities[t].vx; + entities[t].newyp = entities[t].yp + entities[t].vy; + } + + + public function entitymapcollision(t:int, map:mapclass):void { + if (testwallsx(t, map, entities[t].newxp, entities[t].yp)) { + entities[t].xp = entities[t].newxp; + }else { + if (entities[t].onwall > 0) entities[t].state = entities[t].onwall; + if (entities[t].onxwall > 0) entities[t].state = entities[t].onxwall; + } + if (testwallsy(t, map, entities[t].xp, entities[t].newyp)) { + entities[t].yp = entities[t].newyp; + }else { + if (entities[t].onwall > 0) entities[t].state = entities[t].onwall; + if (entities[t].onywall > 0) entities[t].state = entities[t].onywall; + entities[t].jumpframe = 0; + } + } + + public function movingplatformfix(t:int, map:mapclass):void{ + //If this intersects the player, then we move the player along it + j = getplayer(); + if (entitycollide(t, j)) { + //ok, bollox, let's make sure + entities[j].yp = entities[j].yp + entities[j].vy; + if (entitycollide(t, j)) { + entities[j].yp = entities[j].yp - entities[j].vy; + entities[j].vy = entities[t].vy; + entities[j].newyp = entities[j].yp + entities[j].vy; + if (testwallsy(j, map, entities[j].xp, entities[j].newyp)) { + if (entities[t].vy > 0) { + entities[j].yp = entities[t].yp + entities[t].h; + entities[j].vy = 0; + entities[j].onroof = 1; + }else { + entities[j].yp = entities[t].yp - entities[j].h-entities[j].cy; + entities[j].vy = 0; + entities[j].onground = 1; + } + }else { + entities[t].state = entities[t].onwall; + } + } + } + } + + public function scmmovingplatformfix(t:int, map:mapclass):void{ + //If this intersects the SuperCrewMate, then we move them along it + j = getscm(); + if (entitycollide(t, j)) { + //ok, bollox, let's make sure + entities[j].yp = entities[j].yp + entities[j].vy; + if (entitycollide(t, j)) { + entities[j].yp = entities[j].yp - entities[j].vy; + entities[j].vy = entities[t].vy; + entities[j].newyp = entities[j].yp + entities[j].vy; + if (testwallsy(j, map, entities[j].xp, entities[j].newyp)) { + if (entities[t].vy > 0) { + entities[j].yp = entities[t].yp + entities[t].h; + entities[j].vy = 0; + //entities[j].onroof = true; + }else { + entities[j].yp = entities[t].yp - entities[j].h-entities[j].cy; + entities[j].vy = 0; + //entities[j].onground = true; + } + }else { + entities[t].state = entities[t].onwall; + } + } + } + } + + public function hormovingplatformfix(t:int, map:mapclass):void{ + //If this intersects the player, then we move the player along it + //for horizontal platforms, this is simplier + createblock(0, entities[t].xp, entities[t].yp, entities[t].w, entities[t].h); + /*j = getplayer(); + if (entitycollide(t, j)) { + //ok, bollox, let's make sure + entities[j].yp = entities[j].yp + entities[j].vy; + if (entitycollide(t, j)) { + //entities[t].state = entities[t].onwall; + } + }*/ + } + + public function customwarplinecheck(i:int):void { + //Turns on obj.customwarpmodevon and obj.customwarpmodehon if player collides + //with warp lines + + if (entities[i].active) { + //We test entity to entity + for (j = 0; j < nentity; j++) { + if (entities[j].active && i != j) {//Active + if (entities[i].rule == 0 && entities[j].rule == 5) { //Player vs vertical line! + if (entities[j].type == 51 || entities[j].type == 52) { + if (entitywarpvlinecollide(i, j)) { + customwarpmodevon = true; + } + } + } + + if (entities[i].rule == 0 && entities[j].rule == 7){ //Player vs horizontal WARP line + if (entities[j].type == 53 || entities[j].type == 54) { + if (entitywarphlinecollide(i, j)) { + customwarpmodehon = true; + } + } + } + } + } + } + } + + public function entitycollisioncheck(dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, music:musicclass):void { + i = getplayer(); + if (entities[i].active) { + //We test entity to entity + for (j = 0; j < nentity; j++) { + if (entities[j].active && i != j) {//Active + if (entities[i].rule == 0 && entities[j].rule == 1 && entities[j].harmful) { + //player i hits enemy or enemy bullet j + if (entitycollide(i, j) && !map.invincibility) { + if (entities[i].size == 0 && (entities[j].size == 0 || entities[j].size == 12)) { + //They're both sprites, so do a per pixel collision + colpoint1.x = entities[i].xp; colpoint1.y = entities[i].yp; + colpoint2.x = entities[j].xp; colpoint2.y = entities[j].yp; + if (dwgfx.flipmode) { + if (dwgfx.flipsprites[entities[i].drawframe].hitTest( + colpoint1, 1, dwgfx.flipsprites[entities[j].drawframe], colpoint2, 1)) { + //Do the collision stuff + game.deathseq = 30; + } + }else{ + if (dwgfx.sprites[entities[i].drawframe].hitTest( + colpoint1, 1, dwgfx.sprites[entities[j].drawframe], colpoint2, 1)) { + //Do the collision stuff + game.deathseq = 30; + } + } + }else { + //Ok, then we just assume a normal bounding box collision + game.deathseq = 30; + } + } + } + if (entities[i].rule == 0 && entities[j].rule == 2) { //Moving platforms + if (entitycollide(i, j)) removeblockat(entities[j].xp, entities[j].yp); + } + if (entities[i].rule == 0 && entities[j].rule == 3) { //Entity to entity + if(entities[j].onentity>0){ + if (entitycollide(i, j)) entities[j].state = entities[j].onentity; + } + } + if (entities[i].rule == 0 && entities[j].rule == 4) { //Player vs horizontal line! + if(game.deathseq==-1){ + //Here we compare the player's old position versus his new one versus the line. + //All points either be above or below it. Otherwise, there was a collision this frame. + if (entities[j].onentity > 0) { + if (entityhlinecollide(i, j)) { + music.playef(8,10); + game.gravitycontrol = (game.gravitycontrol + 1) % 2; + game.totalflips++; + if (game.gravitycontrol == 0) { + if (entities[i].vy < 1) entities[i].vy = 1; + }else { + if (entities[i].vy > -1) entities[i].vy = -1; + } + + entities[j].state = entities[j].onentity; + entities[j].life = 6; + } + } + } + } + if (entities[i].rule == 0 && entities[j].rule == 5) { //Player vs vertical line! + if(game.deathseq==-1){ + if(entities[j].onentity>0){ + if (entityvlinecollide(i, j)) { + entities[j].state = entities[j].onentity; + entities[j].life = 4; + } + } + } + } + if (entities[i].rule == 0 && entities[j].rule == 6) { //Player versus crumbly blocks! Special case + if (entities[j].onentity > 0) { + //ok; only check the actual collision if they're in a close proximity + temp = entities[i].yp - entities[j].yp; + if (temp < 30 || temp > -30) { + temp = entities[i].xp - entities[j].xp; + if (temp < 30 || temp > -30) { + if (entitycollide(i, j)) entities[j].state = entities[j].onentity; + } + } + } + } + /* + if (entities[i].rule == 0 && entities[j].rule == 7){ //Player vs horizontal WARP line + if (game.deathseq == -1) { + if (entities[j].onentity > 0) { + if (entityhlinecollide(i, j)) { + entities[j].state = entities[j].onentity; + entities[j].life = 4; + } + } + } + } + */ + } + } + } + + if (game.supercrewmate) { + //some extra collisions + for (i = 0; i < nentity; i++) { + if (entities[i].active) { + for (j = 0; j < nentity; j++) { + if (entities[j].active && i != j) {//Active + if (entities[i].type == 14) { //i is the supercrewmate + if (entities[j].rule == 1 && entities[j].harmful) {//j is a harmful enemy + //player i hits enemy or enemy bullet j + if (entitycollide(i, j) && !map.invincibility) { + if (entities[i].size == 0 && entities[j].size == 0) { + //They're both sprites, so do a per pixel collision + colpoint1.x = entities[i].xp; colpoint1.y = entities[i].yp; + colpoint2.x = entities[j].xp; colpoint2.y = entities[j].yp; + if (dwgfx.flipmode) { + if (dwgfx.flipsprites[entities[i].drawframe].hitTest( + colpoint1, 1, dwgfx.flipsprites[entities[j].drawframe], colpoint2, 1)) { + //Do the collision stuff + game.deathseq = 30; game.scmhurt = true; + } + }else{ + if (dwgfx.sprites[entities[i].drawframe].hitTest( + colpoint1, 1, dwgfx.sprites[entities[j].drawframe], colpoint2, 1)) { + //Do the collision stuff + game.deathseq = 30; game.scmhurt = true; + } + } + }else { + //Ok, then we just assume a normal bounding box collision + game.deathseq = 30; game.scmhurt = true; + } + } + } + if (entities[j].rule == 2) { //Moving platforms + if (entitycollide(i, j)) removeblockat(entities[j].xp, entities[j].yp); + } + if (entities[j].type == 8 && entities[j].rule == 3) { //Entity to entity (well, checkpoints anyway!) + if(entities[j].onentity>0){ + if (entitycollide(i, j)) entities[j].state = entities[j].onentity; + } + } + } + } + } + } + } + } + + //can't have the player being stuck... + j = getplayer(); + skipdirblocks = true; + if (!testwallsx(j, map, entities[j].xp, entities[j].yp)) { + //Let's try to get out... + if (entities[j].rule == 0) { + if(game.gravitycontrol==0){ + entities[j].yp -= 3; + }else { + entities[j].yp += 3; + } + } + } + skipdirblocks = false; + + //Can't have the supercrewmate getting stuck either! + if (game.supercrewmate) { + j = getscm(); + skipdirblocks = true; + if (!testwallsx(j, map, entities[j].xp, entities[j].yp)) { + //Let's try to get out... + if(game.gravitycontrol==0){ + entities[j].yp -= 3; + }else { + entities[j].yp += 3; + } + } + skipdirblocks = false; + } + + //Is the player colliding with any damageblocks? + if (checkdamage() && !map.invincibility) { + //usual player dead stuff + game.deathseq = 30; + } + + //how about the supercrewmate? + if (game.supercrewmate) { + if (scmcheckdamage() && !map.invincibility) { + //usual player dead stuff + game.scmhurt = true; + game.deathseq = 30; + } + } + + activetrigger = -1; + if (checktrigger() > -1) { + game.state = activetrigger; + game.statedelay = 0; + } + } + + public var nentity:int; + public var entities:Vector. = new Vector.; + + public var linecrosskludge:Vector. = new Vector.; + public var nlinecrosskludge:int; + public var colpoint1:Point, colpoint2:Point; + + public var tempx:int, tempy:int, tempw:int, temph:int, temp:int, temp2:int; + public var tpx1:int, tpy1:int, tpx2:int, tpy2:int; + public var temprect:Rectangle, temprect2:Rectangle; + public var i:int, j:int, k:int;// z:int; + public var dx:int, dy:int, dr:int; + public var px:int, py:int, linetemp:int; + public var activetrigger:int; + + public var blocks:Vector. = new Vector.; + public var flags:Array = new Array; + public var collect:Array = new Array; + public var customcollect:Array = new Array; + public var nblocks:int; + public var skipblocks:Boolean, skipdirblocks:Boolean; + + public var platformtile:int; + public var vertplatforms:Boolean, horplatforms:Boolean; + + // :( + public var nearelephant:Boolean; + public var upsetmode:Boolean, upset:int; + + //Trophy Text + public var trophytext:int, trophytype:int; + + //Secret lab scripts + public var altstates:int; + + //Custom stuff + public var customenemy:int; + public var customplatformtile:int; + public var customwarpmode:Boolean, customwarpmodevon:Boolean, customwarpmodehon:Boolean; + public var customscript:String; + public var customcrewmoods:Array = new Array(); + + public var mobilemenus:Boolean = true; + } +} \ No newline at end of file diff --git a/mobile_version/src/gameclass.as b/mobile_version/src/gameclass.as new file mode 100644 index 00000000..2f487b8f --- /dev/null +++ b/mobile_version/src/gameclass.as @@ -0,0 +1,5290 @@ +package { + import bigroom.input.KeyPoll; + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + import flash.desktop.NativeApplication; + + public class gameclass extends Sprite { + public var GAMEMODE:int = 0; + public var TITLEMODE:int = 1; + public var CLICKTOSTART:int = 2; + public var FOCUSMODE:int = 3; + public var MAPMODE:int = 4; + public var TELEPORTERMODE:int = 5; + public var GAMECOMPLETE:int = 6; + public var GAMECOMPLETE2:int = 7; + public var EDITORMODE:int = 8; + public var CONTROLTUTORIALMODE:int = 9; + + public function gameclass(dwgfx:dwgraphicsclass, map:mapclass, obj:entityclass, help:helpclass, music:musicclass):void { + platform.init(); //Cross platform specific init + NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, onActivate); + NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivate); + + infocus = true; paused = false; muted = false; globalsound = 1; + /* + if(device.devicetype != device.MOBILE){ + addEventListener(Event.DEACTIVATE, windowNotActive); + addEventListener(Event.ACTIVATE, windowActive); + } + */ + + //iOS only, turn off for android + scores.init(stage); + + //gamestate = GAMEMODE; + hascontrol = true; jumpheld = false; advancetext = false; jumppressed = 0; + gravitycontrol = 0; teleport = false; companion = 0; roomchange = false; + + edteleportent = 0; //Added in the port! + teleport_to_new_area = false; mapheld = false; teleport_to_x = 0; teleport_to_y = 0; + teleportscript = ""; + savemystats = false; + menukludge = false; + quickrestartkludge = false; + + tapleft = 0; tapright = 0; + + recording = 0; recordinit = false; playbackfinished = false; + recordstring = ""; + + advancetext = false; pausescript = false; completestop = false; + activeactivity = -1; act_fade = 0; + backgroundtext = false; + startscript = false; newscript = ""; + inintermission = false; + + alarmon = false; alarmdelay = 0; blackout = false; + creditposx = 0; creditposy = 0; creditposdelay = 0; + + useteleporter = false; teleport_to_teleporter = 0; + + teleblock = new Rectangle(); + activetele = false; readytotele = 0; + activity_lastprompt = ""; activity_r = 0; activity_g = 0; activity_b = 0; + creditposition = 0; + bestgamedeaths = -1; + + //Accessibility Options + colourblindmode = false; + noflashingmode = false; + slowdown = 30; + + fullscreen = false;// true; //Assumed true at first unless overwritten at some point! + advanced_mode = false; + advanced_smoothing = true; + advanced_scaling = 0; + + nodeathmode = false; + nocutscenes = false; + + for (i = 0; i < 50; i++){ + customscript.push(""); + } + customcol = 0; + + for (i = 0; i < 6; i++) { + var cstats:Boolean; + cstats = false; + crewstats.push(cstats); + tele_crewstats.push(false); + quick_crewstats.push(false); + besttimes.push( -1); + besttrinkets.push( -1); + bestlives.push( -1); + bestrank.push( -1); + } + crewstats[0] = true; + lastsaved = 0; + + tele_gametime = "00:00"; + tele_trinkets = 0; + tele_currentarea = "Error! Error!"; + quick_gametime = "00:00"; + quick_trinkets = 0; + quick_currentarea = "Error! Error!"; + + //Menu stuff initiliased here: + for (i = 0; i < 25; i++) { + menuoptions.push(new String); + menuoptions_alt.push(new String); + menuoptionsactive.push(new Boolean); + menuoptionslayout.push(new int(0)); + + var nb1:Boolean, nb2:Boolean; + nb1 = false; nb2 = false; + unlock.push(nb1); + unlocknotify.push(nb2); + } + + for (i = 0; i < 25; i++) { unlock[i] = false; unlocknotify[i] = false; } + + nummenuoptions = 0; currentmenuoption = 0; + menuselection = "null"; currentmenuname = "null"; + menuxoff = 0; menuyoff = 0; + menucountdown = 0; menudest="null"; + createmenu("mainmenu"); + + deathcounts = 0; gameoverdelay = 0; + frames = 0; seconds = 0; minutes = 0; hours = 0; + gamesaved = false; + savetime = "00:00"; savearea = "nowhere"; savetrinkets = 0; + + intimetrial = false; + timetrialcountdown = 0; timetrialshinytarget = 0; + timetrialparlost = false; timetrialpar = 0; timetrialresulttime = 0; + + totalflips = 0; + hardestroom = "Welcome Aboard"; hardestroomdeaths = 0; currentroomdeaths=0; + + sfpsmode = false; //by default, play at 30 fps + inertia = 1.1; + swnmode = false; swntimer = 0; swngame = 0;//Not playing sine wave ninja! + swnstate = 0; swnstate2 = 0; swnstate3 = 0; swnstate4 = 0; swndelay = 0; swndeaths = 0; + supercrewmate = false; scmhurt = false; scmprogress = 0; scmmoveme = false; + swncolstate = 0; swncoldelay = 0; + swnrecord = 0; swnbestrank = 0; swnrank = 0; swnmessage = 0; + + for (i = 0; i < 200; i++) { + customlevelstats.push(""); + customlevelscore.push(int(0)); + } + + clearcustomlevelstats(); + + //Save stuff + for (i = 0; i < 3; i++) { + var supersave:saveclass = new saveclass(); + savestate.push(supersave); + } + + telecookie = SharedObject.getLocal("vvvvvv_telesave"); + quickcookie = SharedObject.getLocal("vvvvvv_quicksave"); + levelstatscookie = SharedObject.getLocal("vvvvvv_levelstats"); + for (var i:int = 0; i < editor.playerlevel.length; i++) { + customcookie.push(SharedObject.getLocal("vvvvvv_custom_" + String(i))); + customcookieexists.push(false); + customcookiesummary.push(false); + } + + levelstatscookieloaded = true; + if (levelstatscookie.data.num == undefined) { + levelstatscookie.data.num = 0; + } + + if (telecookie.data.savex == undefined) { + telecookieexists = false; telesummary = ""; + } else { + telecookieexists = true; telesummary = telecookie.data.summary; + } + + if (quickcookie.data.savex == undefined) { + quickcookieexists = false; quicksummary = ""; + } else { + quickcookieexists = true; quicksummary = quickcookie.data.summary; + } + + for (i = 0; i < editor.playerlevel.length; i++) { + if(customcookie[i].data.savex == undefined) { + customcookieexists[i] = false; customcookiesummary[i] = ""; + } else { + customcookieexists[i] = true; customcookiesummary[i] = customcookie[i].data.summary; + } + } + + screenshake = flashlight = 0; + + stat_trinkets = 0; + + test = false; teststring = "TEST = True"; + state = 1; statedelay = 0; + updatestate(dwgfx, map, obj, help, music); + } + + public function onActivate(e:Event):void { + platform.callonwake(); + infocus = true; + } + + public function onDeactivate(e:Event):void { + infocus = false; + } + + public function clearcustomlevelstats():void{ + //just clearing the arrays + for (var i:int = 0; i < 200; i++) { + customlevelstats[i] = ""; + customlevelscore[i] = 0; + } + numcustomlevelstats = 0; + + customlevelstatsloaded=false; //To ensure we don't load it where it isn't needed + } + + public function updatecustomlevelstats(clevel:String, cscore:int):void{ + var tvar:int = -1; + for (var j:int = 0; j < numcustomlevelstats; j++) { + if (clevel == customlevelstats[j]) { + tvar=j; + j=numcustomlevelstats+1; + } + } + + if (tvar >= 0) { + //update existing entry + customlevelscore[tvar]=cscore; + }else{ + //add a new entry + if (numcustomlevelstats < 200) { + customlevelstats[numcustomlevelstats]=clevel; + customlevelscore[numcustomlevelstats]=cscore; + numcustomlevelstats++; + } + } + savecustomlevelstats(); + } + + public function loadcustomlevelstats():void{ + //Totally rewriten for mobile version, probably broken + if (!customlevelstatsloaded) { + numcustomlevelstats = levelstatscookie.data.num; + if (numcustomlevelstats > 0) { + if (numcustomlevelstats >= 200) numcustomlevelstats = 199; + + var lvlstring:String = levelstatscookie.data.customlevelscore; + var values:Array; + values = new Array; + values = lvlstring.split(","); + for (var i:int = 0; i < values.length; i++) { + if (i < 200) customlevelscore[i] = int(values[i]); + } + + lvlstring = levelstatscookie.data.customlevelstats; + values = new Array; + values = lvlstring.split("|"); + for(i = 0; i < values.length; i++){ + if (i < 200) customlevelstats[i] = values[i]; + } + } + } + } + + public function savecustomlevelstats():void { + //Rewritten for mobile + levelstatscookie = SharedObject.getLocal("vvvvvv_levelstats"); + + if (numcustomlevelstats >= 200) numcustomlevelstats = 199; + levelstatscookie.data.num = numcustomlevelstats; + + var lvlstring:String = ""; + for (var i:int = 0; i < numcustomlevelstats; i++) { + lvlstring = lvlstring + customlevelscore[i] + ","; + } + levelstatscookie.data.customlevelscore = lvlstring; + + lvlstring = "" + for (i = 0; i < numcustomlevelstats; i++) { + lvlstring = lvlstring + customlevelstats[i] + "|"; + } + levelstatscookie.data.customlevelstats = lvlstring; + + levelstatscookie.flush(); + levelstatscookie.close(); + } + + public function inittouchpoints(key:KeyPoll):void { + if (key.touchPoints > 0) { + my = key.touchy[key.touchPoints - 1]; + } + } + + public function inbox(x:int, y:int, x1:int, y1:int, w:int, h:int):Boolean { + if (x >= x1 && x <= x1 + w) { + if (y >= y1 && y <= y1 + h) { + return true; + } + } + return false; + } + + public var m_touchx:int, m_touchy:int; + public var m_pressed:Boolean = false; + public var b_gap:int = 40, b_size:int = 26; + + public function gettouchpoints_mainmenu(key:KeyPoll, dwgfx:dwgraphicsclass):void { + //Checks for last touchpress. For main menu, check to see that you've lifted + //your finger before continuing. + if (!m_pressed) { + if (key.touchPoints > 0) { + m_pressed = true; + m_touchx = key.touchx[key.touchPoints - 1]; + m_touchy = key.touchy[key.touchPoints - 1]; + if (dwgfx.flipmode) m_touchy = dwgfx.devicey - m_touchy; + //These coordinates now need to be translated to actual screen coordinates + //Gamecenter + if(menustart && !showloadingnotice) { + if (inbox(m_touchx, m_touchy, 0, 0, dwgfx.buttonscreen[0].width + (dwgfx.buttonxspacing * 2), dwgfx.buttonscreen[0].height + (dwgfx.buttonyspacing * 2))) { + //Bring up game center achievements + scores.showAchievements(); + } + } + + m_touchx -= dwgfx.screen.x; + m_touchx = m_touchx / dwgfx.screensizemultiplier; + m_touchy = m_touchy / dwgfx.screensizemultiplier; + + //Ok! Now we see if we've pressed any buttons! + + for (i = 0; i < nummenuoptions; i++) { + switch(menuoptionslayout[i]) { + case 0: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 160 - 70, 140 + (i * b_gap) + menuyoff - 6, 140, b_size)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 1: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 160 - 70, 140 + (i * b_gap) - 10 + menuyoff - 6, 140, b_size * 2)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 2: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 160 - 70, 140 + (i * b_gap)+20 + menuyoff - 6, 140, b_size)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 3: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, -8, 230 - 6, 70, b_size)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 4: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 160 - 90, 140 + (i * b_gap) + menuyoff - 6, 180, b_size)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 5: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 10, 140 + (i * 68)-10 + menuyoff - 6, 140, 40)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 6: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 170, 140 + ((i-3) * 68)-10 + menuyoff - 6, 140, 40)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 7: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, -8, 230 - 6-10, 70, b_size)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 8: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 320 - 70, 230 - 6-10, 70, b_size)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 9: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 160 - 90, 140 + (i * b_gap) + menuyoff - 6, 180, b_size)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 10: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 160 - 70, 240 - b_gap, 140, b_size)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 11: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 160 - 140, 140 + (i * 65)-10 + menuyoff - 6, 280, (b_size*2)+5)) { + press_action = true; + currentmenuoption = i; + } + } + break; + case 12: + if (menuoptionsactive[i]) { + if (inbox(m_touchx, m_touchy, 320 - 70, 0, 70, b_size+10)) { + press_action = true; + currentmenuoption = i; + } + } + break; + } + + if (!menustart) press_action = true; + } + } + }else { + if (key.touchPoints == 0) { + m_pressed = false; + } + } + } + + + public function gettouchpoints_gamemenu(key:KeyPoll, obj:entityclass, music:musicclass, dwgfx:dwgraphicsclass):void { + //Buttons for in game menu! + if (!m_pressed) { + if (key.touchPoints > 0) { + m_pressed = true; + m_touchx = key.touchx[key.touchPoints - 1]; + m_touchy = key.touchy[key.touchPoints - 1]; + if (dwgfx.flipmode) m_touchy = dwgfx.devicey - m_touchy; + + if (inbox(m_touchx, m_touchy, dwgfx.devicex - dwgfx.buttonscreen[0].width - dwgfx.buttonxspacing, 0, dwgfx.buttonscreen[0].width + (dwgfx.buttonxspacing*2), dwgfx.buttonscreen[0].height + (dwgfx.buttonyspacing*2) )) { + press_map = true; + } + if(menupage == 0){ + if (inbox(m_touchx, m_touchy, 0, 0, dwgfx.buttonscreen[1].width + (dwgfx.buttonxspacing*2), dwgfx.buttonscreen[1].height + (dwgfx.buttonyspacing*2) )) { + menupage = 30; + music.playef(11, 10); + } + } + + //These coordinates now need to be translated to actual screen coordinates + m_touchx -= dwgfx.screen.x; + m_touchx = m_touchx / dwgfx.screensizemultiplier; + m_touchy = m_touchy / dwgfx.screensizemultiplier; + + //Ok! Now we see if we've pressed any buttons! + if (inbox(m_touchx, m_touchy, 30 - 8-10, 220-20, 56+20, b_size+40)) { + //Press map button + //disablekludge_1 = !disablekludge_1; + menupage = 0; + music.playef(11, 10); + }else if (inbox(m_touchx, m_touchy, 103-10, 220-20, 56+20, b_size+40)) { + //Press crew button + //disablekludge_2 = !disablekludge_2; + menupage = 1; + music.playef(11, 10); + }else if (inbox(m_touchx, m_touchy, 185-4-10, 220-20, 56+20, b_size+40)) { + //Press stats button + //disablekludge_3 = !disablekludge_3; + menupage = 2; + music.playef(11, 10); + }else if (inbox(m_touchx, m_touchy, 258-10, 220-20, 56+20, b_size+40)) { + //Press quit button + //disablekludge_4 = !disablekludge_4; + menupage = 3; + music.playef(11, 10); + } + + if (menupage == 1 && !insecretlab && obj.flags[67] == 1) { + if (inbox(m_touchx, m_touchy, 160 + 4 - 24-20, 110-20, (8 * 6)+40, b_size+40)) { + //Warp to ship! + press_action = true; + } + } + if (menupage == 3 || menupage == 10 || menupage == 20) { + if (inbox(m_touchx, m_touchy, 160 + 4 - 24-20, 110-20, (8 * 6)+40, b_size+40)) { + //Press quit button + press_action = true; + } + } + if (menupage == 30) { + //Change controls + if (inbox(m_touchx, m_touchy, 160 - (12 * 8) - 20-10, 156-20, (8 * 8)+20, b_size+40)) { + if(controlstyle!=0){ + controlstyle = 0; + music.playef(11, 10); + savemystats = true; + } + } + if (inbox(m_touchx, m_touchy, 160 - (4 * 8)-20, 156-10, (8 * 8)+20, b_size+40)) { + if(controlstyle!=1){ + controlstyle = 1; + music.playef(11, 10); + savemystats = true; + } + } + if (inbox(m_touchx, m_touchy, 160 + (4 * 8)+20-10, 156-20, (8 * 8)+20, b_size+40)) { + if(controlstyle!=2){ + controlstyle = 2; + music.playef(11, 10); + savemystats = true; + } + } + } + + } + }else { + if (key.touchPoints == 0) { + m_pressed = false; + } + } + } + + public function gettouchpoints_teleportmenu(key:KeyPoll, music:musicclass, dwgfx:dwgraphicsclass):void { + //Buttons for in game menu! + if (!m_pressed) { + if (key.touchPoints > 0) { + m_pressed = true; + m_touchx = key.touchx[key.touchPoints - 1]; + m_touchy = key.touchy[key.touchPoints - 1]; + if (dwgfx.flipmode) m_touchy = dwgfx.devicey - m_touchy; + //These coordinates now need to be translated to actual screen coordinates + m_touchx -= dwgfx.screen.x; + m_touchx = m_touchx / dwgfx.screensizemultiplier; + m_touchy = m_touchy / dwgfx.screensizemultiplier; + + //Ok! Now we see if we've pressed any buttons! + if (inbox(m_touchx, m_touchy, 5+10-20, 220-10-20, 64+40, b_size+40)) { + //Press left + press_left = true; + music.playef(11, 10); + }else if (inbox(m_touchx, m_touchy,320 - 5 - 64-20, 220-10-20, 64+40, b_size+40)) { + //Press right + press_right = true; + music.playef(11, 10); + }else if (inbox(m_touchx, m_touchy, 160 - 40+4-20, 220-20, 64+16+40, b_size+40)) { + //Press teleport + press_map = true; + music.playef(11, 10); + } + } + }else { + if (key.touchPoints == 0) { + m_pressed = false; + } + } + } + + public function gettouchpoints_gamecomplete(key:KeyPoll, music:musicclass, dwgfx:dwgraphicsclass):void { + //Buttons for in game menu! + if (!m_pressed) { + if (key.touchPoints > 0) { + /* + m_touchx = key.touchx[key.touchPoints - 1]; + m_touchy = key.touchy[key.touchPoints - 1]; + if (dwgfx.flipmode) m_touchy = dwgfx.devicey - m_touchy; + //These coordinates now need to be translated to actual screen coordinates + m_touchx -= dwgfx.screen.x; + m_touchx = m_touchx / dwgfx.screensizemultiplier; + m_touchy = m_touchy / dwgfx.screensizemultiplier; + */ + press_action = true; + + } + }else { + if (key.touchPoints == 0) { + m_pressed = false; + } + } + } + + public function gettouchpoints_controltutorial(key:KeyPoll, music:musicclass, dwgfx:dwgraphicsclass):void { + //Buttons for in game menu! + if (!m_pressed) { + if (key.touchPoints > 0) { + m_pressed = true; + m_touchx = key.touchx[key.touchPoints - 1]; + m_touchy = key.touchy[key.touchPoints - 1]; + if (dwgfx.flipmode) m_touchy = dwgfx.devicey - m_touchy; + //These coordinates now need to be translated to actual screen coordinates + m_touchx -= dwgfx.screen.x; + m_touchx = m_touchx / dwgfx.screensizemultiplier; + m_touchy = m_touchy / dwgfx.screensizemultiplier; + + //Ok! Now we see if we've pressed any buttons! + if (inbox(m_touchx, m_touchy, 160 + 4 - 24-20, 200-20, (8 * 7)+40, b_size+40)) { + //Press continue + press_action = true; + music.playef(11, 10); + } + } + }else { + if (key.touchPoints == 0) { + m_pressed = false; + } + } + } + + public function gettouchpoints(key:KeyPoll, dwgfx:dwgraphicsclass):void { + //Iterate through touch points, find buttons that are being pressed + switch(controlstyle) { + case 0: + //Swipe controls + for (i = 0; i < key.touchPoints; i++) { + /*if (inbox(key.touchx[i], key.touchy[i], 0, dwgfx.buttonpos[0].y - 100, dwgfx.buttonsize + dwgfx.buttonxspacing+ (dwgfx.buttonxspacing/2), dwgfx.buttonsize + 200)) { + press_left = true; + }else if (inbox(key.touchx[i], key.touchy[i], dwgfx.buttonpos[1].x - (dwgfx.buttonxspacing/2), dwgfx.buttonpos[1].y - 100, dwgfx.buttonsize + (dwgfx.buttonxspacing*3), dwgfx.buttonsize + 200)) { + press_right = true; + }else + */ + if (insecretlab) { + if (inbox(key.touchx[i], key.touchy[i], 0, 0, dwgfx.buttonscreen[0].width + (dwgfx.buttonxspacing * 2), dwgfx.buttonscreen[0].height + (dwgfx.buttonyspacing * 2) )) { + scores.opengamecenter(); + press_map = true; + } + } + if (inbox(key.touchx[i], key.touchy[i], dwgfx.devicex - dwgfx.buttonscreen[0].width - dwgfx.buttonxspacing, 0, dwgfx.buttonscreen[0].width + (dwgfx.buttonxspacing*2), dwgfx.buttonscreen[0].height + (dwgfx.buttonyspacing*2) )) { + press_map = true; + }else { + if (key.touchid[i] != key.controlstick) { + press_action = true; + } + } + } + + if (key.pushleft) press_left = true; + if (key.pushright) press_right = true; + break; + case 1: + //both sides + for (i = 0; i < key.touchPoints; i++) { + //if (inbox(key.touchx[i], key.touchy[i], 0, 0, dwgfx.devicex, dwgfx.devicey / 4)) { + // press_action = true; + //}else + if (insecretlab) { + if (inbox(key.touchx[i], key.touchy[i], 0, 0, dwgfx.buttonscreen[0].width + (dwgfx.buttonxspacing * 2), dwgfx.buttonscreen[0].height + (dwgfx.buttonyspacing * 2) )) { + scores.opengamecenter(); + press_map = true; + } + } + if (inbox(key.touchx[i], key.touchy[i], dwgfx.devicex - dwgfx.buttonscreen[0].width - dwgfx.buttonxspacing, 0, dwgfx.buttonscreen[0].width + (dwgfx.buttonxspacing*2), dwgfx.buttonscreen[0].height + (dwgfx.buttonyspacing*2) )) { + press_map = true; + }else{ + if (inbox(key.touchx[i], key.touchy[i], 0, 0, dwgfx.devicex / 2, dwgfx.devicey)) { + press_left = true; + }else if (inbox(key.touchx[i], key.touchy[i], dwgfx.devicex / 2, 0, dwgfx.devicex / 2, dwgfx.devicey)) { + press_right = true; + } + } + } + + /* + if (last_action > 0) { + if (!press_left || !press_right) { + last_action = 0; + }else { + press_left = false; + press_right = false; + } + } + */ + + //if (last_action > 0) { + if (press_left && press_right) { + if (last_left > 0 && last_right > 0) { + press_left = false; + press_right = false; + press_action = true; + last_action = 1; + }else if (last_left > 0 && last_right == 0) { + press_right = false; + press_action = true; + }else if (last_left == 0 && last_right > 0) { + press_left = false; + press_action = true; + } + } + //} + + if (press_left) { + last_left = 2; + }else { + if (last_left > 0) last_left--; + } + if (press_right) { + last_right = 2; + }else { + if (last_right > 0) last_right--; + } + break; + case 2: + //D-Pad controls + for (i = 0; i < key.touchPoints; i++) { + if (insecretlab) { + if (inbox(key.touchx[i], key.touchy[i], 0, 0, dwgfx.buttonscreen[0].width + (dwgfx.buttonxspacing * 2), dwgfx.buttonscreen[0].height + (dwgfx.buttonyspacing * 2) )) { + scores.opengamecenter(); + press_map = true; + } + } + if (inbox(key.touchx[i], key.touchy[i], dwgfx.devicex - dwgfx.buttonscreen[0].width - dwgfx.buttonxspacing, 0, dwgfx.buttonscreen[0].width + (dwgfx.buttonxspacing*2), dwgfx.buttonscreen[0].height + (dwgfx.buttonyspacing*2) )) { + press_map = true; + }else if (inbox(key.touchx[i], key.touchy[i], 0, dwgfx.buttonpos[2].y - (dwgfx.devicey*2/3), dwgfx.buttonsize + dwgfx.buttonxspacing+ (dwgfx.buttonxspacing/2), dwgfx.devicey)) { + press_left = true; + }else if (inbox(key.touchx[i], key.touchy[i], dwgfx.buttonpos[3].x - (dwgfx.buttonxspacing / 2), dwgfx.buttonpos[3].y -(dwgfx.devicey*2 / 3), dwgfx.buttonsize + (dwgfx.buttonxspacing * 5), dwgfx.devicey)) { + press_right = true; + }else if (key.touchx[i] > dwgfx.devicex / 2) { + press_action = true; + } + } + break; + } + } + + public function windowNotActive(e:Event):void{ infocus = false; } + public function windowActive(e:Event):void{ infocus = true; } + + public function customstart(obj:entityclass, music:musicclass):void{ + jumpheld = true; + + savex = edsavex; + savey = edsavey; + saverx = edsaverx; + savery = edsavery; + + savegc = edsavegc; + savedir = edsavedir; //Worldmap Start + //savex = 6 * 8; savey = 15 * 8; saverx = 46; savery = 54; savegc = 0; savedir = 1; //Final Level Current + savepoint = 0; + gravitycontrol = savegc; + + coins = 0; + trinkets = 0; + crewmates = 0; + + //state = 2; deathseq = -1; lifeseq = 10; //Not dead, in game initilisation state + state = 0; + deathseq = -1; + lifeseq = 0; + + //let's teleport in! + //state = 2500; + //if (!nocutscenes) music.play(5); + } + + public function start(obj:entityclass, music:musicclass):void { + jumpheld = true; + + savex = 232; savey = 113; saverx = 104; savery = 110; savegc = 0; savedir = 1; //Worldmap Start + //savex = 6 * 8; savey = 15 * 8; saverx = 46; savery = 54; savegc = 0; savedir = 1; //Final Level Current + savepoint = 0; + gravitycontrol = savegc; + + coins = 0; trinkets = 0; + + //state = 2; deathseq = -1; lifeseq = 10; //Not dead, in game initilisation state + state = 0; deathseq = -1; lifeseq = 0; + + //let's teleport in! + //state = 2500; + if (!nocutscenes) music.play(5); + } + + + public function startspecial(t:int, obj:entityclass, music:musicclass):void { + jumpheld = true; + + switch(t) { + case 0: //Secret Lab + savex = 104; savey = 169; saverx = 118; savery = 106; savegc = 0; savedir = 1; + break; + case 1: //Intermission 1 (any) + savex = 80; savey = 57; saverx = 41; savery = 56; savegc = 0; savedir = 0; + break; + default: + savex = 232; savey = 113; saverx = 104; savery = 110; savegc = 0; savedir = 1; //Worldmap Start + break; + } + + savepoint = 0; + gravitycontrol = savegc; + coins = 0; trinkets = 0; + state = 0; deathseq = -1; lifeseq = 0; + } + + public function starttrial(t:int, obj:entityclass, music:musicclass):void { + jumpheld = true; + + switch(t) { + case 0: //Space Station 1 + savex = 200; savey = 161; saverx = 113; savery = 105; savegc = 0; savedir = 1; + break; + case 1: //Lab + savex = 191; savey = 33; saverx = 102; savery = 116; savegc = 0; savedir = 1; + break; + case 2: //Tower + savex = 84; savey = 193, saverx = 108; savery = 109; savegc = 0; savedir = 1; + break; + case 3: //Space Station 2 + savex = 148; savey = 38; saverx = 112; savery = 114; savegc = 1; savedir = 0; + break; + case 4: //Warp + savex = 52; savey = 73; saverx = 114; savery = 101; savegc = 0; savedir = 1; + break; + case 5: //Final + savex = 101; savey = 113; saverx = 46; savery = 54; savegc = 0; savedir = 1; + break; + default: + savex = 232; savey = 113; saverx = 104; savery = 110; savegc = 0; savedir = 1; //Worldmap Start + break; + } + + savepoint = 0; + gravitycontrol = savegc; + + coins = 0; trinkets = 0; + + //state = 2; deathseq = -1; lifeseq = 10; //Not dead, in game initilisation state + state = 0; deathseq = -1; lifeseq = 0; + } + + public function starttest(obj:entityclass, music:musicclass):void { + jumpheld = true; + + //savex = 19*8; savey = 17*8; saverx = 50; savery = 50; savegc = 0; savedir = 1; //Generic Start + + //savex = 19*8; savey = 18*8; saverx = 114; savery = 101; savegc = 0; savedir = 1; //Warp Zone Start + //savex = 20*8; savey = 18*8; saverx = 113; savery = 100; savegc = 0; savedir = 1; //Warp Zone current + + //savex = 6 * 8; savey = 6 * 8; saverx = 113; savery = 105; savegc = 0; savedir = 1; //Space Station Start + //savex = 6 * 8; savey = 6 * 8; saverx = 50; savery = 42; savegc = 0; savedir = 1; //Space Station Reversal + //savex = 16 * 8; savey = 10 * 8; saverx = 116; savery = 107; savegc = 0; savedir = 1; //Space Station Tele + + //savex = 5 * 8; savey = 5 * 8; saverx = 112; savery = 114; savegc = 1; savedir = 1; //Space Station 2 Start + //savex = 22*8; savey = 10*8; saverx = 113; savery = 108; savegc = 0; savedir = 1; //Space Station 2 Tele1 + //savex = 9*8; savey = 13*8; saverx = 118; savery = 108; savegc = 0; savedir = 1; //Space Station 2 s.driller + //savex = 10*8; savey = 22*8; saverx = 111; savery = 107; savegc = 0; savedir = 1; //Space Station 2 ending + //savex = 24*8; savey = 26*8; saverx = 53; savery = 52; savegc = 0; savedir = 1; //Actual start + //savex = 5 * 8; savey = 5 * 8; saverx = 117; savery = 108; savegc = 0; savedir = 1; //Space Station 2 wip + + //savex = 18 * 8; savey = 24 * 8; saverx = 100; savery = 116; savegc = 0; savedir = 1; //Lab outside, start + //savex = 17 * 8; savey = 24 * 8; saverx = 107; savery = 115; savegc = 1; savedir = 1; //Lab tele + //savex = 31 * 8; savey = 12 * 8; saverx = 49; savery = 54; savegc = 1; savedir = 1; //Lab, final bit + //savex = 19 * 8; savey = 14 * 8; saverx = 104; savery = 102; savegc = 0; savedir = 1; //Lab, ending + + //savex = 20; savey = 680*8; saverx = 109; savery = 101; savegc = 0; savedir = 1; //The tower + //savex = 6 * 8; savey = 6 * 8; saverx = 108; savery = 109; savegc = 0; savedir = 1; //Area just before tower + //savex = 6 * 8; savey = 6 * 8; saverx = 110; savery = 104; savegc = 0; savedir = 1; //Area after tower + //savex = 70; savey = 129; saverx = 1; savery = 1; savegc = 0; savedir = 1; //The testbed + + //savex = 14 * 8; savey = 15 * 8; saverx = 102; savery = 111; savegc = 0; savedir = 1; //Worldmap Start + //savex = 19 * 8; savey = 13 * 8; saverx = 114; savery = 117; savegc = 0; savedir = 1; //Warp zone entrance + //savex = 19 * 8; savey = 13 * 8; saverx = 110; savery = 109; savegc = 0; savedir = 1; //The Elephant + + //savex = 16 * 8; savey = 15 * 8; saverx = 46; savery = 54; savegc = 0; savedir = 1; //Final Level Start + //savex = 5 * 8; savey = 15 * 8; saverx = 41; savery = 52; savegc = 0; savedir = 1; //Final Level Midpoint + //savex = (5-3) * 8; savey = (5+2) * 8; saverx = 52-2; savery = 53; savegc = 0; savedir = 1; //Final Level End + + //savex = 6 * 8; savey = 6 * 8; saverx = 117; savery = 107; savegc = 0; savedir = 1; //Space Station Start + + savex = 13 * 8; savey = 129; saverx = 102; savery = 111; savegc = 0; savedir = 1; //Worldmap Start ********** + //savex = 13 * 8; savey = (19 * 8)-22; saverx = 107; savery = 108; savegc = 0; savedir = 1; //Worldmap Start + + //savex = 228; savey = 129; saverx = 53; savery = 49; savegc = 0; savedir = 0; //Intermission level 2 + //savex = 80; savey = 57; saverx = 41; savery = 56; savegc = 0; savedir = 0; //Intermission level 1 + //savex = 215; savey = 33; saverx = 52-1; savery = 56; savegc = 0; savedir = 0; //Intermission level 1 + + //savex = 104; savey = 169; saverx = 118; savery = 106; savegc = 0; savedir = 1; //Secret Lab + //savex = 132; savey = 137; saverx = 119; savery = 107; savegc = 0; savedir = 1; //Secret Lab (beside gravitron) + + savepoint = 0; + gravitycontrol = savegc; + + coins = 0; trinkets = 0; + + state = 0; deathseq = -1; lifeseq = 10; + + //music.play(1); + } + + //Menu stuff first! + public function createmenu(t:String):void { + var tcount:int, i:int, tvar:int, j:int; + for (i = 0; i < 25; i++) menuoptionslayout[i] = 0; + + currentmenuoption = 0; menuselection = "null"; currentmenuname = t; + menuxoff = 0; menuyoff = 0; + menucountdown = 0; menudest="null"; + + if (mobilemenu) { + if (t == "mainmenu") { + showloadingnotice = false; + menuoptions[0] = "play"; + menuoptionsactive[0] = true; + menuoptionslayout[0] = 1; + menuoptions[1] = "player worlds"; + menuoptionsactive[1] = true; + menuoptionslayout[1] = 2; + /*menuoptions[2] = "super gravitron"; + menuoptionsactive[2] = true; + menuoptionslayout[2] = 2; + */ + menuoptions[2] = "options"; + menuoptionsactive[2] = true; + menuoptionslayout[2] = 7; + menuoptions[3] = "credits"; + menuoptionsactive[3] = true; + menuoptionslayout[3] = 8; + menuoptions[4] = "more games"; + menuoptionsactive[4] = true; + menuoptionslayout[4] = 12; + nummenuoptions = 5; + menuxoff = -16; + menuyoff = -50+20; + }else if (t == "playerworlds"){ + menuoptions[0] = "play a level"; + menuoptionsactive[0] = true; + menuoptions[1] = "level editor"; + menuoptionsactive[1] = true; + menuoptions[2] = "< back"; menuoptionsactive[2] = true; + menuoptionslayout[2] = 3; + nummenuoptions = 3; + menuxoff = -30; + menuyoff = -40-(12*2); + }else if (t == "quickloadlevel") { + menuoptions[0] = "continue from save"; + menuoptionsactive[0] = true; + menuoptionslayout[0] = 4; + menuoptions[1] = "start from beginning"; + menuoptionsactive[1] = true; + menuoptionslayout[1] = 4; + menuoptions[2] = "< back"; menuoptionsactive[2] = true; + menuoptionslayout[2] = 3; + nummenuoptions = 3; + menuxoff = -40; + menuyoff = -30-(12*2); + }else if (t == "youwannaquit") { + menuoptions[0] = "yes, quit"; menuoptionsactive[0] = true; + menuoptions[1] = "no, return"; menuoptionsactive[1] = true; + nummenuoptions = 2; + menuxoff = 0; menuyoff = -20-(12*2); + }else if (t == "levellist"){ + if (editor.ListOfMetaData.length == 0) { + menuoptions[0] = "ok"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 0; + menuyoff = -20; + }else{ + tcount = 0; + for (i = 0; i < editor.ListOfMetaData.length; i++) { + if (i >= levelpage * 3 && i < (levelpage * 3) + 3) { + //This is, er, suboptimal. Whatever, life optimisation and all that + tvar = -1; + for (j = 0; j < numcustomlevelstats; j++) { + if (editor.ListOfMetaData[i].filename == customlevelstats[j]) { + tvar = customlevelscore[j]; + j=numcustomlevelstats+1; + } + } + /* + if(tvar>=0){ + if(customlevelscore[tvar]==0){ + menuoptions[tcount] = " " + editor.ListOfMetaData[i].title; + }else if(customlevelscore[tvar]==1){ + menuoptions[tcount] = " * " + editor.ListOfMetaData[i].title; + }else if(customlevelscore[tvar]==3){ + menuoptions[tcount] = "** " + editor.ListOfMetaData[i].title; + } + }else{ + menuoptions[tcount] = " " + editor.ListOfMetaData[i].title; + } + */ + menuoptions[tcount] = String(i); + menuoptions_alt[tcount] = String(tvar); + menuoptionsactive[tcount] = true; + menuoptionslayout[tcount] = 11; + menuoptions[tcount] = menuoptions[tcount].toLowerCase(); + tcount++; + } + } + if((levelpage*3)+3= 3 && !unlocknotify[9]) temp++; + if (unlock[1] && stat_trinkets >= 6 && !unlocknotify[10]) temp++; + if (unlock[2] && stat_trinkets >= 9 && !unlocknotify[11]) temp++; + if (unlock[3] && stat_trinkets >= 12 && !unlocknotify[12]) temp++; + if (unlock[4] && stat_trinkets >= 15 && !unlocknotify[13]) temp++; + if (unlock[5] && stat_trinkets >= 18 && !unlocknotify[14]) temp++; + if (temp > 0) { + //you've unlocked a time trial! + if (unlock[0] && stat_trinkets >= 3) { unlocknotify[9] = true; unlock[9] = true; } + if (unlock[1] && stat_trinkets >= 6) { unlocknotify[10] = true; unlock[10] = true; } + if (unlock[2] && stat_trinkets >= 9) { unlocknotify[11] = true; unlock[11] = true; } + if (unlock[3] && stat_trinkets >= 12) { unlocknotify[12] = true; unlock[12] = true; } + if (unlock[4] && stat_trinkets >= 15) { unlocknotify[13] = true; unlock[13] = true; } + if (unlock[5] && stat_trinkets >= 18) { unlocknotify[14] = true; unlock[14] = true; } + + if (temp == 1) { + createmenu("unlocktimetrial"); savemystats = true; + }else if (temp > 1) { + createmenu("unlocktimetrials"); savemystats = true; + } + }else { + //Alright, we haven't unlocked any time trials. How about no death mode? + temp = 0; + if (bestrank[0] >= 2) temp++; + if (bestrank[1] >= 2) temp++; + if (bestrank[2] >= 2) temp++; + if (bestrank[3] >= 2) temp++; + if (bestrank[4] >= 2) temp++; + if (bestrank[5] >= 2) temp++; + if (temp >= 4 && !unlocknotify[17]) { + //Unlock No Death Mode + unlocknotify[17] = true; unlock[17] = true; + createmenu("unlocknodeathmode"); + savemystats = true; + }else{ + //Alright then! Flip mode? + if (unlock[5] && !unlocknotify[18]) { + unlock[18] = true; unlocknotify[18] = true; + createmenu("unlockflipmode"); + savemystats = true; + }else { + //What about the intermission levels? + if (unlock[7] && !unlocknotify[16]) { + unlock[16] = true; unlocknotify[16] = true; + createmenu("unlockintermission"); + savemystats = true; + }else { + //ok, secret lab! no notification, but test: + if (unlock[8]) { + createmenu("playsecretlab"); + }else{ + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + menuoptions[1] = "play modes"; menuoptionsactive[1] = true; + menuoptions[2] = "new game"; menuoptionsactive[2] = true; + menuoptions[3] = "< back"; menuoptionsactive[3] = true; + menuoptionslayout[3] = 3; + nummenuoptions = 4; + menuxoff = -20; menuyoff = -30 -(12*3); + } + } + } + } + } + }else if (t == "unlocktimetrial" || t == "unlocktimetrials") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; menuyoff = 70; + }else if (t == "unlocknodeathmode") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; menuyoff = 70; + }else if (t == "unlockintermission") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; menuyoff = 70; + }else if (t == "unlockflipmode") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; menuyoff = 70; + }else if (t == "playsecretlab") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + menuoptions[1] = "secret lab"; menuoptionsactive[1] = true; + menuoptions[2] = "play modes"; menuoptionsactive[2] = true; + menuoptions[3] = "new game"; menuoptionsactive[3] = true; + menuoptions[4] = "< back"; menuoptionsactive[4] = true; + menuoptionslayout[4] = 3; + nummenuoptions = 5; + menuxoff = -40; menuyoff = -35-(12*4); + }else if (t == "newgamewarning") { + menuoptions[0] = "start new game"; menuoptionsactive[0] = true; + menuoptions[1] = "< back"; menuoptionsactive[1] = true; + menuoptionslayout[1] = 3; + nummenuoptions = 2; + menuxoff = -30; menuyoff = 64-(16*2)-32; + }else if (t == "flipmode_mobile") { + menuoptions[0] = "change flip mode"; menuoptionsactive[0] = true; + menuoptions[1] = "< back"; menuoptionsactive[1] = true; + menuoptionslayout[1] = 3; + nummenuoptions = 2; + menuxoff = -30; menuyoff = 64-(16*2); + }else if (t == "playmodes") { + menuoptions[0] = "time trials"; menuoptionsactive[0] = true; + menuoptions[1] = "intermissions"; menuoptionsactive[1] = unlock[16]; + menuoptions[2] = "no death mode"; menuoptionsactive[2] = unlock[17]; + menuoptions[3] = "flip mode"; menuoptionsactive[3] = unlock[18]; + menuoptions[4] = "< back"; menuoptionsactive[4] = true; + menuoptionslayout[4] = 3; + nummenuoptions = 5; + menuxoff = -70; menuyoff = -35-(12*4); + }else if (t == "intermissionmenu") { + menuoptions[0] = "play intermission 1"; menuoptionsactive[0] = true; + menuoptions[1] = "play intermission 2"; menuoptionsactive[1] = true; + menuoptions[2] = "< back"; menuoptionsactive[2] = true; + menuoptionslayout[0] = 4; menuoptionslayout[1] = 4; + menuoptionslayout[2] = 3; + nummenuoptions = 3; + menuxoff = -50; menuyoff = -35-(12*2); + }else if (t == "playint1") { + menuoptions[0] = "Vitellary"; menuoptionsactive[0] = true; + menuoptions[1] = "Vermilion"; menuoptionsactive[1] = true; + menuoptions[2] = "Verdigris"; menuoptionsactive[2] = true; + menuoptions[3] = "Victoria"; menuoptionsactive[3] = true; + menuoptions[4] = "< back"; menuoptionsactive[4] = true; + menuoptionslayout[4] = 3; + nummenuoptions = 5; + menuxoff = -60; menuyoff = -30-(12*4); + }else if (t == "playint2") { + menuoptions[0] = "Vitellary"; menuoptionsactive[0] = true; + menuoptions[1] = "Vermilion"; menuoptionsactive[1] = true; + menuoptions[2] = "Verdigris"; menuoptionsactive[2] = true; + menuoptions[3] = "Victoria"; menuoptionsactive[3] = true; + menuoptions[4] = "< back"; menuoptionsactive[4] = true; + menuoptionslayout[4] = 3; + nummenuoptions = 5; + menuxoff = -60; menuyoff = -30-(12*4); + }else if (t == "continue") { + menuoptions[0] = "continue from teleporter"; menuoptionsactive[0] = true; + menuoptions[1] = "continue from quicksave"; menuoptionsactive[1] = true; + menuoptionslayout[0] = 4; menuoptionslayout[1] = 4; + menuoptions[2] = "< back"; menuoptionsactive[2] = true; + menuoptionslayout[2] = 3; + nummenuoptions = 3; + menuxoff = -60; menuyoff = 20-(12*2); + }else if (t == "startnodeathmode") { + menuoptions[0] = "disable cutscenes"; menuoptionsactive[0] = true; + menuoptions[1] = "enable cutscenes"; menuoptionsactive[1] = true; + menuoptionslayout[0] = 4; menuoptionslayout[1] = 4; + menuoptions[2] = "< back"; menuoptionsactive[2] = true; + menuoptionslayout[2] = 3; + nummenuoptions = 3; + menuxoff = -60; menuyoff = 30-(12*2); + }else if (t == "gameover") { + nummenuoptions = 0; + menucountdown = 120; menudest="gameover2"; + }else if (t == "gameover2") { + menuoptions[0] = "return to play menu"; menuoptionsactive[0] = true; + menuoptionslayout[0] = 4; + nummenuoptions = 1; + menuxoff = -25; menuyoff = 80-8; + }else if (t == "unlockmenutrials") { + if (unlock[9]) { menuoptions[0] = "space station 1"; menuoptionsactive[0] = false; + }else{ menuoptions[0] = "space station 1"; menuoptionsactive[0] = true;} + if (unlock[10]) { menuoptions[1] = "the laboratory"; menuoptionsactive[1] = false; + }else{ menuoptions[1] = "the laboratory"; menuoptionsactive[1] = true;} + if (unlock[11]) { menuoptions[2] = "the tower"; menuoptionsactive[2] = false; + }else{ menuoptions[2] = "the tower"; menuoptionsactive[2] = true;} + if (unlock[12]) { menuoptions[3] = "space station 2"; menuoptionsactive[3] = false; + }else{ menuoptions[3] = "space station 2"; menuoptionsactive[3] = true;} + if (unlock[13]) { menuoptions[4] = "the warp zone"; menuoptionsactive[4] = false; + }else{ menuoptions[4] = "the warp zone"; menuoptionsactive[4] = true;} + if (unlock[14]) { menuoptions[5] = "the final level"; menuoptionsactive[5] = false; + }else{ menuoptions[5] = "the final level"; menuoptionsactive[5] = true;} + + menuoptions_alt[0] = "space station 1 unlocked"; + menuoptions_alt[1] = "the laboratory unlocked"; + menuoptions_alt[2] = "the tower unlocked"; + menuoptions_alt[3] = "space station 2 unlocked"; + menuoptions_alt[4] = "the warp zone unlocked"; + menuoptions_alt[5] = "the final level unlocked"; + + menuoptionslayout[0] = 9; + menuoptionslayout[1] = 9; + menuoptionslayout[2] = 9; + menuoptionslayout[3] = 9; + menuoptionslayout[4] = 9; + menuoptionslayout[5] = 9; + + menuoptions[6] = "< back"; menuoptionsactive[6] = true; + menuoptionslayout[6] = 3; + nummenuoptions = 7; + menuxoff = -80; menuyoff = -55-(12*6); + }else if (t == "timetrials") { + if (!unlock[9]) { menuoptions[0] = "???"; menuoptionsactive[0] = false; + }else{ menuoptions[0] = "space station 1"; menuoptionsactive[0] = true;} + if (!unlock[10]) { menuoptions[1] = "???"; menuoptionsactive[1] = false; + }else{ menuoptions[1] = "the laboratory"; menuoptionsactive[1] = true;} + if (!unlock[11]) { menuoptions[2] = "???"; menuoptionsactive[2] = false; + }else{ menuoptions[2] = "the tower"; menuoptionsactive[2] = true;} + if (!unlock[12]) { menuoptions[3] = "???"; menuoptionsactive[3] = false; + }else{ menuoptions[3] = "space station 2"; menuoptionsactive[3] = true;} + if (!unlock[13]) { menuoptions[4] = "???"; menuoptionsactive[4] = false; + }else{ menuoptions[4] = "the warp zone"; menuoptionsactive[4] = true;} + if (!unlock[14]) { menuoptions[5] = "???"; menuoptionsactive[5] = false; + }else{ menuoptions[5] = "the final level"; menuoptionsactive[5] = true;} + menuoptionslayout[0] = 5; + menuoptionslayout[1] = 5; + menuoptionslayout[2] = 5; + menuoptionslayout[3] = 6; + menuoptionslayout[4] = 6; + menuoptionslayout[5] = 6; + + menuoptions[6] = "< back"; menuoptionsactive[6] = true; + menuoptionslayout[6] = 3; + nummenuoptions = 7; + menuxoff = -80; menuyoff = -100; + }else if (t == "nodeathmodecomplete") { + nummenuoptions = 0; + menucountdown = 90; menudest = "nodeathmodecomplete2"; + }else if (t == "nodeathmodecomplete2") { + menuoptions[0] = "return to play menu"; menuoptionsactive[0] = true; + menuoptionslayout[0] = 4; + nummenuoptions = 1; + menuxoff = -25; menuyoff = 70-8; + }else if (t == "timetrialcomplete") { + nummenuoptions = 0; + menucountdown = 90; menudest="timetrialcomplete2"; + }else if (t == "timetrialcomplete2") { + nummenuoptions = 0; + menucountdown = 60; menudest="timetrialcomplete3"; + }else if (t == "timetrialcomplete3") { + menuoptions[0] = "try again"; menuoptionsactive[0] = true; + menuoptions[1] = "< back"; menuoptionsactive[1] = true; + menuoptionslayout[1] = 3; + nummenuoptions = 2; + menuxoff = -25; menuyoff = 70; + }else if (t == "gamecompletecontinue") { + menuoptions[0] = "return to play menu"; menuoptionsactive[0] = true; + menuoptionslayout[0] = 4; + nummenuoptions = 1; + menuxoff = -25; menuyoff = 70-8; + } + }else{ + if (t == "mainmenu") { + menuoptions[0] = "start game"; + menuoptionsactive[0] = true; + menuoptions[1] = "player levels"; + menuoptionsactive[1] = true; + menuoptions[2] = "graphic options"; + menuoptionsactive[2] = true; + menuoptions[3] = "game options"; + menuoptionsactive[3] = true; + menuoptions[4] = "view credits"; + menuoptionsactive[4] = true; + menuoptions[5] = "quit game"; + menuoptionsactive[5] = true; + nummenuoptions = 6; + menuxoff = -16; + menuyoff = -10; + }else if (t == "playerworlds"){ + menuoptions[0] = "play a level"; + menuoptionsactive[0] = true; + menuoptions[1] = "level editor"; + menuoptionsactive[1] = true; + menuoptions[2] = "back to menu"; + menuoptionsactive[3] = true; + nummenuoptions = 3; + menuxoff = -30; + menuyoff = -40; + }else if (t == "quickloadlevel") { + menuoptions[0] = "continue from save"; + menuoptionsactive[0] = true; + menuoptions[1] = "start from beginning"; + menuoptionsactive[1] = true; + menuoptions[2] = "back to levels"; + menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -40; + menuyoff = -30; + }else if (t == "youwannaquit") { + menuoptions[0] = "yes, quit"; menuoptionsactive[0] = true; + menuoptions[1] = "no, return"; menuoptionsactive[1] = true; + nummenuoptions = 2; + menuxoff = 0; menuyoff = -20; + }else if (t == "levellist"){ + if (editor.ListOfMetaData.length == 0) { + menuoptions[0] = "ok"; + menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 0; + menuyoff = -20; + }else{ + tcount = 0; + for (i = 0; i < editor.ListOfMetaData.length; i++) { + if (i >= levelpage * 8 && i < (levelpage * 8) + 8) { + //This is, er, suboptimal. Whatever, life optimisation and all that + tvar = -1; + for (j = 0; j < numcustomlevelstats; j++) { + if (editor.ListOfMetaData[i].filename == customlevelstats[j]) { + tvar=j; + j=numcustomlevelstats+1; + } + } + if(tvar>=0){ + if(customlevelscore[tvar]==0){ + menuoptions[tcount] = " " + editor.ListOfMetaData[i].title; + }else if(customlevelscore[tvar]==1){ + menuoptions[tcount] = " * " + editor.ListOfMetaData[i].title; + }else if(customlevelscore[tvar]==3){ + menuoptions[tcount] = "** " + editor.ListOfMetaData[i].title; + } + }else{ + menuoptions[tcount] = " " + editor.ListOfMetaData[i].title; + } + menuoptionsactive[tcount] = true; + menuoptions[tcount] = menuoptions[tcount].toLowerCase(); + tcount++; + } + } + if((levelpage*8)+8= 3 && !unlocknotify[9]) temp++; + if (unlock[1] && stat_trinkets >= 6 && !unlocknotify[10]) temp++; + if (unlock[2] && stat_trinkets >= 9 && !unlocknotify[11]) temp++; + if (unlock[3] && stat_trinkets >= 12 && !unlocknotify[12]) temp++; + if (unlock[4] && stat_trinkets >= 15 && !unlocknotify[13]) temp++; + if (unlock[5] && stat_trinkets >= 18 && !unlocknotify[14]) temp++; + if (temp > 0) { + //you've unlocked a time trial! + if (unlock[0] && stat_trinkets >= 3) { unlocknotify[9] = true; unlock[9] = true; } + if (unlock[1] && stat_trinkets >= 6) { unlocknotify[10] = true; unlock[10] = true; } + if (unlock[2] && stat_trinkets >= 9) { unlocknotify[11] = true; unlock[11] = true; } + if (unlock[3] && stat_trinkets >= 12) { unlocknotify[12] = true; unlock[12] = true; } + if (unlock[4] && stat_trinkets >= 15) { unlocknotify[13] = true; unlock[13] = true; } + if (unlock[5] && stat_trinkets >= 18) { unlocknotify[14] = true; unlock[14] = true; } + + if (temp == 1) { + createmenu("unlocktimetrial"); savemystats = true; + }else if (temp > 1) { + createmenu("unlocktimetrials"); savemystats = true; + } + }else { + //Alright, we haven't unlocked any time trials. How about no death mode? + temp = 0; + if (bestrank[0] >= 2) temp++; + if (bestrank[1] >= 2) temp++; + if (bestrank[2] >= 2) temp++; + if (bestrank[3] >= 2) temp++; + if (bestrank[4] >= 2) temp++; + if (bestrank[5] >= 2) temp++; + if (temp >= 4 && !unlocknotify[17]) { + //Unlock No Death Mode + unlocknotify[17] = true; unlock[17] = true; + createmenu("unlocknodeathmode"); + savemystats = true; + }else{ + //Alright then! Flip mode? + if (unlock[5] && !unlocknotify[18]) { + unlock[18] = true; unlocknotify[18] = true; + createmenu("unlockflipmode"); + savemystats = true; + }else { + //What about the intermission levels? + if (unlock[7] && !unlocknotify[16]) { + unlock[16] = true; unlocknotify[16] = true; + createmenu("unlockintermission"); + savemystats = true; + }else { + //ok, secret lab! no notification, but test: + if (unlock[8]) { + createmenu("playsecretlab"); + }else{ + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + menuoptions[1] = "play modes"; menuoptionsactive[1] = true; + menuoptions[2] = "new game"; menuoptionsactive[2] = true; + menuoptions[3] = "return"; menuoptionsactive[3] = true; + nummenuoptions = 4; + menuxoff = -20; menuyoff = -40; + } + } + } + } + } + }else if (t == "unlocktimetrial" || t == "unlocktimetrials") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; menuyoff = 70; + }else if (t == "unlocknodeathmode") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; menuyoff = 70; + }else if (t == "unlockintermission") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; menuyoff = 70; + }else if (t == "unlockflipmode") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = 20; menuyoff = 70; + }else if (t == "playsecretlab") { + menuoptions[0] = "continue"; menuoptionsactive[0] = true; + menuoptions[1] = "secret lab"; menuoptionsactive[1] = true; + menuoptions[2] = "play modes"; menuoptionsactive[2] = true; + menuoptions[3] = "new game"; menuoptionsactive[3] = true; + menuoptions[4] = "return"; menuoptionsactive[4] = true; + nummenuoptions = 5; + menuxoff = -40; menuyoff = -30; + }else if (t == "newgamewarning") { + menuoptions[0] = "start new game"; menuoptionsactive[0] = true; + menuoptions[1] = "return to menu"; menuoptionsactive[1] = true; + nummenuoptions = 2; + menuxoff = -30; menuyoff = 64; + }else if (t == "playmodes") { + menuoptions[0] = "time trials"; menuoptionsactive[0] = true; + menuoptions[1] = "intermissions"; menuoptionsactive[1] = unlock[16]; + menuoptions[2] = "no death mode"; menuoptionsactive[2] = unlock[17]; + menuoptions[3] = "flip mode"; menuoptionsactive[3] = unlock[18]; + menuoptions[4] = "return to play menu"; menuoptionsactive[4] = true; + nummenuoptions = 5; + menuxoff = -70; menuyoff = 8; + }else if (t == "intermissionmenu") { + menuoptions[0] = "play intermission 1"; menuoptionsactive[0] = true; + menuoptions[1] = "play intermission 2"; menuoptionsactive[1] = true; + menuoptions[2] = "return to play menu"; menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -50; menuyoff = -35; + }else if (t == "playint1") { + menuoptions[0] = "Vitellary"; menuoptionsactive[0] = true; + menuoptions[1] = "Vermilion"; menuoptionsactive[1] = true; + menuoptions[2] = "Verdigris"; menuoptionsactive[2] = true; + menuoptions[3] = "Victoria"; menuoptionsactive[3] = true; + menuoptions[4] = "return"; menuoptionsactive[4] = true; + nummenuoptions = 5; + menuxoff = -60; menuyoff = 10; + }else if (t == "playint2") { + menuoptions[0] = "Vitellary"; menuoptionsactive[0] = true; + menuoptions[1] = "Vermilion"; menuoptionsactive[1] = true; + menuoptions[2] = "Verdigris"; menuoptionsactive[2] = true; + menuoptions[3] = "Victoria"; menuoptionsactive[3] = true; + menuoptions[4] = "return"; menuoptionsactive[4] = true; + nummenuoptions = 5; + menuxoff = -60; menuyoff = 10; + }else if (t == "continue") { + menuoptions[0] = "continue from teleporter"; menuoptionsactive[0] = true; + menuoptions[1] = "continue from quicksave"; menuoptionsactive[1] = true; + menuoptions[2] = "return to play menu"; menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -60; menuyoff = 20; + }else if (t == "startnodeathmode") { + menuoptions[0] = "disable cutscenes"; menuoptionsactive[0] = true; + menuoptions[1] = "enable cutscenes"; menuoptionsactive[1] = true; + menuoptions[2] = "return to play menu"; menuoptionsactive[2] = true; + nummenuoptions = 3; + menuxoff = -60; menuyoff = 40; + }else if (t == "gameover") { + nummenuoptions = 0; + menucountdown = 120; menudest="gameover2"; + }else if (t == "gameover2") { + menuoptions[0] = "return to play menu"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = -25; menuyoff = 80; + }else if (t == "unlockmenutrials") { + if (unlock[9]) { menuoptions[0] = "space station 1"; menuoptionsactive[0] = true; + }else{ menuoptions[0] = "space station 1"; menuoptionsactive[0] = true;} + if (unlock[10]) { menuoptions[1] = "the laboratory"; menuoptionsactive[1] = true; + }else{ menuoptions[1] = "the laboratory"; menuoptionsactive[1] = true;} + if (unlock[11]) { menuoptions[2] = "the tower"; menuoptionsactive[2] = true; + }else{ menuoptions[2] = "the tower"; menuoptionsactive[2] = true;} + if (unlock[12]) { menuoptions[3] = "space station 2"; menuoptionsactive[3] = true; + }else{ menuoptions[3] = "space station 2"; menuoptionsactive[3] = true;} + if (unlock[13]) { menuoptions[4] = "the warp zone"; menuoptionsactive[4] = true; + }else{ menuoptions[4] = "the warp zone"; menuoptionsactive[4] = true;} + if (unlock[14]) { menuoptions[5] = "the final level"; menuoptionsactive[5] = true; + }else{ menuoptions[5] = "the final level"; menuoptionsactive[5] = true;} + + menuoptions[6] = "return to unlock menu"; menuoptionsactive[6] = true; + nummenuoptions = 7; + menuxoff = -80; menuyoff = 0 - (12*6); + }else if (t == "timetrials") { + if (!unlock[9]) { menuoptions[0] = "???"; menuoptionsactive[0] = true; + }else{ menuoptions[0] = "space station 1"; menuoptionsactive[0] = true;} + if (!unlock[10]) { menuoptions[1] = "???"; menuoptionsactive[1] = true; + }else{ menuoptions[1] = "the laboratory"; menuoptionsactive[1] = true;} + if (!unlock[11]) { menuoptions[2] = "???"; menuoptionsactive[2] = true; + }else{ menuoptions[2] = "the tower"; menuoptionsactive[2] = true;} + if (!unlock[12]) { menuoptions[3] = "???"; menuoptionsactive[3] = true; + }else{ menuoptions[3] = "space station 2"; menuoptionsactive[3] = true;} + if (!unlock[13]) { menuoptions[4] = "???"; menuoptionsactive[4] = true; + }else{ menuoptions[4] = "the warp zone"; menuoptionsactive[4] = true;} + if (!unlock[14]) { menuoptions[5] = "???"; menuoptionsactive[5] = true; + }else{ menuoptions[5] = "the final level"; menuoptionsactive[5] = true;} + + menuoptions[6] = "return to play menu"; menuoptionsactive[6] = true; + nummenuoptions = 7; + menuxoff = -80; menuyoff = 0 - (12*6); + }else if (t == "nodeathmodecomplete") { + nummenuoptions = 0; + menucountdown = 90; menudest = "nodeathmodecomplete2"; + }else if (t == "nodeathmodecomplete2") { + menuoptions[0] = "return to play menu"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = -25; menuyoff = 70; + }else if (t == "timetrialcomplete") { + nummenuoptions = 0; + menucountdown = 90; menudest="timetrialcomplete2"; + }else if (t == "timetrialcomplete2") { + nummenuoptions = 0; + menucountdown = 60; menudest="timetrialcomplete3"; + }else if (t == "timetrialcomplete3") { + menuoptions[0] = "return to play menu"; menuoptionsactive[0] = true; + menuoptions[1] = "try again"; menuoptionsactive[1] = true; + nummenuoptions = 2; + menuxoff = -25; menuyoff = 70; + }else if (t == "gamecompletecontinue") { + menuoptions[0] = "return to play menu"; menuoptionsactive[0] = true; + nummenuoptions = 1; + menuxoff = -25; menuyoff = 70; + } + } + } + + public function loadstats(map:mapclass, dwgfx:dwgraphicsclass):void { + statcookie = SharedObject.getLocal("vvvvvv_unlock"); + + if (statcookie.data.stattrinkets == undefined) { + savestats(map, dwgfx); //save with default values + }else{ + temp_unlock = statcookie.data.unlock.slice(); + unlock = temp_unlock.slice(); + + temp_unlocknotify = statcookie.data.unlocknotify.slice(); + unlocknotify = temp_unlocknotify.slice(); + + temp_besttimes = statcookie.data.besttimes.slice(); + besttimes = temp_besttimes.slice(); + temp_besttrinkets = statcookie.data.besttrinkets.slice(); + besttrinkets = temp_besttrinkets.slice(); + temp_bestlives = statcookie.data.bestlives.slice(); + bestlives = temp_bestlives.slice(); + temp_bestrank = statcookie.data.bestrank.slice(); + bestrank = temp_bestrank.slice(); + + bestgamedeaths = statcookie.data.bestgamedeaths; + + stat_trinkets = statcookie.data.stattrinkets; + fullscreen = statcookie.data.fullscreen; + + noflashingmode = statcookie.data.screenshakes; + colourblindmode = statcookie.data.backgrounds; + dwgfx.setflipmode = statcookie.data.flipmode; + map.invincibility = statcookie.data.invincibility; + slowdown = statcookie.data.slowdown; + + swnbestrank = statcookie.data.swnbestrank; + swnrecord = statcookie.data.swnrecord; + + advanced_mode = statcookie.data.advanced_mode; + advanced_smoothing = statcookie.data.advanced_smoothing; + advanced_scaling = statcookie.data.advanced_scaling; + + controlstyle = statcookie.data.controlstyle; + controlsensitivity = statcookie.data.controlsensitivity; + showcontroltutorial = statcookie.data.showcontroltutorial; + } + statcookie.close(); + } + + public function savestats(map:mapclass, dwgfx:dwgraphicsclass):void { + statcookie = SharedObject.getLocal("vvvvvv_unlock"); + + temp_unlock = unlock.slice(); + temp_unlocknotify = unlocknotify.slice(); + + statcookie.data.unlock = temp_unlock.slice(); + statcookie.data.unlocknotify = temp_unlocknotify.slice(); + + temp_besttimes = besttimes.slice(); + temp_besttrinkets = besttrinkets.slice(); + temp_bestlives = bestlives.slice(); + temp_bestrank = bestrank.slice(); + statcookie.data.besttimes = temp_besttimes.slice(); + statcookie.data.besttrinkets = temp_besttrinkets.slice(); + statcookie.data.bestlives = temp_bestlives.slice(); + statcookie.data.bestrank = temp_bestrank.slice(); + + statcookie.data.bestgamedeaths = bestgamedeaths; + + statcookie.data.stattrinkets = stat_trinkets; + statcookie.data.fullscreen = fullscreen; + + statcookie.data.screenshakes = noflashingmode; + statcookie.data.backgrounds = colourblindmode; + statcookie.data.flipmode = dwgfx.setflipmode; + statcookie.data.invincibility = map.invincibility; + statcookie.data.slowdown = slowdown; + + statcookie.data.swnbestrank = swnbestrank; + statcookie.data.swnrecord = swnrecord; + + statcookie.data.advanced_mode = advanced_mode; + statcookie.data.advanced_smoothing = advanced_smoothing; + statcookie.data.advanced_scaling = advanced_scaling; + + statcookie.data.controlstyle = controlstyle; + statcookie.data.controlsensitivity = controlsensitivity; + statcookie.data.showcontroltutorial = showcontroltutorial; + + statcookie.flush() + statcookie.close(); + } + + public function deletestats(map:mapclass, dwgfx:dwgraphicsclass):void { + for (i = 0; i < 25; i++) { + unlock[i] = false; + unlocknotify[i] = false; + } + for (i = 0; i < 6; i++) { + besttimes[i] = -1; + besttrinkets[i] = -1; + bestlives[i] = -1; + bestrank[i] = -1; + } + dwgfx.setflipmode = false; + stat_trinkets = 0; + controlstyle = 0; + controlsensitivity = 50; + savestats(map, dwgfx); + } + + public function unlocknum(t:int, map:mapclass, dwgfx:dwgraphicsclass):void { + unlock[t] = true; + savestats(map, dwgfx); + } + + public function CopyLevelData():void { + //Not used in mobile version + } + + public function loadsummary(map:mapclass, help:helpclass):void { + quickcookie = SharedObject.getLocal("vvvvvv_quicksave"); + telecookie = SharedObject.getLocal("vvvvvv_telesave"); + + if (telecookie.data.savex == undefined) { + telecookieexists = false; telesummary = ""; + } else { + telecookieexists = true; telesummary = telecookie.data.summary; + tele_gametime = giventimestring(telecookie.data.hours, telecookie.data.minutes, telecookie.data.seconds, help); + tele_trinkets = telecookie.data.trinkets; + tele_currentarea = map.currentarea(map.area(telecookie.data.savex, telecookie.data.savey)); + + summary_crewstats = telecookie.data.crewstats.slice(); + tele_crewstats = summary_crewstats.slice(); + } + + if (quickcookie.data.savex == undefined) { + quickcookieexists = false; quicksummary = ""; + } else { + quickcookieexists = true; quicksummary = quickcookie.data.summary; + quick_gametime = giventimestring(quickcookie.data.hours, quickcookie.data.minutes, quickcookie.data.seconds, help); + quick_trinkets = quickcookie.data.trinkets; + quick_currentarea = map.currentarea(map.area(quickcookie.data.savex, quickcookie.data.savey)); + + summary_crewstats = quickcookie.data.crewstats.slice(); + quick_crewstats = summary_crewstats.slice(); + } + } + + public function savequick(map:mapclass, obj:entityclass, music:musicclass, help:helpclass):void { + quickcookie = SharedObject.getLocal("vvvvvv_quicksave"); + //Save to the quicksave cookie + quickcookieexists = true; + //Flags, map and stats + savestate[0].explored = map.explored.slice(); + savestate[0].flags = obj.flags.slice(); + savestate[0].crewstats = crewstats.slice(); + savestate[0].collect = obj.collect.slice(); + + quickcookie.data.worldmap = savestate[0].explored.slice(); + quickcookie.data.flags = savestate[0].flags.slice(); + quickcookie.data.crewstats = savestate[0].crewstats.slice(); + quickcookie.data.collect = savestate[0].collect.slice(); + + //trace(obj.flags); + + quickcookie.data.finalmode = map.finalmode; + quickcookie.data.finalstretch = map.finalstretch; + + quickcookie.data.finalx = map.finalx; + quickcookie.data.finaly = map.finaly; + //Position + quickcookie.data.savex = savex; + quickcookie.data.savey = savey; + quickcookie.data.saverx = saverx; + quickcookie.data.savery = savery; + quickcookie.data.savegc = savegc; + quickcookie.data.savedir = savedir; + quickcookie.data.savepoint = savepoint; + quickcookie.data.trinkets = trinkets; + + quickcookie.data.currentsong = music.currentsong; + quickcookie.data.teleportscript = teleportscript; + + //Special stats + quickcookie.data.companion = companion; + quickcookie.data.lastsaved = lastsaved; + quickcookie.data.supercrewmate = supercrewmate; + quickcookie.data.scmprogress = scmprogress; + quickcookie.data.scmmoveme = scmmoveme; + + quickcookie.data.frames = frames; quickcookie.data.seconds = seconds; + quickcookie.data.minutes = minutes; quickcookie.data.hours = hours; + + quickcookie.data.deathcounts = deathcounts; + quickcookie.data.totalflips = totalflips; + quickcookie.data.hardestroom = hardestroom; quickcookie.data.hardestroomdeaths = hardestroomdeaths; + + savearea = map.currentarea(map.area(roomx, roomy)); + quickcookie.data.summary = savearea + ", " + timestring(help); + quicksummary = quickcookie.data.summary; + + quickcookie.flush() + quickcookie.close(); + } + + public function customsavequick(t:int, map:mapclass, obj:entityclass, music:musicclass, help:helpclass):void { + customcookie[t] = SharedObject.getLocal("vvvvvv_custom_" + String(t)); + + //Flags, map and stats + savestate[2].explored = map.explored.slice(); + savestate[2].flags = obj.flags.slice(); + savestate[2].crewstats = crewstats.slice(); + savestate[2].collect = obj.collect.slice(); + savestate[2].customcollect = obj.customcollect.slice(); + savestate[2].moods = obj.customcrewmoods.slice(); + + customcookie[t].data.worldmap = savestate[2].explored.slice(); + customcookie[t].data.flags = savestate[2].flags.slice(); + customcookie[t].data.crewstats = savestate[2].crewstats.slice(); + customcookie[t].data.collect = savestate[2].collect.slice(); + customcookie[t].data.customcollect = savestate[2].customcollect.slice(); + customcookie[t].data.moods = savestate[2].moods.slice(); + + //trace(obj.flags); + + customcookie[t].data.finalmode = map.finalmode; + customcookie[t].data.finalstretch = map.finalstretch; + + customcookie[t].data.finalx = map.finalx; + customcookie[t].data.finaly = map.finaly; + //Position + customcookie[t].data.savex = savex; + customcookie[t].data.savey = savey; + customcookie[t].data.saverx = saverx; + customcookie[t].data.savery = savery; + customcookie[t].data.savegc = savegc; + customcookie[t].data.savedir = savedir; + customcookie[t].data.savepoint = savepoint; + customcookie[t].data.trinkets = trinkets; + customcookie[t].data.crewmates = crewmates; + + customcookie[t].data.currentsong = music.currentsong; + customcookie[t].data.teleportscript = teleportscript; + + //Special stats + customcookie[t].data.companion = companion; + customcookie[t].data.lastsaved = lastsaved; + customcookie[t].data.supercrewmate = supercrewmate; + customcookie[t].data.scmprogress = scmprogress; + customcookie[t].data.scmmoveme = scmmoveme; + + customcookie[t].data.frames = frames; customcookie[t].data.seconds = seconds; + customcookie[t].data.minutes = minutes; customcookie[t].data.hours = hours; + + customcookie[t].data.deathcounts = deathcounts; + customcookie[t].data.totalflips = totalflips; + customcookie[t].data.hardestroom = hardestroom; customcookie[t].data.hardestroomdeaths = hardestroomdeaths; + + customcookie[t].data.showminimap = map.customshowmm; + + savearea = map.currentarea(map.area(roomx, roomy)) + customcookie[t].data.summary = savearea + ", " + timestring(help); + customcookiesummary[t] = customcookie[t].data.summary; + + customcookie[t].flush() + customcookie[t].close(); + + customcookieexists[t] = true; + customcookiesummary[t] = savearea + ", " + timestring(help); + } + + public function loadquick(map:mapclass, obj:entityclass, music:musicclass):void { + quickcookie = SharedObject.getLocal("vvvvvv_quicksave"); + //Save to the quicksave cookie + savestate[0].explored = quickcookie.data.worldmap.slice(); + savestate[0].flags = quickcookie.data.flags.slice(); + savestate[0].crewstats = quickcookie.data.crewstats.slice(); + savestate[0].collect = quickcookie.data.collect.slice(); + + map.explored = savestate[0].explored.slice(); + obj.flags = savestate[0].flags.slice(); + crewstats = savestate[0].crewstats.slice(); + obj.collect = savestate[0].collect.slice(); + //trace(obj.flags); + + map.finalmode = quickcookie.data.finalmode; + map.finalstretch = quickcookie.data.finalstretch; + if (map.finalmode) { + map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + } + if (map.finalstretch) { + map.finalstretch = true; + map.final_colormode = true; + map.final_mapcol = 0; + map.final_colorframe = 1; + } + + map.finalx = quickcookie.data.finalx; + map.finaly = quickcookie.data.finaly; + //position + savex = quickcookie.data.savex; + savey = quickcookie.data.savey; + saverx = quickcookie.data.saverx; + savery = quickcookie.data.savery; + savegc = quickcookie.data.savegc; + savedir = quickcookie.data.savedir; + savepoint = quickcookie.data.savepoint; + trinkets = quickcookie.data.trinkets; + + //Special stats + companion = quickcookie.data.companion; + lastsaved = quickcookie.data.lastsaved; + teleportscript = quickcookie.data.teleportscript; + supercrewmate = quickcookie.data.supercrewmate; + scmprogress = quickcookie.data.scmprogress; + scmmoveme = quickcookie.data.scmmoveme; + + frames = quickcookie.data.frames; seconds = quickcookie.data.seconds; + minutes = quickcookie.data.minutes; hours = quickcookie.data.hours; + + deathcounts = quickcookie.data.deathcounts; + totalflips = quickcookie.data.totalflips; + hardestroom = quickcookie.data.hardestroom; hardestroomdeaths = quickcookie.data.hardestroomdeaths; + + music.play(quickcookie.data.currentsong); + + //Ok, now we determine some game stuff based on the above: + map.showteleporters = true; + if(obj.flags[12]==1) map.showtargets = true; + if (obj.flags[42] == 1) map.showtrinkets = true; + + quickcookie.close(); + } + + public function customloadquick(t:int, map:mapclass, obj:entityclass, music:musicclass):void{ + customcookie[t] = SharedObject.getLocal("vvvvvv_custom_" + String(t)); + + savestate[2].explored = customcookie[t].data.worldmap.slice(); + savestate[2].flags = customcookie[t].data.flags.slice(); + savestate[2].crewstats = customcookie[t].data.crewstats.slice(); + savestate[2].collect = customcookie[t].data.collect.slice(); + savestate[2].customcollect = customcookie[t].data.customcollect.slice(); + savestate[2].moods = customcookie[t].data.moods.slice(); + + map.explored = savestate[2].explored.slice(); + obj.flags = savestate[2].flags.slice(); + crewstats = savestate[2].crewstats.slice(); + obj.collect = savestate[2].collect.slice(); + obj.customcollect = savestate[2].customcollect.slice(); + obj.customcrewmoods = savestate[2].moods.slice(); + //trace(obj.flags); + + map.finalmode = customcookie[t].data.finalmode; + map.finalstretch = customcookie[t].data.finalstretch; + if (map.finalmode) { + map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + } + if (map.finalstretch) { + map.finalstretch = true; + map.final_colormode = true; + map.final_mapcol = 0; + map.final_colorframe = 1; + } + + map.finalx = customcookie[t].data.finalx; + map.finaly = customcookie[t].data.finaly; + //position + savex = customcookie[t].data.savex; + savey = customcookie[t].data.savey; + saverx = customcookie[t].data.saverx; + savery = customcookie[t].data.savery; + savegc = customcookie[t].data.savegc; + savedir = customcookie[t].data.savedir; + savepoint = customcookie[t].data.savepoint; + trinkets = customcookie[t].data.trinkets; + crewmates = customcookie[t].data.crewmates; + + //Special stats + companion = customcookie[t].data.companion; + lastsaved = customcookie[t].data.lastsaved; + teleportscript = customcookie[t].data.teleportscript; + supercrewmate = customcookie[t].data.supercrewmate; + scmprogress = customcookie[t].data.scmprogress; + scmmoveme = customcookie[t].data.scmmoveme; + + frames = customcookie[t].data.frames; seconds = customcookie[t].data.seconds; + minutes = customcookie[t].data.minutes; hours = customcookie[t].data.hours; + + deathcounts = customcookie[t].data.deathcounts; + totalflips = customcookie[t].data.totalflips; + hardestroom = customcookie[t].data.hardestroom; hardestroomdeaths = customcookie[t].data.hardestroomdeaths; + + map.customshowmm = customcookie[t].data.showminimap; + + music.play(customcookie[t].data.currentsong); + + //Ok, now we determine some game stuff based on the above: + map.showteleporters = true; + if (obj.flags[12] == 1) map.showtargets = true; + if (obj.flags[42] == 1) map.showtrinkets = true; + + customcookie[t].close(); + } + + public function deletequick():void { + quicksummary = ""; + quickcookieexists = false; + quickcookie.clear(); + } + + public function telegotoship():void { + //Special function to move the telesave to the ship teleporter. + telecookie.data.savex = 13*8; + telecookie.data.savey = 129; + telecookie.data.saverx = 102; + telecookie.data.savery = 111; + telecookie.data.savegc = 0; + telecookie.data.savedir = 1; + telecookie.data.savepoint = 0; + + telecookie.data.currentsong = 4; + telecookie.data.companion = 0; + + telecookie.data.finalmode = false;; + telecookie.data.finalstretch = false; + } + + public function savetele(map:mapclass, obj:entityclass, music:musicclass, help:helpclass):void { + //do a quicksave instead + savequick(map, obj, music, help); + /* + telecookie = SharedObject.getLocal("vvvvvv_telesave"); + //Save to the telesave cookie + telecookieexists = true; + //Flags, map and stats + savestate[1].explored = map.explored.slice(); + savestate[1].flags = obj.flags.slice(); + savestate[1].crewstats = crewstats.slice(); + savestate[1].collect = obj.collect.slice(); + + telecookie.data.worldmap = savestate[1].explored.slice(); + telecookie.data.flags = savestate[1].flags.slice(); + telecookie.data.crewstats = savestate[1].crewstats.slice(); + telecookie.data.collect = savestate[1].collect.slice(); + + telecookie.data.finalmode = map.finalmode; + telecookie.data.finalstretch = map.finalstretch; + + telecookie.data.finalx = map.finalx; + telecookie.data.finaly = map.finaly; + //Position + telecookie.data.savex = savex; + telecookie.data.savey = savey; + telecookie.data.saverx = saverx; + telecookie.data.savery = savery; + telecookie.data.savegc = savegc; + telecookie.data.savedir = savedir; + telecookie.data.savepoint = savepoint; + telecookie.data.trinkets = trinkets; + + if (music.nicechange != -1) { + telecookie.data.currentsong = music.nicechange; + }else{ + telecookie.data.currentsong = music.currentsong; + } + telecookie.data.teleportscript = teleportscript; + + //Special stats + telecookie.data.companion = companion; + telecookie.data.lastsaved = lastsaved; + telecookie.data.supercrewmate = supercrewmate; + telecookie.data.scmprogress = scmprogress; + telecookie.data.scmmoveme = scmmoveme; + + telecookie.data.frames = frames; telecookie.data.seconds = seconds; + telecookie.data.minutes = minutes; telecookie.data.hours = hours; + + telecookie.data.deathcounts = deathcounts; + telecookie.data.totalflips = totalflips; + telecookie.data.hardestroom = hardestroom; telecookie.data.hardestroomdeaths = hardestroomdeaths; + + savearea = map.currentarea(map.area(roomx, roomy)) + telecookie.data.summary = savearea + ", " + timestring(help); + telesummary = telecookie.data.summary; + + telecookie.flush(); + telecookie.close(); + */ + } + + public function loadtele(map:mapclass, obj:entityclass, music:musicclass):void { + telecookie = SharedObject.getLocal("vvvvvv_telesave"); + //Save to the telesave cookie + savestate[1].explored = telecookie.data.worldmap.slice(); + savestate[1].flags = telecookie.data.flags.slice(); + savestate[1].crewstats = telecookie.data.crewstats.slice(); + savestate[1].collect = telecookie.data.collect.slice(); + + map.explored = savestate[1].explored.slice(); + obj.flags = savestate[1].flags.slice(); + crewstats = savestate[1].crewstats.slice(); + obj.collect = savestate[1].collect.slice(); + + map.finalmode = telecookie.data.finalmode; + map.finalstretch = telecookie.data.finalstretch; + if (map.finalmode) { + map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + } + if (map.finalstretch) { + map.finalstretch = true; + map.final_colormode = true; + map.final_mapcol = 0; + map.final_colorframe = 1; + } + + map.finalx = telecookie.data.finalx; + map.finaly = telecookie.data.finaly; + //position + savex = telecookie.data.savex; + savey = telecookie.data.savey; + saverx = telecookie.data.saverx; + savery = telecookie.data.savery; + savegc = telecookie.data.savegc; + savedir = telecookie.data.savedir; + savepoint = telecookie.data.savepoint; + trinkets = telecookie.data.trinkets; + + //trinkets = 19; obj.flags[41] = 0; obj.flags[42] = 0; obj.collect[18] = 0; //Testing Victoria epilogue criteria# + + //Special stats + companion = telecookie.data.companion; + lastsaved = telecookie.data.lastsaved; + teleportscript = telecookie.data.teleportscript; + supercrewmate = telecookie.data.supercrewmate; + scmprogress = telecookie.data.scmprogress; + scmmoveme = telecookie.data.scmmoveme; + + frames = telecookie.data.frames; seconds = telecookie.data.seconds; + minutes = telecookie.data.minutes; hours = telecookie.data.hours; + + deathcounts = telecookie.data.deathcounts; + totalflips = telecookie.data.totalflips; + hardestroom = telecookie.data.hardestroom; hardestroomdeaths = telecookie.data.hardestroomdeaths; + + music.play(telecookie.data.currentsong); + + //Ok, now we determine some game stuff based on the above: + map.showteleporters = true; + if(obj.flags[12]==1) map.showtargets = true; + if (obj.flags[42] == 1) map.showtrinkets = true; + + telecookie.close(); + + } + + public function deletetele():void { + telesummary = ""; + telecookieexists = false; + telecookie.clear(); + } + + public function crewrescued():int { + temp = 0; + if (crewstats[0]) temp++; + if (crewstats[1]) temp++; + if (crewstats[2]) temp++; + if (crewstats[3]) temp++; + if (crewstats[4]) temp++; + if (crewstats[5]) temp++; + return temp; + } + + public function unrescued():String { + //Randomly return the name of an unrescued crewmate + if (Math.random() * 100 > 50) { + if (!crewstats[5]) return "Victoria"; + if (!crewstats[2]) return "Vitellary"; + if (!crewstats[4]) return "Verdigris"; + if (!crewstats[3]) return "Vermilion"; + }else { + if (Math.random() * 100 > 50) { + if (!crewstats[2]) return "Vitellary"; + if (!crewstats[4]) return "Verdigris"; + if (!crewstats[3]) return "Vermilion"; + if (!crewstats[5]) return "Victoria"; + }else { + if (!crewstats[4]) return "Verdigris"; + if (!crewstats[3]) return "Vermilion"; + if (!crewstats[5]) return "Victoria"; + if (!crewstats[2]) return "Vitellary"; + } + } + return "you"; + } + + public function gethardestroom(map:mapclass):void { + if (currentroomdeaths > hardestroomdeaths) { + hardestroomdeaths = currentroomdeaths; + hardestroom = map.roomname; + if (map.roomname == "glitch") { + if (roomx == 42 && roomy == 51) { + hardestroom = "Rear Vindow"; + }else if (roomx == 48 && roomy == 51) { + hardestroom = "On the Vaterfront"; + }else if (roomx == 49 && roomy == 51) { + hardestroom = "The Untouchavles"; + } + }else if (map.roomname == "change") { + if (roomx == 45 && roomy == 51) hardestroom =map.specialnames[3]; + if (roomx == 46 && roomy == 51) hardestroom =map.specialnames[4]; + if (roomx == 47 && roomy == 51) hardestroom =map.specialnames[5]; + if (roomx == 50 && roomy == 53) hardestroom =map.specialnames[6]; + if (roomx == 50 && roomy == 54) hardestroom = map.specialnames[7]; + } + } + } + + public function updatestate(dwgfx:dwgraphicsclass, map:mapclass, obj:entityclass, help:helpclass, music:musicclass):void { + statedelay--; if(statedelay<=0) statedelay=0; + if (statedelay <= 0) { + switch(state){ + case 0: + //Do nothing here! Standard game state + break; + case 1: + //Game initilisation + state = 0; + break; + case 2: + //Opening cutscene + advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!"); + //Oh no! what happen to rest of crew etc crash into dimension + break; + case 4: + //End of opening cutscene for now + switch(controlstyle) { + case 0: + dwgfx.createtextbox(" Swipe on the left side to move ", -1, 195, 174, 174, 174); + break; + case 1: + dwgfx.createtextbox(" Touch the screen sides to move ", -1, 195, 174, 174, 174); + break; + case 2: + dwgfx.createtextbox(" Tap the buttons to move ", -1, 195, 174, 174, 174); + break; + } + dwgfx.textboxtimer(60); + state = 0; + break; + case 5: + //Demo over + advancetext = true; + hascontrol = false; + /*dwgfx.createtextbox(" Prototype Complete ", 50, 80, 164, 164, 255); + dwgfx.addline("Congrats! More Info Soon!"); + dwgfx.textboxcenter(); + */ + + startscript = true; newscript="returntohub"; + obj.removetrigger(5); + state = 6; + break; + case 7: + //End of opening cutscene for now + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + state = 0; + break; + case 8: + //Enter dialogue + obj.removetrigger(8); + if (obj.flags[13] == 0) { + obj.changeflag(13, 1); + if (mobilemenu) { + dwgfx.createtextbox(" Tap the top right corner ", -1, 155, 174, 174, 174); + dwgfx.addline(" to view map and crew"); + }else{ + dwgfx.createtextbox(" Press ENTER to view map ", -1, 155, 174, 174, 174); + dwgfx.addline(" and quicksave"); + } + + dwgfx.textboxtimer(60); + } + state = 0; + break; + + case 9: + //Start SWN Minigame Mode B + obj.removetrigger(9); + + swnmode = true; + swngame = 6; + swndelay = 150; + swntimer = 60 * 30; + + //set the checkpoint in the middle of the screen + savepoint = 0; + savex = 148; + savey = 100; + savegc = 0; + saverx = roomx; savery = roomy; + savedir = 0; + + state = 0; + break; + + case 10: + //Start SWN Minigame Mode A + obj.removetrigger(10); + + swnmode = true; + swngame = 4; + swndelay = 150; + swntimer = 60 * 30; + + //set the checkpoint in the middle of the screen + savepoint = 0; + savex = 148; + savey = 100; + savegc = 0; + saverx = roomx; savery = roomy; + savedir = 0; + + state = 0; + break; + + case 11: + //Intermission 1 instructional textbox, depends on last saved + dwgfx.textboxremovefast(); + dwgfx.createtextbox(" When you're NOT standing on ", -1, 3, 174, 174, 174); + if (dwgfx.flipmode) { + if (lastsaved == 2) { dwgfx.addline(" the ceiling, Vitellary will"); + }else if (lastsaved == 3) { dwgfx.addline(" the ceiling, Vermilion will"); + }else if (lastsaved == 4) { dwgfx.addline(" the ceiling, Verdigris will"); + }else if (lastsaved == 5) { dwgfx.addline(" the ceiling, Victoria will"); } + }else{ + if (lastsaved == 2) { dwgfx.addline(" the floor, Vitellary will"); + }else if (lastsaved == 3) { dwgfx.addline(" the floor, Vermilion will"); + }else if (lastsaved == 4) { dwgfx.addline(" the floor, Verdigris will"); + }else if (lastsaved == 5) { dwgfx.addline(" the floor, Victoria will"); } + } + + dwgfx.addline(" stop and wait for you."); + dwgfx.textboxtimer(180); + state = 0; + break; + case 12: + //Intermission 1 instructional textbox, depends on last saved + obj.removetrigger(12); + if (obj.flags[61] == 0) { + obj.changeflag(61, 1); + dwgfx.textboxremovefast(); + dwgfx.createtextbox(" You can't continue to the next ", -1, 8, 174, 174, 174); + if (lastsaved == 5) { + dwgfx.addline(" room until she is safely across. "); + }else { + dwgfx.addline(" room until he is safely across. "); + } + dwgfx.textboxtimer(120); + } + state = 0; + break; + case 13: + //textbox removal + obj.removetrigger(13); + dwgfx.textboxremovefast(); + state = 0; + break; + case 14: + //Intermission 1 instructional textbox, depends on last saved + if (dwgfx.flipmode) { + dwgfx.createtextbox(" When you're standing on the ceiling, ", -1, 3, 174, 174, 174); + }else{ + dwgfx.createtextbox(" When you're standing on the floor, ", -1, 3, 174, 174, 174); + } + if (lastsaved == 2) { dwgfx.addline(" Vitellary will try to walk to you. "); + }else if (lastsaved == 3) { dwgfx.addline(" Vermilion will try to walk to you. "); + }else if (lastsaved == 4) { dwgfx.addline(" Verdigris will try to walk to you. "); + }else if (lastsaved == 5) { dwgfx.addline(" Victoria will try to walk to you. ");} + dwgfx.textboxtimer(280); + + state = 0; + break; + + case 15: + //leaving the naughty corner + obj.entities[obj.getplayer()].tile = 0; + state = 0; + break; + case 16: + //entering the naughty corner + if(obj.entities[obj.getplayer()].tile == 0){ + obj.entities[obj.getplayer()].tile = 144; + music.playef(2, 10); + } + state = 0; + break; + + case 17: + //Arrow key tutorial + /* + obj.removetrigger(17); + dwgfx.createtextbox(" If you prefer, you can press UP or ", -1, 195, 174, 174, 174); + dwgfx.addline(" DOWN instead of ACTION to flip."); + dwgfx.textboxtimer(100); + */ + state = 0; + break; + + case 20: + if (obj.flags[1] == 0) { + obj.changeflag(1, 1); + state = 0; + dwgfx.textboxremove(); + } + obj.removetrigger(20); + break; + case 21: + if (obj.flags[2] == 0) { + obj.changeflag(2, 1); + state = 0; + dwgfx.textboxremove(); + } + obj.removetrigger(21); + break; + case 22: + if (obj.flags[3] == 0) { + dwgfx.textboxremovefast(); + obj.changeflag(3, 1); + state = 0; + + switch(controlstyle) { + case 0: case 2: + dwgfx.createtextbox(" Tap on the right to flip ", -1, 25, 174, 174, 174); + break; + case 1: + dwgfx.createtextbox(" Tap both sides together to flip ", -1, 25, 174, 174, 174); + break; + } + + dwgfx.textboxtimer(60); + } + obj.removetrigger(22); + break; + + case 30: + //Generic "run script" + if (obj.flags[4] == 0) { + obj.changeflag(4, 1); + startscript = true; newscript="firststeps"; + state = 0; + } + obj.removetrigger(30); + state = 0; + break; + case 31: + //state = 55; statedelay = 50; + state = 0; statedelay = 0; + if (obj.flags[6] == 0) { + obj.changeflag(6, 1); + + obj.changeflag(5, 1); + startscript = true; newscript="communicationstation"; + state = 0; statedelay = 0; + } + obj.removetrigger(31); + break; + case 32: + //Generic "run script" + if (obj.flags[7] == 0) { + obj.changeflag(7, 1); + startscript = true; newscript="teleporterback"; + state = 0; + } + obj.removetrigger(32); + state = 0; + break; + case 33: + //Generic "run script" + if (obj.flags[9] == 0) { + obj.changeflag(9, 1); + startscript = true; newscript="rescueblue"; + state = 0; + } + obj.removetrigger(33); + state = 0; + break; + case 34: + //Generic "run script" + if (obj.flags[10] == 0) { + obj.changeflag(10, 1); + startscript = true; newscript="rescueyellow"; + state = 0; + } + obj.removetrigger(34); + state = 0; + break; + case 35: + //Generic "run script" + if (obj.flags[11] == 0) { + obj.changeflag(11, 1); + startscript = true; newscript="rescuegreen"; + state = 0; + } + obj.removetrigger(35); + state = 0; + break; + case 36: + //Generic "run script" + if (obj.flags[8] == 0) { + obj.changeflag(8, 1); + startscript = true; newscript="rescuered"; + state = 0; + } + obj.removetrigger(36); + state = 0; + break; + + case 37: + //Generic "run script" + if (companion == 0) { + startscript = true; newscript="int2_yellow"; + state = 0; + } + obj.removetrigger(37); + state = 0; + break; + case 38: + //Generic "run script" + if (companion == 0) { + startscript = true; newscript="int2_red"; + state = 0; + } + obj.removetrigger(38); + state = 0; + break; + case 39: + //Generic "run script" + if (companion == 0) { + startscript = true; newscript="int2_green"; + state = 0; + } + obj.removetrigger(39); + state = 0; + break; + case 40: + //Generic "run script" + if (companion == 0) { + startscript = true; newscript="int2_blue"; + state = 0; + } + obj.removetrigger(40); + state = 0; + break; + + case 41: + //Generic "run script" + if (obj.flags[60] == 0) { + obj.changeflag(60, 1); + startscript = true; + if (lastsaved == 2) { newscript = "int1yellow_2"; + }else if (lastsaved == 3) { newscript = "int1red_2"; + }else if (lastsaved == 4) { newscript = "int1green_2"; + }else if (lastsaved == 5) { newscript = "int1blue_2";} + state = 0; + } + obj.removetrigger(41); + state = 0; + break; + case 42: + //Generic "run script" + if (obj.flags[62] == 0) { + obj.changeflag(62, 1); + startscript = true; + if (lastsaved == 2) { newscript = "int1yellow_3"; + }else if (lastsaved == 3) { newscript = "int1red_3"; + }else if (lastsaved == 4) { newscript = "int1green_3"; + }else if (lastsaved == 5) { newscript = "int1blue_3";} + state = 0; + } + obj.removetrigger(42); + state = 0; + break; + case 43: + //Generic "run script" + if (obj.flags[63] == 0) { + obj.changeflag(63, 1); + startscript = true; + if (lastsaved == 2) { newscript = "int1yellow_4"; + }else if (lastsaved == 3) { newscript = "int1red_4"; + }else if (lastsaved == 4) { newscript = "int1green_4"; + }else if (lastsaved == 5) { newscript = "int1blue_4";} + state = 0; + } + obj.removetrigger(43); + state = 0; + break; + case 44: + //Generic "run script" + if (obj.flags[64] == 0) { + obj.changeflag(64, 1); + startscript = true; + if (lastsaved == 2) { newscript = "int1yellow_5"; + }else if (lastsaved == 3) { newscript = "int1red_5"; + }else if (lastsaved == 4) { newscript = "int1green_5"; + }else if (lastsaved == 5) { newscript = "int1blue_5";} + state = 0; + } + obj.removetrigger(44); + state = 0; + break; + case 45: + //Generic "run script" + if (obj.flags[65] == 0) { + obj.changeflag(65, 1); + startscript = true; + if (lastsaved == 2) { newscript = "int1yellow_6"; + }else if (lastsaved == 3) { newscript = "int1red_6"; + }else if (lastsaved == 4) { newscript = "int1green_6"; + }else if (lastsaved == 5) { newscript = "int1blue_6";} + state = 0; + } + obj.removetrigger(45); + state = 0; + break; + case 46: + //Generic "run script" + if (obj.flags[66] == 0) { + obj.changeflag(66, 1); + startscript = true; + if (lastsaved == 2) { newscript = "int1yellow_7"; + }else if (lastsaved == 3) { newscript = "int1red_7"; + }else if (lastsaved == 4) { newscript = "int1green_7"; + }else if (lastsaved == 5) { newscript = "int1blue_7";} + state = 0; + } + obj.removetrigger(46); + state = 0; + break; + + case 47: + //Generic "run script" + if (obj.flags[69] == 0) { + obj.changeflag(69, 1); + startscript = true; newscript="trenchwarfare"; + state = 0; + } + obj.removetrigger(47); + state = 0; + break; + case 48: + //Generic "run script" + if (obj.flags[70] == 0) { + obj.changeflag(70, 1); + startscript = true; newscript="trinketcollector"; + state = 0; + } + obj.removetrigger(48); + state = 0; + break; + case 49: + //Start final level music + if (obj.flags[71] == 0) { + obj.changeflag(71, 1); + music.niceplay(15); //Final level remix + state = 0; + } + obj.removetrigger(49); + state = 0; + break; + + case 50: + music.playef(15, 10); + dwgfx.createtextbox("Help! Can anyone hear", 35, 15, 255, 134, 255); + dwgfx.addline("this message?"); + dwgfx.textboxtimer(60); + state++; statedelay = 100; + break; + case 51: + music.playef(15, 10); + dwgfx.createtextbox("Verdigris? Are you out", 30, 12, 255, 134, 255); + dwgfx.addline("there? Are you ok?"); + dwgfx.textboxtimer(60); + state++; statedelay = 100; + break; + case 52: + music.playef(15, 10); + dwgfx.createtextbox("Please help us! We've crashed", 5, 22, 255, 134, 255); + dwgfx.addline("and need assistance!"); + dwgfx.textboxtimer(60); + state++; statedelay = 100; + break; + case 53: + music.playef(15, 10); + dwgfx.createtextbox("Hello? Anyone out there?", 40, 15, 255, 134, 255); + dwgfx.textboxtimer(60); + state++; statedelay = 100; + break; + case 54: + music.playef(15, 10); + dwgfx.createtextbox("This is Doctor Violet from the", 5, 8, 255, 134, 255); + dwgfx.addline("D.S.S. Souleye! Please respond!"); + dwgfx.textboxtimer(60); + state++; statedelay = 100; + break; + case 55: + music.playef(15, 10); + dwgfx.createtextbox("Please... Anyone...", 45, 14, 255, 134, 255); + dwgfx.textboxtimer(60); + state++; statedelay = 100; + break; + case 56: + music.playef(15, 10); + dwgfx.createtextbox("Please be alright, everyone...", 25, 18, 255, 134, 255); + dwgfx.textboxtimer(60); + state=50; statedelay = 100; + break; + + + case 80: + //Used to return to menu from the game + if(dwgfx.fademode == 1) state++; + break; + case 81: + gamestate = 1; dwgfx.fademode = 4; + music.play(6); dwgfx.backgrounddrawn = false; map.tdrawback = true; + dwgfx.flipmode = false; + createmenu("mainmenu"); + state = 0; + break; + + case 82: + //Time Trial Complete! + obj.removetrigger(82); + hascontrol = false; + timetrialresulttime = seconds + (minutes * 60); + timetrialrank = 0; + if (timetrialresulttime <= timetrialpar) timetrialrank++; + if (trinkets >= timetrialshinytarget) timetrialrank++; + if (deathcounts == 0) timetrialrank++; + + if (timetrialresulttime < besttimes[timetriallevel] || besttimes[timetriallevel]==-1) { + besttimes[timetriallevel] = timetrialresulttime; + } + if (trinkets > besttrinkets[timetriallevel] || besttrinkets[timetriallevel]==-1) { + besttrinkets[timetriallevel] = trinkets; + } + if (deathcounts < bestlives[timetriallevel] || bestlives[timetriallevel]==-1) { + bestlives[timetriallevel] = deathcounts; + } + if (timetrialrank > bestrank[timetriallevel] || bestrank[timetriallevel]==-1) { + bestrank[timetriallevel] = timetrialrank; + scores.reportAchievement(6 + timetriallevel); + } + + savestats(map, dwgfx); + + dwgfx.fademode = 2; music.fadeout(); + state++; + break; + case 83: + frames--; + if(dwgfx.fademode == 1) state++; + break; + case 84: + dwgfx.flipmode = false; + gamestate = 1; dwgfx.fademode = 4; + dwgfx.backgrounddrawn = true; map.tdrawback = true; + createmenu("timetrialcomplete"); + state = 0; + break; + + + case 85: + //Cutscene skip version of final level change + obj.removetrigger(85); + //Init final stretch + state++; music.playef(9, 10); + music.play(2); + obj.flags[72] = 1; + + screenshake = 10; + flashlight = 5; + map.finalstretch = true; + map.warpx = false; map.warpy = false; + map.background = 6; + + map.final_colormode = true; map.final_colorframe = 1; + + state = 0; + break; + + //From 90-100 are run scripts for the eurogamer expo only, remove later + case 90: + //Generic "run script" + startscript = true; newscript="startexpolevel_station1"; + obj.removetrigger(90); + state = 0; + break; + case 91: + //Generic "run script" + startscript = true; newscript="startexpolevel_lab"; + obj.removetrigger(91); + state = 0; + break; + case 92: + //Generic "run script" + startscript = true; newscript="startexpolevel_warp"; + obj.removetrigger(92); + state = 0; + break; + case 93: + //Generic "run script" + startscript = true; newscript="startexpolevel_tower"; + obj.removetrigger(93); + state = 0; + break; + case 94: + //Generic "run script" + startscript = true; newscript="startexpolevel_station2"; + obj.removetrigger(94); + state = 0; + break; + case 95: + //Generic "run script" + startscript = true; newscript="startexpolevel_final"; + obj.removetrigger(95); + state = 0; + break; + + case 96: + //Used to return to gravitron to game + if(dwgfx.fademode == 1) state++; + break; + case 97: + gamestate = 0; dwgfx.fademode = 4; + startscript = true; newscript="returntolab"; + state = 0; + break; + + case 100: + // + // Meeting crewmate in the warpzone + // + obj.removetrigger(100); + if (obj.flags[4] == 0) { + obj.changeflag(4, 1); + state++; + } + break; + case 101: + i = obj.getplayer(); + hascontrol = false; + if (obj.entities[i].onroof > 0 && gravitycontrol == 1) { + gravitycontrol = 0; music.playef(1, 10); + } + if (obj.entities[i].onground > 0) { + state++; + } + break; + case 102: + companion = 6; + i = obj.getcompanion(6); obj.entities[i].tile = 0; obj.entities[i].state = 1; + + advancetext = true; hascontrol = false; + + dwgfx.createtextbox("Captain! I've been so worried!", 60, 90, 164, 255, 164); + state++; music.playef(12, 10); + break; + case 104: + dwgfx.createtextbox("I'm glad you're ok!", 135, 152, 164, 164, 255); + state++; music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 106: + dwgfx.createtextbox("I've been trying to find a", 74, 70, 164, 255, 164); + dwgfx.addline("way out, but I keep going"); + dwgfx.addline("around in circles..."); + state++; music.playef(2, 10); + dwgfx.textboxactive(); + i = obj.getcompanion(6); + obj.entities[i].tile = 54; obj.entities[i].state = 0; + break; + case 108: + dwgfx.createtextbox("Don't worry! I have a", 125, 152, 164, 164, 255); + dwgfx.addline("teleporter key!"); + state++; music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 110: + i = obj.getcompanion(6); obj.entities[i].tile = 0; obj.entities[i].state = 1; + dwgfx.createtextbox("Follow me!", 185, 154, 164, 164, 255); + state++; music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 112: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + + state = 0; + break; + + case 115: + // + // Test script for space station, totally delete me! + // + i = obj.getplayer(); + hascontrol = false; + state++; + break; + case 116: + advancetext = true; hascontrol = false; + + dwgfx.createtextbox("Sorry Eurogamers! Teleporting around", 60 - 20, 200, 255, 64, 64); + dwgfx.addline("the map doesn't work in this version!"); + dwgfx.textboxcenterx(); + state++; + break; + case 118: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + + state = 0; + break; + + case 120: + // + // Meeting crewmate in the space station + // + obj.removetrigger(120); + if (obj.flags[5] == 0) { + obj.changeflag(5, 1); + state++; + } + break; + case 121: + i = obj.getplayer(); + hascontrol = false; + if (obj.entities[i].onground > 0 && gravitycontrol == 0) { + gravitycontrol = 1; music.playef(1, 10); + } + if (obj.entities[i].onroof > 0) { + state++; + } + break; + case 122: + companion = 7; + i = obj.getcompanion(7); obj.entities[i].tile = 6; obj.entities[i].state = 1; + + advancetext = true; hascontrol = false; + + dwgfx.createtextbox("Captain! You're ok!", 60-10, 90-40, 255, 255, 134); + state++; music.playef(14, 10); + break; + case 124: + dwgfx.createtextbox("I've found a teleporter, but", 60-20, 90 - 40, 255, 255, 134); + dwgfx.addline("I can't get it to go anywhere..."); + state++; music.playef(2, 10); + dwgfx.textboxactive(); + i = obj.getcompanion(7); //obj.entities[i].tile = 66; obj.entities[i].state = 0; + break; + case 126: + dwgfx.createtextbox("I can help with that!", 125, 152-40, 164, 164, 255); + state++; music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 128: + dwgfx.createtextbox("I have the teleporter", 130, 152-35, 164, 164, 255); + dwgfx.addline("codex for our ship!"); + state++; music.playef(11, 10); + dwgfx.textboxactive(); + break; + + case 130: + dwgfx.createtextbox("Yey! Let's go home!", 60-30, 90-35, 255, 255, 134); + state++; music.playef(14, 10); + dwgfx.textboxactive(); + i = obj.getcompanion(7); obj.entities[i].tile = 6; obj.entities[i].state = 1; + break; + case 132: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + + state = 0; + break; + + case 200: + //Init final stretch + state++; music.playef(9, 10); + //music.play(2); + obj.flags[72] = 1; + + screenshake = 10; + flashlight = 5; + map.finalstretch = true; + map.warpx = false; map.warpy = false; + map.background = 6; + + map.final_colormode = true; map.final_colorframe = 1; + + startscript = true; newscript="finalterminal_finish"; + state = 0; + break; + + case 300: + startscript = true; + newscript="custom_"+customscript[0]; + obj.removetrigger(300); + state = 0; + break; + case 301: + startscript = true; + newscript="custom_"+customscript[1]; + obj.removetrigger(301); + state = 0; + break; + case 302: + startscript = true; + newscript="custom_"+customscript[2]; + obj.removetrigger(302); + state = 0; + break; + case 303: + startscript = true; + newscript="custom_"+customscript[3]; + obj.removetrigger(303); + state = 0; + break; + case 304: + startscript = true; + newscript="custom_"+customscript[4]; + obj.removetrigger(304); + state = 0; + break; + case 305: + startscript = true; + newscript="custom_"+customscript[5]; + obj.removetrigger(305); + state = 0; + break; + case 306: + startscript = true; + newscript="custom_"+customscript[6]; + obj.removetrigger(306); + state = 0; + break; + case 307: + startscript = true; + newscript="custom_"+customscript[7]; + obj.removetrigger(307); + state = 0; + break; + case 308: + startscript = true; + newscript="custom_"+customscript[8]; + obj.removetrigger(308); + state = 0; + break; + case 309: + startscript = true; + newscript="custom_"+customscript[9]; + obj.removetrigger(309); + state = 0; + break; + case 310: + startscript = true; + newscript="custom_"+customscript[10]; + obj.removetrigger(310); + state = 0; + break; + case 311: + startscript = true; + newscript="custom_"+customscript[11]; + obj.removetrigger(311); + state = 0; + break; + case 312: + startscript = true; + newscript="custom_"+customscript[12]; + obj.removetrigger(312); + state = 0; + break; + case 313: + startscript = true; + newscript="custom_"+customscript[13]; + obj.removetrigger(313); + state = 0; + break; + case 314: + startscript = true; + newscript="custom_"+customscript[14]; + obj.removetrigger(314); + state = 0; + break; + case 315: + startscript = true; + newscript="custom_"+customscript[15]; + obj.removetrigger(315); + state = 0; + break; + case 316: + startscript = true; + newscript="custom_"+customscript[16]; + obj.removetrigger(316); + state = 0; + break; + case 317: + startscript = true; + newscript="custom_"+customscript[17]; + obj.removetrigger(317); + state = 0; + break; + case 318: + startscript = true; + newscript="custom_"+customscript[18]; + obj.removetrigger(318); + state = 0; + break; + case 319: + startscript = true; + newscript="custom_"+customscript[19]; + obj.removetrigger(319); + state = 0; + break; + case 320: + startscript = true; + newscript="custom_"+customscript[20]; + obj.removetrigger(320); + state = 0; + break; + case 321: + startscript = true; + newscript="custom_"+customscript[21]; + obj.removetrigger(321); + state = 0; + break; + case 322: + startscript = true; + newscript="custom_"+customscript[22]; + obj.removetrigger(322); + state = 0; + break; + case 323: + startscript = true; + newscript="custom_"+customscript[23]; + obj.removetrigger(323); + state = 0; + break; + case 324: + startscript = true; + newscript="custom_"+customscript[24]; + obj.removetrigger(324); + state = 0; + break; + case 325: + startscript = true; + newscript="custom_"+customscript[25]; + obj.removetrigger(325); + state = 0; + break; + case 326: + startscript = true; + newscript="custom_"+customscript[26]; + obj.removetrigger(326); + state = 0; + break; + case 327: + startscript = true; + newscript="custom_"+customscript[27]; + obj.removetrigger(327); + state = 0; + break; + case 328: + startscript = true; + newscript="custom_"+customscript[28]; + obj.removetrigger(328); + state = 0; + break; + case 329: + startscript = true; + newscript="custom_"+customscript[29]; + obj.removetrigger(329); + state = 0; + break; + case 330: + startscript = true; + newscript="custom_"+customscript[30]; + obj.removetrigger(330); + state = 0; + break; + case 331: + startscript = true; + newscript="custom_"+customscript[31]; + obj.removetrigger(331); + state = 0; + break; + case 332: + startscript = true; + newscript="custom_"+customscript[32]; + obj.removetrigger(332); + state = 0; + break; + case 333: + startscript = true; + newscript="custom_"+customscript[33]; + obj.removetrigger(333); + state = 0; + break; + case 334: + startscript = true; + newscript="custom_"+customscript[34]; + obj.removetrigger(334); + state = 0; + break; + case 335: + startscript = true; + newscript="custom_"+customscript[35]; + obj.removetrigger(335); + state = 0; + break; + case 336: + startscript = true; + newscript="custom_"+customscript[36]; + obj.removetrigger(336); + state = 0; + break; + + case 1000: + dwgfx.showcutscenebars = true; + hascontrol = false; + completestop = true; + state++; statedelay = 15; + break; + case 1001: + //Found a trinket! + advancetext = true; + state++; + if (dwgfx.flipmode) { + dwgfx.createtextbox(" Congratulations! ", 50, 105, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a shiny trinket!"); + dwgfx.textboxcenterx(); + + if (map.custommode) { + dwgfx.createtextbox(" " + help.number(trinkets) + " out of " + help.number(map.customtrinkets), 50, 65, 174, 174, 174); + }else{ + dwgfx.createtextbox(" " + help.number(trinkets) + " out of Twenty ", 50, 65, 174, 174, 174); + } + dwgfx.textboxcenterx(); + }else{ + dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a shiny trinket!"); + dwgfx.textboxcenterx(); + + if (map.custommode) { + dwgfx.createtextbox(" " + help.number(trinkets) + " out of " + help.number(map.customtrinkets), 50, 135, 174, 174, 174); + }else{ + dwgfx.createtextbox(" " + help.number(trinkets) + " out of Twenty ", 50, 135, 174, 174, 174); + } + dwgfx.textboxcenterx(); + } + break; + case 1003: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; completestop = false; + state = 0; + //music.play(music.resumesong); + music.musicfadein = 90; + dwgfx.showcutscenebars = false; + break; + + case 1010: + dwgfx.showcutscenebars = true; + hascontrol = false; + completestop = true; + state++; + statedelay = 15; + break; + case 1011: + //Found a trinket! + advancetext = true; + state++; + if (dwgfx.flipmode) + { + dwgfx.createtextbox(" Congratulations! ", 50, 105, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a lost crewmate!"); + dwgfx.textboxcenterx(); + + if(int(map.customcrewmates-crewmates)==0) + { + dwgfx.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174); + } + else if(map.customcrewmates-crewmates==1) + { + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 135, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 135, 174, 174, 174); + } + dwgfx.textboxcenterx(); + + } + else + { + dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a lost crewmate!"); + dwgfx.textboxcenterx(); + + if(int(map.customcrewmates-crewmates)==0) + { + dwgfx.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174); + } + else if(map.customcrewmates-crewmates==1) + { + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remains ", 50, 135, 174, 174, 174); + } + else + { + dwgfx.createtextbox(" " + help.number(int(map.customcrewmates-crewmates))+ " remain ", 50, 135, 174, 174, 174); + } + dwgfx.textboxcenterx(); + } + break; + case 1013: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + completestop = false; + state = 0; + + if(map.customcrewmates-crewmates==0) + { + if(map.custommodeforreal) + { + dwgfx.fademode = 2; + if(!muted && editor.levmusic>0) music.musicfadein = 90; + if(editor.levmusic>0) music.fadeout(); + state=1014; + } + else + { + gamestate = EDITORMODE; + dwgfx.backgrounddrawn=false; + if(!muted && editor.levmusic>0) music.musicfadein = 90; + if(editor.levmusic>0) music.fadeout(); + } + } + else + { + if(!muted && editor.levmusic>0) music.musicfadein = 90; + } + dwgfx.showcutscenebars = false; + break; + case 1014: + frames--; + if(dwgfx.fademode == 1) state++; + break; + case 1015: + dwgfx.flipmode = false; + gamestate = TITLEMODE; + dwgfx.fademode = 4; + music.play(6); + dwgfx.backgrounddrawn = true; + map.tdrawback = true; + //Update level stats + if(map.customcrewmates-crewmates==0) + { + //Finished level + if(map.customtrinkets-trinkets==0) + { + //and got all the trinkets! + updatecustomlevelstats(customlevelfilename, 3); + } + else + { + updatecustomlevelstats(customlevelfilename, 1); + } + } + createmenu("levellist"); + state = 0; + break; + + case 2000: + //Game Saved! + if (intimetrial || nodeathmode || inintermission) { + state = 0; + }else{ + savetele(map, obj, music, help); + if (dwgfx.flipmode) { + dwgfx.createtextbox(" Game Saved ", -1, 202, 174, 174, 174); + dwgfx.textboxtimer(25); + }else{ + dwgfx.createtextbox(" Game Saved ", -1, 12, 174, 174, 174); + dwgfx.textboxtimer(25); + } + state = 0; + } + break; + + case 2500: + + music.play(5); + //Activating a teleporter (appear) + state++; statedelay = 15; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 2501: + //Activating a teleporter 2 + state++; statedelay = 0; + flashlight = 5; screenshake = 0; + //we're done here! + music.playef(10, 10); + break; + case 2502: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); + obj.entities[i].colour = 0; + obj.entities[i].invis = false; + + obj.entities[i].xp = obj.entities[obj.getteleporter()].xp+44; + obj.entities[i].yp = obj.entities[obj.getteleporter()].yp+44; + obj.entities[i].ay = -6; + obj.entities[i].ax = 6; + obj.entities[i].vy = -6; + obj.entities[i].vx = 6; + + i = obj.getteleporter(); + obj.entities[i].tile = 1; + obj.entities[i].colour = 101; + break; + case 2503: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 10; + break; + case 2504: + state++; + i = obj.getplayer(); + //obj.entities[i].xp += 10; + break; + case 2505: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 8; + break; + case 2506: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 6; + break; + case 2507: + state++; + i = obj.getplayer(); + //obj.entities[i].xp += 4; + break; + case 2508: + state++; + i = obj.getplayer(); + obj.entities[i].xp += 2; + break; + case 2509: + state++; statedelay = 15; + i = obj.getplayer(); + obj.entities[i].xp += 1; + break; + case 2510: + advancetext = true; hascontrol = false; + dwgfx.createtextbox("Hello?", 125+24, 152-20, 164, 164, 255); + state++; music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 2512: + advancetext = true; hascontrol = false; + dwgfx.createtextbox("Is anyone there?", 125+8, 152-24, 164, 164, 255); + state++; music.playef(11, 10); + dwgfx.textboxactive(); + break; + case 2514: + dwgfx.textboxremove(); + hascontrol = true; + advancetext = false; + + state = 0; + music.play(3); + break; + + + case 3000: + //Activating a teleporter (long version for level complete) + state++; statedelay = 30; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 3001: + //Activating a teleporter 2 + state++; statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3002: + //Activating a teleporter 2 + state++; statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3003: + //Activating a teleporter 2 + state++; statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3004: + //Activating a teleporter 2 + state++; statedelay = 0; + flashlight = 5; screenshake = 0; + //we're done here! + music.playef(10, 10); + break; + case 3005: + //Activating a teleporter 2 + state++; statedelay = 50; + //testing! + //state = 3006; //Warp Zone + //state = 3020; //Space Station + switch(companion) { + case 6: state = 3006; break; //Warp Zone + case 7: state = 3020; break; //Space Station + case 8: state = 3040; break; //Lab + case 9: state = 3060; break; //Tower + case 10: state = 3080; break; //Intermission 2 + case 11: state = 3085; break; //Intermission 1 + } + + i = obj.getplayer(); + obj.entities[i].colour = 0; + obj.entities[i].invis = true; + + i = obj.getcompanion(companion); + if(i>-1){ + obj.entities[i].active = false; + } + + i = obj.getteleporter(); + obj.entities[i].tile = 1; + obj.entities[i].colour = 100; + break; + + case 3006: + //Level complete! (warp zone) + unlocknum(4, map, dwgfx); + lastsaved = 4; + music.play(0); + state++; statedelay = 75; + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 180, 165, 165, 255); + }else{ dwgfx.createtextbox("", -1, 12, 165, 165, 255); } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + +/* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3007: + state++; statedelay = 45; + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 104, 175,174,174); + }else { dwgfx.createtextbox("", -1, 64+8+16, 175,174,174); } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3008: + state++; statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) { + tempstring = " One remains "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else if (temp > 0) { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else { + if (dwgfx.flipmode) { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } + } + dwgfx.textboxcenterx(); + break; + case 3009: + state++; statedelay = 0; + + if (dwgfx.flipmode) { dwgfx.createtextbox(" Tap screen to continue ", -1, 20, 164, 164, 255); + }else { dwgfx.createtextbox(" Tap screen to continue ", -1, 196, 164, 164, 255); } + dwgfx.textboxcenterx(); + break; + case 3010: + if (jumppressed) { + state++; statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3011: + state = 3070; statedelay = 0; + break; + + case 3020: + //Level complete! (Space Station 2) + unlocknum(3, map, dwgfx); + lastsaved = 2; + music.play(0); + state++; statedelay = 75; + + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 180, 165, 165, 255); + }else{ dwgfx.createtextbox("", -1, 12, 165, 165, 255); } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + +/* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3021: + state++; statedelay = 45; + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 104, 174,175,174); + }else { dwgfx.createtextbox("", -1, 64+8+16, 174,175,174); } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3022: + state++; statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) { + tempstring = " One remains "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else if (temp > 0) { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else { + if (dwgfx.flipmode) { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } + } + dwgfx.textboxcenterx(); + break; + case 3023: + state++; statedelay = 0; + + if (dwgfx.flipmode) { dwgfx.createtextbox(" Tap screen to continue ", -1, 20, 164, 164, 255); + }else { dwgfx.createtextbox(" Tap screen to continue ", -1, 196, 164, 164, 255); } + dwgfx.textboxcenterx(); + break; + case 3024: + if (jumppressed) { + state++; statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3025: + state = 3070; statedelay = 0; + break; + + case 3040: + //Level complete! (Lab) + unlocknum(1, map, dwgfx); + lastsaved = 5; + music.play(0); + state++; statedelay = 75; + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 180, 165, 165, 255); + }else{ dwgfx.createtextbox("", -1, 12, 165, 165, 255); } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + +/* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3041: + state++; statedelay = 45; + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 104, 174,174,175); + }else { dwgfx.createtextbox("", -1, 64+8+16, 174,174,175); } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3042: + state++; statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) { + tempstring = " One remains "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else if (temp > 0) { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else { + if (dwgfx.flipmode) { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } + } + dwgfx.textboxcenterx(); + break; + case 3043: + state++; statedelay = 0; + + if (dwgfx.flipmode) { dwgfx.createtextbox(" Tap screen to continue ", -1, 20, 164, 164, 255); + }else { dwgfx.createtextbox(" Tap screen to continue ", -1, 196, 164, 164, 255); } + dwgfx.textboxcenterx(); + break; + case 3044: + if (jumppressed) { + state++; statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3045: + state = 3070; statedelay = 0; + break; + + case 3050: + //Level complete! (Space Station 1) + unlocknum(0, map, dwgfx); + lastsaved = 1; + music.play(0); + state++; statedelay = 75; + + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 180, 165, 165, 255); + }else{ dwgfx.createtextbox("", -1, 12, 165, 165, 255); } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + +/* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3051: + state++; statedelay = 45; + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 104, 175,175,174); + }else { dwgfx.createtextbox("", -1, 64+8+16, 175,175,174); } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3052: + state++; statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) { + tempstring = " One remains "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else if (temp > 0) { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else { + if (dwgfx.flipmode) { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } + } + dwgfx.textboxcenterx(); + break; + case 3053: + state++; statedelay = 0; + + if (dwgfx.flipmode) { dwgfx.createtextbox(" Tap screen to continue ", -1, 20, 164, 164, 255); + }else { dwgfx.createtextbox(" Tap screen to continue ", -1, 196, 164, 164, 255); } + dwgfx.textboxcenterx(); + break; + case 3054: + if (jumppressed) { + state++; statedelay = 30; + dwgfx.textboxremove(); + crewstats[1] = 0; //Set violet's rescue script to 0 to make the next bit easier + teleportscript = ""; + } + break; + case 3055: + dwgfx.fademode = 2; + state++; statedelay = 10; + break; + case 3056: + if(dwgfx.fademode==1){ + startscript = true; + if (nocutscenes) { + newscript="bigopenworldskip"; + }else{ + newscript = "bigopenworld"; + } + state = 0; + } + break; + + + case 3060: + //Level complete! (Tower) + unlocknum(2, map, dwgfx); + lastsaved = 3; + music.play(0); + state++; statedelay = 75; + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 180, 165, 165, 255); + }else{ dwgfx.createtextbox("", -1, 12, 165, 165, 255); } + //dwgfx.addline(" Level Complete! "); + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + +/* advancetext = true; + hascontrol = false; + state = 3; + dwgfx.createtextbox("To do: write quick", 50, 80, 164, 164, 255); + dwgfx.addline("intro to story!");*/ + break; + case 3061: + state++; statedelay = 45; + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 104, 175,174,175); + }else { dwgfx.createtextbox("", -1, 64+8+16, 175,174,175); } + dwgfx.addline(" You have rescued "); + dwgfx.addline(" a crew member! "); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3062: + state++; statedelay = 45; + + temp = 6 - crewrescued(); + if (temp == 1) { + tempstring = " One remains "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else if (temp > 0) { + tempstring = " " + help.number(temp) + " remain "; + if (dwgfx.flipmode) { dwgfx.createtextbox(tempstring, -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(tempstring, -1, 128+16, 174, 174, 174); } + }else { + if (dwgfx.flipmode) { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 72, 174, 174, 174); + }else { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 128+16, 174, 174, 174); } + } + dwgfx.textboxcenterx(); + break; + case 3063: + state++; statedelay = 0; + + if (dwgfx.flipmode) { dwgfx.createtextbox(" Tap screen to continue ", -1, 20, 164, 164, 255); + }else { dwgfx.createtextbox(" Tap screen to continue ", -1, 196, 164, 164, 255); } + dwgfx.textboxcenterx(); + break; + case 3064: + if (jumppressed) { + state++; statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3065: + state = 3070; statedelay = 0; + break; + + + case 3070: + dwgfx.fademode = 2; + state++; + break; + case 3071: + if (dwgfx.fademode == 1) state++; + break; + case 3072: + //Ok, we need to adjust some flags based on who've we've rescued. Some of there conversation options + //change depending on when they get back to the ship. + if (lastsaved == 2) { + if (crewstats[3]) obj.flags[25] = 1; + if (crewstats[4]) obj.flags[26] = 1; + if (crewstats[5]) obj.flags[24] = 1; + }else if (lastsaved == 3) { + if (crewstats[2]) obj.flags[50] = 1; + if (crewstats[4]) obj.flags[49] = 1; + if (crewstats[5]) obj.flags[48] = 1; + }else if (lastsaved == 4) { + if (crewstats[2]) obj.flags[54] = 1; + if (crewstats[3]) obj.flags[55] = 1; + if (crewstats[5]) obj.flags[56] = 1; + }else if (lastsaved == 5) { + if (crewstats[2]) obj.flags[37] = 1; + if (crewstats[3]) obj.flags[38] = 1; + if (crewstats[4]) obj.flags[39] = 1; + } + //We're pitch black now, make a decision + companion = 0; + if (crewrescued() == 6) { + startscript = true; newscript="startlevel_final"; + state = 0; + }else if (crewrescued() == 4) { + companion = 11; + supercrewmate = true; + scmprogress = 0; + + startscript = true; newscript = "intermission_1"; + obj.flags[19] = 1; + if (lastsaved == 2) obj.flags[32] = 1; + if (lastsaved == 3) obj.flags[35] = 1; + if (lastsaved == 4) obj.flags[34] = 1; + if (lastsaved == 5) obj.flags[33] = 1; + state = 0; + }else if (crewrescued() == 5) { + startscript = true; newscript = "intermission_2"; + obj.flags[20] = 1; + if (lastsaved == 2) obj.flags[32] = 1; + if (lastsaved == 3) obj.flags[35] = 1; + if (lastsaved == 4) obj.flags[34] = 1; + if (lastsaved == 5) obj.flags[33] = 1; + state = 0; + }else { + startscript = true; newscript="regularreturn"; + state = 0; + } + break; + + case 3080: + //returning from an intermission, very like 3070 + if (inintermission) { + dwgfx.fademode = 2; + companion = 0; + state=3100; + }else{ + unlocknum(7, map, dwgfx); + dwgfx.fademode = 2; + companion = 0; + state++; + } + break; + case 3081: + if (dwgfx.fademode == 1) state++; + break; + case 3082: + map.finalmode = false; + startscript = true; newscript="regularreturn"; + state = 0; + break; + + case 3085: + //returning from an intermission, very like 3070 + //return to menu from here + if (inintermission) { + companion = 0; + supercrewmate = false; + state++; + dwgfx.fademode = 2; music.fadeout(); + state=3100; + }else{ + unlocknum(6, map, dwgfx); + dwgfx.fademode = 2; + companion = 0; + supercrewmate = false; + state++; + } + break; + case 3086: + if (dwgfx.fademode == 1) state++; + break; + case 3087: + map.finalmode = false; + startscript = true; newscript="regularreturn"; + state = 0; + break; + + case 3100: + if(dwgfx.fademode == 1) state++; + break; + case 3101: + dwgfx.flipmode = false; + gamestate = 1; dwgfx.fademode = 4; + dwgfx.backgrounddrawn = true; map.tdrawback = true; + createmenu("play"); + music.play(6); + state = 0; + break; + + //startscript = true; newscript="returntohub"; + //state = 0; + + /*case 3025: + if (recording == 1) { + //if recording the input, output it to debug here + trace(recordstring); + help.toclipboard(recordstring); + } + test = true; teststring = recordstring; + dwgfx.createtextbox(" Congratulations! ", 50, 80, 164, 164, 255); + dwgfx.addline(""); + dwgfx.addline("Your play of this level has"); + dwgfx.addline("been copied to the clipboard."); + dwgfx.addline(""); + dwgfx.addline("Please consider pasting and"); + dwgfx.addline("sending it to me! Even if you"); + dwgfx.addline("made a lot of mistakes - knowing"); + dwgfx.addline("exactly where people are having"); + dwgfx.addline("trouble is extremely useful!"); + dwgfx.textboxcenter(); + state = 0; + break;*/ + + case 3500: + music.fadeout(); + state++; statedelay = 120; + //state = 3511; //testing + break; + case 3501: + //Game complete! + scores.reportAchievement(scores.vvvvvvgamecomplete); + unlocknum(5, map, dwgfx); + crewstats[0] = true; + state++; statedelay = 75; + music.play(7); + + if (dwgfx.flipmode) { dwgfx.createtextbox("", -1, 180, 164, 165, 255); + }else{ dwgfx.createtextbox("", -1, 12, 164, 165, 255); } + dwgfx.addline(" "); + dwgfx.addline(""); + dwgfx.addline(""); + dwgfx.textboxcenterx(); + break; + case 3502: + state++; statedelay = 45+15; + + if (dwgfx.flipmode) { dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 175-24, 0, 0, 0); + }else{ dwgfx.createtextbox(" All Crew Members Rescued! ", -1, 64, 0, 0, 0);} + savetime = timestring(help); + break; + case 3503: + state++; statedelay = 45; + + tempstring = help.number(trinkets); + if (dwgfx.flipmode) { + dwgfx.createtextbox("Trinkets Found:", 48, 155-24, 0,0,0); + dwgfx.createtextbox(tempstring, 180, 155-24, 0, 0, 0); + }else{ + dwgfx.createtextbox("Trinkets Found:", 48, 84, 0,0,0); + dwgfx.createtextbox(tempstring, 180, 84, 0, 0, 0); + } + break; + case 3504: + state++; statedelay = 45+15; + + tempstring = String(savetime); + if (dwgfx.flipmode) { + dwgfx.createtextbox(" Game Time:", 64, 143-24, 0,0,0); + dwgfx.createtextbox(tempstring, 180, 143-24, 0, 0, 0); + }else{ + dwgfx.createtextbox(" Game Time:", 64, 96, 0,0,0); + dwgfx.createtextbox(tempstring, 180, 96, 0, 0, 0); + } + break; + case 3505: + state++; statedelay = 45; + + if (dwgfx.flipmode) { + dwgfx.createtextbox(" Total Flips:", 64, 116-24, 0,0,0); + dwgfx.createtextbox(String(totalflips), 180, 116-24, 0, 0, 0); + }else{ + dwgfx.createtextbox(" Total Flips:", 64, 123, 0,0,0); + dwgfx.createtextbox(String(totalflips), 180, 123, 0, 0, 0); + } + break; + case 3506: + state++; statedelay = 45+15; + + if (dwgfx.flipmode) { + dwgfx.createtextbox("Total Deaths:", 64, 104-24, 0,0,0); + dwgfx.createtextbox(String(deathcounts), 180, 104-24, 0, 0, 0); + }else{ + dwgfx.createtextbox("Total Deaths:", 64, 135, 0,0,0); + dwgfx.createtextbox(String(deathcounts), 180, 135, 0, 0, 0); + } + break; + case 3507: + state++; statedelay = 45+15; + + if (dwgfx.flipmode) { + tempstring = "Hardest Room (with " + String(hardestroomdeaths) + " deaths)"; + dwgfx.createtextbox(tempstring, -1, 81-24, 0,0,0); + dwgfx.createtextbox(hardestroom, -1, 69-24, 0, 0, 0); + }else{ + tempstring = "Hardest Room (with " + String(hardestroomdeaths) + " deaths)"; + dwgfx.createtextbox(tempstring, -1, 158, 0,0,0); + dwgfx.createtextbox(hardestroom, -1, 170, 0, 0, 0); + } + break; + case 3508: + state++; statedelay = 0; + + if (dwgfx.flipmode) { + dwgfx.createtextbox(" Tap screen to continue ", -1, 20, 164, 164, 255); + }else{ + dwgfx.createtextbox(" Tap screen to continue ", -1, 196, 164, 164, 255); + } + dwgfx.textboxcenterx(); + break; + case 3509: + if (jumppressed) { + state++; statedelay = 30; + dwgfx.textboxremove(); + } + break; + case 3510: + //Save stats and stuff here + if (obj.flags[73] == 0) { + //flip mode complete + scores.reportAchievement(scores.vvvvvvgamecompleteflip); + unlock[19] = true; + } + + if (bestgamedeaths == -1) { + bestgamedeaths = deathcounts; + }else { + if (deathcounts < bestgamedeaths) { + bestgamedeaths = deathcounts; + } + } + + if (bestgamedeaths > -1) { + if (bestgamedeaths <= 500) { + scores.reportAchievement(scores.vvvvvvcomplete500); + } + if (bestgamedeaths <= 250) { + scores.reportAchievement(scores.vvvvvvcomplete250); + } + if (bestgamedeaths <= 100) { + scores.reportAchievement(scores.vvvvvvcomplete100); + } + if (bestgamedeaths <= 50) { + scores.reportAchievement(scores.vvvvvvcomplete50); + } + } + + savestats(map, dwgfx); + if (nodeathmode) { + scores.reportAchievement(scores.vvvvvvmaster); //bloody hell + unlock[20] = true; + state = 3520; statedelay = 0; + }else{ + statedelay = 120; + state++; + } + break; + case 3511: + //Activating a teleporter (long version for level complete) + i = obj.getplayer(); obj.entities[i].colour = 102; + + obj.flags[67] = 1; + + state++; statedelay = 30; + flashlight = 5; + screenshake = 90; + music.playef(9, 10); + break; + case 3512: + //Activating a teleporter 2 + state++; statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3513: + //Activating a teleporter 2 + state++; statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3514: + //Activating a teleporter 2 + state++; statedelay = 15; + flashlight = 5; + music.playef(9, 10); + break; + case 3515: + //Activating a teleporter 2 + state++; statedelay = 0; + flashlight = 5; screenshake = 0; + + i = obj.getplayer(); obj.entities[i].colour = 0; + obj.entities[i].invis = true; + + //we're done here! + music.playef(10, 10); + statedelay = 60; + break; + case 3516: + dwgfx.fademode = 2; + state++; + break; + case 3517: + if (dwgfx.fademode == 1) { + state++; statedelay = 30; + } + break; + case 3518: + dwgfx.fademode = 4; + state = 0; statedelay = 30; + //music.play(5); + //music.play(10); + + map.finalmode = false; + map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + map.finalstretch = false; + map.finalx = 100; map.finaly = 100; + + dwgfx.cutscenebarspos = 320; + + teleport_to_new_area = true; + teleportscript = "gamecomplete"; + break; + + case 3520: + //NO DEATH MODE COMPLETE JESUS + hascontrol = false; + crewstats[0] = true; + + dwgfx.fademode = 2; + state++; + break; + case 3521: + if(dwgfx.fademode == 1) state++; + break; + case 3522: + dwgfx.flipmode = false; + gamestate = 1; dwgfx.fademode = 4; + dwgfx.backgrounddrawn = true; map.tdrawback = true; + createmenu("nodeathmodecomplete"); + state = 0; + break; + + case 4000: + //Activating a teleporter (short version) + state++; statedelay = 10; + flashlight = 5; + screenshake = 10; + music.playef(9, 10); + break; + case 4001: + //Activating a teleporter 2 + state++; statedelay = 0; + flashlight = 5; screenshake = 0; + //we're done here! + music.playef(10, 10); + break; + case 4002: + //Activating a teleporter 2 + state++; statedelay = 10; + //testing! + //state = 3006; //Warp Zone + //state = 3020; //Space Station + //state = 3040; //Lab + + i = obj.getplayer(); + obj.entities[i].colour = 0; + obj.entities[i].invis = true; + + i = obj.getteleporter(); + if(i>-1){ + obj.entities[i].tile = 1; + obj.entities[i].colour = 100; + } + break; + case 4003: + state = 0; statedelay = 0; + teleport_to_new_area = true; + break; + + case 4010: + //Activating a teleporter (default appear) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4011: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4012: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; obj.entities[i].invis = false; obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; obj.entities[i].ax = 6; + obj.entities[i].vy = -6; obj.entities[i].vx = 6; + break; + case 4013: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4014: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4015: state++; i = obj.getplayer(); obj.entities[i].xp += 8; break; + case 4016: state++; i = obj.getplayer(); obj.entities[i].xp += 6; break; + case 4017: state++; i = obj.getplayer(); obj.entities[i].xp += 3; break; + case 4018: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp += 1; break; + case 4019: + if (intimetrial || nodeathmode || inintermission) { + }else{ + savetele(map, obj, music, help); + } + i = obj.getteleporter(); + activetele = true; + teleblock.x = obj.entities[i].xp - 32; teleblock.y = obj.entities[i].yp - 32; + teleblock.width = 160; teleblock.height = 160; + hascontrol = true; advancetext = false; state = 0; + break; + + case 4020: + //Activating a teleporter (default appear) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4021: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4022: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; obj.entities[i].invis = false; obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; obj.entities[i].ax = 6; + obj.entities[i].vy = -6; obj.entities[i].vx = 6; + break; + case 4023: state++; i = obj.getplayer(); obj.entities[i].xp += 12; break; + case 4024: state++; i = obj.getplayer(); obj.entities[i].xp += 12; break; + case 4025: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4026: state++; i = obj.getplayer(); obj.entities[i].xp += 8; break; + case 4027: state++; i = obj.getplayer(); obj.entities[i].xp += 5; break; + case 4028: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp += 2; break; + case 4029: hascontrol = true; advancetext = false; state = 0; break; + + case 4030: + //Activating a teleporter (default appear) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4031: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4032: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; obj.entities[i].invis = false; obj.entities[i].dir = 0; + + obj.entities[i].ay = -6; obj.entities[i].ax = -6; + obj.entities[i].vy = -6; obj.entities[i].vx = -6; + break; + case 4033: state++; i = obj.getplayer(); obj.entities[i].xp -= 12; break; + case 4034: state++; i = obj.getplayer(); obj.entities[i].xp -= 12; break; + case 4035: state++; i = obj.getplayer(); obj.entities[i].xp -= 10; break; + case 4036: state++; i = obj.getplayer(); obj.entities[i].xp -= 8; break; + case 4037: state++; i = obj.getplayer(); obj.entities[i].xp -= 5; break; + case 4038: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp -= 2; break; + case 4039: hascontrol = true; advancetext = false; state = 0; break; + + case 4040: + //Activating a teleporter (default appear) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4041: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4042: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; obj.entities[i].invis = false; obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; obj.entities[i].ax = 6; + obj.entities[i].vy = -6; obj.entities[i].vx = 6; + break; + case 4043: state++; i = obj.getplayer(); obj.entities[i].xp += 12; obj.entities[i].yp -= 15; break; + case 4044: state++; i = obj.getplayer(); obj.entities[i].xp += 12; obj.entities[i].yp -= 10; break; + case 4045: state++; i = obj.getplayer(); obj.entities[i].xp += 12; obj.entities[i].yp -= 10; break; + case 4046: state++; i = obj.getplayer(); obj.entities[i].xp += 8; obj.entities[i].yp -= 8; break; + case 4047: state++; i = obj.getplayer(); obj.entities[i].xp += 6; obj.entities[i].yp -= 8; break; + case 4048: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp += 3; break; + case 4049: hascontrol = true; advancetext = false; state = 0; break; + + case 4050: + //Activating a teleporter (default appear) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4051: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4052: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; obj.entities[i].invis = false; obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; obj.entities[i].ax = 6; + obj.entities[i].vy = -6; obj.entities[i].vx = 6; + break; + case 4053: state++; i = obj.getplayer(); obj.entities[i].xp += 4; obj.entities[i].yp -= 15; break; + case 4054: state++; i = obj.getplayer(); obj.entities[i].xp += 4; obj.entities[i].yp -= 10; break; + case 4055: state++; i = obj.getplayer(); obj.entities[i].xp += 4; obj.entities[i].yp -= 10; break; + case 4056: state++; i = obj.getplayer(); obj.entities[i].xp += 4; obj.entities[i].yp -= 8; break; + case 4057: state++; i = obj.getplayer(); obj.entities[i].xp += 2; obj.entities[i].yp -= 8; break; + case 4058: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp += 1; break; + case 4059: hascontrol = true; advancetext = false; state = 0; break; + + case 4060: + //Activating a teleporter (default appear) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4061: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4062: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; obj.entities[i].invis = false; obj.entities[i].dir = 0; + + obj.entities[i].ay = -6; obj.entities[i].ax = -6; + obj.entities[i].vy = -6; obj.entities[i].vx = -6; + break; + case 4063: state++; i = obj.getplayer(); obj.entities[i].xp -= 28; obj.entities[i].yp -= 8; break; + case 4064: state++; i = obj.getplayer(); obj.entities[i].xp -= 28; obj.entities[i].yp -= 8; break; + case 4065: state++; i = obj.getplayer(); obj.entities[i].xp -= 25; break; + case 4066: state++; i = obj.getplayer(); obj.entities[i].xp -= 25; break; + case 4067: state++; i = obj.getplayer(); obj.entities[i].xp -= 20; break; + case 4068: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp -= 16; break; + case 4069: hascontrol = true; advancetext = false; state = 0; break; + + + case 4070: + //Activating a teleporter (special for final script, player has colour changed to match rescued crewmate) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4071: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4072: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].invis = false; obj.entities[i].dir = 1; + obj.entities[i].colour = obj.crewcolour(lastsaved); + + obj.entities[i].ay = -6; obj.entities[i].ax = 6; + obj.entities[i].vy = -6; obj.entities[i].vx = 6; + break; + case 4073: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4074: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4075: state++; i = obj.getplayer(); obj.entities[i].xp += 8; break; + case 4076: state++; i = obj.getplayer(); obj.entities[i].xp += 6; break; + case 4077: state++; i = obj.getplayer(); obj.entities[i].xp += 3; break; + case 4078: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp += 1; break; + case 4079: + state = 0; + startscript = true; newscript = "finallevel_teleporter"; + break; + + case 4080: + //Activating a teleporter (default appear) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4081: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4082: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; obj.entities[i].invis = false; obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; obj.entities[i].ax = 6; + obj.entities[i].vy = -6; obj.entities[i].vx = 6; + break; + case 4083: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4084: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4085: state++; i = obj.getplayer(); obj.entities[i].xp += 8; break; + case 4086: state++; i = obj.getplayer(); obj.entities[i].xp += 6; break; + case 4087: state++; i = obj.getplayer(); obj.entities[i].xp += 3; break; + case 4088: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp += 1; break; + case 4089: + startscript = true; newscript = "gamecomplete_ending"; + state = 0; + break; + + case 4090: + //Activating a teleporter (default appear) + state++; statedelay = 15; + flashlight = 5; screenshake = 90; + music.playef(9, 10); + break; + case 4091: + //Activating a teleporter 2 + state++; statedelay = 0; flashlight = 5; screenshake = 0; music.playef(10, 10); + break; + case 4092: + //Activating a teleporter 2 + state++; statedelay = 5; + + i = obj.getplayer(); j = obj.getteleporter(); + if (j != -1) { + obj.entities[i].xp = obj.entities[j].xp+44; + obj.entities[i].yp = obj.entities[j].yp+44; + obj.entities[j].tile = 2; obj.entities[j].colour = 101; + } + obj.entities[i].colour = 0; obj.entities[i].invis = false; obj.entities[i].dir = 1; + + obj.entities[i].ay = -6; obj.entities[i].ax = 6; + obj.entities[i].vy = -6; obj.entities[i].vx = 6; + break; + case 4093: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4094: state++; i = obj.getplayer(); obj.entities[i].xp += 10; break; + case 4095: state++; i = obj.getplayer(); obj.entities[i].xp += 8; break; + case 4096: state++; i = obj.getplayer(); obj.entities[i].xp += 6; break; + case 4097: state++; i = obj.getplayer(); obj.entities[i].xp += 3; break; + case 4098: state++; statedelay = 15; i = obj.getplayer(); obj.entities[i].xp += 1; break; + case 4099: + if (nocutscenes) { + startscript = true; newscript = "levelonecompleteskip"; + }else{ + startscript = true; newscript = "levelonecomplete_ending"; + } + state = 0; + break; + } + } + } + + public function lifesequence(obj:entityclass):void{ + if (lifeseq > 0) { + i = obj.getplayer(); + obj.entities[i].invis = false; + if (lifeseq == 2) obj.entities[i].invis = true; + if (lifeseq == 6) obj.entities[i].invis = true; + if (lifeseq >= 8) obj.entities[i].invis = true; + if (lifeseq > 5) gravitycontrol = savegc; + + lifeseq--; + if (lifeseq <= 0) { obj.entities[i].invis = false; } + } + } + + public function resetgameclock():void { + frames = 0; + seconds = 0; + minutes = 0; + hours = 0; + } + + public function gameclock():void { + frames++; + if (frames >= 30) { + frames -= 30; + seconds++; + if (seconds >= 60) { + seconds -= 60; + minutes++; + if (minutes >= 60) { + minutes -= 60; + hours++; + } + } + } + } + + public function giventimestring(hrs:int, min:int, sec:int, help:helpclass):String { + tempstring = ""; + if (hrs > 0) { + tempstring += String(hrs) + ":"; + } + tempstring += help.twodigits(min) + ":" + help.twodigits(sec); + return tempstring; + } + + public function timestring(help:helpclass):String { + tempstring = ""; + if (hours > 0) { + tempstring += String(hours) + ":"; + } + tempstring += help.twodigits(minutes) + ":" + help.twodigits(seconds); + return tempstring; + } + + public function partimestring(help:helpclass):String { + //given par time in seconds: + tempstring = ""; + if (timetrialpar >= 60) { + tempstring = help.twodigits(int((timetrialpar - (timetrialpar % 60)) / 60)) + ":" + help.twodigits(timetrialpar % 60); + }else { + tempstring = "00:" + help.twodigits(timetrialpar); + } + return tempstring; + } + + public function resulttimestring(help:helpclass):String { + //given result time in seconds: + tempstring = ""; + if (timetrialresulttime > 60) { + tempstring = help.twodigits(int((timetrialresulttime - (timetrialresulttime % 60)) / 60)) + ":" + + help.twodigits(timetrialresulttime % 60); + }else { + tempstring = "00:" + help.twodigits(timetrialresulttime); + } + return tempstring; + } + + public function timetstring(t:int, help:helpclass):String { + //given par time in seconds: + tempstring = ""; + if (t >= 60) { + tempstring = help.twodigits(int((t - (t % 60)) / 60)) + ":" + help.twodigits(t % 60); + }else { + tempstring = "00:" + help.twodigits(t); + } + return tempstring; + } + + + public function deathsequence(map:mapclass, obj:entityclass, music:musicclass):void { + if (supercrewmate && scmhurt) { + i = obj.getscm(); + }else{ + i = obj.getplayer(); + } + obj.entities[i].colour = 1; + + obj.entities[i].invis = false; + if (deathseq == 30) { + if (nodeathmode) { + music.fadeout(); + gameoverdelay = 60; + } + deathcounts++; + music.playef(2,10); + obj.entities[i].invis = true; + if (map.finalmode) { + map.roomdeathsfinal[roomx - 41 + (20 * (roomy - 48))]++; + currentroomdeaths = map.roomdeathsfinal[roomx - 41 + (20 * (roomy - 48))]; + }else{ + map.roomdeaths[roomx - 100 + (20*(roomy - 100))]++; + currentroomdeaths = map.roomdeaths[roomx - 100 + (20 * (roomy - 100))]; + } + } + if (deathseq == 25) obj.entities[i].invis = true; + if (deathseq == 20) obj.entities[i].invis = true; + if (deathseq == 16) obj.entities[i].invis = true; + if (deathseq == 14) obj.entities[i].invis = true; + if (deathseq == 12) obj.entities[i].invis = true; + if (deathseq < 10) obj.entities[i].invis = true; + if (!nodeathmode) { + if (deathseq <= 1) obj.entities[i].invis = false; + }else { + gameoverdelay--; + } + } + + public function initteleportermode(map:mapclass):void { + //Set the teleporter variable to the right position! + teleport_to_teleporter = 0; + + for (i = 0; i < map.numteleporters; i++) { + if (roomx == map.teleporters[i].x + 100 && roomy == map.teleporters[i].y + 100) { + teleport_to_teleporter = i; + } + } + } + + public function swnpenalty():void { + //set the SWN clock back to the closest 5 second interval + if (swntimer <= 150) { swntimer += 8; if (swntimer > 150) swntimer = 150; + }else if (swntimer <= 300) { swntimer += 8; if (swntimer > 300) swntimer = 300; + }else if (swntimer <= 450) { swntimer += 8; if (swntimer > 450) swntimer = 450; + }else if (swntimer <= 600) { swntimer += 8; if (swntimer > 600) swntimer = 600; + }else if (swntimer <= 750) { swntimer += 8; if (swntimer > 750) swntimer = 750; + }else if (swntimer <= 900) { swntimer += 8; if (swntimer > 900) swntimer = 900; + }else if (swntimer <= 1050) { swntimer += 8; if (swntimer > 1050) swntimer = 1050; + }else if (swntimer <= 1200) { swntimer += 8; if (swntimer > 1200) swntimer = 1200; + }else if (swntimer <= 1350) { swntimer += 8; if (swntimer > 1350) swntimer = 1350; + }else if (swntimer <= 1500) { swntimer += 8; if (swntimer > 1500) swntimer = 1500; + }else if (swntimer <= 1650) { swntimer += 8; if (swntimer > 1650) swntimer = 1650; + }else if (swntimer <= 1800) { swntimer += 8; if (swntimer > 1800) swntimer = 1800; + }else if (swntimer <= 2100) { swntimer += 8; if (swntimer > 2100) swntimer = 2100; + }else if (swntimer <= 2400) { swntimer += 8; if (swntimer > 2400) swntimer = 2400; + } + } + + //Game room control + public var door_left:int, door_right:int, door_up:int, door_down:int; + public var roomx:int, roomy:int, roomchangedir:int; + public var temp:int, i:int, j:int, k:int; + + //Save points + public var savex:int, savey:int, saverx:int, savery:int; + public var savegc:int, savedir:int; + + //Game save variables: two cookies, one for quicksaves and one for teleporters + public var telecookie:SharedObject, quickcookie:SharedObject, statcookie:SharedObject; + public var customcookie:Vector. = new Vector.; + public var customcookieexists:Vector. = new Vector.; + public var customcookiesummary:Vector. = new Vector.; + public var telecookieexists:Boolean, quickcookieexists:Boolean; + public var telesummary:String, quicksummary:String; + public var tele_crewstats:Array = new Array(); + public var tele_gametime:String; + public var tele_trinkets:int; + public var tele_currentarea:String; + public var quick_crewstats:Array = new Array(); + public var quick_gametime:String; + public var quick_trinkets:int; + public var quick_currentarea:String; + public var summary_crewstats:Array;// = new Array(); + + public var savestate:Array = new Array(); + + //Added for port + public var edsavex:int, edsavey:int, edsaverx:int, edsavery:int; + public var edsavegc:int, edsavedir:int; + + //State Logic stuff + public var state:int, statedelay:int; + + public var gamestate:int; + public var hascontrol:Boolean, jumpheld:Boolean, jumppressed:int; + public var gravitycontrol:int; + + public var infocus:Boolean, paused:Boolean; + public var muted:Boolean; + public var mutebutton:int; + public var globalsound:int; + + public var mx:int, my:int; + public var screenshake:int, flashlight:int; + public var test:Boolean, teststring:String, tempstring:String; + public var advancetext:Boolean, pausescript:Boolean; + + public var deathseq:int, lifeseq:int; + + public var coins:int, trinkets:int, crewmates:int, trinketcollect:int; + public var savepoint:int, teleport:Boolean, teleportxpos:int; + public var edteleportent:int; + public var completestop:Boolean; + + public var inertia:Number; + + public var companion:int, roomchange:Boolean; + public var teleblock:Rectangle, activetele:Boolean, readytotele:int; + public var activeactivity:int, act_fade:int; + public var activity_lastprompt:String, activity_r:int, activity_g:int, activity_b:int; + public var backgroundtext:Boolean; + + public var press_left:Boolean, press_right:Boolean, press_action:Boolean, press_map:Boolean; + + //Some stats: + public var totalflips:int; + public var hardestroom:String, hardestroomdeaths:int, currentroomdeaths:int; + + //Menu interaction stuff + public var mapheld:Boolean; //Is the map key being held down? + public var menupage:int; + public var crewstats:Array = new Array(); + public var lastsaved:int; + public var deathcounts:int; + public var frames:int, seconds:int, minutes:int, hours:int; + public var gamesaved:Boolean; + public var savetime:String, savearea:String, savetrinkets:int; + public var startscript:Boolean, newscript:String; + + public var mainmenu:int, menustart:Boolean; + + //teleporting + public var teleport_to_new_area:Boolean; + public var teleport_to_x:int, teleport_to_y:int; + public var teleportscript:String; + public var useteleporter:Boolean; + public var teleport_to_teleporter:int; + + //Screenrecording stuff, for beta/trailer + public var recording:int; + public var recordstring:String; + public var combomode:Boolean, combolen:int, comboaction:String; + public var currentaction:String, recordinit:Boolean; + + public var alarmon:Boolean, alarmdelay:int; + public var blackout:Boolean; + + public var playback:Array = new Array(); + public var playbackpos:int, playbacksize:int; + public var playmove:int, playcombo:int; + public var playbackfinished:Boolean; + + //functions for recording: + public function initplayback():void { + playback = new Array(); + + playback = recordstring.split(","); + playbacksize = playback.length; + playbackpos = 0; + } + + //Main Menu Variables + public var menuoptions:Vector. = new Vector.; + public var menuoptions_alt:Vector. = new Vector.; + public var menuoptionsactive:Vector. = new Vector.; + public var menuoptionslayout:Vector. = new Vector.; + public var nummenuoptions:int, currentmenuoption:int; + public var menuselection:String, currentmenuname:String, previousmenuname:String; + public var menuxoff:int, menuyoff:int; + + public var menucountdown:int, menudest:String; + + public var creditposx:int, creditposy:int, creditposdelay:int; + + //60 fps mode! + public var sfpsmode:Boolean; + + //Sine Wave Ninja Minigame + public var swnmode:Boolean; + public var swngame:int, swnstate:int, swnstate2:int, swnstate3:int, swnstate4:int, swndelay:int, swndeaths:int; + public var swntimer:int, swncolstate:int, swncoldelay:int; + public var swnrecord:int, swnbestrank:int, swnrank:int, swnmessage:int; + + //SuperCrewMate Stuff + public var supercrewmate:Boolean, scmhurt:Boolean, scmprogress:int, scmmoveme:Boolean; + + //Accessibility Options + public var colourblindmode:Boolean; + public var noflashingmode:Boolean; + public var slowdown:int; + + public var nodeathmode:Boolean; + public var gameoverdelay:int; + public var nocutscenes:Boolean; + + //Time Trials + public var intimetrial:Boolean, timetrialparlost:Boolean; + public var timetrialcountdown:int, timetrialshinytarget:int, timetriallevel:int; + public var timetrialpar:int, timetrialresulttime:int, timetrialrank:int; + + public var creditposition:int; + public var insecretlab:Boolean; + + public var inintermission:Boolean; + + //Tap sensors + public var tapleft:int, tapright:int; + + //Stats + public var unlock:Array = new Array(); + public var unlocknotify:Array = new Array(); + public var temp_unlock:Array; + public var temp_unlocknotify:Array; + public var stat_trinkets:int; + public var fullscreen:Boolean; + public var bestgamedeaths:int; + + public var stat_screenshakes:Boolean; + public var stat_backgrounds:Boolean; + public var stat_flipmode:Boolean; + public var stat_invincibility:Boolean; + public var stat_slowdown:int; + + public var besttimes:Array = new Array(); + public var besttrinkets:Array = new Array(); + public var bestlives:Array = new Array(); + public var bestrank:Array = new Array(); + public var temp_besttimes:Array; + public var temp_besttrinkets:Array; + public var temp_bestlives:Array; + public var temp_bestrank:Array; + + public var savemystats:Boolean; + + public var menukludge:Boolean; + public var quickrestartkludge:Boolean; + + public var advanced_mode:Boolean; + public var advanced_smoothing:Boolean; + public var advanced_scaling:int; + + public var fullscreentoggleheld:Boolean = false; + + //Custom stuff + public var levelstatscookie:SharedObject; + public var levelstatscookieloaded:Boolean; + public var customscript:Vector. = new Vector.; + public var customcol:int, levelpage:int, playcustomlevel:int; + public var customleveltitle:String; + public var customlevelfilename:String; + + public var customlevelstats:Vector. = new Vector.; //string array containing level filenames + public var customlevelscore:Vector. = new Vector.; + public var numcustomlevelstats:int; + public var customlevelstatsloaded:Boolean; + + //Control types! + //0 is swipe, 1 is both sides, 2 is d-pad + public var controlstyle:int = 0; + public var last_left:int = 0, last_right:int = 0; + public var last_action:int = 0; + public var controlsensitivity:int = 50; + + //Mobile menu options + public var mobilemenu:Boolean = true; + public var autoquicksave:Boolean = false; + public var mobilequicksave_thisroom:Boolean = false; + public var controltutorialstate:int = 0; + public var controltutorialstatedelay:int = 0; + public var controllerp1:int = 0; + public var controllerp2:int = 0; + public var controllerp3:int = 0; + + public var showloadingnotice:Boolean = false; + + public var disablekludge_1:Boolean = false; + public var disablekludge_2:Boolean = false; + public var disablekludge_3:Boolean = false; + public var disablekludge_4:Boolean = false; + + public var showcontroltutorial:int = 0; + + public var platform:platformclass = new platformclass; + public var scores:scoreclass = new scoreclass; + } +} \ No newline at end of file diff --git a/mobile_version/src/helpclass.as b/mobile_version/src/helpclass.as new file mode 100644 index 00000000..59f0b59b --- /dev/null +++ b/mobile_version/src/helpclass.as @@ -0,0 +1,130 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + import flash.system.System; + + public class helpclass extends Sprite { + public function init():void { + sine = new Array(); + cosine = new Array(); + + for (i = 0; i < 64; i++) { + sine[i]=Math.sin((i*6.283)/64); + cosine[i]=Math.cos((i*6.283)/64); + } + + for (i = 0; i < 30; i++) { + splitseconds.push(int((i * 60) / 30)); + } + + glow = 0; + glowdir = 0; + slowsine = 0; + } + + public function booltoint(b:Boolean):int { + if (b) return 1; + return 0; + } + + public function opa(t:int):int { + return (t + 32) % 64; + } + + public function number(t:int):String { + switch(t) { + case 0: return "Zero"; break; + case 1: return "One"; break; + case 2: return "Two"; break; + case 3: return "Three"; break; + case 4: return "Four"; break; + case 5: return "Five"; break; + case 6: return "Six"; break; + case 7: return "Seven"; break; + case 8: return "Eight"; break; + case 9: return "Nine"; break; + case 10: return "Ten"; break; + case 11: return "Eleven"; break; + case 12: return "Twelve"; break; + case 13: return "Thirteen"; break; + case 14: return "Fourteen"; break; + case 15: return "Fifteen"; break; + case 16: return "Sixteen"; break; + case 17: return "Seventeen"; break; + case 18: return "Eighteen"; break; + case 19: return "Nineteen"; break; + case 20: return "Twenty"; break; + case 21: return "Twenty One"; break; + } + return "Some"; + } + + public function removeObject(obj:Object, arr:Array):void{ + var b:String; + for (b in arr){ + if (arr[b] == obj){ + arr.splice(b,1) + break; + } + } + } + + public function twodigits(t:int):String { + if (t < 10) return "0" + String(t); + if (t >= 100) return "??"; + return String(t); + } + + + public function threedigits(t:int):String { + if (t < 10) return "0" + String(t); + if (t < 100) return "0" + String(t); + if (t >= 100) return String(t); + return String(t); + } + + public function timestring(t:int):String { + //given a time t in frames, return a time in seconds + tempstring = ""; + temp = (t - (t % 30)) / 30; + if (temp < 60) { //less than one minute + t = t % 30; + tempstring = String(temp) + ":" + twodigits(splitseconds[t]); + }else { + temp2 = (temp - (temp % 60)) / 60; + temp = temp % 60; + t = t % 30; + tempstring = String(temp2) + ":" + twodigits(temp) + ":" + twodigits(splitseconds[t]); + } + return tempstring; + } + + public function updateglow():void { + slowsine++; + if (slowsine >= 64) slowsine = 0; + + if (glowdir == 0) { + glow+=2; + if (glow >= 62) glowdir = 1; + }else { + glow-=2; + if (glow < 2) glowdir = 0; + } + } + + public function toclipboard(t:String):void { + System.setClipboard(t); + } + + public var sine:Array; + public var cosine:Array; + public var glow:int, slowsine:int; + public var glowdir:int; + public var globaltemp:int, globaltemp2:int, globaltemp3:int, temp:int, temp2:int, tempstring:String; + public var splitseconds:Array = new Array; + + public var i:int; + } +} diff --git a/mobile_version/src/includes/input.as b/mobile_version/src/includes/input.as new file mode 100644 index 00000000..174eb799 --- /dev/null +++ b/mobile_version/src/includes/input.as @@ -0,0 +1,1902 @@ +public function recordinput(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + //record your input and add it to the record string + //Keys are: + //0 - nothing + //1 - left + //2 - right + //3 - left+right + //4 - flip + //5 - left+flip + //6 - right+flip + //7 - left+right+flip + //8 - Map/teleport + + if (!game.recordinit) { + //Init recording + game.recordinit = true; + game.combomode = false; game.comboaction = "x"; game.combolen = 0; + game.currentaction = "x"; + } + + game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; + + if (key.isDown(Keyboard.LEFT)) game.press_left = true; + if (key.isDown(Keyboard.RIGHT)) game.press_right = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)) game.press_action = true; + if (key.isDown(Keyboard.ENTER) || key.isDown(Keyboard.BACK)) game.press_map = true; + + if (game.press_map) { + game.currentaction = "8"; + }else{ + if (game.press_left) { + if (game.press_right) { + if (game.press_action) { game.currentaction = "7"; + }else { game.currentaction = "3"; + } + }else { + if (game.press_action) { game.currentaction = "5"; + }else { game.currentaction = "1"; + } + } + }else { + if (game.press_right) { + if (game.press_action) { game.currentaction = "6"; + }else { game.currentaction = "2"; + } + }else { + if (game.press_action) { game.currentaction = "4"; + }else { game.currentaction = "0"; + } + } + } + } + + if (game.comboaction != game.currentaction) { + //we're doing something different, output and move on + if (game.comboaction == "x") { + //init + game.recordstring += String(game.savex) + "," + String(game.savey) + "," + +String(game.saverx) + "," + String(game.savery) +"," + String(game.savegc) + ","; + }else{ + game.recordstring += String(game.combolen+1) + "," + game.comboaction + ","; + } + + game.combolen = 1; + game.comboaction = game.currentaction; + }else { + //add to the combo! + game.combolen++; + } + + if (game.currentaction == "8") { + //teleporter - we can't combo this! + game.recordstring += "1," + game.currentaction + ","; + } + + gameinput(key, dwgfx, game, map, obj, help, music); +} + +public function titleinput(key:KeyPoll, dwgfx:dwgraphicsclass, map:mapclass, game:gameclass, obj:entityclass, help:helpclass, music:musicclass):void { + game.inittouchpoints(key); + + game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70) && !game.fullscreentoggleheld) { + //Toggle fullscreen + game.fullscreentoggleheld = true; + if (game.fullscreen) {game.fullscreen = false; + }else {game.fullscreen = true;} + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70)) { + game.fullscreentoggleheld = true; + }else { + game.fullscreentoggleheld = false; + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70)) { + game.fullscreentoggleheld = true; + }else { + game.fullscreentoggleheld = false; + } + + if (dwgfx.flipmode) { + if (key.isDown(Keyboard.LEFT) || key.isDown(Keyboard.DOWN) || key.isDown(65) || key.isDown(83)) game.press_left = true; + if (key.isDown(Keyboard.RIGHT) || key.isDown(Keyboard.UP) || key.isDown(68) || key.isDown(87)) game.press_right = true; + }else{ + if (key.isDown(Keyboard.LEFT) || key.isDown(Keyboard.UP) || key.isDown(65) || key.isDown(87)) game.press_left = true; + if (key.isDown(Keyboard.RIGHT) || key.isDown(Keyboard.DOWN) || key.isDown(68) || key.isDown(83)) game.press_right = true; + } + if (key.isDown(90) || key.isDown(32) || key.isDown(86)) game.press_action = true; + //|| key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)) game.press_action = true; //on menus, up and down don't work as action + if (key.isDown(Keyboard.ENTER) || key.isDown(Keyboard.BACK)) game.press_map = true; + + game.gettouchpoints_mainmenu(key, dwgfx); + + //In the menu system, all keypresses are single taps rather than holds. Therefore this test has to be done for all presses + if (!game.press_action && !game.press_left && !game.press_right) game.jumpheld = false; + if (!game.press_map) game.mapheld = false; + + if (!game.jumpheld && dwgfx.fademode==0) { + if (game.press_action || game.press_left || game.press_right || game.press_map){ + game.jumpheld = true; + } + + /* + if (game.press_left) { + game.mainmenu--; + }else if (game.press_right) { + game.mainmenu++; + } + + if (game.mainmenu < 0) game.mainmenu = 2; + if (game.mainmenu > 2 ) game.mainmenu = 0; + */ + + + /* + if (game.press_action) { + if (!game.menustart) { + game.menustart = true; + music.play(6); + music.playef(18, 10); + game.screenshake = 10; + game.flashlight = 5; + }else{ + if(game.mainmenu==0){ + dwgfx.fademode = 2; + }else if (game.mainmenu == 1) { + if (game.telesummary != "") { + dwgfx.fademode = 2; + } + }else if (game.mainmenu == 2) { + if (game.quicksummary != "") { + dwgfx.fademode = 2; + } + } + } + } + */ + + if (key.isDown(27) && game.currentmenuname != "youwannaquit" && game.menustart) { + music.playef(11, 10); + game.previousmenuname = game.currentmenuname; + game.createmenu("youwannaquit"); + map.nexttowercolour(); + } + + if(game.menustart){ + if (game.press_left) { + game.currentmenuoption--; + }else if (game.press_right) { + game.currentmenuoption++; + } + } + + if (game.currentmenuoption < 0) game.currentmenuoption = game.nummenuoptions-1; + if (game.currentmenuoption >= game.nummenuoptions ) game.currentmenuoption = 0; + + if (game.press_action) { + if (!game.menustart) { + game.menustart = true; + music.play(6); + music.playef(18, 10); + game.screenshake = 10; + game.flashlight = 5; + map.colstate = 10; + map.nexttowercolour(); + + game.loadstats(map, dwgfx); + if (game.slowdown == 0) game.slowdown = 30; + //stage.frameRate = game.slowdown; + }else{ + if (game.currentmenuname == "mainmenu") { + if (game.mobilemenu) { + if (game.currentmenuoption == 0) { + //Play + if (game.telesummary == "" && game.quicksummary == "") { + //No saves exist, just start a new game + game.mainmenu = 0; dwgfx.fademode = 2; + }else { + //Bring you to the normal playmenu + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + }else if (game.currentmenuoption == 1) { + /* + //Bring you to the normal playmenu + music.playef(11, 10); + game.createmenu("playerworlds"); + map.nexttowercolour(); + */ + music.playef(11, 10); + game.levelpage=0; + editor.getDirectoryData(); + game.loadcustomlevelstats(); //Should only load a file if it's needed + game.createmenu("levellist"); + map.nexttowercolour(); + /*}else if (game.currentmenuoption == 2) { + //Options + music.playef(11, 10); + game.createmenu("supergravitron"); + map.nexttowercolour();*/ + }else if (game.currentmenuoption == 2) { + //Credits + music.playef(11, 10); + game.createmenu("options"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 3) { + //Credits + music.playef(11, 10); + game.createmenu("credits"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 4) { + //More games (external link) + music.playef(11, 10); + var distractionware_link:URLRequest = new URLRequest( "http://distractionware.com/games/ios/" ); + //var distractionware_link:URLRequest = new URLRequest( "http://distractionware.com/games/android/" ); + navigateToURL( distractionware_link, "_blank" ); + } + }else{ + if (game.currentmenuoption == 0) { + //Play + if (game.telesummary == "" && game.quicksummary == "") { + //No saves exist, just start a new game + game.mainmenu = 0; dwgfx.fademode = 2; + }else { + //Bring you to the normal playmenu + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + /*}else if (game.currentmenuoption == 1) { + //Options + music.playef(11, 10); + game.createmenu("graphicoptions"); + map.nexttowercolour(); + */ + }else if (game.currentmenuoption == 1){ + //Bring you to the normal playmenu + music.playef(11, 10); + game.createmenu("playerworlds"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 2) { + //Options + //Options + music.playef(11, 10); + game.createmenu("graphicoptions"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 3) { + //Options + //Options + music.playef(11, 10); + game.createmenu("options"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 4) { + //Credits + //Credits + music.playef(11, 10); + game.createmenu("credits"); + map.nexttowercolour(); + }/*else if (game.currentmenuoption == 4) { + //bye! + music.playef(2, 10); + game.mainmenu = 100; dwgfx.fademode = 2; + }*/ + } + }else if(game.currentmenuname=="levellist"){ + if(game.currentmenuoption==game.nummenuoptions-1){ + //go back to menu + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + }else if(game.currentmenuoption==game.nummenuoptions-2){ + //next page + music.playef(11, 10); + if((game.levelpage*3)+3>=editor.ListOfMetaData.length){ + game.levelpage=0; + }else{ + game.levelpage++; + } + game.createmenu("levellist"); + game.currentmenuoption=game.nummenuoptions-2; + map.nexttowercolour(); + }else{ + //Ok, launch the level! + //PLAY CUSTOM LEVEL HOOK + music.playef(11, 10); + game.playcustomlevel = (game.levelpage * 3) + game.currentmenuoption; + game.customleveltitle = editor.ListOfMetaData[game.playcustomlevel].title; + game.customlevelfilename = editor.ListOfMetaData[game.playcustomlevel].filename; + + //DETERMINE IF THERE'S A SAVED GAME HERE + /* + TiXmlDocument doc((game.saveFilePath+editor.ListOfMetaData[game.playcustomlevel].filename+".vvv").c_str()); + if (!doc.LoadFile()){ + */ + if (game.customcookieexists[game.playcustomlevel]) { + music.playef(11, 10); + game.createmenu("quickloadlevel"); + map.nexttowercolour(); + }else { + game.showloadingnotice = true; + game.mainmenu = 22; + dwgfx.fademode = 2; + } + //}else{ + // music.playef(11, 10); + // game.createmenu("quickloadlevel"); + // map.nexttowercolour(); + //} + } + }else if(game.currentmenuname=="quickloadlevel"){ + if (game.currentmenuoption == 0) {//continue save + game.showloadingnotice = true; + game.mainmenu = 23; + dwgfx.fademode = 2; + }else if (game.currentmenuoption == 1) { + game.showloadingnotice = true; + game.mainmenu = 22; + dwgfx.fademode = 2; + }else if(game.currentmenuoption==2){ + music.playef(11, 10); + game.levelpage=0; + game.createmenu("levellist"); + map.nexttowercolour(); + } + }else if(game.currentmenuname=="playerworlds"){ + if(game.currentmenuoption==0){ + music.playef(11, 10); + game.levelpage=0; + editor.getDirectoryData(); + game.loadcustomlevelstats(); //Should only load a file if it's needed + game.createmenu("levellist"); + map.nexttowercolour(); + }else if(game.currentmenuoption==1){ + //LEVEL EDITOR HOOK + music.playef(11, 10); + game.mainmenu = 20; + dwgfx.fademode = 2; + editor.filename=""; + }else if(game.currentmenuoption==2){ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if(game.currentmenuname=="errornostart"){ + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + }else if (game.currentmenuname == "graphicoptions") { + if (game.advanced_mode) { + if (game.currentmenuoption == 0) { + //toggle fullscreen + music.playef(11, 10); + if (game.fullscreen) {game.fullscreen = false; + }else {game.fullscreen = true;} + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + }else if (game.currentmenuoption == 1) { + //enable acceleration: if in fullscreen, go back to window first + music.playef(11, 10); + game.advanced_mode = false; + if (game.fullscreen) { + game.fullscreen = false; + updategraphicsmode(game, dwgfx); + game.fullscreen = true; + } + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 1; + }else if (game.currentmenuoption == 2) { + //change scaling mode + music.playef(11, 10); + game.advanced_scaling = (game.advanced_scaling + 1) % 5; + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 2; + }else if (game.currentmenuoption == 3) { + //change smoothing + music.playef(11, 10); + game.advanced_smoothing = !game.advanced_smoothing; + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 3; + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else{ + if (game.currentmenuoption == 0) { + //toggle fullscreen + music.playef(11, 10); + if (game.fullscreen) {game.fullscreen = false; + }else {game.fullscreen = true;} + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + }else if (game.currentmenuoption == 1) { + //disable acceleration: if in fullscreen, go back to window first + music.playef(11, 10); + game.advanced_mode = true; + if (game.fullscreen) { + game.fullscreen = false; + updategraphicsmode(game, dwgfx); + game.fullscreen = true; + } + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + game.createmenu("graphicoptions"); + game.currentmenuoption = 1; + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + } + }else if (game.currentmenuname == "youwannaquit") { + if (game.currentmenuoption == 0) { + //bye! + music.playef(2, 10); + game.mainmenu = 100; dwgfx.fademode = 2; + }else{ + music.playef(11, 10); + game.createmenu(game.previousmenuname); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "setinvincibility") { + if (game.currentmenuoption == 0) { + //back + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 2; + map.nexttowercolour(); + }else { + map.invincibility = !map.invincibility; + game.deletequick(); game.deletetele(); + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 2; + map.nexttowercolour(); + } + }else if (game.currentmenuname == "setslowdown1") { + if (game.currentmenuoption == 0) { + //back + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + }else { + //change game speed + game.deletequick(); game.deletetele(); + game.createmenu("setslowdown2"); + map.nexttowercolour(); + music.playef(11, 10); + } + }else if (game.currentmenuname == "setslowdown2") { + if (game.currentmenuoption == 0) { + //back + //stage.frameRate = 30; + game.slowdown = 30; + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + }else if (game.currentmenuoption == 1) { + //stage.frameRate = 24; + game.slowdown = 24; + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + }else if (game.currentmenuoption == 2) { + //stage.frameRate = 18; + game.slowdown = 18; + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + }else if (game.currentmenuoption == 3) { + //stage.frameRate = 12; + game.slowdown = 12; + game.savestats(map, dwgfx); + music.playef(11, 10); + game.createmenu("accessibility"); + game.currentmenuoption = 3; + map.nexttowercolour(); + } + }else if (game.currentmenuname == "accessibility") { + if (game.currentmenuoption == 0) { + //disable animated backgrounds + game.colourblindmode = !game.colourblindmode; + game.savestats(map, dwgfx); + map.tdrawback = true; + music.playef(11, 10); + }else if (game.currentmenuoption == 1) { + //disable screeneffects + game.noflashingmode = !game.noflashingmode; + game.savestats(map, dwgfx); + if (!game.noflashingmode) { + music.playef(18, 10); game.screenshake = 10; game.flashlight = 5; + } + /*}else if (game.currentmenuoption == 2) { + //invincibility + if (!map.invincibility) { + game.createmenu("setinvincibility"); + map.nexttowercolour(); + }else { + map.invincibility = !map.invincibility; + } + music.playef(11, 10); + }else if (game.currentmenuoption == 3) { + //change game speed + game.createmenu("setslowdown1"); + map.nexttowercolour(); + music.playef(11, 10); + */ + }else if (game.currentmenuoption == 2) { + //back + music.playef(11, 10); + game.createmenu("options"); + map.nexttowercolour(); + }else{ + //Can't do yet! play sad sound + music.playef(2, 10); + } + }else if (game.currentmenuname == "options") { + if (game.currentmenuoption == 0) { + //accessibility options + music.playef(11, 10); + game.createmenu("accessibility"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 1) { + //unlock play options + music.playef(11, 10); + game.createmenu("unlockmenu"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 2) { + //clear data menu + music.playef(11, 10); + game.createmenu("cleardatamenu"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 3) { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + }else{ + //Can't do yet! play sad sound + music.playef(2, 10); + } + }else if (game.currentmenuname == "unlockmenutrials") { + if (game.currentmenuoption == 0) { //unlock 1 + if (game.unlock[9]) { + game.unlock[9] = false; game.unlocknotify[9] = false; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 0; + }else{ + game.unlock[9] = true; game.unlocknotify[9] = true; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 0; + } + }else if (game.currentmenuoption == 1) { //unlock 2 + if (game.unlock[10]) { + game.unlock[10] = false; game.unlocknotify[10] = false; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 1; + }else{ + game.unlock[10] = true; game.unlocknotify[10] = true; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 1; + } + }else if (game.currentmenuoption == 2) { //unlock 3 + if (game.unlock[11]) { + game.unlock[11] = false; game.unlocknotify[11] = false; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 2; + }else{ + game.unlock[11] = true; game.unlocknotify[11] = true; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 2; + } + }else if (game.currentmenuoption == 3) { //unlock 4 + if (game.unlock[12]) { + game.unlock[12] = false; game.unlocknotify[12] = false; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 3; + }else{ + game.unlock[12] = true; game.unlocknotify[12] = true; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 3; + } + }else if (game.currentmenuoption == 4) { //unlock 5 + if (game.unlock[13]) { + game.unlock[13] = false; game.unlocknotify[13] = false; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 4; + }else{ + game.unlock[13] = true; game.unlocknotify[13] = true; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 4; + } + }else if (game.currentmenuoption == 5) { //unlock 6 + if (game.unlock[14]) { + game.unlock[14] = false; game.unlocknotify[14] = false; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 5; + }else{ + game.unlock[14] = true; game.unlocknotify[14] = true; + music.playef(11, 10); game.savestats(map, dwgfx); game.createmenu("unlockmenutrials"); game.currentmenuoption = 5; + } + }else if (game.currentmenuoption == 6) { //back + //back + music.playef(11, 10); + game.createmenu("unlockmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "unlockmenu") { + if (game.currentmenuoption == 0) { + //unlock time trials seperately... + music.playef(11, 10); + game.createmenu("unlockmenutrials"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 1) { + //unlock intermissions + if (game.unlock[16]) { + music.playef(11, 10); + game.unlock[16] = false; game.unlocknotify[16] = false; + game.unlock[6] = false; game.unlock[7] = false; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 1; + }else{ + music.playef(11, 10); + game.unlock[16] = true; game.unlocknotify[16] = true; + game.unlock[6] = true; game.unlock[7] = true; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 1; + } + }else if (game.currentmenuoption == 2) { + //unlock no death mode + if (game.unlock[17]) { + music.playef(11, 10); + game.unlock[17] = false; game.unlocknotify[17] = false; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 2; + }else{ + music.playef(11, 10); + game.unlock[17] = true; game.unlocknotify[17] = true; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 2; + } + }else if (game.currentmenuoption == 3) { + //unlock flip mode + if (game.unlock[18]) { + music.playef(11, 10); + game.unlock[18] = false; game.unlocknotify[18] = false; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 3; + }else{ + music.playef(11, 10); + game.unlock[18] = true; game.unlocknotify[18] = true; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 3; + } + }else if (game.currentmenuoption == 4) { + //unlock jukebox + if (game.stat_trinkets == 20) { + music.playef(11, 10); + game.stat_trinkets = 0; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 4; + }else{ + music.playef(11, 10); + game.stat_trinkets = 20; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 4; + } + }else if (game.currentmenuoption == 5) { + //unlock secret lab + if (game.unlock[8]) { + music.playef(11, 10); + game.unlock[8] = false; game.unlocknotify[8] = false; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 5; + }else { + music.playef(11, 10); + game.unlock[8] = true; game.unlocknotify[8] = true; + game.savestats(map, dwgfx); + game.createmenu("unlockmenu"); game.currentmenuoption = 5; + } + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits") { + if (game.currentmenuoption == 0) { + //next page + music.playef(11, 10); + game.createmenu("credits2"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits2") { + if (game.currentmenuoption == 0) { + //next page + music.playef(11, 10); + game.createmenu("credits3"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits3") { + if (game.currentmenuoption == 0) { + //next page + music.playef(11, 10); + game.createmenu("credits4"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits4") { + if (game.currentmenuoption == 0) { + //next page + music.playef(11, 10); + game.createmenu("credits5"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits5") { + if (game.currentmenuoption == 0) { + //next page + music.playef(11, 10); + game.createmenu("credits6"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits6") { + if (game.currentmenuoption == 0) { + //next page + music.playef(11, 10); + game.createmenu("credits7"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits7") { + if (game.currentmenuoption == 0) { + //next page + music.playef(11, 10); + game.createmenu("credits8"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits8") { + if (game.currentmenuoption == 0) { + //next page + music.playef(11, 10); + game.createmenu("credits9"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "credits9") { + if (game.currentmenuoption == 0) { + //first page + music.playef(11, 10); + game.createmenu("credits"); + map.nexttowercolour(); + }else{ + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + music.niceplay(6); + } + }else if (game.currentmenuname == "play") { + if (game.currentmenuoption == 0) { + //continue + //right, this depends on what saves you've got + if (game.telesummary == "") { + //You at least have a quicksave, or you couldn't have gotten here + game.mainmenu = 2; dwgfx.fademode = 2; + }else if (game.quicksummary == "") { + //You at least have a telesave, or you couldn't have gotten here + game.mainmenu = 1; dwgfx.fademode = 2; + }else { + //go to a menu! + /* + music.playef(11, 10); + game.loadsummary(map, help); //Prepare save slots to display + game.createmenu("continue"); + map.settowercolour(3); + */ + game.mainmenu = 2; dwgfx.fademode = 2; + } + }else if (game.currentmenuoption == 1) { + //play modes + music.playef(11, 10); + game.createmenu("playmodes"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 2) { + //newgame + music.playef(11, 10); + game.createmenu("newgamewarning"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 3) { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "playsecretlab") { + //as above, except with an extra option... + if (game.currentmenuoption == 0) { + //continue + //right, this depends on what saves you've got + if (game.telesummary == "") { + //You at least have a quicksave, or you couldn't have gotten here + game.mainmenu = 2; dwgfx.fademode = 2; + }else if (game.quicksummary == "") { + //You at least have a telesave, or you couldn't have gotten here + game.mainmenu = 1; dwgfx.fademode = 2; + }else { + //go to a menu! + /* + music.playef(11, 10); + game.loadsummary(map, help); //Prepare save slots to display + game.createmenu("continue"); + map.settowercolour(3); + */ + game.mainmenu = 2; dwgfx.fademode = 2; + } + }else if (game.currentmenuoption == 1) { + game.mainmenu = 11; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 2) { + //play modes + music.playef(11, 10); + game.createmenu("playmodes"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 3) { + //newgame + music.playef(11, 10); + game.createmenu("newgamewarning"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 4) { + //back + music.playef(11, 10); + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "newgamewarning") { + if (game.currentmenuoption == 0) { + //yep + game.mainmenu = 0; dwgfx.fademode = 2; + game.deletequick(); game.deletetele(); + }else{ + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "cleardatamenu") { + if (game.currentmenuoption == 0) { + //back + music.playef(11, 10); + game.createmenu("options"); + map.nexttowercolour(); + }else{ + //yep + music.playef(23, 10); + game.deletequick(); game.deletetele(); + game.deletestats(map, dwgfx); + game.flashlight = 5; game.screenshake = 15; + game.createmenu("mainmenu"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "flipmode_mobile") { + if (game.currentmenuoption == 0 && game.unlock[18]) { //enable/disable flip mode + music.playef(18, 10); game.screenshake = 10; game.flashlight = 5; + dwgfx.setflipmode = !dwgfx.setflipmode; + game.savemystats = true; + }else if (game.currentmenuoption == 1) { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + }else{ + //Can't do yet! play sad sound + music.playef(2, 10); + } + }else if (game.currentmenuname == "playmodes") { + if (game.currentmenuoption == 0 && game.slowdown == 30 && !map.invincibility) { //go to the time trial menu + music.playef(11, 10); + game.createmenu("timetrials"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 1 && game.unlock[16]) { + //intermission mode menu + music.playef(11, 10); + game.createmenu("intermissionmenu"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 2 && game.unlock[17] && game.slowdown == 30 && !map.invincibility) { //start a game in no death mode + music.playef(11, 10); + game.createmenu("startnodeathmode"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 3 && game.unlock[18]) { //enable/disable flip mode + music.playef(11, 10); + game.createmenu("flipmode_mobile"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 4) { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + }else{ + //Can't do yet! play sad sound + music.playef(2, 10); + } + }else if (game.currentmenuname == "startnodeathmode") { + if (game.currentmenuoption == 0) { //start no death mode, disabling cutscenes + game.mainmenu = 10; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 1) { + game.mainmenu = 9; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 2) { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "continue") { + if (game.currentmenuoption == 0) { + game.mainmenu = 1; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 1) { + game.mainmenu = 2; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 2) { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "intermissionmenu") { + if (game.currentmenuoption == 0) { + music.playef(11, 10); + music.play(6); + game.createmenu("playint1"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 1) { + music.playef(11, 10); + music.play(6); + game.createmenu("playint2"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 2) { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "playint1") { + if (game.currentmenuoption == 0) { + game.mainmenu = 12; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 1) { + game.mainmenu = 13; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 2) { + game.mainmenu = 14; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 3) { + game.mainmenu = 15; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 4) { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "playint2") { + if (game.currentmenuoption == 0) { + game.mainmenu = 16; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 1) { + game.mainmenu = 17; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 2) { + game.mainmenu = 18; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 3) { + game.mainmenu = 19; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 4) { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + }else if (game.currentmenuname == "gameover2") { + //back + music.playef(11, 10); + music.play(6); + game.createmenu("mainmenu"); + map.nexttowercolour(); + }else if (game.currentmenuname == "unlocktimetrials" || game.currentmenuname == "unlocktimetrial") { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + }else if (game.currentmenuname == "unlocknodeathmode" || game.currentmenuname == "unlockintermission" + || game.currentmenuname == "unlockflipmode") { + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + }else if (game.currentmenuname == "timetrials") { + if (game.currentmenuoption == 0 && game.unlock[9]) { //space station 1 + game.mainmenu = 3; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 1 && game.unlock[10]) { //lab + game.mainmenu = 4; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 2 && game.unlock[11]) { //tower + game.mainmenu = 5; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 3 && game.unlock[12]) { //station 2 + game.mainmenu = 6; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 4 && game.unlock[13]) { //warp + game.mainmenu = 7; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 5 && game.unlock[14]) { //final + game.mainmenu = 8; dwgfx.fademode = 2; + }else if (game.currentmenuoption == 6) { //go to the time trial menu + //back + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + }else { + //Can't do yet! play sad sound + music.playef(2, 10); + } + }else if (game.currentmenuname == "timetrialcomplete3") { + if (game.currentmenuoption == 1) { + //back + music.playef(11, 10); + music.play(6); + game.createmenu("play"); + map.nexttowercolour(); + }else if (game.currentmenuoption == 0) { + //duplicate the above based on given time trial level! + if (game.timetriallevel == 0) { //space station 1 + game.mainmenu = 3; dwgfx.fademode = 2; + }else if (game.timetriallevel == 1) { //lab + game.mainmenu = 4; dwgfx.fademode = 2; + }else if (game.timetriallevel == 2) { //tower + game.mainmenu = 5; dwgfx.fademode = 2; + }else if (game.timetriallevel == 3) { //station 2 + game.mainmenu = 6; dwgfx.fademode = 2; + }else if (game.timetriallevel == 4) { //warp + game.mainmenu = 7; dwgfx.fademode = 2; + }else if (game.timetriallevel == 5) { //final + game.mainmenu = 8; dwgfx.fademode = 2; + } + } + }else if (game.currentmenuname == "gamecompletecontinue" || game.currentmenuname == "nodeathmodecomplete2") { + if (game.currentmenuoption == 0) { + music.play(6); + music.playef(11, 10); + game.createmenu("play"); + map.nexttowercolour(); + } + } + } + } + + } + + if (dwgfx.fademode == 1) script.startgamemode(game.mainmenu, key, dwgfx, game, map, obj, help, music); +} + +public function gameinput(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + game.inittouchpoints(key); + + if(!script.running){ + game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70) && !game.fullscreentoggleheld) { + //Toggle fullscreen + game.fullscreentoggleheld = true; + if (game.fullscreen) {game.fullscreen = false; + }else {game.fullscreen = true;} + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70)) { + game.fullscreentoggleheld = true; + }else { + game.fullscreentoggleheld = false; + } + + if (game.recording == 2 && !game.playbackfinished) { + //playback! + //record your input and add it to the record string + //Keys are: + //0 - nothing + //1 - left + //2 - right + //3 - left+right + //4 - flip + //5 - left+flip + //6 - right+flip + //7 - left+right+flip + //8 - Map/teleport + if (!game.recordinit) { + //Init recording + game.recordinit = true; + game.combomode = false; + game.playmove = game.playback[game.playbackpos+1]; game.playcombo = game.playback[game.playbackpos]; + } + + if (game.playcombo <= 0) { + //move on to the next action + game.playbackpos += 2; + game.playmove = game.playback[game.playbackpos + 1]; game.playcombo = game.playback[game.playbackpos]; + if (game.playcombo > 1) game.playcombo--; + } + + if (game.playcombo >= 1) { + game.playcombo--; + if (game.playmove == 1 || game.playmove == 3 || game.playmove == 5 || game.playmove == 7){ + game.press_left = true; + } + if (game.playmove == 2 || game.playmove == 3 || game.playmove == 6 || game.playmove == 7){ + game.press_right = true; + } + if (game.playmove == 4 || game.playmove == 5 || game.playmove == 6 || game.playmove == 7){ + game.press_action = true; + } + if (game.playmove == 8){ + game.press_map = true; + //game.playbackfinished = true; + + trace("finished!"); + } + } + }else { + if(!script.running){ + if (key.isDown(Keyboard.LEFT) || key.isDown(65)) game.press_left = true; + if (key.isDown(Keyboard.RIGHT) || key.isDown(68)) game.press_right = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN) || key.isDown(87) || key.isDown(83)) game.press_action = true; + if (key.isDown(Keyboard.ENTER) || key.isDown(Keyboard.BACK)) game.press_map = true; + + game.gettouchpoints(key, dwgfx); + } + } + + if (game.advancetext) { + if (game.pausescript) { + game.press_action = false; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN) || key.isDown(87) || key.isDown(83)) game.press_action = true; + + //Iterate through touch points, find buttons that are being pressed + switch(game.controlstyle) { + case 0: + + if (key.touchPoints > 0) { + game.press_action = true; + } + /*for (i = 0; i < key.touchPoints; i++) { + //if (key.touchid[i] != key.controlstick) { + game.press_action = true; + //} + }*/ + break; + //To do: make these better + case 1: + if (key.touchPoints > 0) { + game.press_action = true; + } + break; + case 2: + if (key.touchPoints > 0) { + game.press_action = true; + } + break; + } + } + + if (game.press_action && !game.jumpheld) { + if (game.pausescript) { + game.pausescript = false; game.hascontrol = true; + game.jumpheld = true; + }else{ + game.state++; + game.jumpheld = true; + } + } + } + + if (!game.press_map) game.mapheld = false; + + /* + if (key.isDown("1".charCodeAt(0))) { + dwgfx.screen.width = 640; + dwgfx.screen.height = 480; + setstage(640,480); + } + if (key.isDown("2".charCodeAt(0))) { + dwgfx.screen.width = 960; + dwgfx.screen.height = 720; + setstage(960,720); + } + if (key.isDown("3".charCodeAt(0))) { + dwgfx.screen.width = 1280; + dwgfx.screen.height = 960; + setstage(1280,960); + } + */ + /*game.test = true; + game.teststring = String(game.inertia); + if (key.isDown("1".charCodeAt(0))) game.inertia = 0.5; + if (key.isDown("2".charCodeAt(0))) game.inertia = 0.6; + if (key.isDown("3".charCodeAt(0))) game.inertia = 0.7; + if (key.isDown("4".charCodeAt(0))) game.inertia = 0.8; + if (key.isDown("5".charCodeAt(0))) game.inertia = 0.9; + if (key.isDown("6".charCodeAt(0))) game.inertia = 1; + if (key.isDown("7".charCodeAt(0))) game.inertia = 1.1; + if (key.isDown("8".charCodeAt(0))) game.inertia = 1.2; + if (key.isDown("9".charCodeAt(0))) game.inertia = 1.3; + if (key.isDown("0".charCodeAt(0))) game.inertia = 1.4;*/ + + if(!game.mobilemenu){ + if (game.intimetrial && dwgfx.fademode == 1 && game.quickrestartkludge) { + //restart the time trial + game.quickrestartkludge = false; + script.startgamemode(game.timetriallevel + 3, key, dwgfx, game, map, obj, help, music); + game.deathseq = -1; + game.completestop = false; + } + } + + //Entity type 0 is player controled + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].rule == 0) { + if (game.hascontrol && game.deathseq == -1 && game.lifeseq <= 5) { + /* + if (key.isDown(8)) { + script.load("returntohub"); + } + */ + /* + if (key.isDown(27)) { + game.state = 0; + dwgfx.textboxremove(); + + map.tdrawback = true; + music.haltdasmusik(); + game.gamestate = TITLEMODE; + } + */ + + if (game.press_map && !game.mapheld) { + game.mapheld = true; + if (game.activetele && game.readytotele > 20 && !game.intimetrial) { + if(!dwgfx.flipmode) obj.flags[73] = 1; //Flip mode test + if(int(Math.abs(obj.entities[i].vx))<=1 && int(obj.entities[i].vy)==0){ + //wait! space station 2 debug thingy + if (game.teleportscript != "") { + + //trace(game.recordstring); + //We're teleporting! Yey! + game.activetele = false; + game.hascontrol = false; + music.fadeout(); //Uncomment this when it's working! + + i = obj.getplayer(); obj.entities[i].colour = 102; + + i = obj.getteleporter(); + obj.entities[i].tile = 6; + obj.entities[i].colour = 102; + //which teleporter script do we use? it depends on the companion! + game.state = 4000; game.statedelay = 0; + }else if (game.companion == 0) { + //Alright, normal teleporting + game.gamestate = 5; + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + dwgfx.resumegamemode = false; + + game.useteleporter = true; + game.initteleportermode(map); + }else { + //trace(game.recordstring); + //We're teleporting! Yey! + game.activetele = false; + game.hascontrol = false; + music.fadeout(); //Uncomment this when it's working! + + i = obj.getplayer(); obj.entities[i].colour = 102; + i = obj.getcompanion(game.companion); if(i>-1) obj.entities[i].colour = 102; + + i = obj.getteleporter(); + obj.entities[i].tile = 6; + obj.entities[i].colour = 102; + //which teleporter script do we use? it depends on the companion! + game.state = 3000; game.statedelay = 0; + } + } + }else if (game.activeactivity > -1) { + if(int(Math.abs(obj.entities[i].vx))<=1 && int(obj.entities[i].vy)==0){ + script.load(obj.blocks[game.activeactivity].script); + obj.removeblock(game.activeactivity); + } + }else if (game.swnmode == 1 && game.swngame == 1) { + //quitting the super gravitron + game.mapheld = true; + //Quit menu, same conditions as in game menu + game.gamestate = MAPMODE; + game.gamesaved = false; dwgfx.resumegamemode = false; + game.menupage = 20; // The Map Page + dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + }else if (game.intimetrial && dwgfx.fademode == 0) { + if (game.mobilemenu) { + //Quit menu in time trial 12345 + game.mapheld = true; + //Quit menu, same conditions as in game menu + game.gamestate = MAPMODE; + game.gamesaved = false; dwgfx.resumegamemode = false; + game.menupage = 10; // The Map Page + dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + }else{ + //Quick restart of time trial + script.hardreset(key, dwgfx, game, map, obj, help, music); + if (dwgfx.setflipmode) dwgfx.flipmode = true; + dwgfx.fademode = 2; game.completestop = true; + music.fadeout(); game.intimetrial = true; + game.quickrestartkludge = true; + } + }else if (dwgfx.fademode==0){ + //Normal map screen, do transition later + game.gamestate = MAPMODE; + map.cursordelay = 0; map.cursorstate = 0; + game.gamesaved = false; dwgfx.resumegamemode = false; + game.menupage = 0; // The Map Page + dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + } + } + + if (key.isDown(27) && (!map.custommode || map.custommodeforreal)) { + game.mapheld = true; + //Quit menu, same conditions as in game menu + game.gamestate = MAPMODE; + game.gamesaved = false; dwgfx.resumegamemode = false; + game.menupage = 10; // The Map Page + dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + } + + if (key.isDown("R".charCodeAt(0)) && game.deathseq<=0 && map.invincibility) { + game.deathseq = 30; + } + + + if (game.press_left) {game.tapleft++; + }else { if (game.tapleft <= 4 && game.tapleft > 0) {if (obj.entities[i].vx < 0) obj.entities[i].vx = 0;}game.tapleft = 0; } + if (game.press_right) {game.tapright++; + }else { if (game.tapright <= 4 && game.tapright > 0) {if (obj.entities[i].vx > 0) obj.entities[i].vx = 0;}game.tapright = 0;} + + + if(game.press_left){ + //obj.entities[i].vx = -4; + obj.entities[i].ax = -3; + obj.entities[i].dir = 0; + }else if (game.press_right){ + //obj.entities[i].vx = 4; + obj.entities[i].ax = 3; + obj.entities[i].dir = 1; + }else{ + //obj.entities[i].vx = 0; + } + + if (!game.press_action) { + game.jumppressed = 0; + game.jumpheld = false; + } + + if (game.press_action && !game.jumpheld) { + game.jumppressed = 5; + game.jumpheld = true; + } + + if (game.jumppressed > 0) { + game.jumppressed--; + if (obj.entities[i].onground>0 && game.gravitycontrol == 0) { + game.gravitycontrol = 1; + obj.entities[i].vy = -4; obj.entities[i].ay = -3; + music.playef(0, 10); + game.jumppressed = 0; + game.totalflips++; + } + if (obj.entities[i].onroof>0 && game.gravitycontrol == 1) { + game.gravitycontrol = 0; + obj.entities[i].vy = 4; obj.entities[i].ay = 3; + music.playef(1, 10); + game.jumppressed = 0; + game.totalflips++; + } + } + }else { + //Simple detection of keypresses outside player control, will probably scrap this (expand on + //advance text function) + if (!game.press_action) { + game.jumppressed = 0; + game.jumpheld = false; + } + + if (game.press_action && !game.jumpheld) { + game.jumppressed = 5; + game.jumpheld = true; + } + } + } + } +} + +public function mapinput(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + + game.inittouchpoints(key); + + game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70) && !game.fullscreentoggleheld) { + //Toggle fullscreen + game.fullscreentoggleheld = true; + if (game.fullscreen) {game.fullscreen = false; + }else {game.fullscreen = true;} + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70)) { + game.fullscreentoggleheld = true; + }else { + game.fullscreentoggleheld = false; + } + + if(dwgfx.menuoffset==0){ + if (dwgfx.flipmode) { + if (key.isDown(Keyboard.LEFT) || key.isDown(Keyboard.DOWN) || key.isDown(65) || key.isDown(83)) game.press_left = true; + if (key.isDown(Keyboard.RIGHT) || key.isDown(Keyboard.UP) || key.isDown(68) || key.isDown(87)) game.press_right = true; + }else{ + if (key.isDown(Keyboard.LEFT) || key.isDown(Keyboard.UP) || key.isDown(65) || key.isDown(87)) game.press_left = true; + if (key.isDown(Keyboard.RIGHT) || key.isDown(Keyboard.DOWN) || key.isDown(68) || key.isDown(83)) game.press_right = true; + } + if (key.isDown(90) || key.isDown(32) || key.isDown(86)) game.press_action = true; + if (game.menupage < 9) { + if (key.isDown(Keyboard.ENTER) || key.isDown(Keyboard.BACK)) game.press_map = true; + if (key.isDown(27)) { game.mapheld = true; game.menupage = 10; } + }else{ + if (key.isDown(Keyboard.ENTER) || key.isDown(27)) game.press_map = true; + if (key.isDown(Keyboard.BACK)) game.press_map = true; + } + + game.gettouchpoints_gamemenu(key, obj, music, dwgfx); + + //In the menu system, all keypresses are single taps rather than holds. Therefore this test has to be done for all presses + if (!game.press_action && !game.press_left && !game.press_right) game.jumpheld = false; + if (!game.press_map && !key.isDown(27)) game.mapheld = false; + }else { + game.mapheld = true; game.jumpheld = true; + } + + /* + if (key.isDown(Keyboard.T)) { + game.menupage = 30; + } + */ + + if (!game.mapheld) { + if (game.mobilemenu) { + if (game.press_map) { + //Normal map screen, do transition later + dwgfx.resumegamemode = true; + } + }else{ + if (game.press_map && ((game.menupage < 10) || game.menupage == 30)) { + //Normal map screen, do transition later + dwgfx.resumegamemode = true; + } + } + } + + if (dwgfx.fademode == 1) { + dwgfx.menubuffer.fillRect(dwgfx.menubuffer.rect, 0x000000); + dwgfx.resumegamemode = true; + obj.removeallblocks(); + game.menukludge = false; + if (game.menupage >= 20) { + game.state = 96; game.statedelay = 0; + }else{ + game.state = 80; game.statedelay = 0; + } + } + + if (!game.jumpheld) { + if (game.press_action || game.press_left || game.press_right || game.press_map){ + game.jumpheld = true; + } + + if (game.press_left) { + game.menupage--; + }else if (game.press_right) { + game.menupage++; + } + + if (game.menupage == 1 && obj.flags[67] == 1 && game.press_action && !game.insecretlab) { + //Warp back to the ship + dwgfx.resumegamemode = true; + + game.teleport_to_x = 2; + game.teleport_to_y = 11; + + //trace(game.recordstring); + //We're teleporting! Yey! + game.activetele = false; + game.hascontrol = false; + + i = obj.getplayer(); obj.entities[i].colour = 102; + + //which teleporter script do we use? it depends on the companion! + game.state = 4000; game.statedelay = 0; + } + + if (game.mobilemenu) { + if (game.menupage == 3 && game.press_action) { + //quit to menu + if (dwgfx.fademode == 0) { + if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true; + script.hardreset(key, dwgfx, game, map, obj, help, music); + if(dwgfx.setflipmode) dwgfx.flipmode = true; + dwgfx.fademode = 2; + music.fadeout(); + } + } + }else{ + if (game.menupage == 3 && !game.gamesaved && game.press_action && !game.intimetrial + && !game.nodeathmode && !game.insecretlab && !game.inintermission) { + game.flashlight = 5; + game.screenshake = 10; + music.playef(18, 10); + game.gamesaved = true; + + game.savetime = game.timestring(help); game.savearea = map.currentarea(map.area(game.roomx, game.roomy)); + game.savetrinkets = game.trinkets; + + if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) game.savearea = "The Ship"; + + if(map.custommodeforreal){ + game.customsavequick(editor.ListOfMetaData[game.playcustomlevel].file_num, map, obj, music, help); + }else{ + game.savequick(map, obj, music, help); + } + + } + } + + if (game.mobilemenu) { + if (game.menupage == 20 && game.press_action) { + //quit to menu + if (dwgfx.fademode == 0) { + game.swnmode = false; + dwgfx.fademode = 2; + music.fadeout(); + } + } + + if (game.menupage == 10 && game.press_action) { + //return to game + if (dwgfx.fademode == 0) { + if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true; + script.hardreset(key, dwgfx, game, map, obj, help, music); + if(dwgfx.setflipmode) dwgfx.flipmode = true; + dwgfx.fademode = 2; + music.fadeout(); + } + } + }else{ + if (game.menupage == 20 && game.press_action) { + //return to game + dwgfx.resumegamemode = true; + } + if (game.menupage == 21 && game.press_action) { + //quit to menu + if (dwgfx.fademode == 0) { + game.swnmode = false; + dwgfx.fademode = 2; + music.fadeout(); + } + } + + if (game.menupage == 10 && game.press_action) { + //return to game + dwgfx.resumegamemode = true; + } + if (game.menupage == 11 && game.press_action) { + //quit to menu + if (dwgfx.fademode == 0) { + if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true; + script.hardreset(key, dwgfx, game, map, obj, help, music); + if(dwgfx.setflipmode) dwgfx.flipmode = true; + dwgfx.fademode = 2; + music.fadeout(); + } + } + } + + if (game.menupage < 0) game.menupage = 3; + if (game.menupage > 3 && game.menupage < 9) game.menupage = 0; + + if (game.menupage == 9) game.menupage = 11; + if (game.menupage == 12) game.menupage = 10; + + if (game.menupage == 19) game.menupage = 21; + if (game.menupage == 22) game.menupage = 20; + + } +} + +public function teleporterinput(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + + game.inittouchpoints(key); + + game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70) && !game.fullscreentoggleheld) { + //Toggle fullscreen + game.fullscreentoggleheld = true; + if (game.fullscreen) {game.fullscreen = false; + }else {game.fullscreen = true;} + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70)) { + game.fullscreentoggleheld = true; + }else { + game.fullscreentoggleheld = false; + } + + if(dwgfx.menuoffset==0){ + if (key.isDown(Keyboard.LEFT)|| key.isDown(65)) game.press_left = true; + if (key.isDown(Keyboard.RIGHT) || key.isDown(68)) game.press_right = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)|| key.isDown(87)|| key.isDown(83)) game.press_action = true; + if (key.isDown(Keyboard.ENTER) || key.isDown(Keyboard.BACK)) game.press_map = true; + + game.gettouchpoints_teleportmenu(key, music, dwgfx); + + //In the menu system, all keypresses are single taps rather than holds. Therefore this test has to be done for all presses + if (!game.press_action && !game.press_left && !game.press_right) game.jumpheld = false; + if (!game.press_map) game.mapheld = false; + }else { + game.mapheld = true; game.jumpheld = true; + } + + if (!game.jumpheld) { + if (game.press_action || game.press_left || game.press_right || game.press_map){ + game.jumpheld = true; + } + + if (game.press_left) { + game.teleport_to_teleporter--; + if (game.teleport_to_teleporter < 0) game.teleport_to_teleporter = map.numteleporters - 1; + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + while (map.explored[tempx + (20 * tempy)] == 0) { + game.teleport_to_teleporter--; + if (game.teleport_to_teleporter < 0) game.teleport_to_teleporter = map.numteleporters - 1; + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + } + }else if (game.press_right) { + game.teleport_to_teleporter++; + if (game.teleport_to_teleporter >= map.numteleporters) game.teleport_to_teleporter = 0; + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + while (map.explored[tempx + (20 * tempy)] == 0) { + game.teleport_to_teleporter++; + if (game.teleport_to_teleporter >= map.numteleporters) game.teleport_to_teleporter = 0; + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + } + } + + if (game.press_map) { + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + if (game.roomx == tempx + 100 && game.roomy == tempy + 100) { + //cancel! + dwgfx.resumegamemode = true; + }else { + //teleport + dwgfx.resumegamemode = true; + game.teleport_to_x = tempx; + game.teleport_to_y = tempy; + + //trace(game.recordstring); + //We're teleporting! Yey! + game.activetele = false; + game.hascontrol = false; + + i = obj.getplayer(); obj.entities[i].colour = 102; + + i = obj.getteleporter(); + obj.entities[i].tile = 6; + obj.entities[i].colour = 102; + //which teleporter script do we use? it depends on the companion! + game.state = 4000; game.statedelay = 0; + } + } + } +} + +public function gamecompleteinput(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + + game.inittouchpoints(key); + + game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; +if ((key.isDown(15) || key.isDown(17)) && key.isDown(70) && !game.fullscreentoggleheld) { + //Toggle fullscreen + game.fullscreentoggleheld = true; + if (game.fullscreen) {game.fullscreen = false; + }else {game.fullscreen = true;} + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70)) { + game.fullscreentoggleheld = true; + }else { + game.fullscreentoggleheld = false; + } + + game.gettouchpoints_gamecomplete(key, music, dwgfx); + + if (game.press_action) { + game.creditposition -= 6; + if (game.creditposition <= -1650) { + if(dwgfx.fademode==0){ + dwgfx.fademode = 2; + } + game.creditposition = -1650; + }else { + map.bypos += 6; map.bscroll = +6; + } + game.press_action = true; + } + if (key.isDown(Keyboard.ENTER) || key.isDown(Keyboard.BACK)) game.press_map = true; + //if (key.isDown(27)) { game.mapheld = true; game.menupage = 10; } + + if (!game.mapheld) { + if(game.press_map){ + //Return to game + if(dwgfx.fademode==0){ + dwgfx.fademode = 2; + } + } + } +} + +public function gamecompleteinput2(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + + game.inittouchpoints(key); + + game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70) && !game.fullscreentoggleheld) { + //Toggle fullscreen + game.fullscreentoggleheld = true; + if (game.fullscreen) {game.fullscreen = false; + }else {game.fullscreen = true;} + updategraphicsmode(game, dwgfx); + + game.savestats(map, dwgfx); + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70)) { + game.fullscreentoggleheld = true; + }else { + game.fullscreentoggleheld = false; + } + + if ((key.isDown(15) || key.isDown(17)) && key.isDown(70)) { + game.fullscreentoggleheld = true; + }else { + game.fullscreentoggleheld = false; + } + + game.gettouchpoints_gamecomplete(key, music, dwgfx); + + if (game.press_action) { + game.creditposx++; + if (game.creditposy >= 30) { + if(dwgfx.fademode==0){ + dwgfx.fademode = 2; music.fadeout(); + } + } + game.press_action = true; + } + if (key.isDown(Keyboard.ENTER) || key.isDown(Keyboard.BACK)) game.press_map = true; + //if (key.isDown(27)) { game.mapheld = true; game.menupage = 10; } + + if (!game.mapheld) { + if(game.press_map){ + //Return to game + if(dwgfx.fademode==0){ + dwgfx.fademode = 2; music.fadeout(); + } + } + } +} + +public function controltutorialinput(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + if (game.controltutorialstate >= 13) { + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)) game.press_action = true; + + game.gettouchpoints_controltutorial(key, music, dwgfx); + if (game.press_action) { + game.gamestate = game.GAMEMODE; + } + } +} + + diff --git a/mobile_version/src/includes/logic.as b/mobile_version/src/includes/logic.as new file mode 100644 index 00000000..e46b6f30 --- /dev/null +++ b/mobile_version/src/includes/logic.as @@ -0,0 +1,1372 @@ +public function titlelogic(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, obj:entityclass, help:helpclass, music:musicclass):void { + //Misc + //map.updatetowerglow(); + dwgfx.mobile_changebutton(dwgfx.BUTTON_BLANK); + if(game.menustart && !game.showloadingnotice) { + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_GAMECENTER); + }else { + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + } + dwgfx.mobile_hidearrows(); + + help.updateglow(); + + map.bypos -= 2; + map.bscroll = -2; + //if (map.ypos <= 0) { map.ypos = 0; map.bypos = 0; map.bscroll = 0; } + //if (map.ypos >= 5368) { map.ypos = 5368; map.bypos = map.ypos / 2; } //700-29 * 8 = 5368 + + if (game.menucountdown > 0) { + game.menucountdown--; + if (game.menucountdown == 0) { + if (game.menudest == "mainmenu"){ music.play(6); + }else if (game.menudest == "gameover2") { music.playef(11, 10); + }else if (game.menudest == "timetrialcomplete3") { music.playef(3, 10); + } + game.createmenu(game.menudest); + } + } +} + +public function maplogic(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + //Misc + if (dwgfx.resumegamemode) { + dwgfx.mobile_changebutton(dwgfx.BUTTON_MENU); + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + dwgfx.mobile_showarrows(game.controlstyle); + }else { + if (game.gamestate == game.TELEPORTERMODE) { + dwgfx.mobile_changebutton(dwgfx.BUTTON_BLANK); + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + }else{ + dwgfx.mobile_changebutton(dwgfx.BUTTON_BACK); + if (game.menupage == 0 || game.menupage >= 30) { + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_CONTROLS); + }else { + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + } + } + dwgfx.mobile_hidearrows(); + } + help.updateglow(); +} + + +public function gamecompletelogic(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + //Misc + + dwgfx.mobile_changebutton(dwgfx.BUTTON_BLANK); + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + dwgfx.mobile_hidearrows(); + + map.updatetowerglow(); + help.updateglow(); + dwgfx.crewframe = 0; + + map.tdrawback = true; + + game.creditposition--; + if (game.creditposition <= -1650) { + game.creditposition = -1650; + map.bscroll = 0; + }else { + map.bypos += 1; map.bscroll = +1; + } + + if (dwgfx.fademode == 1) { + //Fix some graphical things + dwgfx.showcutscenebars = false; + dwgfx.cutscenebarspos = 0; + //Return to game + game.gamestate = 7; dwgfx.fademode = 4; + } +} + +public function gamecompletelogic2(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + + dwgfx.mobile_changebutton(dwgfx.BUTTON_BLANK); + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + dwgfx.mobile_hidearrows(); + + //Misc + map.updatetowerglow(); + help.updateglow(); + + game.creditposdelay--; + if (game.creditposdelay <= 0) { + game.creditposdelay = 1; + game.creditposx++; + if (game.creditposx > 40) { + game.creditposy++; + game.creditposx = 0; + if (game.creditposy > 30) game.creditposy = 30; + } + } + /* + game.creditposition--; + if (game.creditposition <= -1650) { + game.creditposition = -1650; + map.bscroll = 0; + }else { + map.bypos += 1; map.bscroll = +1; + } + */ + + if (dwgfx.fademode == 1) { + //Fix some graphical things + dwgfx.showcutscenebars = false; + dwgfx.cutscenebarspos = 0; + //Fix the save thingy + game.deletequick(); + game.savetele(map,obj,music,help); + game.telegotoship(); + //Return to game + map.colstate = 10; + game.gamestate = 1; dwgfx.fademode = 4; + music.playef(18, 10); + game.createmenu("gamecompletecontinue"); + map.nexttowercolour(); + } +} + + +public function towerlogic(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + //Logic for the tower level + dwgfx.mobile_changebutton(dwgfx.BUTTON_MENU); + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + dwgfx.mobile_showarrows(game.controlstyle); + + map.updatetowerglow(); + help.updateglow(); + + if(!game.completestop){ + if (map.cameramode == 0) { + //do nothing! + //a trigger will set this off in the game + map.cameramode = 1; + map.bscroll = 0; + }else if (map.cameramode == 1) { + //move normally + i = obj.getplayer(); + if(map.scrolldir==0){ + map.ypos -= 2; + map.bypos -= 1; + map.bscroll = -1; + }else { + map.ypos += 2; + map.bypos += 1; + map.bscroll = 1; + } + }else if (map.cameramode == 2) { + //do nothing, but cycle colours (for taking damage) + map.bscroll = 0; + }else if (map.cameramode == 4) { + i = obj.getplayer(); + map.cameraseek = map.ypos - (obj.entities[i].yp - 120); + + map.cameraseek = map.cameraseek / 10; + map.cameraseekframe = 10; + + map.cameramode = 5; + + map.bscroll = map.cameraseek/2; + }else if (map.cameramode == 5) { + //actually do it + if (map.spikeleveltop > 0) map.spikeleveltop-=2; + if (map.spikelevelbottom > 0) map.spikelevelbottom-=2; + if (map.cameraseekframe > 0) { + i = obj.getplayer(); + map.ypos -= map.cameraseek; + if (map.cameraseek > 0) { + if (map.ypos < obj.entities[i].yp - 120) { + map.ypos = obj.entities[i].yp - 120; + } + }else { + if (map.ypos > obj.entities[i].yp - 120) { + map.ypos = obj.entities[i].yp - 120; + } + } + map.cameraseekframe--; + map.bypos = map.ypos / 2; + }else { + i = obj.getplayer(); + map.ypos = obj.entities[i].yp - 120; + map.bypos = map.ypos / 2; + map.cameramode = 0; + map.colsuperstate = 0; + } + } + }else { + map.bscroll = 0; + } + + if (map.ypos <= 0) { map.ypos = 0; map.bypos = 0; map.bscroll = 0; } + if (map.minitowermode) { + if (map.ypos >= 568) { + map.ypos = 568; map.bypos = map.ypos / 2; map.bscroll = 0; + } //100-29 * 8 = 568 + }else{ + if (map.ypos >= 5368) { map.ypos = 5368; map.bypos = map.ypos / 2; } //700-29 * 8 = 5368 + } + + if (game.lifeseq > 0) { + if (map.cameramode == 2) { + map.cameraseekframe = 20; + map.cameramode = 4; + map.resumedelay = 4; + } + + if (map.cameraseekframe <= 0) { + if (map.resumedelay <= 0) { + game.lifesequence(obj); + if (game.lifeseq == 0) map.cameramode = 1; + }else { + map.resumedelay--; + } + } + } + + if (game.deathseq != -1) { + map.colsuperstate = 1; //cause the palette to go spastic! + map.cameramode = 2; + game.deathsequence(map, obj, music); + game.deathseq--; + if (game.deathseq <= 0) { + if (game.nodeathmode) { + game.deathseq = 1; + game.gethardestroom(map); + //start depressing sequence here... + if (game.gameoverdelay <= -10 && dwgfx.fademode==0) dwgfx.fademode = 2; + if (dwgfx.fademode == 1) script.resetgametomenu(key, dwgfx, game, map, obj, help, music); + }else{ + if (game.currentroomdeaths > game.hardestroomdeaths) { + game.hardestroomdeaths = game.currentroomdeaths; + game.hardestroom = map.roomname; + } + + game.gravitycontrol = game.savegc; + dwgfx.textboxremove(); + map.resetplayer(dwgfx, game, obj, music); + } + } + }else{ + //State machine for game logic + game.updatestate(dwgfx, map, obj, help, music); + + + //Time trial stuff + if (game.intimetrial) { + if (game.timetrialcountdown > 0) { + game.hascontrol = true; + game.timetrialcountdown--; + if (game.timetrialcountdown > 30) { + game.hascontrol = false; + } + if(game.timetrialcountdown == 120) music.playef(21, 10); + if(game.timetrialcountdown == 90) music.playef(21, 10); + if(game.timetrialcountdown == 60) music.playef(21, 10); + if (game.timetrialcountdown == 30) { + switch(game.timetriallevel) { + case 0: music.play(1); break; + case 1: music.play(3); break; + case 2: music.play(2); break; + case 3: music.play(1); break; + case 4: music.play(12); break; + case 5: music.play(15); break; + } + music.playef(22, 10); + } + } + + //Have we lost the par? + if (!game.timetrialparlost) { + if ((game.minutes * 60) + game.seconds > game.timetrialpar) { + game.timetrialparlost = true; + i = obj.getplayer(); + if (i > -1) { + obj.entities[i].tile = 144; + } + music.playef(2, 10); + } + } + } + //Update entities + + if(!game.completestop){ + for (i = obj.nentity - 1; i >= 0; i--) { + //Remove old platform + //if (obj.entities[i].isplatform) obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp); + + obj.updateentities(i, help, game, music); // Behavioral logic + obj.updateentitylogic(i, game); // Basic Physics + obj.entitymapcollision(i, map); // Collisions with walls + + //Create new platform + //if (obj.entities[i].isplatform) obj.movingplatformfix(i, map); + } + + obj.entitycollisioncheck(dwgfx, game, map, music); // Check ent v ent collisions, update states + //special for tower: is the player touching any spike blocks? + i = obj.getplayer(); + if(obj.checktowerspikes(i, map) && dwgfx.fademode==0){ + game.deathseq = 30; + } + + //Right so! Screenwraping for tower: + if (map.minitowermode) { + if (map.scrolldir == 1) { + //This is minitower 1! + i = obj.getplayer(); + if (game.door_left > -2 && obj.entities[i].xp < -14) + { obj.entities[i].xp += 320; map.gotoroom(48, 52, dwgfx, game, obj, music); } + if (game.door_right > -2 && obj.entities[i].xp >= 308) + { obj.entities[i].xp -= 320; obj.entities[i].yp -= (71*8); map.gotoroom(game.roomx + 1, game.roomy+1, dwgfx, game, obj, music);} + }else { + //This is minitower 2! + i = obj.getplayer(); + if (game.door_left > -2 && obj.entities[i].xp < -14) + { if (obj.entities[i].yp > 300) { + obj.entities[i].xp += 320; obj.entities[i].yp -= (71 * 8); map.gotoroom(50, 54, dwgfx, game, obj, music); + }else + { obj.entities[i].xp += 320; map.gotoroom(50, 53, dwgfx, game, obj, music); } + } + if (game.door_right > -2 && obj.entities[i].xp >= 308) + { obj.entities[i].xp -= 320; map.gotoroom(52, 53, dwgfx, game, obj, music); } + } + }else { + //Always wrap except for the very top and very bottom of the tower + if(map.ypos>=500 && map.ypos <=5000){ + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].xp <= -10) { + obj.entities[i].xp += 320; + }else { + if (obj.entities[i].xp > 310) { + obj.entities[i].xp -= 320; + } + } + } + }else { + //Do not wrap! Instead, go to the correct room + i = obj.getplayer(); + if (game.door_left > -2 && obj.entities[i].xp < -14) + { obj.entities[i].xp += 320; obj.entities[i].yp -= (671 * 8); map.gotoroom(108, 109, dwgfx, game, obj, music); } + if (game.door_right > -2 && obj.entities[i].xp >= 308) + { obj.entities[i].xp -= 320; map.gotoroom(110, 104, dwgfx, game, obj, music);} + } + } + + if(game.lifeseq==0){ + i = obj.getplayer(); + if(!map.invincibility){ + if (obj.entities[i].yp-map.ypos <= 0) { + game.deathseq = 30; + }else if (obj.entities[i].yp-map.ypos >= 208) { + game.deathseq = 30; + } + }else { + if (obj.entities[i].yp-map.ypos <= 0) { + map.ypos-=10; map.bypos = map.ypos / 2; map.bscroll = 0; + }else if (obj.entities[i].yp-map.ypos >= 208) { + map.ypos+=2; map.bypos = map.ypos / 2; map.bscroll = 0; + } + } + + if (obj.entities[i].yp - map.ypos <= 40) { + map.spikeleveltop++; + if (map.spikeleveltop >= 8) map.spikeleveltop = 8; + }else { + if (map.spikeleveltop > 0) map.spikeleveltop--; + } + + if (obj.entities[i].yp - map.ypos >= 164) { + map.spikelevelbottom++; + if (map.spikelevelbottom >= 8) map.spikelevelbottom = 8; + }else { + if (map.spikelevelbottom > 0) map.spikelevelbottom--; + } + + } + + + } + //now! let's clean up removed entities + obj.cleanup(); + + //Looping around, room change conditions! + } + + if (game.teleport_to_new_area) script.teleport(dwgfx, game, map, obj, help, music); +} + +public function gamelogic(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + if (game.autoquicksave) { + game.autoquicksave = false; + if(!game.intimetrial && !game.nodeathmode && !game.insecretlab && !game.inintermission){ + if(map.custommodeforreal){ + game.customsavequick(editor.ListOfMetaData[game.playcustomlevel].file_num, map, obj, music, help); + }else{ + game.savequick(map, obj, music, help); + } + } + } + + //Misc + help.updateglow(); + + if (game.alarmon) { + game.alarmdelay--; + if (game.alarmdelay <= 0) { + music.playef(19); + game.alarmdelay = 20; + } + } + + if (obj.nearelephant) { + obj.upset++; + if (obj.upset == 300) { + obj.upsetmode = true; + //change player to sad + i = obj.getplayer(); + obj.entities[i].tile = 144; + music.playef(2, 10); + } + if (obj.upset > 301) obj.upset = 301; + }else if (obj.upsetmode) { + obj.upset--; + if (obj.upset <= 0) { + obj.upset = 0; + obj.upsetmode = false; + //change player to happy + i = obj.getplayer(); + obj.entities[i].tile = 0; + } + }else { + obj.upset = 0; + } + + game.lifesequence(obj); + + + if (game.deathseq != -1) { + for (i = 0; i < obj.nentity; i++) { + if (game.roomx == 111 && game.roomy == 107) { + if (obj.entities[i].type == 1) { + if (obj.entities[i].xp < 152) { + obj.entities[i].xp = 152; + obj.entities[i].newxp = 152; + } + } + } + if (obj.entities[i].type == 2 && obj.entities[i].state == 3) { + //Ok! super magical exception for the room with the intention death for the shiny trinket + //fix this when the maps are finalised + if (game.roomx != 111 && game.roomy != 107) { + obj.entities[i].state = 4; + }else { + obj.entities[i].state = 4; + map.settile(18, 9, 59); + } + }else if (obj.entities[i].type == 2 && obj.entities[i].state == 2) { + //ok, unfortunate case where the disappearing platform hasn't fully disappeared. Accept a little + //graphical uglyness to avoid breaking the room! + while (obj.entities[i].state == 2) obj.updateentities(i, help, game, music); + obj.entities[i].state = 4; + }else if (map.finallevel && map.finalstretch && obj.entities[i].type == 2) { + //for the final level. probably something 99% of players won't see. + while (obj.entities[i].state == 2) obj.updateentities(i, help, game, music); + obj.entities[i].state = 4; + }else if (obj.entities[i].type == 23 && game.swnmode && game.deathseq<15) { + //if playing SWN, get the enemies offscreen. + obj.entities[i].xp += obj.entities[i].vx*5; + obj.entities[i].yp += obj.entities[i].vy*5; + } + } + if (game.swnmode) { + //if playing SWN game a, push the clock back to the nearest 10 second interval + if (game.swngame == 0) { + game.swnpenalty(); + }else if (game.swngame == 1) { + game.swnstate = 0; game.swnstate2 = 0; game.swnstate3 = 0; game.swnstate4 = 0; game.swndelay = 0; + if (game.swntimer >= game.swnrecord) { + if (game.swnmessage == 0) { + music.playef(25, 10); + game.scores.reportScore(game.swntimer); + } + game.swnmessage = 1; + game.swnrecord = game.swntimer; + } + } + } + + game.deathsequence(map, obj, music); + game.deathseq--; + if (game.deathseq <= 0) { + if (game.nodeathmode) { + game.deathseq = 1; + game.gethardestroom(map); + //start depressing sequence here... + if (game.gameoverdelay <= -10 && dwgfx.fademode==0) dwgfx.fademode = 2; + if (dwgfx.fademode == 1) script.resetgametomenu(key, dwgfx, game, map, obj, help, music); + }else { + if (game.swnmode) { + //if playing SWN game b, reset the clock + if (game.swngame == 1) { + game.swntimer = 0; + game.swnmessage = 0; + game.swnrank = 0; + } + } + + game.gethardestroom(map); + game.activetele = false; + game.hascontrol = true; + + + game.gravitycontrol = game.savegc; + dwgfx.textboxremove(); + map.resetplayer(dwgfx, game, obj, music); + } + } + }else { + //Update colour thingy + if (map.finalmode) { + if (map.final_colormode) { + if (map.final_colorframe > 0) { + map.final_colorframedelay--; + if (map.final_colorframedelay <= 0) { + if (map.final_colorframe == 1) { + map.final_colorframedelay = 40; + temp = 1+int(Math.random() * 6); + if (temp == map.final_mapcol) temp = (temp + 1) % 6; + if (temp == 0) temp = 6; + map.changefinalcol(temp, obj,game); + }else if (map.final_colorframe == 2) { + map.final_colorframedelay = 15; + temp = 1+int(Math.random() * 6); + if (temp == map.final_mapcol) temp = (temp + 1) % 6; + if (temp == 0) temp = 6; + map.changefinalcol(temp, obj,game); + } + } + } + } + } + //State machine for game logic + game.updatestate(dwgfx, map, obj, help, music); + if (game.startscript) { + script.load(game.newscript); + game.startscript = false; + } + + //Intermission 1 Logic + //Player can't walk off a screen with SCM on it until they've left + if (game.supercrewmate) { + if (game.roomx == 41 + game.scmprogress) { //he's in the same room + i = obj.getplayer(); + if (obj.entities[i].ax > 0 && obj.entities[i].xp > 280) { + obj.entities[i].ax = 0; + obj.entities[i].dir = 0; + } + } + } + + //SWN Minigame Logic + if (game.swnmode) { //which game? + if(game.swngame==0){ //intermission, survive 60 seconds game + game.swntimer -= 1; + if (game.swntimer <= 0) { + music.niceplay(8); + game.swngame = 5; + }else { + obj.generateswnwave(game, help, 0); + } + }else if(game.swngame==1){ //super gravitron game + game.swntimer += 1; + if (game.swntimer > game.swnrecord) game.swnrecord = game.swntimer; + + if (game.swntimer >= 150 && game.swnrank == 0) { + game.swnrank = 1; + if (game.swnbestrank < 1) { + game.scores.reportAchievement(game.scores.vvvvvvsupgrav5); + game.swnbestrank = 1; game.swnmessage = 2 + 30; music.playef(26, 10); + } + }else if (game.swntimer >= 300 && game.swnrank == 1) { + game.swnrank = 2; + if (game.swnbestrank < 2) { + game.scores.reportAchievement(game.scores.vvvvvvsupgrav10); + game.swnbestrank = 2; game.swnmessage = 2 + 30; music.playef(26, 10); + } + }else if (game.swntimer >= 450 && game.swnrank == 2) { + game.swnrank = 3; + if (game.swnbestrank < 3) { + game.scores.reportAchievement(game.scores.vvvvvvsupgrav15); + game.swnbestrank = 3; game.swnmessage = 2 + 30; music.playef(26, 10); + } + }else if (game.swntimer >= 600 && game.swnrank == 3) { + game.swnrank = 4; + if (game.swnbestrank < 4) { + game.scores.reportAchievement(game.scores.vvvvvvsupgrav20); + game.swnbestrank = 4; game.swnmessage = 2 + 30; music.playef(26, 10); + } + }else if (game.swntimer >= 900 && game.swnrank == 4) { + game.swnrank = 5; + if (game.swnbestrank < 5) { + game.scores.reportAchievement(game.scores.vvvvvvsupgrav30); + game.swnbestrank = 5; game.swnmessage = 2 + 30; music.playef(26, 10); + } + }else if (game.swntimer >= 1800 && game.swnrank == 5) { + game.swnrank = 6; + if (game.swnbestrank < 6) { + game.scores.reportAchievement(game.scores.vvvvvvsupgrav60); + game.swnbestrank = 6; game.swnmessage = 2 + 30; music.playef(26, 10); + } + } + + obj.generateswnwave(game, help, 1); + + game.swncoldelay--; + if(game.swncoldelay<=0){ + game.swncolstate = (game.swncolstate+1)%6; + game.swncoldelay = 30; + dwgfx.rcol = game.swncolstate; + obj.swnenemiescol(game.swncolstate); + } + }else if (game.swngame == 2) { //introduce game a + game.swndelay--; + if (game.swndelay <= 0) { + game.swngame = 0; + game.swndelay = 0; + game.swntimer = (60 * 30) - 1; + //game.swntimer = 15; + } + }else if (game.swngame == 3) { //extend line + obj.entities[obj.getlineat(84 - 32)].w += 24; + if (obj.entities[obj.getlineat(84 - 32)].w > 332) { + obj.entities[obj.getlineat(84 - 32)].w = 332; + game.swngame = 2; + } + }else if (game.swngame == 4) { //create top line + game.swngame = 3; + obj.createentity(game, -8, 84 - 32, 11, 8); // (horizontal gravity line) + music.niceplay(2); + game.swndeaths = game.deathcounts; + }else if (game.swngame == 5) { //remove line + obj.entities[obj.getlineat(148 + 32)].xp += 24; + if (obj.entities[obj.getlineat(148 + 32)].xp > 320) { + obj.entities[obj.getlineat(148 + 32)].active = false; + game.swnmode = false; + game.swngame = 6; + } + }else if (game.swngame == 6) { //Init the super gravitron + game.swngame = 7; + music.niceplay(3); + }else if (game.swngame == 7) { //introduce game b + game.swndelay--; + if (game.swndelay <= 0) { + game.swngame = 1; + game.swndelay = 0; + game.swntimer = 0; + game.swncolstate = 3; game.swncoldelay = 30; + } + } + } + + //Time trial stuff + if (game.intimetrial) { + if (game.timetrialcountdown > 0) { + game.hascontrol = true; + game.timetrialcountdown--; + if (game.timetrialcountdown > 30) { + game.hascontrol = false; + } + if(game.timetrialcountdown == 120) music.playef(21, 10); + if(game.timetrialcountdown == 90) music.playef(21, 10); + if(game.timetrialcountdown == 60) music.playef(21, 10); + if (game.timetrialcountdown == 30) { + switch(game.timetriallevel) { + case 0: music.play(1); break; + case 1: music.play(3); break; + case 2: music.play(2); break; + case 3: music.play(1); break; + case 4: music.play(12); break; + case 5: music.play(15); break; //Play cool remix for final level! + } + music.playef(22, 10); + } + } + + //Have we lost the par? + if (!game.timetrialparlost) { + if ((game.minutes * 60) + game.seconds > game.timetrialpar) { + game.timetrialparlost = true; + i = obj.getplayer(); + if (i > -1) { + obj.entities[i].tile = 144; + } + music.playef(2, 10); + } + } + } + + //Update entities + //Ok, moving platform fuckers + if (!game.completestop) { + if(obj.vertplatforms){ + for (i = obj.nentity - 1; i >= 0; i--) { + if (obj.entities[i].isplatform) { + if(obj.entities[i].vx==0) { + obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp); + + obj.updateentities(i, help, game, music); // Behavioral logic + obj.updateentitylogic(i, game); // Basic Physics + obj.entitymapcollision(i, map); // Collisions with walls + + obj.createblock(0, obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); + if (game.supercrewmate) { + obj.movingplatformfix(i, map); + obj.scmmovingplatformfix(i, map); + }else { + obj.movingplatformfix(i, map); + } + } + } + } + } + + if(obj.horplatforms){ + for (i = obj.nentity - 1; i >= 0; i--) { + if (obj.entities[i].isplatform) { + if(obj.entities[i].vy==0) { + obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp); + + obj.updateentities(i, help, game, music); // Behavioral logic + obj.updateentitylogic(i, game); // Basic Physics + obj.entitymapcollision(i, map); // Collisions with walls + + obj.hormovingplatformfix(i, map); + } + } + } + //is the player standing on a moving platform? + i = obj.getplayer(); j = obj.entitycollideplatformfloor(map, i); + if (j > -1000) { obj.entities[i].newxp = obj.entities[i].xp + j; obj.entitymapcollision(i, map); + }else { + j = obj.entitycollideplatformroof(map, i); + if (j > -1000) { obj.entities[i].newxp = obj.entities[i].xp + j; obj.entitymapcollision(i, map); } + } + } + + for (i = obj.nentity - 1; i >= 0; i--) { + if (!obj.entities[i].isplatform) { + obj.updateentities(i, help, game, music); // Behavioral logic + obj.updateentitylogic(i, game); // Basic Physics + obj.entitymapcollision(i, map); // Collisions with walls + } + } + + obj.entitycollisioncheck(dwgfx, game, map, music); // Check ent v ent collisions, update states + } + /* + game.test = true; + game.teststring = String(help.booltoint(game.disablekludge_1)) + "-"; + game.teststring += String(help.booltoint(game.disablekludge_2)) + "-"; + game.teststring += String(help.booltoint(game.disablekludge_3)) + "-"; + game.teststring += String(help.booltoint(game.disablekludge_4)); + game.teststring += " nblocks=" + String(obj.nblocks); + */ + //now! let's clean up removed entities + obj.cleanup(); + + //Using warplines? + if (obj.customwarpmode) { + //Rewritten system for mobile update: basically, the new logic is to + //check if the player is leaving the map, and if so do a special check against + //warp lines for collision + obj.customwarpmodehon = false; + obj.customwarpmodevon = false; + + i = obj.getplayer(); + if ((game.door_down > -2 && obj.entities[i].yp >= 226-16) || + (game.door_up > -2 && obj.entities[i].yp < -2+16) || + (game.door_left > -2 && obj.entities[i].xp < -14+16) || + (game.door_right > -2 && obj.entities[i].xp >= 308-16)){ + //Player is leaving room + obj.customwarplinecheck(i); + } + + if(obj.customwarpmodehon){ map.warpy=true; + }else{ map.warpy=false; } + if(obj.customwarpmodevon){ map.warpx=true; + }else{ map.warpx=false; } + } + + //Finally: Are we changing room? + if (map.warpx && map.warpy) { + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].type < 50) { //Don't warp warp lines + if (obj.entities[i].size < 12) { //Don't wrap SWN enemies + if (obj.entities[i].xp <= -10) { + obj.entities[i].xp += 320; + }else { + if (obj.entities[i].xp > 310) { + obj.entities[i].xp -= 320; + } + } + } + } + } + + for (i = 0; i < obj.nentity; i++) { + if(obj.entities[i].type<50){ //Don't warp warp lines + if (obj.entities[i].size < 12) { //Don't wrap SWN enemies + if (obj.entities[i].yp <= -12) { + obj.entities[i].yp += 232; + }else { + if (obj.entities[i].yp > 226) { + obj.entities[i].yp -= 232; + } + } + } + } + } + }else if (map.warpx) { + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].type < 50) { //Don't warp warp lines + if (obj.entities[i].size < 12) { //Don't wrap SWN enemies + if (game.roomx == 118 && game.roomy == 102 && obj.entities[i].rule==1 && !map.custommode) { + //ascii snakes + if (obj.entities[i].xp <= -80) { + obj.entities[i].xp += 400; + }else { + if (obj.entities[i].xp > 320) { + obj.entities[i].xp -= 400; + } + } + }else{ + if (obj.entities[i].xp <= -10) { + obj.entities[i].xp += 320; + }else { + if (obj.entities[i].xp > 310) { + obj.entities[i].xp -= 320; + } + } + } + } + } + } + + i = obj.getplayer(); + if (game.door_down > -2 && obj.entities[i].yp >= 238) + { obj.entities[i].yp -= 240; map.gotoroom(game.roomx, game.roomy + 1, dwgfx, game, obj, music); } + if (game.door_up > -2 && obj.entities[i].yp < -2) + { obj.entities[i].yp += 240; map.gotoroom(game.roomx, game.roomy - 1, dwgfx, game, obj, music);} + }else if (map.warpy) { + for (i = 0; i < obj.nentity; i++) { + if(obj.entities[i].type<50){ //Don't warp warp lines + if (obj.entities[i].yp <= -12) { + obj.entities[i].yp += 232; + }else { + if (obj.entities[i].yp > 226) { + obj.entities[i].yp -= 232; + } + } + } + } + + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].type < 50) { //Don't warp warp lines + if(obj.entities[i].rule!=0){ + if (obj.entities[i].xp <= -30) { + obj.entities[i].xp += 350; + }else { + if (obj.entities[i].xp > 320) { + obj.entities[i].xp -= 350; + } + } + } + } + } + + i = obj.getplayer(); + if (game.door_left > -2 && obj.entities[i].xp < -14) + { obj.entities[i].xp += 320; map.gotoroom(game.roomx - 1, game.roomy, dwgfx, game, obj, music);} + if (game.door_right > -2 && obj.entities[i].xp >= 308) + { obj.entities[i].xp -= 320; map.gotoroom(game.roomx + 1, game.roomy, dwgfx, game, obj, music); } + }else { + //Normal! Just change room + i = obj.getplayer(); + if (game.door_down > -2 && obj.entities[i].yp >= 238) + { obj.entities[i].yp -= 240; map.gotoroom(game.roomx, game.roomy + 1, dwgfx, game, obj, music); } + if (game.door_up > -2 && obj.entities[i].yp < -2) + { obj.entities[i].yp += 240; map.gotoroom(game.roomx, game.roomy - 1, dwgfx, game, obj, music);} + if (game.door_left > -2 && obj.entities[i].xp < -14) + { obj.entities[i].xp += 320; map.gotoroom(game.roomx - 1, game.roomy, dwgfx, game, obj, music);} + if (game.door_right > -2 && obj.entities[i].xp >= 308) + { obj.entities[i].xp -= 320; map.gotoroom(game.roomx + 1, game.roomy, dwgfx, game, obj, music); } + } + + //Warp tokens + if (map.custommode){ + if (game.teleport){ + var edi:int=obj.entities[game.edteleportent].behave; + var edj:int=obj.entities[game.edteleportent].para; + var edi2:int, edj2:int; + edi2 = (edi-(edi%40))/40; + edj2 = (edj - (edj % 30)) / 30; + + map.warpto(100 + edi2, 100 + edj2, obj.getplayer(), edi % 40, (edj % 30) + 2, dwgfx, game, obj, music); + game.teleport = false; + + if (game.teleport == false){ + game.flashlight = 6; + game.screenshake = 25; + } + } + }else{ + if (game.teleport) { + if (game.roomx == 117 && game.roomy == 102) { + i = obj.getplayer(); + obj.entities[i].yp = 225; map.gotoroom(119, 100, dwgfx, game, obj, music); + game.teleport = false; + }else if (game.roomx == 119 && game.roomy == 100) { + i = obj.getplayer(); + obj.entities[i].yp = 225; map.gotoroom(119, 103, dwgfx, game, obj, music); + game.teleport = false; + }else if (game.roomx == 119 && game.roomy == 103) { + i = obj.getplayer(); + obj.entities[i].xp = 0; map.gotoroom(116, 103, dwgfx, game, obj, music); + game.teleport = false; + }else if (game.roomx == 116 && game.roomy == 103) { + i = obj.getplayer(); + obj.entities[i].yp = 225; map.gotoroom(116, 100, dwgfx, game, obj, music); + game.teleport = false; + }else if (game.roomx == 116 && game.roomy == 100) { + i = obj.getplayer(); + obj.entities[i].xp = 0; map.gotoroom(114, 102, dwgfx, game, obj, music); + game.teleport = false; + }else if (game.roomx == 114 && game.roomy == 102) { + i = obj.getplayer(); + obj.entities[i].yp = 225; map.gotoroom(113, 100, dwgfx, game, obj, music); + game.teleport = false; + }else if (game.roomx == 116 && game.roomy == 104) { + //pre warp zone here + map.warpto(107, 101, obj.getplayer(), 14, 16, dwgfx, game, obj, music); + }else if (game.roomx == 107 && game.roomy == 101) { + map.warpto(105, 119, obj.getplayer(), 5, 26, dwgfx, game, obj, music); + }else if (game.roomx == 105 && game.roomy == 118) { + map.warpto(101, 111, obj.getplayer(), 34, 6, dwgfx, game, obj, music); + }else if (game.roomx == 101 && game.roomy == 111) { + //There are lots of warp tokens in this room, so we have to distinguish! + switch(game.teleportxpos) { + case 1: map.warpto(108, 108, obj.getplayer(), 4, 27, dwgfx, game, obj, music); break; + case 2: map.warpto(101, 111, obj.getplayer(), 12, 27, dwgfx, game, obj, music); break; + case 3: map.warpto(119, 111, obj.getplayer(), 31, 7, dwgfx, game, obj, music); break; + case 4: map.warpto(114, 117, obj.getplayer(), 19, 16, dwgfx, game, obj, music); break; + } + }else if (game.roomx == 108 && game.roomy == 106) { + map.warpto(119, 111, obj.getplayer(), 4, 27, dwgfx, game, obj, music); + }else if (game.roomx == 100 && game.roomy == 111) { + map.warpto(101, 111, obj.getplayer(), 24, 6, dwgfx, game, obj, music); + }else if (game.roomx == 119 && game.roomy == 107) { + //Secret lab, to super gravitron + map.warpto(119, 108, obj.getplayer(), 19, 10, dwgfx, game, obj, music); + } + if (game.teleport == false) { + game.flashlight = 6; game.screenshake = 25; + } + } + } + } + + if (game.roomchange) { + //We've changed room? Let's bring our companion along! + game.roomchange = false; + if (game.companion > 0) { + i = obj.getplayer(); + //ok, we'll presume our companion has been destroyed in the room change. So: + switch(game.companion) { + case 6: + obj.createentity(game, obj.entities[i].xp, 121, 15,1); //Y=121, the floor in that particular place! + j = obj.getcompanion(6); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + break; + case 7: + if (game.roomy <= 105) { //don't jump after him! + if (game.roomx == 110) { + obj.createentity(game, 320, 86, 16, 1); //Y=86, the ROOF in that particular place! + }else{ + obj.createentity(game, obj.entities[i].xp, 86, 16, 1); //Y=86, the ROOF in that particular place! + } + j = obj.getcompanion(7); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + break; + case 8: + if (game.roomy >= 104) { //don't jump after him! + if (game.roomx == 102) { + obj.createentity(game, 310, 177, 17, 1); + j = obj.getcompanion(8); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + }else{ + obj.createentity(game, obj.entities[i].xp, 177, 17, 1); + j = obj.getcompanion(8); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + } + break; + case 9: + if (!map.towermode) { //don't go back into the tower! + if (game.roomx == 110 && obj.entities[i].xp<20) { + obj.createentity(game, 100, 185, 18, 15, 0, 1); + }else{ + obj.createentity(game, obj.entities[i].xp, 185, 18, 15, 0, 1); + } + j = obj.getcompanion(9); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + break; + case 10: + //intermission 2, choose colour based on lastsaved + if (game.roomy == 51) { + if (obj.flags[59] == 0) { + obj.createentity(game, 225, 169, 18, dwgfx.crewcolour(game.lastsaved), 0, 10); + j = obj.getcompanion(10); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + }else if (game.roomy >= 52) { + if (obj.flags[59] == 1) { + obj.createentity(game, 160, 177, 18, dwgfx.crewcolour(game.lastsaved), 0, 18, 1); + j = obj.getcompanion(10); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + }else { + obj.flags[59] = 1; + obj.createentity(game, obj.entities[i].xp, -20, 18, dwgfx.crewcolour(game.lastsaved), 0, 10, 0); + j = obj.getcompanion(10); + obj.entities[j].vx = obj.entities[i].vx; + obj.entities[j].dir = obj.entities[i].dir; + } + } + break; + case 11: + //Intermission 1: We're using the SuperCrewMate instead! + //obj.createentity(game, obj.entities[i].xp, obj.entities[i].yp, 24, dwgfx.crewcolour(game.lastsaved)); + if(game.roomx-41==game.scmprogress){ + switch(game.scmprogress) { + case 0: obj.createentity(game, 76, 161, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 1: obj.createentity(game, 10, 169, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 2: obj.createentity(game, 10, 177, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 3: + if (game.scmmoveme) { + obj.createentity(game, obj.entities[obj.getplayer()].xp, 185, 24, dwgfx.crewcolour(game.lastsaved), 2); + game.scmmoveme = false; + }else{ + obj.createentity(game, 10, 177, 24, dwgfx.crewcolour(game.lastsaved), 2); + } + break; + case 4: obj.createentity(game, 10, 185, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 5: obj.createentity(game, 10, 185, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 6: obj.createentity(game, 10, 185, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 7: obj.createentity(game, 10, 41, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 8: obj.createentity(game, 10, 169, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 9: obj.createentity(game, 10, 169, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 10: obj.createentity(game, 10, 129, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 11: obj.createentity(game, 10, 129, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 12: obj.createentity(game, 10, 65, 24, dwgfx.crewcolour(game.lastsaved), 2); break; + case 13: obj.createentity(game, 10, 177, 24, dwgfx.crewcolour(game.lastsaved)); break; + } + } + + if (game.scmmoveme) { + obj.entities[obj.getscm()].xp = obj.entities[obj.getplayer()].xp; + game.scmmoveme = false; + } + break; + } + } + } + + game.activeactivity = obj.checkactivity(); + + if (game.hascontrol && !script.running && !dwgfx.showcutscenebars) { + if (game.readytotele > 0) { + dwgfx.mobile_changebutton(dwgfx.BUTTON_TELEPORT); + }else{ + if (game.activeactivity > -1) { + if (obj.blocks[game.activeactivity].b == 20) { + dwgfx.mobile_changebutton(dwgfx.BUTTON_USE); + }else { + dwgfx.mobile_changebutton(dwgfx.BUTTON_TALK); + } + }else{ + dwgfx.mobile_changebutton(dwgfx.BUTTON_MENU); + } + } + }else { + dwgfx.mobile_changebutton(dwgfx.BUTTON_BLANK); + } + + if (game.insecretlab) { + if (device.deviceresolution == device.IPAD) { + if(obj.trophytext>0){ + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + }else { + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_GAMECENTER); + } + }else{ + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_GAMECENTER); + } + }else { + dwgfx.mobile_changeleftbutton(dwgfx.BUTTON_BLANK); + } + dwgfx.mobile_showarrows(game.controlstyle); + + if (game.activetele) { + i = obj.getplayer(); obj.settemprect(i); + if (game.teleblock.intersects(obj.temprect)){ + game.readytotele += 25; + if (game.readytotele >= 255) game.readytotele = 255; + }else { + game.readytotele -= 50; + if (game.readytotele < 0) game.readytotele = 0; + } + }else { + if (game.readytotele > 0){ + game.readytotele -= 50; + if (game.readytotele < 0) game.readytotele = 0; + } + } + + if (game.teleport_to_new_area) script.teleport(dwgfx, game, map, obj, help, music); +} + + +public function controltutoriallogic(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + game.press_right = false; + game.press_left = false; + game.press_action = false; + game.press_map = false; + + //Misc + help.updateglow(); + if (game.controllerp2 > 0) { + game.controllerp2--; + } + + switch(game.controltutorialstate) { + case 0: + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 10) { + game.controltutorialstatedelay = 0; + game.controltutorialstate = 1; + } + break; + case 1: + game.controllerp1+=5; + if (game.controllerp1 >= 100) { + game.controllerp1 = 100; + game.controltutorialstatedelay = 0; + game.controltutorialstate = 2; + } + break; + case 2: + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 30) { + game.controltutorialstatedelay = 0; + game.controltutorialstate = 3; + } + break; + case 3: + game.press_right = true; + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 60) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 4: + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 30) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 5: + game.press_left = true; + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 60) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 6: + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 30) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 7: + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 5) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 8: + game.jumppressed = 5; game.jumpheld = true; + game.controllerp2 = 10; + game.controltutorialstate++; + break; + case 9: + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 45) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 10: + game.jumppressed = 5; game.jumpheld = true; + game.controllerp2 = 10; + game.controltutorialstate++; + break; + case 11: + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 45) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + //Case 14 on is loopable + case 12: + game.press_right = true; + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay > 28) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 13: + game.press_left = true; + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay == 30) { + game.jumppressed = 5; game.jumpheld = true; + game.controllerp2 = 10; + } + if (game.controltutorialstatedelay > 45) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 14: + game.press_right = true; + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay == 30) { + if(Math.random()*100>50){ + game.jumppressed = 5; game.jumpheld = true; + game.controllerp2 = 10; + } + } + if (game.controltutorialstatedelay > 45) { + game.controltutorialstatedelay = 0; + game.controltutorialstate++; + } + break; + case 15: + game.press_left = true; + game.controltutorialstatedelay++; + if (game.controltutorialstatedelay == 30) { + if(Math.random()*100>50){ + game.jumppressed = 5; game.jumpheld = true; + game.controllerp2 = 10; + } + } + if (game.controltutorialstatedelay > 45) { + game.controltutorialstatedelay = 0; + game.controltutorialstate = 14; + } + break; + } + + //Entity type 0 is player controled + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].rule == 0) { + if (game.press_left) {game.tapleft++; game.controllerp3++; + }else { if (game.tapleft <= 4 && game.tapleft > 0) {if (obj.entities[i].vx < 0) obj.entities[i].vx = 0;}game.tapleft = 0; } + if (game.press_right) {game.tapright++; game.controllerp3++; + }else { if (game.tapright <= 4 && game.tapright > 0) {if (obj.entities[i].vx > 0) obj.entities[i].vx = 0;}game.tapright = 0;} + + if(game.press_left){ + //obj.entities[i].vx = -4; + if(game.controllerp3>=8){ + obj.entities[i].ax = -3; + obj.entities[i].dir = 0; + } + }else if (game.press_right){ + //obj.entities[i].vx = 4; + if(game.controllerp3>=8){ + obj.entities[i].ax = 3; + obj.entities[i].dir = 1; + } + }else{ + //obj.entities[i].vx = 0; + game.controllerp3 = 0; + } + + if (game.jumppressed > 0) { + game.jumppressed--; + if (obj.entities[i].onground>0 && game.gravitycontrol == 0) { + game.gravitycontrol = 1; + obj.entities[i].vy = -4; obj.entities[i].ay = -3; + music.playef(0, 10); + game.jumppressed = 0; + game.totalflips++; + } + if (obj.entities[i].onroof>0 && game.gravitycontrol == 1) { + game.gravitycontrol = 0; + obj.entities[i].vy = 4; obj.entities[i].ay = 3; + music.playef(1, 10); + game.jumppressed = 0; + game.totalflips++; + } + } + } + } + + for (i = obj.nentity - 1; i >= 0; i--) { + if (!obj.entities[i].isplatform) { + obj.updateentities(i, help, game, music); // Behavioral logic + obj.updateentitylogic(i, game); // Basic Physics + obj.entitymapcollision(i, map); // Collisions with walls + } + } + + obj.entitycollisioncheck(dwgfx, game, map, music); // Check ent v ent collisions, update states + + //warp around x axis! + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].type < 50) { //Don't warp warp lines + if (obj.entities[i].size < 12) { //Don't wrap SWN enemies + if (obj.entities[i].xp <= -10) { + obj.entities[i].xp += 320; + }else { + if (obj.entities[i].xp > 310) { + obj.entities[i].xp -= 320; + } + } + } + } + } +} diff --git a/mobile_version/src/includes/render.as b/mobile_version/src/includes/render.as new file mode 100644 index 00000000..88261380 --- /dev/null +++ b/mobile_version/src/includes/render.as @@ -0,0 +1,2524 @@ +import flash.geom.Point; +public function titlerender(key:KeyPoll, dwgfx:dwgraphicsclass, map:mapclass, game:gameclass, obj:entityclass, help:helpclass):void { + dwgfx.drawbutton(game, help); + + dwgfx.backbuffer.lock(); + dwgfx.backbuffer.fillRect(dwgfx.backbuffer.rect, 0x000000); + + if (!game.menustart) { + tr = 164 - (help.glow / 2) - Math.random() * 4; + tg = 164 - (help.glow / 2) - Math.random() * 4; + tb = 164 - (help.glow / 2) - Math.random() * 4; + + temp = 100; + dwgfx.drawsprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); + + + dwgfx.print(5, 135, "[ tap to start ]", tr, tg, tb, true); + //dwgfx.print(5, 195, "ACTION = Space, Z, or V", tr*0.5, tg*0.5, tb*0.5, true); + + //dwgfx.print(5, 215, "Press CTRL-F for Fullscreen", tr, tg, tb, true); + + /*dwgfx.print(5, 5, "IGF WIP Build, 29th Oct '09", tr, tg, tb, true); + dwgfx.print(5, 200, "Game by Terry Cavanagh", tr, tg, tb, true); + dwgfx.print(5, 210, "Music by Magnus P~lsson", tr, tg, tb, true); + dwgfx.print(5, 220, "Roomnames by Bennett Foddy", tr, tg, tb, true);*/ + }else { + if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo(map); + + tr = map.r - (help.glow / 4) - Math.random() * 4; + tg = map.g - (help.glow / 4) - Math.random() * 4; + tb = map.b - (help.glow / 4) - Math.random() * 4; + if (tr < 0) tr = 0; if(tr>255) tr=255; + if (tg < 0) tg = 0; if(tg>255) tg=255; + if (tb < 0) tb = 0; if(tb>255) tb=255; + + temp = 30+20; + + if(game.currentmenuname=="mainmenu"){ + dwgfx.drawsprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); + dwgfx.print( 320 - 8 * 11, 2, "more games", tr / 2, tg / 2, tb / 2); + dwgfx.print( 320 - 8 * 8, 230, "credits", tr / 2, tg / 2, tb / 2); + dwgfx.print( 8, 230, "options", tr / 2, tg / 2, tb / 2); + }else if (game.currentmenuname == "options") { + /* + if (game.currentmenuoption == 0) { + dwgfx.bigprint( -1, 30, "Accessibility", tr, tg, tb, true); + dwgfx.print( -1, 65, "Disable screen effects, enable", tr, tg, tb, true); + dwgfx.print( -1, 75, "slowdown modes or invincibility", tr, tg, tb, true); + }else if (game.currentmenuoption == 1) { + dwgfx.bigprint( -1, 30, "Unlock Play Modes", tr, tg, tb, true); + dwgfx.print( -1, 65, "Unlock parts of the game normally", tr, tg, tb, true); + dwgfx.print( -1, 75, "unlocked as you progress", tr, tg, tb, true); + }else if (game.currentmenuoption == 2) { + dwgfx.bigprint( -1, 30, "Clear Data", tr, tg, tb, true); + dwgfx.print( -1, 65, "Delete your save data", tr, tg, tb, true); + dwgfx.print( -1, 75, "and unlocked play modes", tr, tg, tb, true); + } + */ + }else if (game.currentmenuname == "graphicoptions") { + if (game.advanced_mode) { + if (game.currentmenuoption == 0) { + dwgfx.bigprint( -1, 30, "Screen Mode", tr, tg, tb, true); + dwgfx.print( -1, 65, "Change between windowed", tr, tg, tb, true); + dwgfx.print( -1, 75, "and fullscreen modes", tr, tg, tb, true); + }else if (game.currentmenuoption == 1) { + dwgfx.bigprint( -1, 20, "Enable Hardware", tr, tg, tb, true); + dwgfx.bigprint( -1, 45, "Acceleration", tr, tg, tb, true); + dwgfx.print( -1, 85, "Uses graphics hardware to manually", tr, tg, tb, true); + dwgfx.print( -1, 95, "manage screen scaling. Can cause", tr, tg, tb, true); + dwgfx.print( -1, 105, "slowdown on some computers.", tr, tg, tb, true); + }else if (game.currentmenuoption == 2) { + dwgfx.bigprint( -1, 30, "Screen Scaling", tr, tg, tb, true); + dwgfx.print( -1, 65, "Manually adjust scaling ratio. Full", tr, tg, tb, true); + dwgfx.print( -1, 75, "scaling can cause distortions if", tr, tg, tb, true); + dwgfx.print( -1, 85, "screen smoothing is disabled.", tr, tg, tb, true); + switch(game.advanced_scaling) { + case 0: dwgfx.print( -1, 105, "[Full] x1 x2 x3 x4 ", tr, tg, tb, true); break; + case 1: dwgfx.print( -1, 105, " Full [x1] x2 x3 x4 ", tr, tg, tb, true); break; + case 2: dwgfx.print( -1, 105, " Full x1 [x2] x3 x4 ", tr, tg, tb, true); break; + case 3: dwgfx.print( -1, 105, " Full x1 x2 [x3] x4 ", tr, tg, tb, true); break; + case 4: dwgfx.print( -1, 105, " Full x1 x2 x3 [x4]", tr, tg, tb, true); break; + } + } else if (game.currentmenuoption == 3) { + dwgfx.bigprint( -1, 30, "Screen Smoothing", tr, tg, tb, true); + dwgfx.print( -1, 65, "Scales the screen evenly, but", tr, tg, tb, true); + dwgfx.print( -1, 75, "causes a blurring effect.", tr, tg, tb, true); + } + }else{ + if (game.currentmenuoption == 0) { + dwgfx.bigprint( -1, 30, "Screen Mode", tr, tg, tb, true); + dwgfx.print( -1, 65, "Change between windowed", tr, tg, tb, true); + dwgfx.print( -1, 75, "and fullscreen modes", tr, tg, tb, true); + }else if (game.currentmenuoption == 1) { + dwgfx.bigprint( -1, 20, "Disable Hardware", tr, tg, tb, true); + dwgfx.bigprint( -1, 45, "Acceleration", tr, tg, tb, true); + dwgfx.print( -1, 85, "May improve fullscreen performance on", tr, tg, tb, true); + dwgfx.print( -1, 95, "some computers. Provides additional", tr, tg, tb, true); + dwgfx.print( -1, 105, "scaling and smoothing options.", tr, tg, tb, true); + } + } + }else if (game.currentmenuname == "credits") { + dwgfx.print( -1, 50, "VVVVVV is a game by", tr, tg, tb, true); + dwgfx.bigprint( 40, 65, "Terry Cavanagh", tr, tg, tb, true, 2); + + dwgfx.drawimagecol(7, -1, 86, tr *0.75, tg *0.75, tb *0.75, true); + //dwgfx.print( 40, 85, "http://www.distractionware.com", tr, tg, tb, true); + + dwgfx.print( -1, 120, "and features music by", tr, tg, tb, true); + dwgfx.bigprint( 40, 135, "Magnus P~lsson", tr, tg, tb, true, 2); + dwgfx.drawimagecol(8, -1, 156, tr *0.75, tg *0.75, tb *0.75, true); + //dwgfx.print( 40, 155, "http://souleye.madtracker.net", tr, tg, tb, true); + }else if (game.currentmenuname == "credits2") { + dwgfx.print( -1, 30, "Roomnames are by", tr, tg, tb, true); + dwgfx.bigprint( 40, 45, "Bennett Foddy", tr, tg, tb, true); + dwgfx.drawimagecol(9, -1, 66, tr*0.75, tg *0.75, tb *0.75, true); + //dwgfx.print( 40, 80, "http://www.distractionware.com", tr, tg, tb); + + dwgfx.print( -1, 100, "Beta Testing by", tr, tg, tb, true); + dwgfx.bigprint( 40, 110, "Sam Kaplan", tr, tg, tb, true); + dwgfx.bigprint( 40, 130, "Pauli Kohberger", tr, tg, tb, true); + dwgfx.print( -1, 160, "Ending Picture by", tr, tg, tb, true); + dwgfx.bigprint( 40, 170, "Pauli Kohberger", tr, tg, tb, true); + }else if (game.currentmenuname == "credits3") { + dwgfx.print( -1, 20, "VVVVVV is supported by", tr, tg, tb, true); + dwgfx.print( 40, 30, "the following patrons", tr, tg, tb, true); + + dwgfx.print( 80-16, 40+20, "Anders Ekermo", tr, tg, tb); + dwgfx.print( 80-12, 54+20, "Andreas K|mper", tr, tg, tb); + dwgfx.print( 80-8, 68+20, "Anthony Burch", tr, tg, tb); + dwgfx.print( 80-4, 82+20, "Bennett Foddy", tr, tg, tb); + dwgfx.print( 80, 96+20, "Brendan O'Sullivan", tr, tg, tb); + dwgfx.print( 80+4, 110+20, "Christopher Armstrong", tr, tg, tb); + dwgfx.print( 80+8, 124+20, "Daniel Benmergui", tr, tg, tb); + dwgfx.print( 80+12, 138+20, "David Pittman", tr, tg, tb); + dwgfx.print( 80+16, 152+20, "Ian Bogost", tr, tg, tb); + }else if (game.currentmenuname == "credits4") { + dwgfx.print( -1, 20, "VVVVVV is supported by", tr, tg, tb, true); + dwgfx.print( 40, 30, "the following patrons", tr, tg, tb, true); + dwgfx.print( 80-16, 20+40, "Ian Poma", tr, tg, tb); + dwgfx.print( 80-12, 34+40, "Jaz McDougall", tr, tg, tb); + dwgfx.print( 80-8, 48+40, "John Faulkenbury", tr, tg, tb); + dwgfx.print( 80-4, 62+40, "Jonathan Whiting", tr, tg, tb); + dwgfx.print( 80, 76+40, "Kyle Pulver", tr, tg, tb); + dwgfx.print( 80+4, 90+40, "Markus Persson", tr, tg, tb); + dwgfx.print( 80+8, 104+40, "Nathan Ostgard", tr, tg, tb); + dwgfx.print( 80+12, 118+40, "Nick Easler", tr, tg, tb); + dwgfx.print( 80+16, 132+40, "Stephen Lavelle", tr, tg, tb); + }else if (game.currentmenuname == "credits5") { + dwgfx.print( -1, 20, "and also by", tr, tg, tb, true); + + dwgfx.print( 80, 40,"Adam Wendt", tr, tg, tb); + dwgfx.print( 80, 50,"Andreas J{rgensen", tr, tg, tb); + dwgfx.print( 80, 60,"}ngel Louzao Penalva", tr, tg, tb); + dwgfx.print( 80, 70,"Ashley Burton", tr, tg, tb); + dwgfx.print( 80, 80,"Aubrey Hesselgren", tr, tg, tb); + dwgfx.print( 80, 90,"Bradley Rose", tr, tg, tb); + dwgfx.print( 80, 100,"Brendan Urquhart", tr, tg, tb); + dwgfx.print( 80, 110,"Chris Ayotte", tr, tg, tb); + dwgfx.print( 80, 120,"Christopher Zamanillo", tr, tg, tb); + dwgfx.print( 80, 130,"Daniel Schuller", tr, tg, tb); + dwgfx.print( 80, 140,"Hybrid Mind Studios", tr, tg, tb); + dwgfx.print( 80, 150,"Emilie McGinley", tr, tg, tb); + dwgfx.print( 80, 160,"Francisco Solares", tr, tg, tb); + dwgfx.print( 80, 170,"Hal Helms", tr, tg, tb); + }else if (game.currentmenuname == "credits6") { + dwgfx.print( -1, 20, "and also by", tr, tg, tb, true); + + dwgfx.print( 80, 40,"Hayden Scott-Baron", tr, tg, tb); + dwgfx.print( 80, 50,"Hermit Games", tr, tg, tb); + dwgfx.print( 80, 60,"Ido Yehieli", tr, tg, tb); + dwgfx.print( 80, 70,"Jade Vault Games", tr, tg, tb); + dwgfx.print( 80, 80,"James Andrews", tr, tg, tb); + dwgfx.print( 80, 90,"James Riley", tr, tg, tb); + dwgfx.print( 80, 100,"James Hsieh", tr, tg, tb); + dwgfx.print( 80, 110,"Jasper Byrne", tr, tg, tb); + dwgfx.print( 80, 120,"Jedediah Baker", tr, tg, tb); + dwgfx.print( 80, 130,"Jens Bergensten", tr, tg, tb); + dwgfx.print( 80, 140,"Jeremy J. Penner", tr, tg, tb); + dwgfx.print( 80, 150,"Jeremy Peterson", tr, tg, tb); + dwgfx.print( 80, 160,"Jim McGinley", tr, tg, tb); + dwgfx.print( 80, 170,"Jonathan Cartwright", tr, tg, tb); + }else if (game.currentmenuname == "credits7") { + dwgfx.print( -1, 20, "and also by", tr, tg, tb, true); + + dwgfx.print( 80, 40,"John Nesky", tr, tg, tb); + dwgfx.print( 80, 50,"Jos Yule", tr, tg, tb); + dwgfx.print( 80, 60,"Jose Flores", tr, tg, tb); + dwgfx.print( 80, 70,"Josh Bizeau", tr, tg, tb); + dwgfx.print( 80, 80,"Joshua Buergel", tr, tg, tb); + dwgfx.print( 80, 90,"Joshua Hochner", tr, tg, tb); + dwgfx.print( 80, 100,"Kurt Ostfeld", tr, tg, tb); + dwgfx.print( 80, 110,"Magnus P~lsson", tr, tg, tb); + dwgfx.print( 80, 120,"Mark Neschadimenko", tr, tg, tb); + dwgfx.print( 80, 130,"Matt Antonellis", tr, tg, tb); + dwgfx.print( 80, 140,"Matthew Reppert", tr, tg, tb); + dwgfx.print( 80, 150,"Michael Falkensteiner", tr, tg, tb); + dwgfx.print( 80, 160,"Michael Vendittelli", tr, tg, tb); + dwgfx.print( 80, 170,"Mike Kasprzak", tr, tg, tb); + }else if (game.currentmenuname == "credits8") { + dwgfx.print( -1, 20, "and also by", tr, tg, tb, true); + + dwgfx.print( 80, 70,"Mitchel Stein", tr, tg, tb); + dwgfx.print( 80, 80,"Sean Murray", tr, tg, tb); + dwgfx.print( 80, 90,"Simon Michael", tr, tg, tb); + dwgfx.print( 80, 100,"Simon Schmid", tr, tg, tb); + dwgfx.print( 80, 110,"Stephen Maxwell", tr, tg, tb); + dwgfx.print( 80, 120,"Swing Swing Submarine", tr, tg, tb); + dwgfx.print( 80, 130,"Tam Toucan", tr, tg, tb); + dwgfx.print( 80, 140,"Terry Dooher", tr, tg, tb); + dwgfx.print( 80, 150,"Tim W.", tr, tg, tb); + dwgfx.print( 80, 160,"Timothy Bragan", tr, tg, tb); + }else if (game.currentmenuname == "credits9") { + dwgfx.print( -1, 20, "and thanks also to:", tr, tg, tb, true); + + dwgfx.bigprint(80, 60, "You!", tr, tg, tb, true); + + dwgfx.print( 80, 100, "Your support makes it possible", tr, tg, tb,true); + dwgfx.print( 80, 110,"for me to continue making the", tr, tg, tb,true); + dwgfx.print( 80, 120,"games I want to make, now", tr, tg, tb,true); + dwgfx.print( 80, 130, "and into the future.", tr, tg, tb, true); + + dwgfx.print( 80, 150,"Thank you!", tr, tg, tb,true); + }else if (game.currentmenuname == "setinvincibility") { + dwgfx.print( -1, 90, "Warning! Enabling invincibility", tr, tg, tb, true); + dwgfx.print( -1, 100, "requires a game restart, and will", tr, tg, tb, true); + dwgfx.print( -1, 110, "delete your current saves.", tr, tg, tb, true); + dwgfx.print( -1, 120, "Is this ok?", tr, tg, tb, true); + }else if (game.currentmenuname == "setslowdown1") { + dwgfx.print( -1, 90, "Warning! Changing the game speed", tr, tg, tb, true); + dwgfx.print( -1, 100, "requires a game restart, and will", tr, tg, tb, true); + dwgfx.print( -1, 110, "delete your current saves.", tr, tg, tb, true); + dwgfx.print( -1, 120, "Is this ok?", tr, tg, tb, true); + }else if (game.currentmenuname == "setslowdown2") { + dwgfx.bigprint( -1, 40, "Game Speed", tr, tg, tb, true); + dwgfx.print( -1, 75, "Select a new game speed below.", tr, tg, tb, true); + /* + if (stage.frameRate==30) { dwgfx.print( -1, 105, "Game speed is normal.", tr/2, tg/2, tb/2, true); + }else if (stage.frameRate==24){ dwgfx.print( -1, 105, "Game speed is at 80%", tr, tg, tb, true); + }else if (stage.frameRate==18){ dwgfx.print( -1, 105, "Game speed is at 60%", tr, tg, tb, true); + }else if (stage.frameRate==12){ dwgfx.print( -1, 105, "Game speed is at 40%", tr, tg, tb, true); + } + */ + }else if (game.currentmenuname == "newgamewarning") { + dwgfx.print( -1, 100-32, "Are you sure? This will", tr, tg, tb, true); + dwgfx.print( -1, 110-32, "delete your current saves...", tr, tg, tb, true); + }else if (game.currentmenuname == "cleardatamenu") { + dwgfx.print( -1, 100-32, "Are you sure you want to", tr, tg, tb, true); + dwgfx.print( -1, 110-32, "delete all your saved data?", tr, tg, tb, true); + }else if (game.currentmenuname == "startnodeathmode") { + dwgfx.print( -1, 45, "Good luck!", tr, tg, tb, true); + dwgfx.print( -1, 80, "You cannot save in this mode.", tr, tg, tb, true); + dwgfx.print( -1, 100, "Would you like to disable the", tr, tg, tb, true); + dwgfx.print( -1, 112, "cutscenes during the game?", tr, tg, tb, true); + }else if (game.currentmenuname == "accessibility") { + //if (game.currentmenuoption == 0) { + dwgfx.bigprint( -1, 40, "Accessibility", tr, tg, tb, true); + if (!game.colourblindmode) { dwgfx.print( -1, 75, "Backgrounds are ON.", tr, tg, tb, true); + }else{ dwgfx.print( -1, 75, "Backgrounds are OFF.", tr/2, tg/2, tb/2, true); } + //}else if (game.currentmenuoption == 1) { + //dwgfx.bigprint( -1, 40, "Screen Effects", tr, tg, tb, true); + //dwgfx.print( -1, 75, "Disables screen shakes and flashes.", tr, tg, tb, true); + if (!game.noflashingmode) { dwgfx.print( -1, 85, "Screen Effects are ON.", tr, tg, tb, true); + }else{ dwgfx.print( -1, 85, "Screen Effects are OFF.", tr/2, tg/2, tb/2, true); } + /*}else if (game.currentmenuoption == 2) { + dwgfx.bigprint( -1, 40, "Invincibility", tr, tg, tb, true); + dwgfx.print( -1, 75, "Provided to help disabled gamers", tr, tg, tb, true); + dwgfx.print( -1, 85, "explore the game. Can cause glitches.", tr, tg, tb, true); + if (map.invincibility) { dwgfx.print( -1, 105, "Invincibility is ON.", tr, tg, tb, true); + }else{ dwgfx.print( -1, 105, "Invincibility is off.", tr/2, tg/2, tb/2, true); } + }else if (game.currentmenuoption == 3) { + dwgfx.bigprint( -1, 40, "Game Speed", tr, tg, tb, true); + dwgfx.print( -1, 75, "May be useful for disabled gamers", tr, tg, tb, true); + dwgfx.print( -1, 85, "using one switch devices.", tr, tg, tb, true); + /* + if (stage.frameRate==30) { dwgfx.print( -1, 105, "Game speed is normal.", tr/2, tg/2, tb/2, true); + }else if (stage.frameRate==24){ dwgfx.print( -1, 105, "Game speed is at 80%", tr, tg, tb, true); + }else if (stage.frameRate==18){ dwgfx.print( -1, 105, "Game speed is at 60%", tr, tg, tb, true); + }else if (stage.frameRate==12){ dwgfx.print( -1, 105, "Game speed is at 40%", tr, tg, tb, true); } + */ + //} + }else if (game.currentmenuname == "playint1" || game.currentmenuname == "playint2") { + dwgfx.print( -1, 25, "Who do you want to play", tr, tg, tb, true); + dwgfx.print( -1, 35, "the level with?", tr, tg, tb, true); + }else if (game.currentmenuname == "playmodes") { + if (!game.mobilemenu) { + if (game.currentmenuoption == 0) { + dwgfx.bigprint( -1, 30, "Time Trials", tr, tg, tb, true); + dwgfx.print( -1, 65, "Replay any level in the game in", tr, tg, tb, true); + dwgfx.print( -1, 75, "a competitive time trial mode.", tr, tg, tb, true); + + /* + if (swfStage.frameRate < 30 || map.invincibility) { + dwgfx.print( -1, 105, "Time Trials are not available", tr, tg, tb, true); + dwgfx.print( -1, 115, "with slowdown or invincibility.", tr, tg, tb, true); + } + */ + }else if (game.currentmenuoption == 1) { + dwgfx.bigprint( -1, 30, "Intermissions", tr, tg, tb, true); + dwgfx.print( -1, 65, "Replay the intermission levels.", tr, tg, tb, true); + + if (!game.unlock[15] && !game.unlock[16]) { + dwgfx.print( -1, 95, "TO UNLOCK: Complete the", tr, tg, tb, true); + dwgfx.print( -1, 105, "intermission levels in-game.", tr, tg, tb, true); + } + }else if (game.currentmenuoption == 2) { + dwgfx.bigprint( -1, 30, "No Death Mode", tr, tg, tb, true); + dwgfx.print( -1, 65, "Play the entire game", tr, tg, tb, true); + dwgfx.print( -1, 75, "without dying once.", tr, tg, tb, true); + + /* + if (swfStage.frameRate < 30 || map.invincibility) { + dwgfx.print( -1, 105, "No death mode is not available", tr, tg, tb, true); + dwgfx.print( -1, 115, "with slowdown or invincibility.", tr, tg, tb, true); + }else + */ + if (!game.unlock[17]) { + dwgfx.print( -1, 105, "TO UNLOCK: Achieve an S-rank or", tr, tg, tb, true); + dwgfx.print( -1, 115, "above in at least 4 time trials.", tr, tg, tb, true); + } + }else if (game.currentmenuoption == 3) { + dwgfx.bigprint( -1, 30, "Flip Mode", tr, tg, tb, true); + dwgfx.print( -1, 65, "Flip the entire game vertically.", tr, tg, tb, true); + dwgfx.print( -1, 75, "Compatible with other game modes.", tr, tg, tb, true); + + if (game.unlock[18]) { + if (dwgfx.setflipmode) { dwgfx.print( -1, 105, "Currently ENABLED!", tr, tg, tb, true); + }else{ dwgfx.print( -1, 105, "Currently Disabled.", tr/2, tg/2, tb/2, true); } + }else{ + dwgfx.print( -1, 105, "TO UNLOCK: Complete the game.", tr, tg, tb, true); + } + } + } + }else if (game.currentmenuname == "flipmode_mobile") { + dwgfx.bigprint( -1, 30, "Flip Mode", tr, tg, tb, true); + dwgfx.print( -1, 65, "Flip the entire game vertically.", tr, tg, tb, true); + dwgfx.print( -1, 75, "Compatible with other game modes.", tr, tg, tb, true); + + if (game.unlock[18]) { + if (dwgfx.setflipmode) { dwgfx.print( -1, 105, "Currently ENABLED!", tr, tg, tb, true); + }else{ dwgfx.print( -1, 105, "Currently Disabled.", tr/2, tg/2, tb/2, true); } + }else{ + dwgfx.print( -1, 105, "TO UNLOCK: Complete the game.", tr, tg, tb, true); + } + }else if (game.currentmenuname == "youwannaquit") { + dwgfx.print( -1, 75, "Are you sure you want to quit?", tr, tg, tb, true); + }else if (game.currentmenuname == "continue") { + dwgfx.crewframedelay--; + if (dwgfx.crewframedelay <= 0) { + dwgfx.crewframedelay = 8; + dwgfx.crewframe = (dwgfx.crewframe + 1) % 2; + } + if (game.currentmenuoption == 0) { + //Show teleporter save info + dwgfx.drawpixeltextbox(25, 65-20, 270, 90, 34,12, 65, 185, 207,0,4); + + dwgfx.bigprint(-1, 20, "Tele Save", tr, tg, tb, true); + dwgfx.print(0, 80-20, game.tele_currentarea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + for (i = 0; i < 6; i++) { + dwgfx.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.tele_crewstats[i], help, true); + } + dwgfx.print(160 - 84, 132-20, game.tele_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.print(160 + 40, 132-20, help.number(game.tele_trinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 126-20, 50, 18, help); + dwgfx.drawspritesetcol(175, 126-20, 22, 18, help); + }else if (game.currentmenuoption == 1) { + //Show quick save info + dwgfx.drawpixeltextbox(25, 65-20, 270, 90, 34,12, 65, 185, 207,0,4); + + dwgfx.bigprint(-1, 20, "Quick Save", tr, tg, tb, true); + dwgfx.print(0, 80-20, game.quick_currentarea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + for (i = 0; i < 6; i++) { + dwgfx.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.quick_crewstats[i], help, true); + } + dwgfx.print(160 - 84, 132-20, game.quick_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.print(160 + 40, 132-20, help.number(game.quick_trinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 126-20, 50, 18, help); + dwgfx.drawspritesetcol(175, 126-20, 22, 18, help); + } + }else if (game.currentmenuname == "gameover" || game.currentmenuname == "gameover2") { + dwgfx.bigprint( -1, 25, "GAME OVER", tr, tg, tb, true, 3); + + dwgfx.crewframedelay--; + if (dwgfx.crewframedelay <= 0) { + dwgfx.crewframedelay = 8; + dwgfx.crewframe = (dwgfx.crewframe + 1) % 2; + } + for (i = 0; i < 6; i++) { + dwgfx.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], help, true); + } + tempstring = "You rescued " + help.number(game.crewrescued()) + " crewmates"; + dwgfx.print(0, 100, tempstring, tr, tg, tb, true); + + tempstring = "and found " + help.number(game.trinkets) + " trinkets."; + dwgfx.print(0, 110, tempstring, tr, tg, tb, true); + + tempstring = "You managed to reach:"; + dwgfx.print(0, 145, tempstring, tr, tg, tb, true); + dwgfx.print(0, 155, game.hardestroom, tr, tg, tb, true); + + if (game.crewrescued() == 1) { tempstring = "Keep trying! You'll get there!"; + }else if (game.crewrescued() == 2) { tempstring = "Nice one!"; + }else if (game.crewrescued() == 3) { tempstring = "Wow! Congratulations!"; + }else if (game.crewrescued() == 4) { tempstring = "Incredible!"; + }else if (game.crewrescued() == 5) { tempstring = "Unbelievable! Well done!"; + }else if (game.crewrescued() == 6) { tempstring = "Er, how did you do that?"; + } + + dwgfx.print(0, 190, tempstring, tr, tg, tb, true); + }else if (game.currentmenuname == "nodeathmodecomplete" || game.currentmenuname == "nodeathmodecomplete2") { + dwgfx.bigprint( -1, 8, "WOW", tr, tg, tb, true, 4); + + dwgfx.crewframedelay--; + if (dwgfx.crewframedelay <= 0) { + dwgfx.crewframedelay = 8; + dwgfx.crewframe = (dwgfx.crewframe + 1) % 2; + } + for (i = 0; i < 6; i++) { + dwgfx.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], help, true); + } + tempstring = "You rescued all the crewmates!"; + dwgfx.print(0, 100, tempstring, tr, tg, tb, true); + + tempstring = "And you found " + help.number(game.trinkets) + " trinkets."; + dwgfx.print(0, 110, tempstring, tr, tg, tb, true); + + dwgfx.print(0, 160, "A new trophy has been awarded and", tr, tg, tb, true); + dwgfx.print(0, 170, "placed in the secret lab to", tr, tg, tb, true); + dwgfx.print(0, 180, "acknowledge your achievement!", tr, tg, tb, true); + }else if (game.currentmenuname == "timetrialcomplete" || game.currentmenuname == "timetrialcomplete2" + || game.currentmenuname == "timetrialcomplete3" || game.currentmenuname == "timetrialcomplete4") { + dwgfx.bigprint( -1, 20, "Results", tr, tg, tb, true, 3); + + tempstring = game.resulttimestring(help) + " / " + game.partimestring(help); + + dwgfx.drawspritesetcol(30, 80-15, 50, 22, help); + dwgfx.print(65, 80-15, "TIME TAKEN:", 255, 255, 255); + dwgfx.print(65, 90-15, tempstring, tr, tg, tb); + if (game.timetrialresulttime <= game.timetrialpar) { + dwgfx.print(220, 85-15, "+1 Rank!", 255, 255, 255); + } + + tempstring = String(game.deathcounts); + dwgfx.drawspritesetcol(30-4, 80+20-4, 12, 22, help); + dwgfx.print(65, 80+20, "NUMBER OF DEATHS:", 255, 255, 255); + dwgfx.print(65, 90+20, tempstring, tr, tg, tb); + if (game.deathcounts == 0) { + dwgfx.print(220, 85+20, "+1 Rank!", 255, 255, 255); + } + + tempstring = String(game.trinkets) + " of " + String(game.timetrialshinytarget); + dwgfx.drawspritesetcol(30, 80+55, 22, 22, help); + dwgfx.print(65, 80+55, "SHINY TRINKETS:", 255, 255, 255); + dwgfx.print(65, 90+55, tempstring, tr, tg, tb); + if (game.trinkets >= game.timetrialshinytarget) { + dwgfx.print(220, 85+55, "+1 Rank!", 255, 255, 255); + } + + if (game.currentmenuname == "timetrialcomplete2" || game.currentmenuname == "timetrialcomplete3") { + dwgfx.bigprint( 100, 175, "Rank:", tr, tg, tb, false, 2); + } + + if (game.currentmenuname == "timetrialcomplete3"){ + switch(game.timetrialrank) { + case 0: dwgfx.bigprint( 195, 165, "B", 255, 255, 255, false, 4); break; + case 1: dwgfx.bigprint( 195, 165, "A", 255, 255, 255, false, 4); break; + case 2: dwgfx.bigprint( 195, 165, "S", 255, 255, 255, false, 4); break; + case 3: dwgfx.bigprint( 195, 165, "V", 255, 255, 255, false, 4); break; + } + } + }else if (game.currentmenuname == "unlockmenutrials") { + /* + dwgfx.bigprint( -1, 30, "Unlock Time Trials", tr, tg, tb, true); + dwgfx.print( -1, 65, "You can unlock each time", tr, tg, tb, true); + dwgfx.print( -1, 75, "trial seperately.", tr, tg, tb, true); + */ + }else if (game.currentmenuname == "timetrials") { + /* + if (game.currentmenuoption == 0) { + if(game.unlock[9]){ + dwgfx.bigprint( -1, 30, "Space Station 1", tr, tg, tb, true); + if (game.besttimes[0] == -1) { + dwgfx.print( -1, 75, "Not yet attempted", tr, tg, tb, true); + }else { + dwgfx.print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.print( 110, 65, game.timetstring(game.besttimes[0], help), tr, tg, tb); + dwgfx.print( 110, 75, String(game.besttrinkets[0])+"/2", tr, tg, tb); + dwgfx.print( 110, 85, String(game.bestlives[0]), tr, tg, tb); + + + dwgfx.print( 170, 65, "PAR TIME 1:15", tr, tg, tb); + dwgfx.print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[0]) { + case 0: dwgfx.bigprint( 275, 82, "B", 225, 225, 225); break; + case 1: dwgfx.bigprint( 275, 82, "A", 225, 225, 225); break; + case 2: dwgfx.bigprint( 275, 82, "S", 225, 225, 225); break; + case 3: dwgfx.bigprint( 275, 82, "V", 225, 225, 225); break; + } + } + + }else { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.print( -1, 75, "Rescue Violet", tr, tg, tb, true); + dwgfx.print( -1, 85, "Find three trinkets", tr, tg, tb, true); + } + }else if (game.currentmenuoption == 1) { + if(game.unlock[10]){ + dwgfx.bigprint( -1, 30, "The Laboratory", tr, tg, tb, true); + if (game.besttimes[1] == -1) { + dwgfx.print( -1, 75, "Not yet attempted", tr, tg, tb, true); + }else { + dwgfx.print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.print( 110, 65, game.timetstring(game.besttimes[1], help), tr, tg, tb); + dwgfx.print( 110, 75, String(game.besttrinkets[1])+"/4", tr, tg, tb); + dwgfx.print( 110, 85, String(game.bestlives[1]), tr, tg, tb); + + + dwgfx.print( 170, 65, "PAR TIME 2:45", tr, tg, tb); + dwgfx.print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[1]) { + case 0: dwgfx.bigprint( 275, 82, "B", 225, 225, 225); break; + case 1: dwgfx.bigprint( 275, 82, "A", 225, 225, 225); break; + case 2: dwgfx.bigprint( 275, 82, "S", 225, 225, 225); break; + case 3: dwgfx.bigprint( 275, 82, "V", 225, 225, 225); break; + } + } + + }else { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.print( -1, 75, "Rescue Victoria", tr, tg, tb, true); + dwgfx.print( -1, 85, "Find six trinkets", tr, tg, tb, true); + } + }else if (game.currentmenuoption == 2) { + if(game.unlock[11]){ + dwgfx.bigprint( -1, 30, "The Tower", tr, tg, tb, true); + if (game.besttimes[2] == -1) { + dwgfx.print( -1, 75, "Not yet attempted", tr, tg, tb, true); + }else { + dwgfx.print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.print( 110, 65, game.timetstring(game.besttimes[2], help), tr, tg, tb); + dwgfx.print( 110, 75, String(game.besttrinkets[2])+"/2", tr, tg, tb); + dwgfx.print( 110, 85, String(game.bestlives[2]), tr, tg, tb); + + + dwgfx.print( 170, 65, "PAR TIME 1:45", tr, tg, tb); + dwgfx.print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[2]) { + case 0: dwgfx.bigprint( 275, 82, "B", 225, 225, 225); break; + case 1: dwgfx.bigprint( 275, 82, "A", 225, 225, 225); break; + case 2: dwgfx.bigprint( 275, 82, "S", 225, 225, 225); break; + case 3: dwgfx.bigprint( 275, 82, "V", 225, 225, 225); break; + } + } + + }else { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.print( -1, 75, "Rescue Vermilion", tr, tg, tb, true); + dwgfx.print( -1, 85, "Find nine trinkets", tr, tg, tb, true); + } + }else if (game.currentmenuoption == 3) { + if(game.unlock[12]){ + dwgfx.bigprint( -1, 30, "Space Station 2", tr, tg, tb, true); + if (game.besttimes[3] == -1) { + dwgfx.print( -1, 75, "Not yet attempted", tr, tg, tb, true); + }else { + dwgfx.print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.print( 110, 65, game.timetstring(game.besttimes[3], help), tr, tg, tb); + dwgfx.print( 110, 75, String(game.besttrinkets[3])+"/5", tr, tg, tb); + dwgfx.print( 110, 85, String(game.bestlives[3]), tr, tg, tb); + + + dwgfx.print( 170, 65, "PAR TIME 3:20", tr, tg, tb); + dwgfx.print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[3]) { + case 0: dwgfx.bigprint( 275, 82, "B", 225, 225, 225); break; + case 1: dwgfx.bigprint( 275, 82, "A", 225, 225, 225); break; + case 2: dwgfx.bigprint( 275, 82, "S", 225, 225, 225); break; + case 3: dwgfx.bigprint( 275, 82, "V", 225, 225, 225); break; + } + } + + }else { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.print( -1, 75, "Rescue Vitellary", tr, tg, tb, true); + dwgfx.print( -1, 85, "Find twelve trinkets", tr, tg, tb, true); + } + }else if (game.currentmenuoption == 4) { + if(game.unlock[13]){ + dwgfx.bigprint( -1, 30, "The Warp Zone", tr, tg, tb, true); + if (game.besttimes[4] == -1) { + dwgfx.print( -1, 75, "Not yet attempted", tr, tg, tb, true); + }else { + dwgfx.print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.print( 110, 65, game.timetstring(game.besttimes[4], help), tr, tg, tb); + dwgfx.print( 110, 75, String(game.besttrinkets[4])+"/1", tr, tg, tb); + dwgfx.print( 110, 85, String(game.bestlives[4]), tr, tg, tb); + + + dwgfx.print( 170, 65, "PAR TIME 2:00", tr, tg, tb); + dwgfx.print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[4]) { + case 0: dwgfx.bigprint( 275, 82, "B", 225, 225, 225); break; + case 1: dwgfx.bigprint( 275, 82, "A", 225, 225, 225); break; + case 2: dwgfx.bigprint( 275, 82, "S", 225, 225, 225); break; + case 3: dwgfx.bigprint( 275, 82, "V", 225, 225, 225); break; + } + } + + }else { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.print( -1, 75, "Rescue Verdigris", tr, tg, tb, true); + dwgfx.print( -1, 85, "Find fifteen trinkets", tr, tg, tb, true); + } + }else if (game.currentmenuoption == 5) { + if(game.unlock[14]){ + dwgfx.bigprint( -1, 30, "The Final Level", tr, tg, tb, true); + if (game.besttimes[5] == -1) { + dwgfx.print( -1, 75, "Not yet attempted", tr, tg, tb, true); + }else { + dwgfx.print( 16, 65, "BEST TIME ", tr, tg, tb); + dwgfx.print( 16, 75, "BEST SHINY ", tr, tg, tb); + dwgfx.print( 16, 85, "BEST LIVES ", tr, tg, tb); + dwgfx.print( 110, 65, game.timetstring(game.besttimes[5], help), tr, tg, tb); + dwgfx.print( 110, 75, String(game.besttrinkets[5])+"/1", tr, tg, tb); + dwgfx.print( 110, 85, String(game.bestlives[5]), tr, tg, tb); + + + dwgfx.print( 170, 65, "PAR TIME 2:15", tr, tg, tb); + dwgfx.print( 170, 85, "Best Rank", tr, tg, tb); + switch(game.bestrank[5]) { + case 0: dwgfx.bigprint( 275, 82, "B", 225, 225, 225); break; + case 1: dwgfx.bigprint( 275, 82, "A", 225, 225, 225); break; + case 2: dwgfx.bigprint( 275, 82, "S", 225, 225, 225); break; + case 3: dwgfx.bigprint( 275, 82, "V", 225, 225, 225); break; + } + } + + }else { + dwgfx.bigprint( -1, 30, "???", tr, tg, tb, true); + dwgfx.print( -1, 60, "TO UNLOCK:", tr, tg, tb, true); + dwgfx.print( -1, 75, "Complete the game", tr, tg, tb, true); + dwgfx.print( -1, 85, "Find eighteen trinkets", tr, tg, tb, true); + } + } + */ + }else if (game.currentmenuname == "gamecompletecontinue") { + dwgfx.bigprint( -1, 25, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.print( -1, 45, "Your save files have been updated.", tr, tg, tb, true); + + dwgfx.print( -1, 110, "If you want to keep exploring", tr, tg, tb, true); + dwgfx.print( -1, 120, "the game, select CONTINUE", tr, tg, tb, true); + dwgfx.print( -1, 130, "from the play menu.", tr, tg, tb, true); + }else if (game.currentmenuname == "unlockmenu") { + /* + dwgfx.bigprint( -1, 25, "Unlock Play Modes", tr, tg, tb, true, 2); + + dwgfx.print( -1, 55, "From here, you may unlock parts", tr, tg, tb, true); + dwgfx.print( -1, 65, "of the game that are normally", tr, tg, tb, true); + dwgfx.print( -1, 75, "unlocked as you play.", tr, tg, tb, true); + */ + }else if (game.currentmenuname == "unlocktimetrial") { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.print( -1, 125, "Your have unlocked", tr, tg, tb, true); + dwgfx.print( -1, 135, "a new Time Trial.", tr, tg, tb, true); + }else if (game.currentmenuname == "unlocktimetrials") { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.print( -1, 125, "Your have unlocked some", tr, tg, tb, true); + dwgfx.print( -1, 135, "new Time Trials.", tr, tg, tb, true); + }else if (game.currentmenuname == "unlocknodeathmode") { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.print( -1, 125, "Your have unlocked", tr, tg, tb, true); + dwgfx.print( -1, 135, "No Death Mode.", tr, tg, tb, true); + }else if (game.currentmenuname == "unlockflipmode") { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.print( -1, 125, "Your have unlocked", tr, tg, tb, true); + dwgfx.print( -1, 135, "Flip Mode.", tr, tg, tb, true); + }else if (game.currentmenuname == "unlockintermission") { + dwgfx.bigprint( -1, 45, "Congratulations!", tr, tg, tb, true, 2); + + dwgfx.print( -1, 125, "Your have unlocked", tr, tg, tb, true); + dwgfx.print( -1, 135, "the intermission levels.", tr, tg, tb, true); + } + + /* + switch(game.mainmenu) { + case 0: + dwgfx.print(5, 115, "[ NEW GAME ]", tr, tg, tb, true); + break; + case 1: + if (game.telesummary == "") { + dwgfx.print(5, 115, "[ no teleporter save ]", tr/3, tg/3, tb/3, true); + }else { + dwgfx.print(5, 115, "[ RESTORE FROM LAST TELEPORTER ]", tr, tg, tb, true); + dwgfx.print(5, 125, game.telesummary, tr, tg, tb, true); + } + break; + case 2: + if (game.quicksummary == "") { + dwgfx.print(5, 115, "[ no quicksave ]", tr/3, tg/3, tb/3, true); + }else { + dwgfx.print(5, 115, "[ RESTORE FROM LAST QUICKSAVE ]", tr, tg, tb, true); + dwgfx.print(5, 125, game.quicksummary, tr, tg, tb, true); + } + break; + } + */ + + tr = tr * .8; + tg = tg * .8; + tb = tb * .8; + if (tr < 0) tr = 0; if(tr>255) tr=255; + if (tg < 0) tg = 0; if(tg>255) tg=255; + if (tb < 0) tb = 0; if(tb>255) tb=255; + if (game.currentmenuname == "timetrials" || game.currentmenuname == "unlockmenutrials") { + dwgfx.drawmenu(game, tr, tg, tb, help, 15); + }else if (game.currentmenuname == "unlockmenu") { + dwgfx.drawmenu(game, tr, tg, tb, help, 15); + }else if (game.currentmenuname == "playmodes") { + dwgfx.drawmenu(game, tr, tg, tb, help, 20); + }else if (game.currentmenuname == "mainmenu") { + dwgfx.drawmenu(game, tr, tg, tb, help, 15); + }else if (game.currentmenuname == "playerworlds"){ + dwgfx.drawmenu(game, tr, tg, tb, help, 15); + }else if (game.currentmenuname == "levellist"){ + //dwgfx.drawlevelmenu(game, tr, tg, tb, 5); + dwgfx.drawmenu(game, tr, tg, tb, help, 5); + }else if (game.currentmenuname == "fullscreenmenu"){ + dwgfx.drawmenu(game, tr, tg, tb, help, 15); + }else{ + dwgfx.drawmenu(game, tr, tg, tb, help); + } + //dwgfx.print(5, 228, "Left/Right to Choose, V to Select", tr, tg, tb, true); + } + + if (game.test) { + dwgfx.print(5, 5, game.teststring, 196, 196, 255, false); + } + + dwgfx.drawfade(); + + if (game.showloadingnotice && dwgfx.fademode == 1) { + dwgfx.print(-1, 120, "LOADING", 196, 196, 196, true); + } + + if (game.flashlight > 0 && !game.noflashingmode) { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) { + game.screenshake--; + dwgfx.screenshake(); + }else{ + dwgfx.render(); + } + dwgfx.backbuffer.unlock(); +} + +public function gamecompleterender(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, obj:entityclass, help:helpclass):void { + dwgfx.drawbutton(game, help); + + dwgfx.backbuffer.lock(); + dwgfx.backbuffer.fillRect(dwgfx.backbuffer.rect, 0x000000); + + if(!game.colourblindmode) dwgfx.drawtowerbackgroundsolo(map); + //dwgfx.drawtowermap(map); + + for (i = 0; i < 6; i++) { + //dwgfx.drawsprite((160-96)+ i * 32, 10, 23, 96+(i*10)+(Math.random()*16), 196-(help.glow)-(Math.random()*16), 255 - (help.glow*2)); + } + + tr = map.r - (help.glow / 4) - Math.random() * 4; + tg = map.g - (help.glow / 4) - Math.random() * 4; + tb = map.b - (help.glow / 4) - Math.random() * 4; + if (tr < 0) tr = 0; if(tr>255) tr=255; + if (tg < 0) tg = 0; if(tg>255) tg=255; + if (tb < 0) tb = 0; if(tb>255) tb=255; + + + //rendering starts... here! + + if (dwgfx.onscreen(220 + game.creditposition)) { + temp = 220 + game.creditposition; + dwgfx.drawsprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); + dwgfx.drawsprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); + } + + if (dwgfx.onscreen(290 + game.creditposition)) dwgfx.bigprint( -1, 290 + game.creditposition, "Starring", tr, tg, tb, true, 2); + + if (dwgfx.onscreen(320 + game.creditposition)) { + dwgfx.drawcrewman(70, 320 + game.creditposition, 0, true, help); + dwgfx.print(100, 330 + game.creditposition, "Captain Viridian", tr, tg, tb); + } + if (dwgfx.onscreen(350 + game.creditposition)) { + dwgfx.drawcrewman(70, 350 + game.creditposition, 1, true, help); + dwgfx.print(100, 360 + game.creditposition, "Doctor Violet", tr, tg, tb); + } + if (dwgfx.onscreen(380 + game.creditposition)) { + dwgfx.drawcrewman(70, 380 + game.creditposition, 2, true, help); + dwgfx.print(100, 390 + game.creditposition, "Professor Vitellary", tr, tg, tb); + } + if (dwgfx.onscreen(410 + game.creditposition)) { + dwgfx.drawcrewman(70, 410 + game.creditposition, 3, true, help); + dwgfx.print(100, 420 + game.creditposition, "Officer Vermilion", tr, tg, tb); + } + if (dwgfx.onscreen(440 + game.creditposition)) { + dwgfx.drawcrewman(70, 440 + game.creditposition, 4, true, help); + dwgfx.print(100, 450 + game.creditposition, "Chief Verdigris", tr, tg, tb); + } + if (dwgfx.onscreen(470 + game.creditposition)) { + dwgfx.drawcrewman(70, 470 + game.creditposition, 5, true, help); + dwgfx.print(100, 480 + game.creditposition, "Doctor Victoria", tr, tg, tb); + } + + if (dwgfx.onscreen(540 + game.creditposition)) dwgfx.bigprint( -1, 540 + game.creditposition, "Credits", tr, tg, tb, true, 3); + + if (dwgfx.onscreen(600 + game.creditposition)) { + dwgfx.print(40, 600 + game.creditposition, "Created by", tr, tg, tb); + dwgfx.bigprint(60, 610 + game.creditposition, "Terry Cavanagh", tr, tg, tb); + } + + if (dwgfx.onscreen(640 + game.creditposition)) { + dwgfx.print(40, 640 + game.creditposition, "With Music by", tr, tg, tb); + dwgfx.bigprint(60, 650 + game.creditposition, "Magnus P~lsson", tr, tg, tb); + } + + if (dwgfx.onscreen(680 + game.creditposition)) { + dwgfx.print(40, 680 + game.creditposition, "Rooms Named by", tr, tg, tb); + dwgfx.bigprint(60, 690 + game.creditposition, "Bennett Foddy", tr, tg, tb); + } + + + if (dwgfx.onscreen(720 + game.creditposition)) { + dwgfx.print(40, 720 + game.creditposition, "Beta Testing by", tr, tg, tb); + dwgfx.bigprint(60, 730 + game.creditposition, "Sam Kaplan", tr, tg, tb); + dwgfx.bigprint(60, 750 + game.creditposition, "Pauli Kohberger", tr, tg, tb); + } + + if (dwgfx.onscreen(780 + game.creditposition)) { + dwgfx.print(40, 780 + game.creditposition, "Ending Picture by", tr, tg, tb); + dwgfx.bigprint(60, 790 + game.creditposition, "Pauli Kohberger", tr, tg, tb); + } + + + if (dwgfx.onscreen(870 + game.creditposition)) dwgfx.bigprint( -1, 870 + game.creditposition, "Patrons", tr, tg, tb, true, 3); + + if (dwgfx.onscreen(910 + game.creditposition)) dwgfx.print(-1, 910 + game.creditposition,"Anders Ekermo", tr, tg, tb, true); +if (dwgfx.onscreen(920 + game.creditposition)) dwgfx.print(-1, 920 + game.creditposition,"Andreas K|mper", tr, tg, tb, true); +if (dwgfx.onscreen(930 + game.creditposition)) dwgfx.print(-1, 930 + game.creditposition,"Anthony Burch", tr, tg, tb, true); +if (dwgfx.onscreen(940 + game.creditposition)) dwgfx.print(-1, 940 + game.creditposition,"Bennett Foddy", tr, tg, tb, true); +if (dwgfx.onscreen(950 + game.creditposition)) dwgfx.print(-1, 950 + game.creditposition,"Brendan O'Sullivan", tr, tg, tb, true); +if (dwgfx.onscreen(960 + game.creditposition)) dwgfx.print(-1, 960 + game.creditposition,"Christopher Armstrong", tr, tg, tb, true); +if (dwgfx.onscreen(970 + game.creditposition)) dwgfx.print(-1, 970 + game.creditposition,"Daniel Benmergui", tr, tg, tb, true); +if (dwgfx.onscreen(980 + game.creditposition)) dwgfx.print(-1, 980 + game.creditposition,"David Pittman", tr, tg, tb, true); +if (dwgfx.onscreen(990 + game.creditposition)) dwgfx.print(-1, 990 + game.creditposition,"Ian Bogost", tr, tg, tb, true); +if (dwgfx.onscreen(1000 + game.creditposition)) dwgfx.print(-1, 1000 + game.creditposition,"Jaz McDougall", tr, tg, tb, true); +if (dwgfx.onscreen(1010 + game.creditposition)) dwgfx.print(-1, 1010 + game.creditposition,"John Faulkenbury", tr, tg, tb, true); +if (dwgfx.onscreen(1020 + game.creditposition)) dwgfx.print(-1, 1020 + game.creditposition,"Jonathan Whiting", tr, tg, tb, true); +if (dwgfx.onscreen(1030 + game.creditposition)) dwgfx.print(-1, 1030 + game.creditposition,"Kyle Pulver", tr, tg, tb, true); +if (dwgfx.onscreen(1040 + game.creditposition)) dwgfx.print(-1, 1040 + game.creditposition,"Markus Persson", tr, tg, tb, true); +if (dwgfx.onscreen(1050 + game.creditposition)) dwgfx.print(-1, 1050 + game.creditposition,"Nathan Ostgard", tr, tg, tb, true); +if (dwgfx.onscreen(1060 + game.creditposition)) dwgfx.print(-1, 1060 + game.creditposition,"Nick Easler", tr, tg, tb, true); +if (dwgfx.onscreen(1070 + game.creditposition)) dwgfx.print(-1, 1070 + game.creditposition,"Stephen Lavelle", tr, tg, tb, true); + +if (dwgfx.onscreen(1090 + game.creditposition)) dwgfx.print( -1, 1090 + game.creditposition, "and", tr, tg, tb, true); + +if (dwgfx.onscreen(1110 + game.creditposition)) dwgfx.print(-1, 1110 + game.creditposition,"Adam Wendt", tr, tg, tb, true); +if (dwgfx.onscreen(1110 + game.creditposition)) dwgfx.print(-1, 1120 + game.creditposition,"Andreas J{rgensen", tr, tg, tb, true); +if (dwgfx.onscreen(1120 + game.creditposition)) dwgfx.print(-1, 1130 + game.creditposition,"}ngel Louzao Penalva", tr, tg, tb, true); +if (dwgfx.onscreen(1130 + game.creditposition)) dwgfx.print(-1, 1140 + game.creditposition,"Ashley Burton", tr, tg, tb, true); +if (dwgfx.onscreen(1140 + game.creditposition)) dwgfx.print(-1, 1150 + game.creditposition,"Aubrey Hesselgren", tr, tg, tb, true); +if (dwgfx.onscreen(1150 + game.creditposition)) dwgfx.print(-1, 1160 + game.creditposition,"Bradley Rose", tr, tg, tb, true); +if (dwgfx.onscreen(1160 + game.creditposition)) dwgfx.print(-1, 1170 + game.creditposition,"Brendan Urquhart", tr, tg, tb, true); +if (dwgfx.onscreen(1170 + game.creditposition)) dwgfx.print(-1, 1180 + game.creditposition,"Chris Ayotte", tr, tg, tb, true); +if (dwgfx.onscreen(1180 + game.creditposition)) dwgfx.print(-1, 1190 + game.creditposition,"Christopher Zamanillo", tr, tg, tb, true); +if (dwgfx.onscreen(1190 + game.creditposition)) dwgfx.print(-1, 1200 + game.creditposition,"Daniel Schuller", tr, tg, tb, true); +if (dwgfx.onscreen(1200 + game.creditposition)) dwgfx.print(-1, 1210 + game.creditposition,"Hybrid Mind Studios", tr, tg, tb, true); +if (dwgfx.onscreen(1210 + game.creditposition)) dwgfx.print(-1, 1220 + game.creditposition,"Emilie McGinley", tr, tg, tb, true); +if (dwgfx.onscreen(1220 + game.creditposition)) dwgfx.print(-1, 1230 + game.creditposition,"Francisco Solares", tr, tg, tb, true); +if (dwgfx.onscreen(1230 + game.creditposition)) dwgfx.print(-1, 1240 + game.creditposition,"Hal Helms", tr, tg, tb, true); +if (dwgfx.onscreen(1240 + game.creditposition)) dwgfx.print(-1, 1250 + game.creditposition,"Hayden Scott-Baron", tr, tg, tb, true); +if (dwgfx.onscreen(1250 + game.creditposition)) dwgfx.print(-1, 1260 + game.creditposition,"Hermit Games", tr, tg, tb, true); +if (dwgfx.onscreen(1260 + game.creditposition)) dwgfx.print(-1, 1270 + game.creditposition,"Ido Yehieli", tr, tg, tb, true); +if (dwgfx.onscreen(1270 + game.creditposition)) dwgfx.print(-1, 1280 + game.creditposition,"Jade Vault Games", tr, tg, tb, true); +if (dwgfx.onscreen(1280 + game.creditposition)) dwgfx.print(-1, 1290 + game.creditposition,"James Andrews", tr, tg, tb, true); +if (dwgfx.onscreen(1290 + game.creditposition)) dwgfx.print(-1, 1300 + game.creditposition,"James Riley", tr, tg, tb, true); +if (dwgfx.onscreen(1300 + game.creditposition)) dwgfx.print(-1, 1310 + game.creditposition,"James Hsieh", tr, tg, tb, true); +if (dwgfx.onscreen(1310 + game.creditposition)) dwgfx.print(-1, 1320 + game.creditposition,"Jasper Byrne", tr, tg, tb, true); +if (dwgfx.onscreen(1320 + game.creditposition)) dwgfx.print(-1, 1330 + game.creditposition,"Jedediah Baker", tr, tg, tb, true); +if (dwgfx.onscreen(1330 + game.creditposition)) dwgfx.print(-1, 1340 + game.creditposition,"Jens Bergensten", tr, tg, tb, true); +if (dwgfx.onscreen(1340 + game.creditposition)) dwgfx.print(-1, 1350 + game.creditposition,"Jeremy J. Penner", tr, tg, tb, true); +if (dwgfx.onscreen(1350 + game.creditposition)) dwgfx.print(-1, 1360 + game.creditposition,"Jeremy Peterson", tr, tg, tb, true); +if (dwgfx.onscreen(1360 + game.creditposition)) dwgfx.print(-1, 1370 + game.creditposition,"Jim McGinley", tr, tg, tb, true); +if (dwgfx.onscreen(1370 + game.creditposition)) dwgfx.print(-1, 1380 + game.creditposition,"Jonathan Cartwright", tr, tg, tb, true); +if (dwgfx.onscreen(1380 + game.creditposition)) dwgfx.print(-1, 1390 + game.creditposition,"John Nesky", tr, tg, tb, true); +if (dwgfx.onscreen(1390 + game.creditposition)) dwgfx.print(-1, 1400 + game.creditposition,"Jos Yule", tr, tg, tb, true); +if (dwgfx.onscreen(1400 + game.creditposition)) dwgfx.print(-1, 1410 + game.creditposition,"Jose Flores", tr, tg, tb, true); +if (dwgfx.onscreen(1410 + game.creditposition)) dwgfx.print(-1, 1420 + game.creditposition,"Josh Bizeau", tr, tg, tb, true); +if (dwgfx.onscreen(1420 + game.creditposition)) dwgfx.print(-1, 1430 + game.creditposition,"Joshua Buergel", tr, tg, tb, true); +if (dwgfx.onscreen(1430 + game.creditposition)) dwgfx.print(-1, 1440 + game.creditposition,"Joshua Hochner", tr, tg, tb, true); +if (dwgfx.onscreen(1440 + game.creditposition)) dwgfx.print(-1, 1450 + game.creditposition,"Kurt Ostfeld", tr, tg, tb, true); +if (dwgfx.onscreen(1450 + game.creditposition)) dwgfx.print(-1, 1460 + game.creditposition, "Magnus P~lsson", tr, tg, tb, true); +if (dwgfx.onscreen(1460 + game.creditposition)) dwgfx.print(-1, 1470 + game.creditposition,"Mark Neschadimenko", tr, tg, tb, true); +if (dwgfx.onscreen(1470 + game.creditposition)) dwgfx.print(-1, 1480 + game.creditposition,"Matt Antonellis", tr, tg, tb, true); +if (dwgfx.onscreen(1480 + game.creditposition)) dwgfx.print(-1, 1490 + game.creditposition,"Matthew Reppert", tr, tg, tb, true); +if (dwgfx.onscreen(1490 + game.creditposition)) dwgfx.print(-1, 1500 + game.creditposition,"Michael Falkensteiner", tr, tg, tb, true); +if (dwgfx.onscreen(1500 + game.creditposition)) dwgfx.print(-1, 1510 + game.creditposition,"Michael Vendittelli", tr, tg, tb, true); +if (dwgfx.onscreen(1510 + game.creditposition)) dwgfx.print(-1, 1520 + game.creditposition,"Mike Kasprzak", tr, tg, tb, true); +if (dwgfx.onscreen(1520 + game.creditposition)) dwgfx.print(-1, 1530 + game.creditposition,"Mitchel Stein", tr, tg, tb, true); +if (dwgfx.onscreen(1530 + game.creditposition)) dwgfx.print(-1, 1540 + game.creditposition,"Sean Murray", tr, tg, tb, true); +if (dwgfx.onscreen(1540 + game.creditposition)) dwgfx.print(-1, 1550 + game.creditposition,"Simon Michael", tr, tg, tb, true); +if (dwgfx.onscreen(1550 + game.creditposition)) dwgfx.print(-1, 1560 + game.creditposition,"Simon Schmid", tr, tg, tb, true); +if (dwgfx.onscreen(1560 + game.creditposition)) dwgfx.print(-1, 1570 + game.creditposition,"Stephen Maxwell", tr, tg, tb, true); +if (dwgfx.onscreen(1570 + game.creditposition)) dwgfx.print(-1, 1580 + game.creditposition,"Swing Swing Submarine", tr, tg, tb, true); +if (dwgfx.onscreen(1580 + game.creditposition)) dwgfx.print(-1, 1590 + game.creditposition,"Tam Toucan", tr, tg, tb, true); +if (dwgfx.onscreen(1590 + game.creditposition)) dwgfx.print(-1, 1600 + game.creditposition,"Terry Dooher", tr, tg, tb, true); +if (dwgfx.onscreen(1600 + game.creditposition)) dwgfx.print(-1, 1610 + game.creditposition,"Tim W.", tr, tg, tb, true); +if (dwgfx.onscreen(1610 + game.creditposition)) dwgfx.print( -1, 1620 + game.creditposition, "Timothy Bragan", tr, tg, tb, true); + +if (dwgfx.onscreen(1760 + game.creditposition)) dwgfx.bigprint( -1, 1760 + game.creditposition, "Thanks for playing!", tr, tg, tb, true, 2); + + if (game.test) { + dwgfx.print(5, 5, game.teststring, 196, 196, 255, false); + } + + dwgfx.drawfade(); + + if (game.flashlight > 0 && !game.noflashingmode) { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) { + game.screenshake--; + dwgfx.screenshake(); + }else{ + dwgfx.render(); + } + dwgfx.backbuffer.unlock(); +} + +public function gamecompleterender2(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, obj:entityclass, help:helpclass):void { + dwgfx.drawbutton(game, help); + + dwgfx.backbuffer.lock(); + dwgfx.backbuffer.fillRect(dwgfx.backbuffer.rect, 0x000000); + + dwgfx.drawimage(10, 0, 0); + + for (j = 0; j < 30; j++) { + for (i = 0; i < 40; i++) { + if (j == game.creditposy) { + if (i > game.creditposx) { + dwgfx.drawfillrect(i * 8, j * 8, 8, 8, 0, 0, 0); + } + } + + if (j > game.creditposy) { + dwgfx.drawfillrect(i * 8, j * 8, 8, 8, 0, 0, 0); + } + } + } + + if (game.test) { + dwgfx.print(5, 5, game.teststring, 196, 196, 255, false); + } + + dwgfx.drawfade(); + + if (game.flashlight > 0 && !game.noflashingmode) { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) { + game.screenshake--; + dwgfx.screenshake(); + }else{ + dwgfx.render(); + } + dwgfx.backbuffer.unlock(); +} + +public function gamerender(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass):void { + + dwgfx.drawbutton(game, help); + + dwgfx.backbuffer.lock(); + + if(!game.blackout){ + if(!game.colourblindmode) dwgfx.drawbackground(map.background, map); + if (map.final_colormode) { + dwgfx.drawfinalmap(map); + }else{ + dwgfx.drawmap(map); + } + + if(!game.completestop){ + for (i = 0; i < obj.nentity; i++) { + //Is this entity on the ground? (needed for jumping) + if (obj.entities[i].active) { + if (obj.entities[i].rule == 0 || obj.entities[i].rule >= 6 || obj.entities[i].type == 55) { + if (obj.entitycollidefloor(map, i)) {obj.entities[i].onground = 2; + }else { obj.entities[i].onground--;} + + if (obj.entitycollideroof(map, i)) {obj.entities[i].onroof = 2; + }else { obj.entities[i].onroof--; } + } + } + + //Animate the entities + obj.animateentities(i, game, help); + } + } + + dwgfx.drawentities(map, obj, help); + } + + /*for(i=0; i 100 && !game.advancetext && game.hascontrol && !script.running && !game.intimetrial) { + i = obj.getplayer(); + if(dwgfx.flipmode){ + dwgfx.bprint(5, 20, "- Press ENTER to Teleport -", game.readytotele - 20 - (help.glow / 2), game.readytotele - 20 - (help.glow / 2), game.readytotele, true); + }else { + dwgfx.bprint(5, 210, "- Press ENTER to Teleport -", game.readytotele - 20 - (help.glow / 2), game.readytotele - 20 - (help.glow / 2), game.readytotele, true); + } + } + } + + if (game.swnmode) { + if (game.swngame == 0) { + tempstring = help.timestring(game.swntimer); + dwgfx.bigprint( -1, 20, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + }else if (game.swngame == 1) { + if (game.swnmessage == 0) { + tempstring = help.timestring(game.swntimer); + dwgfx.print( 10, 10, "Current Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigprint( 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + tempstring = help.timestring(game.swnrecord); + dwgfx.print( 240, 10, "Best Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigrprint( 300, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + + switch(game.swnbestrank) { + case 0: dwgfx.print( -1, 204, "Next Trophy at 5 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); break; + case 1: dwgfx.print( -1, 204, "Next Trophy at 10 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); break; + case 2: dwgfx.print( -1, 204, "Next Trophy at 15 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); break; + case 3: dwgfx.print( -1, 204, "Next Trophy at 20 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); break; + case 4: dwgfx.print( -1, 204, "Next Trophy at 30 seconds", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); break; + case 5: dwgfx.print( -1, 204, "Next Trophy at 1 minute", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); break; + case 6: dwgfx.print( -1, 204, "All Trophies collected!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); break; + } + }else if (game.swnmessage == 1) { + tempstring = help.timestring(game.swntimer); + dwgfx.print( 10, 10, "Current Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigprint( 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + tempstring = help.timestring(game.swnrecord); + if (int(game.deathseq / 5) % 2 == 1) { + dwgfx.print( 240, 10, "Best Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigrprint( 300, 24, tempstring, 128 - (help.glow), 220 - (help.glow), 128 - (help.glow / 2), false, 2); + + dwgfx.bigprint( -1, 200, "New Record!", 128 - (help.glow), 220 - (help.glow), 128 - (help.glow / 2), true, 2); + } + }else if (game.swnmessage >= 2) { + game.swnmessage--; + if (game.swnmessage == 2) game.swnmessage = 0; + tempstring = help.timestring(game.swntimer); + dwgfx.print( 10, 10, "Current Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigprint( 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + tempstring = help.timestring(game.swnrecord); + dwgfx.print( 240, 10, "Best Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false); + dwgfx.bigrprint( 300, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), false, 2); + + if (int(game.swnmessage / 5) % 2 == 1) { + dwgfx.bigprint( -1, 200, "New Trophy!", 220 - (help.glow), 128 - (help.glow), 128 - (help.glow / 2), true, 2); + } + } + + if(!game.mobilemenu){ + dwgfx.print( 20, 228, "[Press ENTER to stop]", 160 - (help.glow / 2), 160 - (help.glow / 2), 160 - (help.glow / 2), true); + } + }else if(game.swngame==2){ + if (int(game.swndelay / 15) % 2 == 1 || game.swndelay >= 120) { + if (dwgfx.flipmode) { + dwgfx.bigprint( -1, 30, "Survive for", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + dwgfx.bigprint( -1, 10, "60 seconds!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + }else { + dwgfx.bigprint( -1, 10, "Survive for", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + dwgfx.bigprint( -1, 30, "60 seconds!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + } + } + }else if(game.swngame==7){ + if (game.swndelay >= 60) { + dwgfx.bigprint( -1, 20, "SUPER GRAVITRON", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + + tempstring = help.timestring(game.swnrecord); + dwgfx.print( 240, 190, "Best Time", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + dwgfx.bigrprint( 300, 205, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + }else if (int(game.swndelay / 10) % 2 == 1) { + dwgfx.bigprint( -1, 20, "SUPER GRAVITRON", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 2); + dwgfx.bigprint( -1, 200, "GO!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 3); + } + } + } + + if (game.intimetrial && dwgfx.fademode==0) { + //Draw countdown! + if (game.timetrialcountdown > 0) { + if (game.timetrialcountdown < 30) { + game.resetgameclock(); + if (int(game.timetrialcountdown / 4) % 2 == 0) dwgfx.bigprint( -1, 100, "Go!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + }else if (game.timetrialcountdown < 60) { + dwgfx.bigprint( -1, 100, "1", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + }else if (game.timetrialcountdown < 90) { + dwgfx.bigprint( -1, 100, "2", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + }else if (game.timetrialcountdown < 120) { + dwgfx.bigprint( -1, 100, "3", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + }else { + //Draw OSD stuff + dwgfx.bprint(6, 18, "TIME :", 255,255,255); + dwgfx.bprint(6, 30, "DEATH:", 255, 255, 255); + dwgfx.bprint(6, 42, "SHINY:", 255,255,255); + + if(game.timetrialparlost){ + dwgfx.bprint(56, 18, game.timestring(help), 196, 80, 80); + }else { + dwgfx.bprint(56, 18, game.timestring(help), 196, 196, 196); + } + if(game.deathcounts>0){ + dwgfx.bprint(56, 30, String(game.deathcounts), 196, 80, 80); + }else { + dwgfx.bprint(56, 30, String(game.deathcounts), 196, 196, 196); + } + if(game.trinkets -1) { + //dwgfx.backbuffer.fillRect(new Rectangle(0, 0, 320, 18), 0x000000); + game.activity_lastprompt = obj.blocks[game.activeactivity].prompt; + game.activity_r = obj.blocks[game.activeactivity].r; + game.activity_g = obj.blocks[game.activeactivity].g; + game.activity_b = obj.blocks[game.activeactivity].b; + if(game.act_fade<5) game.act_fade=5; + if(game.act_fade<10){ + game.act_fade++; + } + dwgfx.drawtextbox(16, 4, 36, 3, game.activity_r*(game.act_fade/10), game.activity_g*(game.act_fade/10), game.activity_b*(game.act_fade/10)); + dwgfx.print(5, 12, game.activity_lastprompt, game.activity_r*(game.act_fade/10), game.activity_g*(game.act_fade/10), game.activity_b*(game.act_fade/10), true); + }else { + if(game.act_fade>5){ + dwgfx.drawtextbox(16, 4, 36, 3, game.activity_r*(game.act_fade/10), game.activity_g*(game.act_fade/10), game.activity_b*(game.act_fade/10)); + dwgfx.print(5, 12, game.activity_lastprompt, game.activity_r*(game.act_fade/10), game.activity_g*(game.act_fade/10), game.activity_b*(game.act_fade/10), true); + game.act_fade--; + } + } + + if (obj.trophytext > 0) { + dwgfx.drawtrophytext(obj, help); + obj.trophytext--; + } + + /* + * For creating graphical buttons! + dwgfx.drawmobilebutton(game, 20, 20, 8*7, dwgfx.b_size, "BACK", 65, 185, 207); + dwgfx.drawmobilebutton(game, 20, 80, 8*7, dwgfx.b_size, "BACK", 65*1.2, 185*1.2, 207*1.2); + * + * / + + //dwgfx.rprint(5, 231, String(game.coins), 255 - help.glow/2, 255 - help.glow/2, 196, true); + //dwgfx.drawhuetile(311, 230, 48, 1); + + //Level complete image + //if (game.state >= 3007) { + // dwgfx.drawimage(0, 0, 12, true); + //} + + //state changes + + /* + game.test = true; + if (game.teststring != String(game.state)) trace(game.state); + game.teststring = String(game.state); + */ + + //Detail entity info for debuging + /* + for (i = 0; i < obj.nentity; i++) { + game.tempstring = String(obj.entities[i].type) +", (" + String(obj.entities[i].xp) + "," + String(obj.entities[i].yp) + ")"; + game.tempstring += " state:" +obj.entities[i].state + ", delay:" + obj.entities[i].statedelay; + dwgfx.print(5, 5 + i * 8, game.tempstring, 255, 255, 255); + } + */ + + /* + game.test = true; + game.teststring = String(int(obj.entities[obj.getplayer()].xp)) + "," + String(int(obj.entities[obj.getplayer()].yp)); + game.teststring += " [" + String(game.roomx) + "," + String(game.roomy) + "]"; + */ + + //game.test = true; + //game.teststring = "Current room deaths: " + String(game.currentroomdeaths); + + if (game.test) { + dwgfx.print(5, 5, game.teststring, 196, 196, 255, false); + } + + if (game.flashlight > 0 && !game.noflashingmode) { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) { + game.screenshake--; + dwgfx.screenshake(); + }else{ + dwgfx.render(); + } + + dwgfx.backbuffer.unlock(); +} + +public function maprender(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass):void { + + dwgfx.drawbutton(game, help); + + dwgfx.backbuffer.lock(); + + + //dwgfx.drawgui(help); + + //draw screen alliteration + //Roomname: + temp = map.area(game.roomx, game.roomy); + if (temp < 2 && !map.custommode && dwgfx.fademode == 0) { + if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) { + dwgfx.print(5, 2, "The Ship", 196, 196, 255 - help.glow, true); + }else{ + dwgfx.print(5, 2, "Dimension VVVVVV", 196, 196, 255 - help.glow, true); + } + }else { + if (map.finallevel) { + map.glitchname = map.getglitchname(game.roomx, game.roomy); + dwgfx.print(5, 2, map.glitchname, 196, 196, 255 - help.glow, true); + }else{ + dwgfx.print(5, 2, map.roomname, 196, 196, 255 - help.glow, true); + } + } + + //Background color + dwgfx.drawfillrect(0, 12, 320, 240, 10, 24, 26); + + dwgfx.crewframedelay--; + if (dwgfx.crewframedelay <= 0) { + dwgfx.crewframedelay = 8; + dwgfx.crewframe = (dwgfx.crewframe + 1) % 2; + } + + //Menubar: + dwgfx.drawtextbox( -10, 212, 42, 3, 65, 185, 207); + switch(game.menupage) { + + case 0: + dwgfx.print(30 - 8, 220, "[MAP]", 196, 196, 255 - help.glow); + if (game.insecretlab) { dwgfx.print(103, 220, "GRAV", 64, 64, 64); + }else if (obj.flags[67] == 1 && !map.custommode) { dwgfx.print(103, 220, "SHIP", 64,64,64); + }else{ dwgfx.print(103, 220, "CREW", 64,64,64);} + dwgfx.print(185-4, 220, "STATS", 64,64,64); + dwgfx.print(258, 220, "SAVE", 64, 64, 64); + + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 30 - 8, 220, 56, dwgfx.b_size, "MAP", 65, 185, 207); + if (game.insecretlab) { dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "GRAV", 32, 92, 104); + }else if (obj.flags[67] == 1 && !map.custommode) { dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "SHIP", 32, 92, 104); + }else{ dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "CREW", 32, 92, 104);} + dwgfx.drawmobilebutton(game, 185-4, 220, 56, dwgfx.b_size, "STATS", 32, 92, 104); + dwgfx.drawmobilebutton(game, 258, 220, 56, dwgfx.b_size, "QUIT", 32, 92, 104); + } + + if (map.finalmode || (map.custommode && !map.customshowmm)) { + //draw the map image + dwgfx.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + dwgfx.drawimage(1, 40, 21, false); + + for (j = 0; j < 20; j++) { + for (i = 0; i < 20; i++) { + dwgfx.drawimage(2, 40 + (i * 12), 21 + (j * 9), false); + } + } + dwgfx.print(-1, 105, "NO SIGNAL", 245, 245, 245, true); + }else if(map.custommode){ + //draw the map image + dwgfx.drawcustompixeltextbox(35 + map.custommmxoff, 16 + map.custommmyoff, map.custommmxsize + 10, map.custommmysize + 10, (map.custommmxsize + 10) / 8, (map.custommmysize + 10) / 8, 65, 185, 207, 4, 0); + dwgfx.drawpartimage(12, 40 + map.custommmxoff, 21 + map.custommmyoff, map.custommmxsize, map.custommmysize); + + //Black out here + if(map.customzoom==4){ + for (j = 0; j < map.customheight; j++){ + for (i = 0; i < map.customwidth; i++){ + if(map.explored[i+(j*20)]==0){ + //Draw the fog of war on the map + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48), map.custommmyoff+21 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48), map.custommmyoff+21 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48), map.custommmyoff+21 + 9 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff + 40 + 12 + (i * 48), map.custommmyoff + 21 + 9 + (j * 36), false); + + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48) + 24, map.custommmyoff+21 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48) + 24, map.custommmyoff+21 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48) + 24, map.custommmyoff+ 21 + 9 + (j * 36), false); + dwgfx.drawimage(2, map.custommmxoff + 40 + 12 + (i * 48) + 24, map.custommmyoff + 21 + 9 + (j * 36), false); + + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48), map.custommmyoff+21 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48), map.custommmyoff+21 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48), map.custommmyoff+21 + 9 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff + 40 + 12 + (i * 48), map.custommmyoff + 21 + 9 + (j * 36) + 18, false); + + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48) + 24, map.custommmyoff+21 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48) + 24, map.custommmyoff+21 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 48) + 24, map.custommmyoff+21 + 9 + (j * 36)+18, false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 48) + 24, map.custommmyoff+21 + 9+ (j * 36)+18, false); + } + } + } + }else if(map.customzoom==2){ + for (j = 0; j < map.customheight; j++){ + for (i = 0; i < map.customwidth; i++){ + if (map.explored[i + (j * 20)] == 0) { + //Draw the fog of war on the map + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 24), map.custommmyoff+21 + (j * 18), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 24), map.custommmyoff+21 + (j * 18), false); + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 24), map.custommmyoff+21 + 9 + (j * 18), false); + dwgfx.drawimage(2, map.custommmxoff+40 + 12 + (i * 24), map.custommmyoff+21 + 9+ (j * 18), false); + } + } + } + }else{ + for (j = 0; j < map.customheight; j++){ + for (i = 0; i < map.customwidth; i++){ + if(map.explored[i+(j*20)]==0){ + //Draw the fog of war on the map + dwgfx.drawimage(2, map.custommmxoff+40 + (i * 12), map.custommmyoff+21 + (j * 9), false); + } + } + } + } + + if (map.cursorstate == 0){ + map.cursordelay++; + if (map.cursordelay > 10){ + map.cursorstate = 1; + map.cursordelay = 0; + } + }else if (map.cursorstate == 1){ + map.cursordelay++; + if (map.cursordelay > 30) map.cursorstate = 2; + }else if (map.cursorstate == 2){ + map.cursordelay++; + } + + //normal size maps + if(map.customzoom==4){ + if(map.cursorstate==1){ + if (int(map.cursordelay / 4) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 48) +map.custommmxoff, 21 + ((game.roomy - 100) * 36)+map.custommmyoff , 48 , 36 , 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 48) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 36) + 2+map.custommmyoff, 48 - 4, 36 - 4, 255,255,255); + } + }else if (map.cursorstate == 2){ + if (int(map.cursordelay / 15) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 48) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 36) + 2+map.custommmyoff, 48 - 4, 36 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + } + } + }else if(map.customzoom==2){ + if(map.cursorstate==1){ + if (int(map.cursordelay / 4) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 24)+map.custommmxoff , 21 + ((game.roomy - 100) * 18)+map.custommmyoff , 24 , 18 , 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 24) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 18) + 2+map.custommmyoff, 24 - 4, 18 - 4, 255,255,255); + } + }else if (map.cursorstate == 2){ + if (int(map.cursordelay / 15) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 24) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 18) + 2+map.custommmyoff, 24 - 4, 18 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + } + } + }else{ + if(map.cursorstate==1){ + if (int(map.cursordelay / 4) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 12)+map.custommmxoff , 21 + ((game.roomy - 100) * 9)+map.custommmyoff , 12 , 9 , 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 9) + 2+map.custommmyoff, 12 - 4, 9 - 4, 255,255,255); + } + }else if (map.cursorstate == 2){ + if (int(map.cursordelay / 15) % 2 == 0){ + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2+map.custommmxoff, 21 + ((game.roomy - 100) * 9) + 2+map.custommmyoff, 12 - 4, 9 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + } + } + } + }else { + //draw the map image + dwgfx.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + dwgfx.drawimage(1, 40, 21, false); + + //black out areas we can't see yet + for (j = 0; j < 20; j++) { + for (i = 0; i < 20; i++) { + if(map.explored[i+(j*20)]==0){ + //dwgfx.drawfillrect(10 + (i * 12), 21 + (j * 9), 12, 9, 16, 16, 16); + dwgfx.drawimage(2, 40 + (i * 12), 21 + (j * 9), false); + } + } + } + //draw the coordinates + if (game.roomx == 109) { + //tower!instead of room y, scale map.ypos + /*if (map.ypos > (0.57 * (680 * 8))) { + i = int(map.ypos - (0.57 * (680 * 8))); + i = int((i / (0.43 * (680 * 8)))*9); + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + i + 2, 12 - 4, 9 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); + }*/ + if (map.cursorstate == 0) { + map.cursordelay++; + if (map.cursordelay > 10) { map.cursorstate = 1; map.cursordelay = 0; } + }else if (map.cursorstate == 1) { + map.cursordelay++; + if (int(map.cursordelay / 4) % 2 == 0) { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) , 21 , 12, 180, 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2 , 21 + 2, 12 - 4, 180 - 4, 255,255,255); + } + if (map.cursordelay > 30) map.cursorstate = 2; + }else if (map.cursorstate == 2) { + map.cursordelay++; + if (int(map.cursordelay / 15) % 2 == 0) { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2 , 21 + 2, 12 - 4, 180 - 4,16, 245 - (help.glow), 245 - (help.glow)); + } + } + }else { + if (map.cursorstate == 0) { + map.cursordelay++; + if (map.cursordelay > 10) { map.cursorstate = 1; map.cursordelay = 0; } + }else if (map.cursorstate == 1) { + map.cursordelay++; + if (int(map.cursordelay / 4) % 2 == 0) { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) , 21 + ((game.roomy - 100) * 9) , 12 , 9 , 255,255,255); + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + ((game.roomy - 100) * 9) + 2, 12 - 4, 9 - 4, 255,255,255); + } + if (map.cursordelay > 30) map.cursorstate = 2; + }else if (map.cursorstate == 2) { + map.cursordelay++; + if (int(map.cursordelay / 15) % 2 == 0) { + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + ((game.roomy - 100) * 9) + 2, 12 - 4, 9 - 4, 16, 245 - (help.glow), 245 - (help.glow)); + } + } + } + + //draw legend details + for (i = 0; i < map.numteleporters; i++) { + if (map.showteleporters && map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)] > 0) { + temp = 1126 + map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)]; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), temp); + }else if(map.showtargets && map.explored[map.teleporters[i].x+(20*map.teleporters[i].y)]==0){ + temp = 1126 + map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)]; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), temp); + } + //dwgfx.drawtile(40+3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), 1086); //for shiny trinkets, do later + } + + if (map.showtrinkets) { + for (i = 0; i < map.numshinytrinkets; i++) { + if (obj.collect[i] == 0) { + temp = 1086; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.shinytrinkets[i].x * 12), 22 + (map.shinytrinkets[i].y * 9), temp); + } + } + } + } + break; + case 1: + if (game.insecretlab) { + dwgfx.print(30, 220, "MAP", 64,64,64); + dwgfx.print(103-8, 220, "[GRAV]", 196, 196, 255 - help.glow); + dwgfx.print(185-4, 220, "STATS", 64,64,64); + dwgfx.print(258, 220, "SAVE", 64, 64, 64); + + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 30 - 8, 220, 56, dwgfx.b_size, "MAP", 32, 92, 104); + dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "GRAV", 65, 185, 207); + dwgfx.drawmobilebutton(game, 185-4, 220, 56, dwgfx.b_size, "STATS", 32, 92, 104); + dwgfx.drawmobilebutton(game, 258, 220, 56, dwgfx.b_size, "QUIT", 32, 92, 104); + } + + if (dwgfx.flipmode) { + dwgfx.print(0, 174, "SUPER GRAVITRON HIGHSCORE", 196, 196, 255 - help.glow, true); + + tempstring = help.timestring(game.swnrecord); + dwgfx.print( 240, 124, "Best Time", 196, 196, 255 - help.glow, true); + dwgfx.bigrprint( 300, 94, tempstring, 196, 196, 255 - help.glow, true, 2); + + switch(game.swnbestrank) { + case 0: dwgfx.print( -1, 40, "Next Trophy at 5 seconds", 196, 196, 255 - help.glow, true); break; + case 1: dwgfx.print( -1, 40, "Next Trophy at 10 seconds", 196, 196, 255 - help.glow, true); break; + case 2: dwgfx.print( -1, 40, "Next Trophy at 15 seconds", 196, 196, 255 - help.glow, true); break; + case 3: dwgfx.print( -1, 40, "Next Trophy at 20 seconds", 196, 196, 255 - help.glow, true); break; + case 4: dwgfx.print( -1, 40, "Next Trophy at 30 seconds", 196, 196, 255 - help.glow, true); break; + case 5: dwgfx.print( -1, 40, "Next Trophy at 1 minute", 196, 196, 255 - help.glow, true); break; + case 6: dwgfx.print( -1, 40, "All Trophies collected!", 196, 196, 255 - help.glow, true); break; + } + }else{ + dwgfx.print(0, 40, "SUPER GRAVITRON HIGHSCORE", 196, 196, 255 - help.glow, true); + + tempstring = help.timestring(game.swnrecord); + dwgfx.print( 240, 90, "Best Time", 196, 196, 255 - help.glow, true); + dwgfx.bigrprint( 300, 104, tempstring, 196, 196, 255 - help.glow, true, 2); + + switch(game.swnbestrank) { + case 0: dwgfx.print( -1, 174, "Next Trophy at 5 seconds", 196, 196, 255 - help.glow, true); break; + case 1: dwgfx.print( -1, 174, "Next Trophy at 10 seconds", 196, 196, 255 - help.glow, true); break; + case 2: dwgfx.print( -1, 174, "Next Trophy at 15 seconds", 196, 196, 255 - help.glow, true); break; + case 3: dwgfx.print( -1, 174, "Next Trophy at 20 seconds", 196, 196, 255 - help.glow, true); break; + case 4: dwgfx.print( -1, 174, "Next Trophy at 30 seconds", 196, 196, 255 - help.glow, true); break; + case 5: dwgfx.print( -1, 174, "Next Trophy at 1 minute", 196, 196, 255 - help.glow, true); break; + case 6: dwgfx.print( -1, 174, "All Trophies collected!", 196, 196, 255 - help.glow, true); break; + } + } + }else if (obj.flags[67] == 1 && !map.custommode) { + dwgfx.print(30, 220, "MAP", 64,64,64); + dwgfx.print(103-8, 220, "[SHIP]", 196, 196, 255 - help.glow); + dwgfx.print(185-4, 220, "STATS", 64,64,64); + dwgfx.print(258, 220, "SAVE", 64, 64, 64); + + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 30 - 8, 220, 56, dwgfx.b_size, "MAP", 32, 92, 104); + dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "SHIP", 65, 185, 207); + dwgfx.drawmobilebutton(game, 185-4, 220, 56, dwgfx.b_size, "STATS", 32, 92, 104); + dwgfx.drawmobilebutton(game, 258, 220, 56, dwgfx.b_size, "QUIT", 32, 92, 104); + } + + if (game.mobilemenu) { + dwgfx.print(0, 80, "Warp to the ship?", 255 - (help.glow * 2), 255 - (help.glow * 2), 255 - help.glow, true); + + if(help.slowsine%8>4){ + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "WARP", 65, 185, 207); + }else { + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "WARP", 65*1.2, 185*1.2, 207*1.2); + } + + }else{ + dwgfx.print(0, 105, "Press ACTION to warp to the ship.", 196, 196, 255 - help.glow, true); + } + }else if(map.custommode){ + dwgfx.print(30, 220, "MAP", 64,64,64); + dwgfx.print(103-8, 220, "[CREW]", 196, 196, 255 - help.glow); + dwgfx.print(185-4, 220, "STATS", 64,64,64); + dwgfx.print(258, 220, "SAVE", 64, 64, 64); + + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 30 - 8, 220, 56, dwgfx.b_size, "MAP", 32, 92, 104); + dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "CREW", 65, 185, 207); + dwgfx.drawmobilebutton(game, 185-4, 220, 56, dwgfx.b_size, "STATS", 32, 92, 104); + dwgfx.drawmobilebutton(game, 258, 220, 56, dwgfx.b_size, "QUIT", 32, 92, 104); + } + + if (dwgfx.flipmode){ + dwgfx.bigprint( -1, 220-45, editor.ListOfMetaData[game.playcustomlevel].title, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 220-70, "by " + editor.ListOfMetaData[game.playcustomlevel].creator, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 220-80, editor.ListOfMetaData[game.playcustomlevel].website, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 220-100, editor.ListOfMetaData[game.playcustomlevel].Desc1, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 220-110, editor.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 220 - 120, editor.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true); + + if(map.customcrewmates-game.crewmates==1){ + dwgfx.print(1,220-165, help.number(int(map.customcrewmates-game.crewmates))+ " crewmate remains", 196, 196, 255 - help.glow, true); + }else if(map.customcrewmates-game.crewmates>0){ + dwgfx.print(1,220-165, help.number(int(map.customcrewmates-game.crewmates))+ " crewmates remain", 196, 196, 255 - help.glow, true); + } + }else{ + dwgfx.bigprint( -1, 45, editor.ListOfMetaData[game.playcustomlevel].title, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 70, "by " + editor.ListOfMetaData[game.playcustomlevel].creator, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 80, editor.ListOfMetaData[game.playcustomlevel].website, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 100, editor.ListOfMetaData[game.playcustomlevel].Desc1, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 110, editor.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true); + dwgfx.print( -1, 120, editor.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true); + + if(map.customcrewmates-game.crewmates==1){ + dwgfx.print(1,165, help.number(int(map.customcrewmates-game.crewmates))+ " crewmate remains", 196, 196, 255 - help.glow, true); + }else if(map.customcrewmates-game.crewmates>0){ + dwgfx.print(1,165, help.number(int(map.customcrewmates-game.crewmates))+ " crewmates remain", 196, 196, 255 - help.glow, true); + } + } + }else{ + dwgfx.print(30, 220, "MAP", 64,64,64); + dwgfx.print(103-8, 220, "[CREW]", 196, 196, 255 - help.glow); + dwgfx.print(185-4, 220, "STATS", 64,64,64); + dwgfx.print(258, 220, "SAVE", 64, 64, 64); + + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 30 - 8, 220, 56, dwgfx.b_size, "MAP", 32, 92, 104); + dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "CREW", 65, 185, 207); + dwgfx.drawmobilebutton(game, 185-4, 220, 56, dwgfx.b_size, "STATS", 32, 92, 104); + dwgfx.drawmobilebutton(game, 258, 220, 56, dwgfx.b_size, "QUIT", 32, 92, 104); + } + + if (dwgfx.flipmode) { + for (i = 0; i < 3; i++) { + dwgfx.drawcrewman(16, 32 + (i * 64), 2-i, game.crewstats[2-i], help); + if (game.crewstats[(2-i)]) { + dwgfx.printcrewname(44, 32 + (i * 64)+4+10, 2-i); + dwgfx.printcrewnamestatus(44, 32 + (i * 64)+4, 2-i); + }else { + dwgfx.printcrewnamedark(44, 32 + (i * 64)+4+10, 2-i); + dwgfx.print(44, 32 + (i * 64) + 4, "Missing...", 64,64,64); + } + + dwgfx.drawcrewman(16+160, 32 + (i * 64), (2-i)+3, game.crewstats[(2-i)+3], help); + if (game.crewstats[(2-i)+3]) { + dwgfx.printcrewname(44+160, 32 + (i * 64)+4+10, (2-i)+3); + dwgfx.printcrewnamestatus(44+160, 32 + (i * 64)+4, (2-i)+3); + }else { + dwgfx.printcrewnamedark(44+160, 32 + (i * 64)+4+10, (2-i)+3); + dwgfx.print(44+160, 32 + (i * 64) + 4, "Missing...", 64,64,64); + } + } + }else{ + for (i = 0; i < 3; i++) { + dwgfx.drawcrewman(16, 32 + (i * 64), i, game.crewstats[i], help); + if (game.crewstats[i]) { + dwgfx.printcrewname(44, 32 + (i * 64)+4, i); + dwgfx.printcrewnamestatus(44, 32 + (i * 64)+4+10, i); + }else { + dwgfx.printcrewnamedark(44, 32 + (i * 64)+4, i); + dwgfx.print(44, 32 + (i * 64) + 4 + 10, "Missing...", 64,64,64); + } + + dwgfx.drawcrewman(16+160, 32 + (i * 64), i+3, game.crewstats[i+3], help); + if (game.crewstats[i+3]) { + dwgfx.printcrewname(44+160, 32 + (i * 64)+4, i+3); + dwgfx.printcrewnamestatus(44+160, 32 + (i * 64)+4+10, i+3); + }else { + dwgfx.printcrewnamedark(44+160, 32 + (i * 64)+4, i+3); + dwgfx.print(44+160, 32 + (i * 64) + 4 + 10, "Missing...", 64,64,64); + } + } + } + } + break; + case 2: + dwgfx.print(30, 220, "MAP", 64,64,64); + if (game.insecretlab) { dwgfx.print(103, 220, "GRAV", 64, 64, 64); + }else if (obj.flags[67] == 1 && !map.custommode) { dwgfx.print(103, 220, "SHIP", 64,64,64); + }else{ dwgfx.print(103, 220, "CREW", 64,64,64);} + dwgfx.print(185-12, 220, "[STATS]", 196, 196, 255 - help.glow); + dwgfx.print(258, 220, "SAVE", 64, 64, 64); + + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 30 - 8, 220, 56, dwgfx.b_size, "MAP", 32, 92, 104); + if (game.insecretlab) { dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "GRAV", 32, 92, 104); + }else if (obj.flags[67] == 1 && !map.custommode) { dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "SHIP", 32, 92, 104); + }else{ dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "CREW", 32, 92, 104);} + dwgfx.drawmobilebutton(game, 185-4, 220, 56, dwgfx.b_size, "STATS", 65, 185, 207); + dwgfx.drawmobilebutton(game, 258, 220, 56, dwgfx.b_size, "QUIT", 32, 92, 104); + } + + if (map.custommode) { + if (dwgfx.flipmode){ + dwgfx.print(0, 164, "[Trinkets found]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 152, help.number(game.trinkets) + " out of " + help.number(map.customtrinkets), 96, 96, 96, true); + + dwgfx.print(0, 114, "[Number of Deaths]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 102, String(game.deathcounts), 96, 96, 96, true); + + dwgfx.print(0, 64, "[Time Taken]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 52, game.timestring(help), 96, 96, 96, true); + }else{ + dwgfx.print(0, 52, "[Trinkets found]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 64, help.number(game.trinkets) + " out of " + help.number(map.customtrinkets), 96, 96, 96, true); + + dwgfx.print(0, 102, "[Number of Deaths]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 114, String(game.deathcounts), 96, 96, 96, true); + + dwgfx.print(0, 152, "[Time Taken]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 164, game.timestring(help), 96, 96, 96, true); + } + }else{ + if (dwgfx.flipmode) { + dwgfx.print(0, 164, "[Trinkets found]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 152, help.number(game.trinkets) + " out of Twenty", 96,96,96, true); + + dwgfx.print(0, 114, "[Number of Deaths]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 102, String(game.deathcounts), 96,96,96, true); + + dwgfx.print(0, 64, "[Time Taken]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 52, game.timestring(help), 96, 96, 96, true); + }else{ + dwgfx.print(0, 52, "[Trinkets found]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 64, help.number(game.trinkets) + " out of Twenty", 96,96,96, true); + + dwgfx.print(0, 102, "[Number of Deaths]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 114, String(game.deathcounts), 96,96,96, true); + + dwgfx.print(0, 152, "[Time Taken]", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 164, game.timestring(help), 96, 96, 96, true); + } + } + break; + case 3: + dwgfx.print(30, 220, "MAP", 64,64,64); + if (game.insecretlab) { dwgfx.print(103, 220, "GRAV", 64, 64, 64); + }else if (obj.flags[67] == 1 && !map.custommode) { dwgfx.print(103, 220, "SHIP", 64,64,64); + }else{ dwgfx.print(103, 220, "CREW", 64,64,64);} + dwgfx.print(185-4, 220, "STATS", 64,64,64); + dwgfx.print(258 - 8, 220, "[SAVE]", 196, 196, 255 - help.glow); + + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 30 - 8, 220, 56, dwgfx.b_size, "MAP", 32, 92, 104); + if (game.insecretlab) { dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "GRAV", 32, 92, 104); + }else if (obj.flags[67] == 1 && !map.custommode) { dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "SHIP", 32, 92, 104); + }else{ dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "CREW", 32, 92, 104);} + dwgfx.drawmobilebutton(game, 185-4, 220, 56, dwgfx.b_size, "STATS", 32, 92, 104); + dwgfx.drawmobilebutton(game, 258, 220, 56, dwgfx.b_size, "QUIT", 65, 185, 207); + } + + dwgfx.print(0, 80, "Quit to main menu?", 255 - (help.glow * 2), 255 - (help.glow * 2), 255 - help.glow, true); + + if(help.slowsine%8>4){ + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65, 185, 207); + }else { + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65*1.2, 185*1.2, 207*1.2); + } + + if (dwgfx.flipmode) { + dwgfx.print(0, 186, "(Note: The game is autosaved", 146, 146, 180, true); + dwgfx.print(0, 174, "at every checkpoint.)", 146, 146, 180, true); + }else{ + dwgfx.print(0, 174, "(Note: The game is autosaved", 146, 146, 180, true); + dwgfx.print(0, 186, "at every checkpoint.)", 146, 146, 180, true); + } + + /* + if (game.inintermission) { + dwgfx.print(0, 115, "Cannot Save in Level Replay", 146, 146, 180, true); + }else if (game.nodeathmode) { + dwgfx.print(0, 115, "Cannot Save in No Death Mode", 146, 146, 180, true); + }else if (game.intimetrial) { + dwgfx.print(0, 115, "Cannot Save in Time Trial", 146, 146, 180, true); + }else if (game.insecretlab) { + dwgfx.print(0, 115, "Cannot Save in Secret Lab", 146, 146, 180, true); + }else if (map.custommode){ + if (game.gamesaved){ + dwgfx.print(0, 36, "Game saved ok!", 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2), true); + + dwgfx.drawpixeltextbox(25, 65, 270, 90, 34, 12, 65, 185, 207, 0, 4); + + if (dwgfx.flipmode){ + dwgfx.print(0, 122, game.customleveltitle, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + dwgfx.print(160 - 84, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.print(160 + 40, 78, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 74, 50, 18, help); + dwgfx.drawspritesetcol(175, 74, 22, 18, help); + }else{ + dwgfx.print(0, 90, game.customleveltitle, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + dwgfx.print(160 - 84, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.print(160 + 40, 132, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 126, 50, 18, help); + dwgfx.drawspritesetcol(175, 126, 22, 18, help); + } + }else{ + dwgfx.print(0, 80, "[Press ACTION to save your game]", 255 - (help.glow * 2), 255 - (help.glow * 2), 255 - help.glow, true); + } + }else { + if (dwgfx.flipmode) { + dwgfx.print(0, 186, "(Note: The game is autosaved", 146, 146, 180, true); + dwgfx.print(0, 174, "at every teleporter.)", 146, 146, 180, true); + }else{ + dwgfx.print(0, 174, "(Note: The game is autosaved", 146, 146, 180, true); + dwgfx.print(0, 186, "at every teleporter.)", 146, 146, 180, true); + } + + if (game.gamesaved) { + dwgfx.print(0, 36, "Game saved ok!", 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2), true); + + dwgfx.drawpixeltextbox(25, 65, 270, 90, 34,12, 65, 185, 207,0,4); + + if (dwgfx.flipmode) { + dwgfx.print(0, 132, game.savearea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + for (i = 0; i < 6; i++) { + dwgfx.drawcrewman(169-(3*42)+(i*42), 98, i, game.crewstats[i], help, true); + } + dwgfx.print(160 - 84, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.print(160 + 40, 78, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 74, 50, 18, help); + dwgfx.drawspritesetcol(175, 74, 22, 18, help); + }else{ + dwgfx.print(0, 80, game.savearea, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true); + for (i = 0; i < 6; i++) { + dwgfx.drawcrewman(169-(3*42)+(i*42), 95, i, game.crewstats[i], help, true); + } + dwgfx.print(160 - 84, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + dwgfx.print(160 + 40, 132, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); + + dwgfx.drawspritesetcol(50, 126, 50, 18, help); + dwgfx.drawspritesetcol(175, 126, 22, 18, help); + } + }else{ + dwgfx.print(0, 80, "[Press ACTION to save your game]", 255 - (help.glow * 2), 255 - (help.glow * 2), 255 - help.glow, true); + + if (game.quicksummary != "") { + if (dwgfx.flipmode) { + dwgfx.print(0, 110, "Last Save:", 164 - (help.glow / 4), 164 - (help.glow / 4), 164, true); + dwgfx.print(0, 100, game.quicksummary, 164 - (help.glow / 4), 164 - (help.glow / 4), 164, true); + }else{ + dwgfx.print(0, 100, "Last Save:", 164 - (help.glow / 4), 164 - (help.glow / 4), 164, true); + dwgfx.print(0, 110, game.quicksummary, 164 - (help.glow / 4), 164 - (help.glow / 4), 164, true); + } + } + } + } + */ + break; + case 10: + + if(game.mobilemenu){ + dwgfx.drawmobilebutton(game, 128, 220, 56, dwgfx.b_size, "QUIT", 65, 185, 207); + }else { + dwgfx.print(128, 220, "[ QUIT ]", 196, 196, 255 - help.glow); + } + + if (dwgfx.flipmode) { + if (game.intimetrial || game.insecretlab || game.nodeathmode || game.menukludge){ + dwgfx.print(0, 135, "Return to main menu?", 196, 196, 255 - help.glow, true); + }else { + dwgfx.print(0, 142, "Do you want to quit? You will", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 130, "lose any unsaved progress.", 196, 196, 255 - help.glow, true); + } + + if(help.slowsine%8>4){ + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65, 185, 207); + }else { + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65*1.2, 185*1.2, 207*1.2); + } + //dwgfx.print(80-16, 88, "[ NO, KEEP PLAYING ]", 196, 196, 255 - help.glow); + //dwgfx.print(80 + 32, 76, "yes, quit to menu", 96, 96, 96); + }else { + + if (game.intimetrial || game.insecretlab || game.nodeathmode || game.menukludge) { + dwgfx.print(0, 80, "Return to main menu?", 196, 196, 255 - help.glow, true); + }else { + dwgfx.print(0, 76, "Do you want to quit? You will", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "lose any unsaved progress.", 196, 196, 255 - help.glow, true); + } + + if(help.slowsine%8>4){ + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65, 185, 207); + }else { + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65*1.2, 185*1.2, 207*1.2); + } + //dwgfx.print(80-16, 130, "[ NO, KEEP PLAYING ]", 196, 196, 255 - help.glow); + //dwgfx.print(80 + 32, 142, "yes, quit to menu", 96, 96, 96); + + } + break; + case 11: + + if(game.mobilemenu){ + dwgfx.drawmobilebutton(game, 128, 220, 56, dwgfx.b_size, "QUIT", 65, 185, 207); + }else { + dwgfx.print(128, 220, "[ QUIT ]", 196, 196, 255 - help.glow); + } + + + if (dwgfx.flipmode) { + if (game.intimetrial || game.insecretlab || game.nodeathmode || game.menukludge){ + dwgfx.print(0, 135, "Return to main menu?", 196, 196, 255 - help.glow, true); + }else { + dwgfx.print(0, 142, "Do you want to quit? You will", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 130, "lose any unsaved progress.", 196, 196, 255 - help.glow, true); + } + + dwgfx.print(80, 88, "no, keep playing", 96,96,96); + dwgfx.print(80+32-16, 76, "[ YES, QUIT TO MENU ]", 196, 196, 255 - help.glow); + }else{ + if (game.intimetrial || game.insecretlab || game.nodeathmode || game.menukludge) { + dwgfx.print(0, 80, "Return to main menu?", 196, 196, 255 - help.glow, true); + }else { + dwgfx.print(0, 76, "Do you want to quit? You will", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "lose any unsaved progress.", 196, 196, 255 - help.glow, true); + } + + dwgfx.print(80, 130, "no, keep playing", 96,96,96); + dwgfx.print(80+32-16, 142, "[ YES, QUIT TO MENU ]", 196, 196, 255 - help.glow); + } + break; + case 20: + if(game.mobilemenu){ + dwgfx.drawmobilebutton(game, 128, 220, 11*8, dwgfx.b_size, "GRAVITRON", 65, 185, 207); + }else { + dwgfx.print(128, 220, "[ GRAVITRON ]", 196, 196, 255 - help.glow, true); + } + + if (dwgfx.flipmode) { + dwgfx.print(0, 76, "the secret laboratory?", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "Do you want to return to", 196, 196, 255 - help.glow, true); + //dwgfx.print(80-16, 142, "[ NO, KEEP PLAYING ]", 196, 196, 255 - help.glow); + //dwgfx.print(80 + 32, 130, "yes, return", 96, 96, 96); + if(help.slowsine%8>4){ + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65, 185, 207); + }else { + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65*1.2, 185*1.2, 207*1.2); + } + }else { + dwgfx.print(0, 76, "Do you want to return to", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "the secret laboratory?", 196, 196, 255 - help.glow, true); + //dwgfx.print(80-16, 130, "[ NO, KEEP PLAYING ]", 196, 196, 255 - help.glow); + //dwgfx.print(80 + 32, 142, "yes, return", 96, 96, 96); + if(help.slowsine%8>4){ + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65, 185, 207); + }else { + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 110, 8 * 6, dwgfx.b_size, "QUIT", 65*1.2, 185*1.2, 207*1.2); + } + } + break; + case 21: + if(game.mobilemenu){ + dwgfx.drawmobilebutton(game, 128, 220, 11*8, dwgfx.b_size, "GRAVITRON", 65, 185, 207); + }else { + dwgfx.print(128, 220, "[ GRAVITRON ]", 196, 196, 255 - help.glow, true); + } + + if (dwgfx.flipmode) { + dwgfx.print(0, 76, "the secret laboratory?", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "Do you want to return to", 196, 196, 255 - help.glow, true); + dwgfx.print(80, 142, "no, keep playing", 96, 96, 96); + dwgfx.print(80 + 32-16, 130, "[ YES, RETURN ]", 196, 196, 255 - help.glow); + }else { + dwgfx.print(0, 76, "Do you want to return to", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "the secret laboratory?", 196, 196, 255 - help.glow, true); + dwgfx.print(80, 130, "no, keep playing", 96, 96, 96); + dwgfx.print(80 + 32-16, 142, "[ YES, RETURN ]", 196, 196, 255 - help.glow); + } + break; + case 30: + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 30 - 8, 220, 56, dwgfx.b_size, "MAP", 32, 92, 104); + if (game.insecretlab) { dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "GRAV", 32, 92, 104); + }else if (obj.flags[67] == 1 && !map.custommode) { dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "SHIP", 32, 92, 104); + }else{ dwgfx.drawmobilebutton(game, 103, 220, 56, dwgfx.b_size, "CREW", 32, 92, 104);} + dwgfx.drawmobilebutton(game, 185-4, 220, 56, dwgfx.b_size, "STATS", 32, 92, 104); + dwgfx.drawmobilebutton(game, 258, 220, 56, dwgfx.b_size, "QUIT", 32, 92, 104); + } + + if (dwgfx.flipmode) { + dwgfx.drawmobilebutton(game, 160 - (12 * 8)-20, 156, 8 * 8, dwgfx.b_size, "SWIPE", 32, 92, 104); + dwgfx.drawmobilebutton(game, 160 - (4 * 8), 156, 8 * 8, dwgfx.b_size, "SIDES", 32, 92, 104); + dwgfx.drawmobilebutton(game, 160 + (4 * 8)+20, 156, 8 * 8, dwgfx.b_size, "D-PAD", 32, 92, 104); + + switch(game.controlstyle) { + case 0: + dwgfx.print(0, 52, "Current mode: VVVVVV Style", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "Swipe on the left side to move", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 76, "Tap on the right side to flip", 196, 196, 255 - help.glow, true); + dwgfx.drawmobilebutton(game, 160 - (12 * 8)-20, 156, 8 * 8, dwgfx.b_size, "SWIPE", 65, 185, 207); + break; + case 1: + dwgfx.print(0, 52, "Current mode: Super Gravitron Style", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "Touch the left or right edges to move", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 76, "Touch both edges together to flip", 196, 196, 255 - help.glow, true); + dwgfx.drawmobilebutton(game, 160 - (4 * 8), 156, 8 * 8, dwgfx.b_size, "SIDES", 65, 185, 207); + break; + case 2: + dwgfx.print(0, 52, "Current mode: Button Style", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "Use the virtual buttons to move", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 76, "Tap anywhere else to flip", 196, 196, 255 - help.glow, true); + dwgfx.drawmobilebutton(game, 160 + (4 * 8)+20, 156, 8 * 8, dwgfx.b_size, "D-PAD", 65, 185, 207); + break; + } + }else { + dwgfx.drawmobilebutton(game, 160 - (12 * 8)-20, 156, 8 * 8, dwgfx.b_size, "SWIPE", 32, 92, 104); + dwgfx.drawmobilebutton(game, 160 - (4 * 8), 156, 8 * 8, dwgfx.b_size, "SIDES", 32, 92, 104); + dwgfx.drawmobilebutton(game, 160 + (4 * 8)+20, 156, 8 * 8, dwgfx.b_size, "D-PAD", 32, 92, 104); + /* + dwgfx.print(25, 189, "SENSITIVITY", 196, 196, 255 - help.glow); + dwgfx.drawfillrect(200 - 80, 190, 160, 5, 32, 92, 104); + dwgfx.drawfillrect(200 - 80 + int((155 * 50) / 100) - 1, 190 - 4 - 1, 5 + 2, 5 + 8 + 2, 255, 255, 255); + dwgfx.drawfillrect(200 - 80 + int((155 * game.controlsensitivity) / 100), 190 - 4, 5, 5 + 8, 65, 185, 207); + */ + switch(game.controlstyle) { + case 0: + dwgfx.print(0, 52, "Current mode: VVVVVV Style", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 76, "Swipe on the left side to move", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "Tap on the right side to flip", 196, 196, 255 - help.glow, true); + dwgfx.drawmobilebutton(game, 160 - (12 * 8)-20, 156, 8 * 8, dwgfx.b_size, "SWIPE", 65, 185, 207); + break; + case 1: + dwgfx.print(0, 52, "Current mode: Super Gravitron Style", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 76, "Touch the left or right edges to move", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "Touch both edges together to flip", 196, 196, 255 - help.glow, true); + dwgfx.drawmobilebutton(game, 160 - (4 * 8), 156, 8 * 8, dwgfx.b_size, "SIDES", 65, 185, 207); + break; + case 2: + dwgfx.print(0, 52, "Current mode: Button Style", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 76, "Use the virtual buttons to move", 196, 196, 255 - help.glow, true); + dwgfx.print(0, 88, "Tap anywhere else to flip", 196, 196, 255 - help.glow, true); + dwgfx.drawmobilebutton(game, 160 + (4 * 8)+20, 156, 8 * 8, dwgfx.b_size, "D-PAD", 65, 185, 207); + break; + } + + dwgfx.print(0, 124, "Alternate controls:", 196, 196, 255 - help.glow, true); + } + break; + } + + dwgfx.drawfade(); + + if (game.test) { + dwgfx.print(5, 5, game.teststring, 196, 196, 255, false); + } + + if (game.flashlight > 0 && !game.noflashingmode) { + game.flashlight--; + dwgfx.flashlight(); + } + + if (dwgfx.resumegamemode) { + dwgfx.menuoffset += 25; + if (map.extrarow) { + if (dwgfx.menuoffset >= 230) { + dwgfx.menuoffset = 230; + //go back to gamemode! + game.mapheld = true; + game.gamestate = GAMEMODE; + } + }else{ + if (dwgfx.menuoffset >= 240) { + dwgfx.menuoffset = 240; + //go back to gamemode! + game.mapheld = true; + game.gamestate = GAMEMODE; + } + } + dwgfx.menuoffrender(); + }else if (dwgfx.menuoffset > 0) { + dwgfx.menuoffset -= 25; + if (dwgfx.menuoffset < 0) dwgfx.menuoffset = 0; + dwgfx.menuoffrender(); + }else{ + if (game.screenshake > 0 && !game.noflashingmode) { + game.screenshake--; + dwgfx.screenshake(); + }else{ + dwgfx.render(); + } + } + + dwgfx.backbuffer.unlock(); +} + +public function towerrender(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass):void { + + dwgfx.drawbutton(game, help); + //Couple of changes for the towermode + + dwgfx.backbuffer.lock(); + dwgfx.backbuffer.fillRect(dwgfx.backbuffer.rect, 0x000000); + + if (!game.colourblindmode) { + dwgfx.drawtowerbackground(map); + dwgfx.drawtowermap(map); + }else { + dwgfx.drawtowermap_nobackground(map); + } + + if(!game.completestop){ + for (i = 0; i < obj.nentity; i++) { + //Is this entity on the ground? (needed for jumping) + if (obj.entities[i].active) { + if (obj.entities[i].rule == 0 || obj.entities[i].rule >= 6 || obj.entities[i].type == 55) { + if (obj.entitycollidefloor(map, i)) {obj.entities[i].onground = 2; + }else { obj.entities[i].onground--;} + + if (obj.entitycollideroof(map, i)) {obj.entities[i].onroof = 2; + }else { obj.entities[i].onroof--; } + } + } + + //Animate the entities + obj.animateentities(i, game, help); + } + } + + dwgfx.drawtowerentities(map, obj, help); + + dwgfx.drawtowerspikes(map); + + + /*for(i=0; i 0) { + if (game.timetrialcountdown < 30) { + game.resetgameclock(); + if (int(game.timetrialcountdown / 4) % 2 == 0) dwgfx.bigprint( -1, 100, "Go!", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + }else if (game.timetrialcountdown < 60) { + dwgfx.bigprint( -1, 100, "1", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + }else if (game.timetrialcountdown < 90) { + dwgfx.bigprint( -1, 100, "2", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + }else if (game.timetrialcountdown < 120) { + dwgfx.bigprint( -1, 100, "3", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true, 4); + } + }else { + //Draw OSD stuff + dwgfx.bprint(6, 18, "TIME :", 255,255,255); + dwgfx.bprint(6, 30, "DEATH:", 255, 255, 255); + dwgfx.bprint(6, 42, "SHINY:", 255,255,255); + + if(game.timetrialparlost){ + dwgfx.bprint(56, 18, game.timestring(help), 196, 80, 80); + }else { + dwgfx.bprint(56, 18, game.timestring(help), 196, 196, 196); + } + if(game.deathcounts>0){ + dwgfx.bprint(56, 30, String(game.deathcounts), 196, 80, 80); + }else { + dwgfx.bprint(56, 30, String(game.deathcounts), 196, 196, 196); + } + if(game.trinkets 0 && !game.noflashingmode) { + game.flashlight--; + dwgfx.flashlight(); + } + + dwgfx.render(); + dwgfx.backbuffer.unlock(); +} + +public function teleporterrender(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass):void { + + dwgfx.drawbutton(game, help); + dwgfx.backbuffer.lock(); + + //draw screen alliteration + //Roomname: + temp = map.area(game.roomx, game.roomy); + if (temp < 2 && !map.custommode && dwgfx.fademode==0) { + if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) { + dwgfx.print(5, 2, "The Ship", 196, 196, 255 - help.glow, true); + }else{ + dwgfx.print(5, 2, "Dimension VVVVVV", 196, 196, 255 - help.glow, true); + } + }else { + dwgfx.print(5, 2, map.roomname, 196, 196, 255 - help.glow, true); + } + + //Background color + dwgfx.drawfillrect(0, 12, 320, 240, 10, 24, 26); + + //draw the map image + dwgfx.drawpixeltextbox(35, 16, 250, 190, 32,24, 65, 185, 207,4,0); + dwgfx.drawimage(1, 40, 21, false); + //black out areas we can't see yet + for (j = 0; j < 20; j++) { + for (i = 0; i < 20; i++) { + if(map.explored[i+(j*20)]==0){ + //dwgfx.drawfillrect(10 + (i * 12), 21 + (j * 9), 12, 9, 16, 16, 16); + dwgfx.drawimage(2, 40 + (i * 12), 21 + (j * 9), false); + } + } + } + + //draw the coordinates //current + if (game.roomx == 109) { + //tower!instead of room y, scale map.ypos + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + 2, 12 - 4, 180 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); + }else{ + dwgfx.drawrect(40 + ((game.roomx - 100) * 12) + 2, 21 + ((game.roomy - 100) * 9) + 2, 12 - 4, 9 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); + } + + if (game.useteleporter) { + //Draw the chosen destination coordinate! + + //draw the coordinates //destination + tempx = map.teleporters[game.teleport_to_teleporter].x; + tempy = map.teleporters[game.teleport_to_teleporter].y; + dwgfx.drawrect(40 + (tempx * 12) + 1, 21 + (tempy * 9) + 1, 12 - 2, 9 - 2, 245 - (help.glow * 2), 16, 16); + dwgfx.drawrect(40 + (tempx * 12) + 3, 21 + (tempy * 9) + 3, 12 - 6, 9 - 6, 245 - (help.glow * 2), 16, 16); + } + + //draw legend details + for (i = 0; i < map.numteleporters; i++) { + if (map.showteleporters && map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)] > 0) { + temp = 1126 + map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)]; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), temp); + }else if(map.showtargets && map.explored[map.teleporters[i].x+(20*map.teleporters[i].y)]==0){ + temp = 1126 + map.explored[map.teleporters[i].x + (20 * map.teleporters[i].y)]; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), temp); + } + //dwgfx.drawtile(40+3 + (map.teleporters[i].x * 12), 22 + (map.teleporters[i].y * 9), 1086); //for shiny trinkets, do later + } + + if (map.showtrinkets) { + for (i = 0; i < map.numshinytrinkets; i++) { + if (obj.collect[i] == 0) { + temp = 1086; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (map.shinytrinkets[i].x * 12), 22 + (map.shinytrinkets[i].y * 9), temp); + } + } + } + + if (game.useteleporter && ((help.slowsine%16)>8)) { + //colour in the legend + temp = 1128; + if (dwgfx.flipmode) temp += 3; + dwgfx.drawtile(40 + 3 + (tempx * 12), 22 + (tempy * 9), temp); + } + + dwgfx.cutscenebars(); + + + if (game.useteleporter) { + //Instructions! + if (game.mobilemenu) { + dwgfx.drawmobilebutton(game, 5+10, 220-10, 64, dwgfx.b_size, "LEFT", 65, 185, 207); + dwgfx.drawmobilebutton(game, 320 - 5 - 64, 220-10, 64, dwgfx.b_size, "RIGHT", 65, 185, 207); + dwgfx.drawmobilebutton(game, 160 - 40+4, 220, 64+16, dwgfx.b_size, "TELEPORT", 65, 185, 207); + }else{ + dwgfx.print(5, 210, "Press Left/Right to choose a Teleporter", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + dwgfx.print(5, 225, "Press ENTER to Teleport", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + } + } + + dwgfx.drawgui(help); + + if (dwgfx.flipmode) { + if (game.advancetext) dwgfx.bprint(5, 228, "- Tap screen to advance text -", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + }else{ + if (game.advancetext) dwgfx.bprint(5, 5, "- Tap screen to advance text -", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + } + + + if (game.test) { + dwgfx.print(5, 5, game.teststring, 196, 196, 255, false); + } + + if (game.flashlight > 0 && !game.noflashingmode) { + game.flashlight--; + dwgfx.flashlight(); + } + + if (dwgfx.resumegamemode) { + dwgfx.menuoffset += 25; + if (map.extrarow) { + if (dwgfx.menuoffset >= 230) { + dwgfx.menuoffset = 230; + //go back to gamemode! + game.mapheld = true; + game.gamestate = GAMEMODE; + } + }else{ + if (dwgfx.menuoffset >= 240) { + dwgfx.menuoffset = 240; + //go back to gamemode! + game.mapheld = true; + game.gamestate = GAMEMODE; + } + } + dwgfx.menuoffrender(); + }else if (dwgfx.menuoffset > 0) { + dwgfx.menuoffset -= 25; + if (dwgfx.menuoffset < 0) dwgfx.menuoffset = 0; + dwgfx.menuoffrender(); + }else{ + if (game.screenshake > 0 && !game.noflashingmode) { + game.screenshake--; + dwgfx.screenshake(); + }else{ + dwgfx.render(); + } + } + + dwgfx.backbuffer.unlock(); +} + +public function controltutorialrender(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass):void { + + dwgfx.drawbutton(game, help); + dwgfx.backbuffer.lock(); + + //Background color + dwgfx.drawfillrect(0, 0, 320, 240, 10, 24, 26); + + for (i = 0; i < obj.nentity; i++) { + //Is this entity on the ground? (needed for jumping) + if (obj.entities[i].active) { + if (obj.entities[i].rule == 0 || obj.entities[i].rule >= 6 || obj.entities[i].type == 55) { + if (obj.entitycollidefloor(map, i)) {obj.entities[i].onground = 2; + }else { obj.entities[i].onground--;} + + if (obj.entitycollideroof(map, i)) {obj.entities[i].onroof = 2; + }else { obj.entities[i].onroof--; } + } + } + + //Animate the entities + obj.animateentities(i, game, help); + } + + dwgfx.drawentities(map, obj, help); + + dwgfx.drawtextbox(160-120, 2, 30, 3, 174, 174, 174); + dwgfx.print(5, 10, "-= TOUCHSCREEN CONTROLS =-", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + + if(game.controltutorialstate>=3 &&game.controltutorialstate<=6){ + dwgfx.print(5, 195, "Swipe and hold on the left side", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + dwgfx.print(5, 205, "of the screen to move", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + } + + if(game.controltutorialstate>=7 &&game.controltutorialstate<=11){ + dwgfx.print(5, 200, "Tap on the right to flip", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), true); + } + + if (game.controltutorialstate >= 13) { + if(help.slowsine%8>4){ + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 210, 8 * 7, dwgfx.b_size, "START", 65, 185, 207); + }else { + dwgfx.drawmobilebutton(game, 160 + 4 - 24, 210, 8 * 7, dwgfx.b_size, "START", 65*1.2, 185*1.2, 207*1.2); + } + } + + dwgfx.drawmobileimage(0, 0, 70 + ((100 - game.controllerp1) * 3), true); + + //Draw touchpoints + if(!game.press_left && !game.press_right){ + //- 1 Left hand off + dwgfx.drawmobilehands(1, 56, 106 + ((100 - game.controllerp1) * 3)); + }else if(game.press_left){ + //- 2 Left hand moving left + if (game.controllerp3 <= 8) { + if(help.slowsine%16>8){ dwgfx.drawrect(116, 120, 16, 16, 255, 255, 255); + }else { dwgfx.drawrect(116+2, 120+2, 16-4, 16-4, 255, 255, 255); } + dwgfx.drawmobilehands(3, 56, 106); + dwgfx.drawmobileimage(7, 136, 120); + }else{ + if(help.slowsine%16>8){ dwgfx.drawrect(104, 118, 16, 16, 255, 255, 255); + }else { dwgfx.drawrect(104+2, 118+2, 16-4, 16-4, 255, 255, 255); } + dwgfx.drawmobilehands(2, 56, 106); + dwgfx.drawmobileimage(7, 124, 120); + } + }else if(game.press_right){ + //- 3 Left hand moving right + if (game.controllerp3 <= 8) { + if(help.slowsine%16>8){ dwgfx.drawrect(104, 118, 16, 16, 255, 255, 255); + }else { dwgfx.drawrect(104+2, 118+2, 16-4, 16-4, 255, 255, 255); } + dwgfx.drawmobilehands(2, 56, 106); + dwgfx.drawmobileimage(8, 84, 120); + }else{ + if(help.slowsine%16>8){ dwgfx.drawrect(116, 120, 16, 16, 255, 255, 255); + }else { dwgfx.drawrect(116+2, 120+2, 16-4, 16-4, 255, 255, 255); } + dwgfx.drawmobilehands(3, 56, 106); + dwgfx.drawmobileimage(8, 96, 120); + } + } + + if(game.controltutorialstate>=7){ + if (game.controllerp2 > 0) { + if(help.slowsine%16>8){ dwgfx.drawrect(188, 120, 16, 16, 255, 255, 255); + }else { dwgfx.drawrect(188+2, 120+2, 16-4, 16-4, 255, 255, 255); } + dwgfx.drawmobilehands(6, 193, 106); + }else{ + dwgfx.drawmobilehands(4, 193, 106 + ((100 - game.controllerp1) * 3)); + } + } + + if (game.test) { + dwgfx.print(5, 5, game.teststring, 196, 196, 255, false); + } + + if (game.flashlight > 0 && !game.noflashingmode) { + game.flashlight--; + dwgfx.flashlight(); + } + + if (game.screenshake > 0 && !game.noflashingmode) { + game.screenshake--; + dwgfx.screenshake(); + }else{ + dwgfx.render(); + } + + dwgfx.backbuffer.unlock(); +} \ No newline at end of file diff --git a/mobile_version/src/includes/scripts.as b/mobile_version/src/includes/scripts.as new file mode 100644 index 00000000..7e3e555b --- /dev/null +++ b/mobile_version/src/includes/scripts.as @@ -0,0 +1,5822 @@ +public function load(t:String):void { + //loads script name t into the array + + position = 0; scriptlength=0; + running = true; + + var maxlength:int = int(Math.min(int(t.length), 7)); + var customstring:String = ""; + + for (var i:int = 0; i < maxlength; i++) { + customstring += t.substr(i, 1); + } + + if (customstring == "custom_"){ + //this magic function breaks down the custom script and turns into real scripting! + var cscriptname:String = ""; + for (i = 0; i < t.length; i++) { + if (i >= 7) cscriptname += t.substr(i, 1); + } + + var scriptstart:int = -1; + var scriptend:int = -1; + var tstring:String; + + for (i = 0; i < editor.customscript.length; i++) { + if (scriptstart == -1) { + //Find start of the script + if (editor.customscript[i] == cscriptname + ":") { + scriptstart = i + 1; + } + }else if (scriptend == -1) { + //Find the end + tstring = editor.customscript[i]; + tstring = tstring.substr(tstring.length - 1, 1); + if (tstring == ":") { + scriptend = i; + } + } + } + + if (scriptstart > -1) { + if (scriptend == -1) { + scriptend = editor.customscript.length; + } + + //Ok, we've got the relavent script segment, we do a pass to assess it, then run it! + var customcutscenemode:int = 0; + for (i = scriptstart; i < scriptend; i++) { + tokenize(editor.customscript[i]); + if(words[0] == "say"){ + customcutscenemode=1; + }else if(words[0] == "reply"){ + customcutscenemode=1; + } + } + + if(customcutscenemode==1){ + add("cutscene()"); + add("untilbars()"); + } + var customtextmode:int = 0; + var speakermode:int = 0; //0, terminal, numbers for crew + var squeakmode:int = 0;//default on + //Now run the script + for (i = scriptstart; i < scriptend; i++) { + words[0] = "nothing"; //Default! + words[1] = "1"; //Default! + tokenize(editor.customscript[i]); + words[0] = words[0].toLowerCase(); + if(words[0] == "music"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + if(words[1]=="0"){ + tstring="stopmusic()"; + }else{ + if(words[1]=="11"){ tstring="play(14)"; + }else if(words[1]=="10"){ tstring="play(13)"; + }else if(words[1]=="9"){ tstring="play(12)"; + }else if(words[1]=="8"){ tstring="play(11)"; + }else if(words[1]=="7"){ tstring="play(10)"; + }else if(words[1]=="6"){ tstring="play(8)"; + }else if(words[1]=="5"){ tstring="play(6)"; + }else { tstring="play("+words[1]+")"; } + } + add(tstring); + }else if(words[0] == "flash"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add("flash(5)"); + add("shake(20)"); + add("playef(9,10)"); + }else if(words[0] == "sad" || words[0] == "cry"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + if(words[1]=="player"){ + add("changemood(player,1)"); + }else if(words[1]=="cyan" || words[1]=="viridian" || words[1]=="1"){ + add("changecustommood(customcyan,1)"); + }else if(words[1]=="purple" || words[1]=="violet" || words[1]=="pink" || words[1]=="2"){ + add("changecustommood(purple,1)"); + }else if(words[1]=="yellow" || words[1]=="vitellary" || words[1]=="3"){ + add("changecustommood(yellow,1)"); + }else if(words[1]=="red" || words[1]=="vermilion" || words[1]=="4"){ + add("changecustommood(red,1)"); + }else if(words[1]=="green" || words[1]=="verdigris" || words[1]=="5"){ + add("changecustommood(green,1)"); + }else if(words[1]=="blue" || words[1]=="victoria" || words[1]=="6"){ + add("changecustommood(blue,1)"); + }else if(words[1]=="all" || words[1]=="everybody" || words[1]=="everyone"){ + add("changemood(player,1)"); + add("changecustommood(customcyan,1)"); + add("changecustommood(purple,1)"); + add("changecustommood(yellow,1)"); + add("changecustommood(red,1)"); + add("changecustommood(green,1)"); + add("changecustommood(blue,1)"); + }else{ + add("changemood(player,1)"); + } + if(squeakmode==0) add("squeak(cry)"); + }else if(words[0] == "happy"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + if(words[1]=="player"){ + add("changemood(player,0)"); + if(squeakmode==0) add("squeak(player)"); + }else if(words[1]=="cyan" || words[1]=="viridian" || words[1]=="1"){ + add("changecustommood(customcyan,0)"); + if(squeakmode==0) add("squeak(player)"); + }else if(words[1]=="purple" || words[1]=="violet" || words[1]=="pink" || words[1]=="2"){ + add("changecustommood(purple,0)"); + if(squeakmode==0) add("squeak(purple)"); + }else if(words[1]=="yellow" || words[1]=="vitellary" || words[1]=="3"){ + add("changecustommood(yellow,0)"); + if(squeakmode==0) add("squeak(yellow)"); + }else if(words[1]=="red" || words[1]=="vermilion" || words[1]=="4"){ + add("changecustommood(red,0)"); + if(squeakmode==0) add("squeak(red)"); + }else if(words[1]=="green" || words[1]=="verdigris" || words[1]=="5"){ + add("changecustommood(green,0)"); + if(squeakmode==0) add("squeak(green)"); + }else if(words[1]=="blue" || words[1]=="victoria" || words[1]=="6"){ + add("changecustommood(blue,0)"); + if(squeakmode==0) add("squeak(blue)"); + }else if(words[1]=="all" || words[1]=="everybody" || words[1]=="everyone"){ + add("changemood(player,0)"); + add("changecustommood(customcyan,0)"); + add("changecustommood(purple,0)"); + add("changecustommood(yellow,0)"); + add("changecustommood(red,0)"); + add("changecustommood(green,0)"); + add("changecustommood(blue,0)"); + }else{ + add("changemood(player,0)"); + if(squeakmode==0) add("squeak(player)"); + } + }else if(words[0] == "squeak"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + if(words[1]=="player"){ + add("squeak(player)"); + }else if(words[1]=="cyan" || words[1]=="viridian" || words[1]=="1"){ + add("squeak(player)"); + }else if(words[1]=="purple" || words[1]=="violet" || words[1]=="pink" || words[1]=="2"){ + add("squeak(purple)"); + }else if(words[1]=="yellow" || words[1]=="vitellary" || words[1]=="3"){ + add("squeak(yellow)"); + }else if(words[1]=="red" || words[1]=="vermilion" || words[1]=="4"){ + add("squeak(red)"); + }else if(words[1]=="green" || words[1]=="verdigris" || words[1]=="5"){ + add("squeak(green)"); + }else if(words[1]=="blue" || words[1]=="victoria" || words[1]=="6"){ + add("squeak(blue)"); + }else if(words[1]=="cry" || words[1]=="sad"){ + add("squeak(cry)"); + }else if(words[1]=="on"){ + squeakmode=0; + }else if(words[1]=="off"){ + squeakmode=1; + } + }else if(words[0] == "delay"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add(editor.customscript[i]); + }else if(words[0] == "flag"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add(editor.customscript[i]); + }else if(words[0] == "map"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add("custom"+editor.customscript[i]); + }else if(words[0] == "warpdir"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add(editor.customscript[i]); + }else if(words[0] == "ifwarp"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add(editor.customscript[i]); + }else if(words[0] == "iftrinkets"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add("custom"+editor.customscript[i]); + }else if(words[0] == "ifflag"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add("custom"+editor.customscript[i]); + }else if(words[0] == "iftrinketsless"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + add("custom"+editor.customscript[i]); + }else if(words[0] == "destroy"){ + if(customtextmode==1){ add("endtext"); customtextmode=0;} + if(words[1]=="gravitylines"){ + add("destroy(gravitylines)"); + }else if(words[1]=="warptokens"){ + add("destroy(warptokens)"); + }else if(words[1]=="platforms"){ + add("destroy(platforms)"); + } + }else if(words[0] == "speaker"){ + speakermode=0; + if(words[1]=="gray" || words[1]=="grey" || words[1]=="terminal" || words[1]=="0") speakermode=0; + if(words[1]=="cyan" || words[1]=="viridian" || words[1]=="player" || words[1]=="1") speakermode=1; + if(words[1]=="purple" || words[1]=="violet" || words[1]=="pink" || words[1]=="2") speakermode=2; + if(words[1]=="yellow" || words[1]=="vitellary" || words[1]=="3") speakermode=3; + if(words[1]=="red" || words[1]=="vermilion" || words[1]=="4") speakermode=4; + if(words[1]=="green" || words[1]=="verdigris" || words[1]=="5") speakermode=5; + if(words[1]=="blue" || words[1]=="victoria" || words[1]=="6") speakermode=6; + }else if(words[0] == "say"){ + //Speakers! + if(words[2]=="cyan" || words[2]=="viridian" || words[2]=="player" || words[2]=="1") speakermode=1; + if(words[2]=="purple" || words[2]=="violet" || words[2]=="pink" || words[2]=="2") speakermode=2; + if(words[2]=="yellow" || words[2]=="vitellary" || words[2]=="3") speakermode=3; + if(words[2]=="red" || words[2]=="vermilion" || words[2]=="4") speakermode=4; + if(words[2]=="green" || words[2]=="verdigris" || words[2]=="5") speakermode=5; + if(words[2]=="blue" || words[2]=="victoria" || words[2]=="6") speakermode=6; + switch(speakermode){ + case 0: + if(squeakmode==0) add("squeak(terminal)"); + add("text(gray,0,114,"+words[1]+")"); + break; + case 1: //NOT THE PLAYER + if(squeakmode==0) add("squeak(cyan)"); + add("text(cyan,0,0,"+words[1]+")"); + break; + case 2: + if(squeakmode==0) add("squeak(purple)"); + add("text(purple,0,0,"+words[1]+")"); + break; + case 3: + if(squeakmode==0) add("squeak(yellow)"); + add("text(yellow,0,0,"+words[1]+")"); + break; + case 4: + if(squeakmode==0) add("squeak(red)"); + add("text(red,0,0,"+words[1]+")"); + break; + case 5: + if(squeakmode==0) add("squeak(green)"); + add("text(green,0,0,"+words[1]+")"); + break; + case 6: + if(squeakmode==0) add("squeak(blue)"); + add("text(blue,0,0,"+words[1]+")"); + break; + } + var ti:int = int(words[1]); + if (ti >= 0 && ti <= 50) { + for (var ti2:int = 0; ti2 < ti; ti2++) { + i++; add(editor.customscript[i]); + } + }else{ + i++; add(editor.customscript[i]); + } + + switch(speakermode){ + case 0: add("customposition(center)"); break; + case 1: add("customposition(cyan,above)"); break; + case 2: add("customposition(purple,above)"); break; + case 3: add("customposition(yellow,above)"); break; + case 4: add("customposition(red,above)"); break; + case 5: add("customposition(green,above)"); break; + case 6: add("customposition(blue,above)"); break; + } + add("speak_active"); + customtextmode=1; + }else if(words[0] == "reply"){ + //For this version, terminal only + if(squeakmode==0) add("squeak(player)"); + add("text(cyan,0,0," + words[1] + ")"); + + ti = int(words[1]); + if(ti>=0 && ti<=50){ + for (ti2 = 0; ti2 < ti; ti2++) { + i++; add(editor.customscript[i]); + } + }else{ + i++; add(editor.customscript[i]); + } + add("position(player,above)"); + add("speak_active"); + customtextmode=1; + } + } + + if(customtextmode==1){ add("endtext"); customtextmode=0;} + if(customcutscenemode==1){ + add("endcutscene()"); + add("untilbars()"); + } + } + }else if (t == "intro") { + add("ifskip(quickstart)"); + //add("createcrewman(232,113,cyan,0,faceright)"); + add("createcrewman(96,177,green,0,faceright)"); + add("createcrewman(122,177,purple,0,faceleft)"); + add("fadein()"); + add("untilfade()"); + add("delay(90)"); + + add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + add("musicfadeout()"); + add("changemood(player,1)"); + add("delay(15)"); + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("Uh oh..."); + add("position(player,above)"); + //add("backgroundtext"); + add("speak_active"); + + add("squeak(purple)"); + add("changeai(purple,followposition,175)"); + add("text(purple,145,150,1)"); + add("Is everything ok?"); + //add("position(purple,above)"); + //add("backgroundtext"); + add("speak_active"); + + add("squeak(player)"); + add("walk(left,2)"); + add("text(cyan,0,0,2)"); + add("No! We've hit some kind"); + add("of interference..."); + add("position(player,above)"); + //add("backgroundtext"); + add("speak_active"); + + //add("delay(30)"); + add("endtext"); + + add("flash(5)"); add("shake(50)"); add("playef(9,10)"); + add("changemood(green,1)"); + add("changemood(purple,1)"); + add("alarmon"); + + add("changedir(player,1)"); + add("delay(30)"); + add("endtext"); + + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("Something's wrong! We're"); + add("going to crash!"); + add("position(player,above)"); + //add("backgroundtext"); + add("speak_active"); + //add("delay(100)"); + + add("endtext"); + + add("flash(5)"); add("shake(50)"); add("playef(9,10)"); + add("changeai(green,followposition,-60)"); + add("changeai(purple,followposition,-60)"); + add("squeak(player)"); + add("text(cyan,70,140,1)"); + add("Evacuate!"); + add("backgroundtext"); + add("speak_active"); + add("walk(left,35)"); + + add("endtextfast"); + + //Ok, next room! + + add("flash(5)"); add("shake(50)"); add("playef(9,10)"); + add("gotoroom(3,10)"); add("gotoposition(310,177,0)"); + add("createcrewman(208,177,green,1,followposition,120)"); + add("createcrewman(240,177,purple,1,followposition,120)"); + add("createcrewman(10,177,blue,1,followposition,180)"); + + add("squeak(blue)"); + add("text(blue,80,150,1)"); + add("Oh no!"); + add("backgroundtext"); + add("speak_active"); + add("walk(left,20)"); + + add("endtextfast"); + + //and the next! + add("flash(5)"); add("shake(50)"); add("playef(9,10)"); + add("gotoroom(3,11)"); add("gotoposition(140,0,0)"); + + add("createcrewman(90,105,green,1,followblue)"); + add("createcrewman(125,105,purple,1,followgreen)"); + add("createcrewman(55,105,blue,1,followposition,-200)"); + + add("createcrewman(120,177,yellow,1,followposition,-200)"); + add("createcrewman(240,177,red,1,faceleft)"); + + add("delay(5)"); + add("changeai(red,followposition,-200)"); + + add("squeak(red)"); + add("text(red,100,150,1)"); + add("Everyone off the ship!"); + add("backgroundtext"); + add("speak_active"); + + add("walk(left,25)"); + + add("endtextfast"); + + //final room: + add("flash(5)"); add("shake(80)"); add("playef(9,10)"); + add("gotoroom(2,11)"); add("gotoposition(265,153,0)"); + + add("createcrewman(130,153,blue,1,faceleft)"); + add("createcrewman(155,153,green,1,faceleft)"); + add("createcrewman(180,153,purple,1,faceleft)"); + add("createcrewman(205,153,yellow,1,faceleft)"); + add("createcrewman(230,153,red,1,faceleft)"); + + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("This shouldn't be happening!"); + add("position(yellow,below)"); + add("backgroundtext"); + add("speak_active"); + + add("activateteleporter()"); + + add("delay(10)"); + add("changecolour(blue,teleporter)"); + add("delay(10)"); + add("changecolour(green,teleporter)"); + add("delay(10)"); + add("changecolour(purple,teleporter)"); + add("delay(10)"); + add("changecolour(yellow,teleporter)"); + add("delay(10)"); + add("changecolour(red,teleporter)"); + add("delay(10)"); + + //and teleport! + add("endtext"); + add("alarmoff"); + + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("blackout()"); + add("changemood(player,0)"); + add("changedir(player,1)"); + //MOBILE CONTROLS STUFF HARD CODED IN HERE (used to be a delay 100) + add("delay(5)"); + add("gotoroom(7,10)"); add("gotoposition(148,32,0)"); + add("delay(50)"); + add("changemood(player,0)"); + add("changedir(player,0)"); + add("domobilecontrols()"); + + add("delay(50)"); + + add("blackon()"); + add("shake(20)"); add("playef(10,10)"); + + //Finally, appear at the start of the game: + add("gotoroom(13,5)"); add("gotoposition(80,96,0)"); + add("mobilecontrolsfixmap()"); + add("walk(right,20)"); + //add("delay(45)"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("Phew! That was scary!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("At least we all"); + add("escaped, right guys?"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("delay(45)"); + add("walk(left,3)"); + add("delay(45)"); + add("setcheckpoint()"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("...guys?"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("delay(25)"); + add("changemood(player,1)"); + add("squeak(cry)"); + add("delay(25)"); + + add("play(1)"); + add("endcutscene()"); + add("untilbars()"); + + add("hideship()"); + + add("gamestate(4)"); + }else if (t == "quickstart") { + //Finally, appear at the start of the game: + add("gotoroom(13,5)"); add("gotoposition(80,96,0)"); + add("walk(right,17)"); + add("fadein()"); + + add("setcheckpoint()"); + + add("play(1)"); + add("endcutscene()"); + add("untilbars()"); + + add("hideship()"); + }else if (t == "firststeps") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("I wonder why the ship"); + add("teleported me here alone?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("text(cyan,0,0,2)"); + add("I hope everyone else"); + add("got out ok..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "trenchwarfare") { + add("cutscene()"); + add("untilbars()"); + + add("iftrinkets(1,newtrenchwarfare)"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("Ohh! I wonder what that is?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,3)"); + add("I probably don't really need it,"); + add("but it might be nice to take it"); + add("back to the ship to study..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "newtrenchwarfare") { + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("Oh! It's another one of"); + add("those shiny things!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,3)"); + add("I probably don't really need it,"); + add("but it might be nice to take it"); + add("back to the ship to study..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "trinketcollector") { + add("cutscene()"); + add("untilbars()"); + + add("iftrinkets(1,newtrinketcollector)"); + + add("squeak(player)"); + add("text(cyan,0,0,3)"); + add("This seems like a good"); + add("place to store anything"); + add("I find out there..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,3)"); + add("Victoria loves to study the"); + add("interesting things we find"); + add("on our adventures!"); + add("position(player,above)"); + add("speak_active"); + + add("ifcrewlost(5,new2trinketcollector)"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "newtrinketcollector") { + add("squeak(player)"); + add("text(cyan,0,0,3)"); + add("This seems like a good"); + add("place to store those"); + add("shiny things."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,3)"); + add("Victoria loves to study the"); + add("interesting things we find"); + add("on our adventures!"); + add("position(player,above)"); + add("speak_active"); + + add("ifcrewlost(5,new2trinketcollector)"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "new2trinketcollector") { + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(cyan,0,0,1)"); + add("I hope she's ok..."); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("changemood(player,0)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "communicationstation") { + add("ifskip(communicationstationskip)"); + add("cutscene()"); + add("untilbars()"); + add("changemood(player,0)"); + + add("tofloor"); + add("play(5)"); + add("delay(10)"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("Violet! Is that you?"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("squeak(purple)"); + add("text(purple,45,18,1)"); + add("Captain! You're ok!"); + add("speak_active"); + + add("squeak(cry)"); + add("text(purple,20,16,3)"); + add("Something has gone"); + add("horribly wrong with the"); + add("ship's teleporter!"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,8,14,3)"); + add("I think everyone has been"); + add("teleported away randomly!"); + add("They could be anywhere!"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(cyan,0,0,1)"); + add("Oh no!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,10,19,2)"); + add("I'm on the ship - it's damaged"); + add("badly, but it's still intact!") + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,10,15,1)"); + add("Where are you, Captain?"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(cyan,0,0,3)"); + add("I'm on some sort of"); + add("space station... It"); + add("seems pretty modern..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,15,16,2)"); + add("There seems to be some sort of"); + add("interference in this dimension..."); + add("speak_active"); + + add("hideteleporters()"); + add("endtextfast"); + add("delay(10)"); + + //add map mode here and wrap up... + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(purple)"); + add("text(purple,25,205,2)"); + add("I'm broadcasting the coordinates"); + add("of the ship to you now."); + add("speak_active"); + add("endtext"); + + add("squeak(terminal)"); + add("showship()"); + add("delay(10)"); + add("hideship()"); + add("delay(10)"); + add("showship()"); + add("delay(10)"); + add("hideship()"); + add("delay(10)"); + add("showship()"); + add("delay(20)"); + + add("squeak(purple)"); + add("text(purple,10,200,1)"); + add("I can't teleport you back, but..."); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,25,195,3)"); + add("If YOU can find a teleporter"); + add("anywhere nearby, you should be"); + add("able to teleport back to me!"); + add("speak_active"); + add("endtext"); + + add("squeak(terminal)"); + add("delay(20)"); + add("showteleporters()"); + add("delay(10)"); + add("hideteleporters()"); + add("delay(10)"); + add("showteleporters()"); + add("delay(10)"); + add("hideteleporters()"); + add("delay(10)"); + add("showteleporters()"); + add("delay(20)"); + + add("squeak(player)"); + add("text(cyan,20,190,1)"); + add("Ok! I'll try to find one!"); + add("speak_active"); + add("endtext"); + add("delay(20)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("squeak(purple)"); + add("text(purple,40,22,1)"); + add("Good luck, Captain!"); + add("speak_active"); + add("endtext"); + + add("squeak(purple)"); + add("text(purple,10,19,2)"); + add("I'll keep trying to find"); + add("the rest of the crew..."); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + add("play(1)"); + }else if (t == "communicationstationskip") { + add("changemood(player,0)"); + + add("delay(10)"); + add("endtext"); + //add map mode here and wrap up... + add("gamemode(teleporter)"); + add("delay(5)"); + + add("squeak(terminal)"); + add("showship()"); add("showteleporters()"); + add("delay(10)"); + add("hideship()"); add("hideteleporters()"); + add("delay(10)"); + add("showship()"); add("showteleporters()"); + add("delay(10)"); + add("hideship()"); add("hideteleporters()"); + add("delay(10)"); + add("showship()"); add("showteleporters()"); + add("delay(20)"); + + add("gamemode(game)"); + }else if (t == "teleporterback") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("A teleporter!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("I can get back to the"); + add("ship with this!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("teleportscript(levelonecomplete)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "levelonecomplete") { + add("nocontrol()"); + add("createcrewman(230,153,purple,0,faceleft)"); + + add("cutscene()"); + add("untilbars()"); + + add("delay(30)"); + add("rescued(purple)"); + + add("delay(10)"); + add("gamestate(4090)"); + }else if (t == "levelonecomplete_ending") { + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Captain!"); + add("position(purple,above)"); + add("speak_active"); + add("endtext"); + add("nocontrol()"); + + add("endcutscene()"); + add("untilbars()"); + + add("gamestate(3050)"); + }else if (t == "levelonecompleteskip") { + add("nocontrol()"); + add("gamestate(3050)"); + }else if (t == "bigopenworld") { + add("play(5)"); + add("cutscene()"); + add("untilbars()"); + + add("gotoroom(4,10)"); + add("gotoposition(100,177,0)"); + add("createcrewman(150,177,purple,0,faceleft)"); + + //set all the crew as rescued to avoid companion issues! + add("rescued(red)"); + add("rescued(green)"); + add("rescued(blue)"); + add("rescued(yellow)"); + + add("fadein()"); + add("untilfade()"); + + add("delay(15)"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("So, Doctor - have you any"); + add("idea what caused the crash?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,3)"); + add("There's some sort of bizarre"); + add("signal here that's interfering"); + add("with our equipment..."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,3)"); + add("It caused the ship to lose"); + add("its quantum position, collapsing"); + add("us into this dimension!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("Oh no!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("But I think we should be able to fix"); + add("the ship and get out of here..."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("... as long as we can"); + add("find the rest of the crew."); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + //Cut to Red + add("fadeout()");add("untilfade()"); + + add("changeplayercolour(red)"); + add("gotoroom(10,4)"); + add("gotoposition(200,185,0)"); + add("hideplayer()"); + add("createcrewman(200,185,red,1,panic)"); + + add("fadein()"); add("untilfade()"); + + //add("walk(right,10)"); + + add("squeak(purple)"); + add("text(purple,60,40,2)"); + add("We really don't know anything"); + add("about this place..."); + add("speak_active"); + + add("endtext"); + + add("delay(15)"); + + //Cut to Green + add("fadeout()");add("untilfade()"); + + add("showplayer()"); + + add("changeplayercolour(green)"); + add("gotoroom(13,0)"); + add("gotoposition(143,20,0)"); + + add("fadein()");add("untilfade()"); + + + add("squeak(purple)"); + add("text(purple,40,30,2)"); + add("Our friends could be anywhere - they"); + add("could be lost, or in danger!"); + add("speak_active"); + + add("endtext"); + + add("delay(15)"); + + //Cut to Blue + add("fadeout()");add("untilfade()"); + + add("changeplayercolour(blue)"); + add("gotoroom(3,4)"); + add("gotoposition(190,177,0)"); + + add("fadein()"); add("untilfade()"); + + + add("squeak(player)"); + add("text(player,10,60,1)"); + add("Can they teleport back here?"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,50,80,2)"); + add("Not unless they find some way"); + add("to communicate with us!"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,30,100,3)"); + add("We can't pick up their signal and"); + add("they can't teleport here unless"); + add("they know where the ship is..."); + add("speak_active"); + + add("endtext"); + + add("delay(15)"); + + + //Cut to Yellow + add("fadeout()");add("untilfade()"); + + add("changeplayercolour(yellow)"); + add("gotoroom(15,9)"); + add("gotoposition(300,(6*8)-21,0)"); + + add("hideplayer()"); + add("createcrewman(280,25,yellow,1,panic)"); + + //add("hascontrol()"); + //add("walk(left,4)"); + + add("fadein()");add("untilfade()"); + + add("squeak(player)"); + add("text(player,25,60,1)"); + add("So what do we do?"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,80,125,4)"); + add("We need to find them! Head"); + add("out into the dimension and"); + add("look for anywhere they might"); + add("have ended up..."); + add("speak_active"); + + add("endtext"); + + add("delay(15)"); + + //Back to ship + add("fadeout()"); add("untilfade()"); + add("showplayer()"); + + add("missing(red)"); + add("missing(green)"); + add("missing(blue)"); + add("missing(yellow)"); + + add("changeplayercolour(cyan)"); + add("changemood(player,0)"); + add("gotoroom(4,10)"); + add("gotoposition(90,177,0)"); + add("walk(right,2)"); + add("createcrewman(150,177,purple,0,faceleft)"); + + + + add("fadein()");add("untilfade()"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Ok! Where do we start?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("Well, I've been trying to find"); + add("them with the ship's scanners!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("It's not working, but I did"); + add("find something..."); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("delay(15)"); + + add("hidecoordinates(10,4)"); + add("hidecoordinates(13,0)"); + add("hidecoordinates(3,4)"); + add("hidecoordinates(15,9)"); + add("showteleporters()"); + + //Cut to map + //add map mode here and wrap up... + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showtargets()"); + add("delay(10)"); + add("hidetargets()"); + add("delay(10)"); + add("showtargets()"); + add("delay(10)"); + add("hidetargets()"); + add("delay(10)"); + add("showtargets()"); + add("delay(20)"); + + add("squeak(purple)"); + add("text(purple,25,205,2)"); + add("These points show up on our scans"); + add("as having high energy patterns!"); + add("speak_active"); + add("endtext"); + + add("squeak(purple)"); + add("text(purple,35,185,4)"); + add("There's a good chance they're"); + add("teleporters - which means"); + add("they're probably built near"); + add("something important..."); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,25,205,2)"); + add("They could be a very good"); + add("place to start looking."); + add("speak_active"); + add("endtext"); + add("delay(20)"); + + add("gamemode(game)"); + add("delay(20)"); + //And finally, back to the ship! + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Ok! I'll head out and see"); + add("what I can find!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("I'll be right here if"); + add("you need any help!"); + add("position(purple,above)"); + add("speak_active"); + add("endtext"); + + add("rescued(purple)"); + add("play(4)"); + + add("endcutscene()"); + add("untilbars()"); + add("hascontrol()"); + + add("createactivityzone(purple)"); + }else if (t == "bigopenworldskip") { + add("gotoroom(4,10)"); + add("gotoposition(100,177,0)"); + add("createcrewman(150,177,purple,0,faceleft)"); + + add("fadein()"); + add("untilfade()"); + + add("hidecoordinates(10,4)"); + add("hidecoordinates(13,0)"); + add("hidecoordinates(3,4)"); + add("hidecoordinates(15,9)"); + add("showteleporters()"); + + //Cut to map + //add map mode here and wrap up... + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showtargets()"); + add("delay(10)"); + add("hidetargets()"); + add("delay(10)"); + add("showtargets()"); + add("delay(10)"); + add("hidetargets()"); + add("delay(10)"); + add("showtargets()"); + add("delay(20)"); + + add("gamemode(game)"); + add("delay(20)"); + //And finally, back to the ship! + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("I'll be right here if"); + add("you need any help!"); + add("position(purple,above)"); + add("speak_active"); + add("endtext"); + + add("rescued(purple)"); + add("play(4)"); + + add("endcutscene()"); + add("untilbars()"); + add("hascontrol()"); + + add("createactivityzone(purple)"); + }else if (t == "rescueblue") { + add("ifskip(skipblue)"); + add("cutscene()"); + + add("tofloor()"); + add("changeai(blue,followplayer)"); + add("untilbars()"); + + add("rescued(blue)"); + + add("squeak(blue)"); + add("text(blue,0,0,2)"); + add("Oh no! Captain! Are you"); + add("stuck here too?"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("It's ok - I'm here to rescue you!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Let me explain everything..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("fadeout()"); + add("untilfade()"); + add("delay(30)"); + add("fadein()"); + add("untilfade()"); + + add("squeak(cry)"); + add("text(blue,0,0,2)"); + add("What? I didn't understand"); + add("any of that!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Oh... well, don't worry."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Follow me! Everything"); + add("will be alright!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(blue)"); + add("changemood(blue,0)"); + add("text(blue,0,0,1)"); + add("Sniff... Really?"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(blue)"); + add("text(blue,0,0,1)"); + add("Ok then!"); + add("position(blue,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + add("companion(8)"); + add("setcheckpoint()"); + }else if (t == "skipblue") { + add("changeai(blue,followplayer)"); + add("squeak(blue)"); + add("changemood(blue,0)"); + add("companion(8)"); + add("rescued(blue)"); + add("setcheckpoint()"); + }else if (t == "rescueyellow") { + add("ifskip(skipyellow)"); + add("cutscene()"); + + add("changeai(yellow,followplayer)"); + add("changetile(yellow,6)"); + add("untilbars()"); + + add("rescued(yellow)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Ah, Viridian! You got off"); + add("the ship alright too? "); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("It's good to see you're"); + add("alright, Professor!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("Is the ship ok?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("It's badly damaged, but Violet's"); + add("been working on fixing it."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("We could really use your help..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("fadeout()"); + add("untilfade()"); + add("delay(30)"); + add("fadein()"); + add("untilfade()"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("Ah, of course!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,4)"); + add("The background interference"); + add("in this dimension prevented"); + add("the ship from finding a"); + add("teleporter when we crashed!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("We've all been teleported"); + add("to different locations!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Er, that sounds about right!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Let's get back to"); + add("the ship, then!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("After you, Captain!"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("companion(7)"); + add("endcutscene()"); + add("untilbars()"); + }else if (t == "skipyellow") { + add("changeai(yellow,followplayer)"); + add("changetile(yellow,6)"); + add("squeak(yellow)"); + add("rescued(yellow)"); + add("companion(7)"); + }else if (t == "rescuegreen") { + add("ifskip(skipgreen)"); + add("cutscene()"); + + add("tofloor()"); + add("changemood(green,0)"); + add("untilbars()"); + + add("rescued(green)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Captain! I've been so worried!"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Chief Verdigris! You're ok!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(green,1)"); + add("text(green,0,0,2)"); + add("I've been trying to get out, but"); + add("I keep going around in circles..."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("I've come from the ship. I'm here"); + add("to teleport you back to it."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("Is everyone else"); + add("alright? Is Violet..."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("She's fine - she's back on the ship!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(green)"); + add("changemood(green,0)"); + add("text(green,0,0,2)"); + add("Oh! Great - Let's"); + add("get going, then!"); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("companion(6)"); + add("endcutscene()"); + add("untilbars()"); + add("changeai(green,followplayer)"); + }else if (t == "skipgreen") { + add("changeai(green,followplayer)"); + add("squeak(green)"); + add("rescued(green)"); + add("changemood(green,0)"); + add("companion(6)"); + }else if (t == "rescuered") { + add("ifskip(skipred)"); + add("cutscene()"); + + add("tofloor()"); + add("changemood(red,0)"); + add("untilbars()"); + + add("rescued(red)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Captain!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("Am I ever glad to see you!"); + add("I thought I was the only"); + add("one to escape the ship..."); + add("position(red,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Vermilion! I knew you'd be ok!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("So, what's the situation?"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("fadeout()"); + add("untilfade()"); + add("delay(30)"); + add("fadein()"); + add("untilfade()"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("I see! Well, we'd better"); + add("get back then."); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("There's a teleporter"); + add("in the next room."); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("companion(9)"); + add("endcutscene()"); + add("untilbars()"); + add("changeai(red,followplayer)"); + }else if (t == "skipred") { + add("changeai(red,followplayer)"); + add("squeak(red)"); + add("rescued(red)"); + add("changemood(red,0)"); + add("companion(9)"); + }else if (t == "startexpolevel_station1") { + //For the Eurogamer EXPO! Scrap later. + add("fadeout()"); + add("musicfadeout()"); + add("untilfade()"); + + add("cutscene()"); + add("untilbars()"); + + add("resetgame"); + + add("gotoroom(4,10)"); + add("gotoposition(232,113,0)"); + add("setcheckpoint()"); + add("changedir(player,1)"); + add("fadein()"); + + add("play(5)"); + add("loadscript(intro)"); + }else if (t == "startexpolevel_lab") { + //For the Eurogamer EXPO! Scrap later. + add("fadeout()"); + add("musicfadeout()"); + add("untilfade()"); + add("delay(30)"); + + add("resetgame"); + + add("gotoroom(2,16)"); + add("gotoposition(58,193,0)"); + add("setcheckpoint()"); + add("changedir(player,1)"); + add("fadein()"); + + add("stopmusic()"); + add("play(3)"); + }else if (t == "startexpolevel_warp") { + //For the Eurogamer EXPO! Scrap later. + add("fadeout()"); + add("musicfadeout()"); + add("untilfade()"); + add("delay(30)"); + + add("resetgame"); + + add("gotoroom(14,1)"); + add("gotoposition(45,73,0)"); + add("setcheckpoint()"); + add("changedir(player,1)"); + add("fadein()"); + + add("stopmusic()"); + add("play(3)"); + }else if (t == "startexpolevel_tower") { + //For the Eurogamer EXPO! Scrap later. + add("fadeout()"); + add("musicfadeout()"); + add("untilfade()"); + add("delay(30)"); + + add("resetgame"); + + add("gotoroom(8,9)"); + add("gotoposition(95,193,0)"); + add("setcheckpoint()"); + add("changedir(player,1)"); + add("fadein()"); + + add("stopmusic()"); + add("play(2)"); + }else if (t == "skipint1") { + add("finalmode(41,56)"); + add("gotoposition(52,89,0)"); + add("changedir(player,1)"); + add("setcheckpoint()"); + add("delay(15)"); + + add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + add("showplayer()"); + add("play(8)"); + + add("hascontrol()"); + add("befadein()"); + }else if (t == "intermission_1") { + add("ifskip(skipint1)"); + add("finalmode(41,56)"); + add("gotoposition(52,89,0)"); + add("changedir(player,1)"); + add("setcheckpoint()"); + + add("cutscene()"); + + add("delay(15)"); + + add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + + add("delay(35)"); + + add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + + add("delay(25)"); + + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + + add("showplayer()"); + add("play(8)"); + + add("befadein()"); + + add("iflast(2,int1yellow_1)"); + add("iflast(3,int1red_1)"); + add("iflast(4,int1green_1)"); + add("iflast(5,int1blue_1)"); + }else if (t == "int1blue_1") { + add("delay(45)"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("Waaaa!"); + add("position(blue,above)"); + add("speak_active"); + add("face(player,blue)"); add("face(blue,player)"); + + add("squeak(blue)"); + add("text(blue,0,0,1)"); + add("Captain! Are you ok?"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("I'm ok... this..."); + add("this isn't the ship..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Where are we?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("Waaaa!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Something's gone wrong... We"); + add("should look for a way back!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("telesave()"); + + add("endcutscene()"); + add("untilbars()"); + add("gamestate(14)"); + }else if (t == "int1blue_2") { + add("cutscene()"); add("untilbars()"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Follow me! I'll help you!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("Promise you won't leave without me!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("I promise! Don't worry!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("gamestate(11)"); + }else if (t == "int1blue_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)"); add("face(blue,player)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Are you ok down there, Doctor?"); + add("position(player,below)"); + add("speak_active"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("I wanna go home!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(blue)"); + add("text(blue,0,0,2)"); + add("Where are we? How did"); + add("we even get here?"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,4)"); + add("Well, Violet did say that the"); + add("interference in the dimension"); + add("we crashed in was causing"); + add("problems with the teleporters..."); + add("position(player,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("I guess something went wrong..."); + add("position(player,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,3)"); + add("But if we can find another"); + add("teleporter, I think we can"); + add("get back to the ship!"); + add("position(player,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("text(blue,0,0,1)"); + add("Sniff..."); + add("position(blue,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1blue_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)"); add("face(blue,player)"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("Captain! Captain! Wait for me!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(blue)"); + add("text(blue,0,0,2)"); + add("Please don't leave me behind!"); + add("I don't mean to be a burden!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("I'm scared!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Oh... don't worry Victoria,"); + add("I'll look after you!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1blue_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)"); add("face(blue,player)"); + + add("squeak(cry)"); + add("text(blue,0,0,2)"); + add("We're never going to get"); + add("out of here, are we?"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("I.. I don't know..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("text(player,0,0,2)"); + add("I don't know where we are or"); + add("how we're going to get out..."); + add("position(player,above)"); + add("speak_active"); + + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1blue_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)"); add("face(blue,player)"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("We're going to be lost forever!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,2)"); + add("Ok, come on... Things"); + add("aren't that bad."); + add("position(player,above)"); + add("speak_active"); + + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("I have a feeling that"); + add("we're nearly home!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("We can't be too far"); + add("from another teleporter!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("I hope you're right, captain..."); + add("position(blue,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1blue_7") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)"); add("face(blue,player)"); + + add("squeak(blue)"); + add("text(blue,0,0,2"); + add("Captain! You were right!"); + add("It's a teleporter!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,3)"); + add("Phew! You had me worried for a"); + add("while there... I thought we"); + add("were never going to find one."); + add("position(player,above)"); + add("speak_active"); + + + add("squeak(cry)"); + add("changemood(blue,1)"); + add("text(blue,0,0,1"); + add("What? Really?"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Anyway, let's go"); + add("back to the ship."); + add("position(player,above)"); + add("speak_active"); + + add("changemood(blue,0)"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1green_1") { + add("delay(45)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Huh? This isn't the ship..."); + add("position(green,above)"); + add("speak_active"); + add("face(player,green)"); add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Captain! What's going on?"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1"); + add("text(player,0,0,1)"); + add("I... I don't know!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Where are we?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("Uh oh, this isn't good..."); + add("Something must have gone"); + add("wrong with the teleporter!"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,0"); + add("text(player,0,0,1)"); + add("Ok... no need to panic!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,0"); + add("text(player,0,0,1)"); + add("Let's look for another teleporter!"); + add("There's bound to be one around"); + add("here somewhere!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("telesave()"); + add("endcutscene()"); + add("untilbars()"); + add("gamestate(14)"); + }else if (t == "int1green_2") { + add("cutscene()"); add("untilbars()"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Let's go this way!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("After you, Captain!"); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("gamestate(11)"); + + }else if (t == "int1green_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)"); add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("So Violet's back on the"); + add("ship? She's really ok?"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("She's fine! She helped"); + add("me find my way back!"); + add("position(player,below)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Oh, phew! I was worried about her."); + add("position(green,above)"); + add("speak_active"); + add("endtext"); + + add("delay(45)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Captain, I have a secret..."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(green,1)"); + add("text(green,0,0,1)"); + add("I really like Violet!"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Is that so?"); + add("position(player,below)"); + add("speak_active"); + + add("squeak(green)"); + add("changemood(green,0)"); + add("text(green,0,0,2)"); + add("Please promise you"); + add("won't tell her!"); + add("position(green,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1green_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)"); add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Hey again!"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Hey!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Are you doing ok?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("I think so! I really"); + add("hope we can find a way"); + add("back to the ship..."); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1green_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)"); add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("So, about Violet..."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Um, yeah?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Do you have any advice?"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Oh!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("delay(45)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Hmm..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Um... you should... be yourself!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("delay(15)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Oh."); + add("position(green,above)"); + add("speak_active"); + add("endtext"); + + add("delay(75)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Thanks Captain!"); + add("position(green,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1green_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)"); add("face(green,player)"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("So, do you think you'll"); + add("be able to fix the ship?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("Depends on how bad it "); + add("is... I think so, though!"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,5)"); + add("It's not very hard, really. The"); + add("basic dimensional warping engine"); + add("design is pretty simple, and if we"); + add("can get that working we shouldn't"); + add("have any trouble getting home."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Oh! Good!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1green_7") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)"); add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Finally! A teleporter!"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("I was getting worried"); + add("we wouldn't find one..."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Let's head back to the ship!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1red_1") { + add("cutscene()"); add("untilbars()"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Wow! Where are we?"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,3)"); + add("This... isn't right..."); + add("Something must have gone"); + add("wrong with the teleporter!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("Oh well... We can work"); + add("it out when we get"); + add("back to the ship!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Let's go exploring!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,1)"); + add("Ok then!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("telesave()"); + add("endcutscene()"); add("untilbars()"); + add("gamestate(14)"); + }else if (t == "int1red_2") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)"); add("face(red,player)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Follow me!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Aye aye, Captain!"); + add("position(red,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("gamestate(11)"); + }else if (t == "int1red_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)"); add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("Hey Viridian... how did"); + add("the crash happen, exactly?"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Oh, I don't really know -"); + add("some sort of interference..."); + add("position(player,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("...or something sciencey like"); + add("that. It's not really my area."); + add("position(player,below)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("Ah! Well, do you think"); + add("we'll be able to fix"); + add("the ship and go home?"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Of course! Everything will be ok!"); + add("position(player,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1red_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)"); add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Hi again! You doing ok?"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("I think so! But I really want"); + add("to get back to the ship..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("We'll be ok! If we can find"); + add("a teleporter somewhere we"); + add("should be able to get back!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1red_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)"); add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Are we there yet?"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("We're getting closer, I think..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("I hope..."); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1red_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)"); add("face(red,player)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("I wonder where we are, anyway?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,3)"); + add("This seems different from"); + add("that dimension we crashed"); + add("in, somehow..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("I dunno... But we must be"); + add("close to a teleporter by now..."); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1red_7") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)"); add("face(red,player)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("We're there!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("See? I told you! Let's"); + add("get back to the ship!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1yellow_1") { + add("cutscene()"); add("untilbars()"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("Oooh! This is interesting..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Captain! Have you"); + add("been here before?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("What? Where are we?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("I suspect something deflected"); + add("our teleporter transmission!"); + add("This is somewhere new..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("Oh no!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,3)"); + add("We should try to find a"); + add("teleporter and get back"); + add("to the ship..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("telesave()"); + add("endcutscene()"); add("untilbars()"); + add("gamestate(14)"); + }else if (t == "int1yellow_2") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)"); add("face(yellow,player)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Follow me!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("Right behind you, Captain!"); + add("position(yellow,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("gamestate(11)"); + }else if (t == "int1yellow_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)"); add("face(yellow,player)"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("What do you make of"); + add("all this, Professor?"); + add("position(player,below)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,4)"); + add("I'm guessing this dimension"); + add("has something to do with the"); + add("interference that caused"); + add("us to crash!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Maybe we'll find the"); + add("cause of it here?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Oh wow! Really?"); + add("position(player,below)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,4)"); + add("Well, it's just a guess."); + add("I'll need to get back to"); + add("the ship before I can do"); + add("any real tests..."); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1yellow_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)"); add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("Ohh! What was that?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("What was what?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changedir(yellow,0)"); + add("text(yellow,0,0,2)"); + add("That big... C thing!"); + add("I wonder what it does?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,2)"); + add("Em... I don't really know"); + add("how to answer that question..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,3)"); + add("It's probably best not"); + add("to acknowledge that"); + add("it's there at all."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changedir(yellow,1)"); + add("text(yellow,0,0,2)"); + add("Maybe we should take it back"); + add("to the ship to study it?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,3)"); + add("We really shouldn't think"); + add("about it too much... Let's"); + add("keep moving!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1yellow_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)"); add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("You know, there's"); + add("something really odd"); + add("about this dimension..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Yeah?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changedir(yellow,0)"); + add("text(yellow,0,0,3)"); + add("We shouldn't really be able"); + add("to move between dimensions"); + add("with a regular teleporter..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changedir(yellow,0)"); + add("text(yellow,0,0,2)"); + add("Maybe this isn't a proper"); + add("dimension at all?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changedir(yellow,0)"); + add("text(yellow,0,0,4)"); + add("Maybe it's some kind of"); + add("polar dimension? Something"); + add("artificially created for"); + add("some reason?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changedir(yellow,1)"); + add("text(yellow,0,0,2)"); + add("I can't wait to get back to the"); + add("ship. I have a lot of tests to run!"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1yellow_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)"); add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("I wonder if there's anything"); + add("else in this dimension"); + add("worth exploring?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,3)"); + add("Maybe... but we should probably"); + add("just focus on finding the rest"); + add("of the crew for now..."); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "int1yellow_7") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)"); add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("At last!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("Let's go back to the ship!"); + add("position(yellow,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "skipint2") { + add("finalmode(53,49)"); + add("gotoposition(228,129,0)"); + add("changedir(player,1)"); + add("setcheckpoint()"); + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + + add("showplayer()"); + add("play(8)"); + + add("hascontrol()"); + add("befadein()"); + }else if (t == "intermission_2") { + add("ifskip(skipint2)"); + add("finalmode(53,49)"); + add("gotoposition(228,129,0)"); + add("changedir(player,1)"); + add("setcheckpoint()"); + + add("cutscene()"); + + add("delay(15)"); + + add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + + add("delay(35)"); + + add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + + add("delay(25)"); + + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + + add("showplayer()"); + add("play(8)"); + + add("befadein()"); + + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("Uh oh..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("Not again!"); + add("position(player,above)"); + add("speak_active"); + + add("iflast(2,int2intro_yellow)"); + add("iflast(3,int2intro_red)"); + add("iflast(4,int2intro_green)"); + add("iflast(5,int2intro_blue)"); + }else if (t == "int2intro_yellow") { + add("squeak(cry)"); + add("text(player,0,0,1)"); + add("Vitellary? Where are you?"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + add("delay(15)"); + + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("delay(15)"); + + add("changedir(player,0)"); + + add("createcrewman(150,-20,yellow,1,17,1)"); + + add("squeak(cry)"); + add("text(yellow,170,50,1)"); + add("Captain!"); + add("speak_active"); + add("endtext"); + + add("delay(15)"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,1)"); + add("Hang on! I'll save you!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + add("telesave()"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "int2intro_red") { + add("squeak(cry)"); + add("text(player,0,0,1)"); + add("Vermilion? Where are you?"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + add("delay(15)"); + + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("delay(15)"); + + add("changedir(player,0)"); + + add("createcrewman(150,-20,red,0,17,1)"); + + add("squeak(red)"); + add("text(red,170,50,1)"); + add("Wheeeee!"); + add("speak_active"); + add("endtext"); + + add("delay(15)"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,1)"); + add("Hang on! I'll save you!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + add("telesave()"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "int2intro_green") { + add("squeak(cry)"); + add("text(player,0,0,1)"); + add("Verdigris? Where are you?"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + add("delay(15)"); + + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("delay(15)"); + + add("changedir(player,0)"); + + add("createcrewman(150,-20,green,1,17,1)"); + + add("squeak(cry)"); + add("text(green,170,50,1)"); + add("Aaagghh!"); + add("speak_active"); + add("endtext"); + + add("delay(15)"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,1)"); + add("Hang on! I'll save you!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + add("telesave()"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "int2intro_blue") { + add("squeak(cry)"); + add("text(player,0,0,1)"); + add("Victoria? Where are you?"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + add("delay(15)"); + + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("delay(15)"); + + add("changedir(player,0)"); + + add("createcrewman(150,-20,blue,1,17,1)"); + + add("squeak(cry)"); + add("text(blue,170,50,1)"); + add("Help!"); + add("speak_active"); + add("endtext"); + + add("delay(15)"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,1)"); + add("Hang on! I'll save you!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + add("telesave()"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "int2_yellow") { + add("ifskip(skipint2yellow)"); + add("cutscene()"); + + add("tofloor()"); + add("changeai(yellow,followplayer)"); + add("untilbars()"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("That was interesting, wasn't it?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("I feel dizzy..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("changemood(player,0)"); + + add("endcutscene()"); + add("untilbars()"); + add("companion(10)"); + }else if (t == "skipint2yellow") { + add("squeak(yellow)"); + add("companion(10)"); + }else if (t == "int2_red") { + add("ifskip(skipint2red)"); + add("cutscene()"); + + add("tofloor()"); + add("changeai(red,followplayer)"); + add("untilbars()"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Again! Let's go again!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("I feel dizzy..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("changemood(player,0)"); + + add("endcutscene()"); + add("untilbars()"); + add("companion(10)"); + }else if (t == "skipint2red") { + add("squeak(red)"); + add("companion(10)"); + }else if (t == "int2_green") { + add("ifskip(skipint2green)"); + add("cutscene()"); + + add("tofloor()"); + add("changeai(green,followplayer)"); + add("untilbars()"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Phew! You're ok!"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("I feel dizzy..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("changemood(player,0)"); + + add("endcutscene()"); + add("untilbars()"); + add("companion(10)"); + }else if (t == "skipint2green") { + add("squeak(green)"); + add("companion(10)"); + }else if (t == "int2_blue") { + add("ifskip(skipint2blue)"); + add("cutscene()"); + + add("tofloor()"); + add("changeai(blue,followplayer)"); + add("untilbars()"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("I think I'm going to be sick..."); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("I feel dizzy..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("changemood(player,0)"); + add("changemood(blue,0)"); + + add("endcutscene()"); + add("untilbars()"); + add("companion(10)"); + }else if (t == "skipint2blue") { + add("squeak(blue)"); + add("companion(10)"); + }else if (t == "startexpolevel_station2") { + //For the Eurogamer EXPO! Scrap later. + add("fadeout()"); + add("musicfadeout()"); + add("untilfade()"); + add("delay(30)"); + + add("resetgame"); + + add("gotoroom(12,14)"); + add("gotoposition(126,38,1)"); + add("setcheckpoint()"); + add("changedir(player,0)"); + add("fadein()"); + + add("stopmusic()"); + add("play(1)"); + }else if (t == "finallevel_teleporter") { + add("delay(10)"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Welcome back!"); + add("position(purple,above)"); + add("speak_active"); + add("endtext"); + + add("delay(30)"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("..."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Um, where's Captain Viridian?"); + add("position(purple,above)"); + add("speak_active"); + add("endtext"); + + add("delay(30)"); + + add("walk(left,3)"); + add("delay(60)"); + + add("everybodysad()"); + add("squeak(cry)"); + add("delay(30)"); + + add("fadeout()"); + add("untilfade()"); + add("changemood(player,0)"); + add("musicfadeout()"); + + add("finalmode(46,54)"); + add("gotoposition(101,113,0)"); + add("setcheckpoint()"); + add("changedir(player,1)"); + add("restoreplayercolour"); + add("fadein()"); + add("untilfade()"); + + add("delay(15)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("... Hello?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Is anyone there?"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("missing(player)"); + + //add("squeak(cry)"); + //add("changemood(player,1)"); + + add("endcutscene()"); + add("untilbars()"); + + add("play(15)"); + add("telesave()"); + }else if (t == "skipfinal") { + add("finalmode(46,54)"); + add("gotoposition(101,113,0)"); + add("setcheckpoint()"); + add("changedir(player,1)"); + add("restoreplayercolour"); + + add("showplayer()"); + add("hascontrol()"); + add("missing(player)"); + add("play(15)"); + add("fadein()"); + add("untilfade()"); + }else if (t == "startlevel_final") { + add("ifskip(skipfinal)"); + add("cutscene()"); + add("untilbars()"); + add("activeteleporter()"); + + add("stopmusic()"); + add("play(5)"); + + add("gotoroom(2,11)"); add("gotoposition(160,120,0)"); + + add("createcrewman(190,153,purple,0,faceleft)"); + add("createrescuedcrew()"); + + add("fadein()"); + add("untilfade()"); + add("gamestate(4070)"); + }else if (t == "regularreturn") { + add("cutscene()"); + add("untilbars()"); + add("activeteleporter()"); + + add("stopmusic()"); + add("play(4)"); + + add("gotoroom(2,11)"); add("gotoposition(160,120,0)"); + + add("createlastrescued()"); + + add("fadein()"); + add("untilfade()"); + add("endcutscene()"); + add("setcheckpoint()"); + add("gamestate(4010)"); + }else if (t == "returntohub") { + //For the Eurogamer EXPO! Scrap later. + add("fadeout()"); + add("musicfadeout()"); + add("untilfade()"); + add("delay(30)"); + + add("resetgame"); + + add("gotoroom(7,8)"); + add("gotoposition(145,145,0)"); + add("setcheckpoint()"); + add("changedir(player,0)"); + add("fadein()"); + + add("stopmusic()"); + add("play(4)"); + }else if (t == "resetgame") { + //For the Eurogamer EXPO! Scrap later. + add("resetgame"); + add("gotoroom(4,6)"); + add("fadein()"); + }else if (t == "talkred") { + add("redcontrol"); + }else if (t == "talkyellow") { + add("yellowcontrol"); + }else if (t == "talkgreen") { + add("greencontrol"); + }else if (t == "talkblue") { + add("bluecontrol"); + }else if (t == "talkpurple") { + add("purplecontrol"); + }else if (t == "talkred_1") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Don't worry, Sir!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("We'll find a way"); + add("out of here!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_2") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("I hope Victoria is ok..."); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("She doesn't handle"); + add("surprises very well..."); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("I don't know how we're"); + add("going to get this ship"); + add("working again!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("Chief Verdigris would"); + add("know what to do..."); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("I wonder what caused"); + add("the ship to crash here?"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("It's the shame the Professor"); + add("isn't here, huh? I'm sure he"); + add("could work it out!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("It's great to be back!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("I can't wait to help you"); + add("find the rest of the crew!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("It'll be like old"); + add("times, huh, Captain?"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("It's good to have"); + add("Victoria back with us."); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("She really seems happy to"); + add("get back to work in her lab!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_7") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("I think I saw Verdigris"); + add("working on the outside"); + add("of the ship!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_8") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("You found Professor"); + add("Vitellary! All right!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("We'll have this interference"); + add("thing worked out in no time now!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_9") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("That other dimension was"); + add("really strange, wasn't it?"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("I wonder what caused the"); + add("teleporter to send us there?"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_10") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Heya Captain!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("This way looks a little"); + add("dangerous..."); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_11") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("I'm helping!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_12") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Hey Captain!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("I found something interesting"); + add("around here - the same warp"); + add("signature I saw when I landed!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("Someone from the ship"); + add("must be nearby..."); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_13") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("This dimension is pretty"); + add("exciting, isn't it?"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("I wonder what we'll find?"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkred_14") { + add("cutscene()"); add("untilbars()"); + add("face(player,red)");add("face(red,player)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Look what I found!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("It's pretty hard, I can only"); + add("last for about 10 seconds..."); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(red)"); + }else if (t == "talkyellow_1") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("I'm making some fascinating"); + add("discoveries, captain!"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_2") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("This isn't like any"); + add("other dimension we've"); + add("been to, Captain."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("There's something strange"); + add("about this place..."); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("Captain, have you noticed"); + add("that this dimension seems"); + add("to wrap around?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Yeah, it's strange..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(yellow,1)"); + add("text(yellow,0,0,3)"); + add("It looks like this dimension"); + add("is having the same stability"); + add("problems as our own!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("I hope we're not the"); + add("ones causing it..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("What? Do you think we might be?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changemood(yellow,0)"); + add("changemood(player,0)"); + add("text(yellow,0,0,2)"); + add("No no... that's very"); + add("unlikely, really..."); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,4)"); + add("My guess is that whoever used"); + add("to live here was experimenting"); + add("with ways to stop the dimension"); + add("from collapsing."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("It would explain why they've"); + add("wrapped the edges..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Hey, maybe that's what's"); + add("causing the interference?"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("I wonder where the people who"); + add("used to live here have gone?"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("I think it's no coincidence"); + add("that the teleporter was drawn"); + add("to that dimension..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,4)"); + add("There's something there. I"); + add("think it might be causing the"); + add("interference that's stopping"); + add("us from leaving..."); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_7") { + //Vertigris is back + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("I'm glad Verdigris is alright."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("It'll be a lot easier to find"); + add("some way out of here now that"); + add("we can get the ship working again!"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_8") { + //Victoria is back + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Ah, you've found Doctor"); + add("Victoria? Excellent!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("I have lots of questions for her!"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_9") { + //Vermilion is back + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("Vermilion says that he"); + add("was trapped in some"); + add("sort of tunnel?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Yeah, it just seemed to"); + add("keep going and going..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Interesting... I wonder"); + add("why it was built?"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_10") { + //Back on the ship! + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("It's good to be back!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("I've got so much work"); + add("to catch up on..."); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_11") { + //Game Complete + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("I know it's probably a little"); + add("dangerous to stay here now that"); + add("this dimension is collapsing..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("...but it's so rare to find"); + add("somewhere this interesting!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Maybe we'll find the answers"); + add("to our own problems here?"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_12") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("Captain! Have you seen this?"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("With their research and ours,"); + add("we should be able to stabilise"); + add("our own dimension!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("We're saved!"); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkgreen_1") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("I'm an engineer!"); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_2") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("I think I can get this ship"); + add("moving again, but it's going"); + add("to take a while..."); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_2") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("I think I can get this ship"); + add("moving again, but it's going"); + add("to take a while..."); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("Victoria mentioned something"); + add("about a lab? I wonder if she"); + add("found anything down there?"); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Vermilion's back! Yey!"); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("The Professor had lots of"); + add("questions about this"); + add("dimension for me..."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("We still don't really know"); + add("that much, though."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("Until we work out what's"); + add("causing that interference,"); + add("we can't go anywhere."); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("I'm so glad that"); + add("Violet's alright!"); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_7") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("That other dimension we ended"); + add("up in must be related to this"); + add("one, somehow..."); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_8") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(cry)"); + add("text(green,0,0,3)"); + add("The antenna's broken!"); + add("This is going to be"); + add("very hard to fix..."); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_9") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("It looks like we were warped"); + add("into solid rock when we crashed!"); + add("position(green,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("Hmm. It's going to be hard"); + add("to separate from this..."); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_10") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("The ship's all fixed up. We"); + add("can leave at a moment's notice!"); + add("position(green,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkgreen_11") { + add("cutscene()"); add("untilbars()"); + add("face(player,green)");add("face(green,player)"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("I wonder why they abandoned this"); + add("dimension? They were so close to"); + add("working out how to fix it..."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,2)"); + add("Maybe we can fix it for them?"); + add("Maybe they'll come back?"); + add("position(green,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(green)"); + }else if (t == "talkpurple_1") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(cry)"); + add("changemood(purple,1)"); + add("text(purple,0,0,1)"); + add("... I hope Verdigris is alright."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("changemood(purple,0)"); + add("text(purple,0,0,2)"); + add("If you can find him, he'd be a"); + add("a big help fixing the ship!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_2") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("Chief Verdigris is so brave"); + add("and ever so smart!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Are you doing ok, Captain?"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,0)"); + add("specialline(1)"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("Oh - well, don't worry,"); + add("they'll show up!"); + add("position(purple,above)"); + add("speak_active"); + + add("changemood(player,0)"); + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Here! Have a lollipop!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Welcome back, Captain!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("I think Victoria is quite happy"); + add("to be back on the ship."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("She really doesn't like adventuring."); + add("She gets very homesick!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("Vermilion called in"); + add("to say hello!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("He's really looking forward"); + add("specialline(2)"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Captain! You found Verdigris!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Thank you so much!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_7") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("I'm glad Professor"); + add("Vitellary is ok!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("He had lots of questions"); + add("for me about this dimension."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("He's already gotten to"); + add("work with his research!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_8") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(purple)"); + add("text(purple,0,0,4)"); + add("Hey Captain! Now that you've turned"); + add("off the source of the interference,"); + add("we can warp everyone back to the"); + add("ship instantly, if we need to!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,3)"); + add("Any time you want to come back"); + add("to the ship, just select the"); + add("new SHIP option in your menu!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_9") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(purple)"); + add("text(purple,0,0,3)"); + add("Look at all this research!"); + add("This is going to be a big"); + add("help back home!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_intermission1") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(player)"); + add("text(player,0,0,3)"); + add("Doctor, something strange"); + add("happened when we teleported"); + add("back to the ship..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("We got lost in another dimension!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(purple,1)"); + add("text(purple,0,0,1)"); + add("Oh no!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("changemood(purple,0)"); + add("changemood(player,0)"); + add("text(purple,0,0,3)"); + add("Maybe that dimension has something"); + add("to do with the interference that"); + add("caused us to crash here?"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("I'll look into it..."); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_intermission2") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("Doctor! Doctor! It happened again!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("The teleporter brought us"); + add("to that weird dimension..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("changemood(player,0)"); + add("changemood(purple,0)"); + add("text(purple,0,0,2)"); + add("Hmm, there's definitely"); + add("something strange happening..."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("If only we could find the"); + add("source of that interference!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_intermission3") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)");add("face(purple,player)"); + + add("squeak(player)"); + add("text(player,0,0,3)"); + add("Doctor, something strange has"); + add("been happening when we teleport"); + add("back to the ship..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,2)"); + add("We keep getting brought to"); + add("another weird dimension!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(purple,1)"); + add("text(purple,0,0,1)"); + add("Oh no!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("changemood(purple,0)"); + add("changemood(player,0)"); + add("text(purple,0,0,3)"); + add("Maybe that dimension has something"); + add("to do with the interference that"); + add("caused us to crash here?"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("changemood(player,0)"); + add("changemood(purple,0)"); + add("text(purple,0,0,2)"); + add("Hmm, there's definitely"); + add("something strange happening..."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("If only we could find the"); + add("source of that interference!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkpurple_intro") { + add("cutscene()"); add("untilbars()"); + add("face(player,purple)"); add("face(purple,player)"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,2)"); + add("I'm feeling a bit"); + add("overwhelmed, Doctor."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Where do I begin?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,3)"); + add("Remember that you can tap"); + add("the TOP RIGHT MENU button"); + add("to check where you are!"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("Look for areas where the rest"); + add("of the crew might be..."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("If you get lost, you can get back"); + add("to the ship from any teleporter."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("And don't worry!"); + add("We'll find everyone!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("delay(30)"); + + add("changemood(player,0)"); + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("Everything will be ok!"); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(purple)"); + }else if (t == "talkblue_1") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("Any signs of Professor Vitellary?"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Sorry, not yet..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,1)"); + add("I hope he's ok..."); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_2") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,2)"); + add("Thanks so much for"); + add("saving me, Captain!"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_3") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("I'm so glad to be back!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,3)"); + add("That lab was so dark"); + add("and scary! I didn't"); + add("like it at all..."); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_4") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,2)"); + add("Vitellary's back? I"); + add("knew you'd find him!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,2)"); + add("I mean, I admit I was very"); + add("worried that you wouldn't..."); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,2)"); + add("or that something might"); + add("have happened to him..."); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("text(blue,0,0,1)"); + add("sniff..."); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("delay(30)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Doctor Victoria? He's ok!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,3)"); + add("Oh! Sorry! I was just"); + add("thinking about what"); + add("if he wasn't?"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("delay(30)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("Thank you, Captain!"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_5") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("You found Vermilion! Great!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,2)"); + add("I wish he wasn't"); + add("so reckless!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,2)"); + add("He'll get himself"); + add("into trouble..."); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_6") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,2)"); + add("Verdigris is ok! Violet"); + add("will be so happy!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("I'm happy!"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("delay(30)"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,1)"); + add("Though I was very worried..."); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_7") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,2)"); + add("Why did the teleporter send"); + add("us to that scary dimension?"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,1)"); + add("What happened?"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("I don't know, Doctor..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,1)"); + add("Why?"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_8") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("Heya Captain!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("Are you going to try"); + add("and find the rest of"); + add("these shiny things?"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_9") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("text(blue,0,0,3)"); + add("This lab is amazing! The scentists"); + add("who worked here know a lot more"); + add("about warp technology than we do!"); + add("position(blue,below)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_trinket1") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,2)"); + add("Hey Captain, I found"); + add("this in that lab..."); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + add("delay(30)"); + + //found a trinket! + add("foundtrinket(18)"); + add("endtext"); + add("musicfadein"); + + add("delay(30)"); + add("createentity(136,80,22,18,0)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("Any idea what it does?"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Sorry, I don't know!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("They seem important, though..."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Maybe something will happen"); + add("if we find them all?"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_trinket2") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("Captain! Come have a"); + add("look at what I've"); + add("been working on!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("It looks like these shiny"); + add("things are giving off a"); + add("strange energy reading!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("So I analysed it..."); + add("position(blue,below)"); + add("speak_active"); + + add("trinketbluecontrol()"); + }else if (t == "talkblue_trinket3") { + //If you missed the first conversation + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("Captain! Come have a"); + add("look at what I've"); + add("been working on!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("I found this in that lab..."); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + add("delay(30)"); + + //found a trinket! + add("foundtrinket(18)"); + add("endtext"); + add("musicfadein"); + + add("delay(30)"); + add("createentity(136,80,22,18,0)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("It seemed to be"); + add("giving off a weird"); + add("energy reading..."); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("So I analysed it..."); + add("position(blue,below)"); + add("speak_active"); + + add("trinketbluecontrol()"); + }else if (t == "talkblue_trinket4") { + add("hidetrinkets()"); + add("endtextfast"); + add("delay(10)"); + + //add map mode here and wrap up... + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(blue)"); + add("text(blue,50,15,2)"); + add("...and I was able to find more"); + add("of them with the ship's scanner!"); + add("speak_active"); + + add("endtext"); + + add("squeak(terminal)"); + add("showtrinkets()"); + add("delay(10)"); + add("hidetrinkets()"); + add("delay(10)"); + add("showtrinkets()"); + add("delay(10)"); + add("hidetrinkets()"); + add("delay(10)"); + add("showtrinkets()"); + add("delay(75)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("If you get a chance, it"); + add("might be worth finding"); + add("the rest of them!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(cry)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(blue,0,0,2)"); + add("Don't put yourself in"); + add("any danger, though!"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_trinket5") { + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("...but it looks like you've"); + add("already found all of them"); + add("in this dimension!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Oh? Really?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,2)"); + add("Yeah, well done! That"); + add("can't have been easy!"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(blue)"); + }else if (t == "talkblue_trinket6") { + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("...and they're related."); + add("They're all a part of"); + add("something bigger!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Oh? Really?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,4)"); + add("Yeah! There seem to be"); + add("twenty variations of"); + add("the fundamental energy"); + add("signature..."); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("Wait..."); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,2)"); + add("Does that mean you've"); + add("found all of them?"); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("loadscript(startepilogue)"); + }else if (t == "talkyellow_trinket1") { + add("cutscene()"); add("untilbars()"); + add("face(player,yellow)");add("face(yellow,player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Captain! I've been meaning"); + add("to give this to you..."); + add("position(yellow,above)"); + add("speak_active"); + add("endtext"); + + add("delay(30)"); + + //found a trinket! + add("foundtrinket(18)"); + add("endtext"); + add("musicfadein"); + + add("delay(30)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Professor! Where did you find this?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("Oh, it was just lying"); + add("around that space station."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(yellow,1)"); + add("text(yellow,0,0,3)"); + add("It's a pity Doctor Victoria"); + add("isn't here, she loves studying"); + add("that sort of thing..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Any idea what it does?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changemood(yellow,0)"); + add("text(yellow,0,0,2)"); + add("Nope! But it is giving off"); + add("a strange energy reading..."); + add("position(yellow,above)"); + add("speak_active"); + add("endtext"); + + add("trinketyellowcontrol()"); + }else if (t == "talkyellow_trinket2") { + add("hidetrinkets()"); + add("endtextfast"); + add("delay(10)"); + + //add map mode here and wrap up... + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(yellow)"); + add("text(yellow,50,15,2)"); + add("...so I used the ship's scanner"); + add("to find more of them!"); + add("speak_active"); + + add("endtext"); + + add("squeak(terminal)"); + add("showtrinkets()"); + add("delay(10)"); + add("hidetrinkets()"); + add("delay(10)"); + add("showtrinkets()"); + add("delay(10)"); + add("hidetrinkets()"); + add("delay(10)"); + add("showtrinkets()"); + add("delay(75)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("squeak(yellow)"); + add("changemood(yellow,0)"); + add("text(yellow,0,0,3)"); + add("...Please don't let them"); + add("distract you from finding"); + add("Victoria, though!"); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("I hope she's ok..."); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "talkyellow_trinket3") { + add("squeak(yellow)"); + add("changemood(yellow,0)"); + add("text(yellow,0,0,2)"); + add("Can't seem to detect any"); + add("more of them nearby, though."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("changemood(yellow,0)"); + add("text(yellow,0,0,1)"); + add("Maybe you've found them all?"); + add("position(yellow,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); add("untilbars()"); + add("createactivityzone(yellow)"); + }else if (t == "gamecomplete") { + add("gotoroom(2,11)"); add("gotoposition(160,120,0)"); + add("nocontrol()"); + add("createcrewman(185,153,purple,0,faceleft)"); + add("createcrewman(205,153,yellow,0,faceleft)"); + add("createcrewman(225,153,red,0,faceleft)"); + add("createcrewman(245,153,green,0,faceleft)"); + add("createcrewman(265,153,blue,1,faceleft)"); + + add("cutscene()"); + add("untilbars()"); + + add("delay(30)"); + add("rescued(player)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("Any moment now..."); + add("position(yellow,above)"); + add("speak_active"); + add("endtext"); + add("nocontrol()"); + + add("delay(60)"); + + add("gamestate(4080)"); + }else if (t == "gamecomplete_ending") { + add("delay(15)"); + add("changemood(blue,0)"); + add("play(10)"); + add("delay(45)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Hello!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("squeak(purple)"); add("delay(1)"); + add("squeak(yellow)"); add("delay(1)"); + add("squeak(red)"); add("delay(1)"); + add("squeak(green)"); + + add("text(purple,0,0,1)"); add("Captain! "); add("position(purple,above)"); + add("backgroundtext"); add("speak"); + add("text(yellow,0,0,1)"); add("Captain! "); add("position(yellow,above)"); + add("backgroundtext"); add("speak"); + add("text(red,0,0,1)"); add("Captain! "); add("position(red,above)"); + add("backgroundtext"); add("speak"); + add("text(green,0,0,1)"); add("Captain! "); add("position(green,above)"); + add("backgroundtext"); add("speak"); + add("text(blue,0,0,1)"); add("Captain!"); add("position(blue,above)"); + add("speak"); + + add("endtextfast"); + + add("squeak(blue)"); + add("text(blue,0,0,1)"); + add("You're alright!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(blue)"); + add("text(blue,0,0,1)"); + add("I knew you'd be ok!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("We were very worried when"); + add("you didn't come back..."); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("...but when you turned"); + add("off the source of"); + add("the interference..."); + add("position(green,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,3)"); + add("...we were able to"); + add("find you with the"); + add("ship's scanners..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(red)"); + add("text(red,0,0,2)"); + add("...and teleport you"); + add("back on board!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("That was lucky!"); + add("Thanks guys!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Thanks guys!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + //Move to Vitellary's lab + add("fadeout()");add("untilfade()"); + + add("missing(purple)"); + add("missing(red)"); + add("missing(green)"); + add("missing(blue)"); + add("missing(yellow)"); + + add("gotoroom(3,11)"); + add("gotoposition(117,105,0)"); + add("changedir(player,0)"); + add("createcrewman(75,105,yellow,0,faceright)"); + add("createcrewman(190,105,red,0,faceleft)"); + + add("fadein()"); add("untilfade()"); + + add("squeak(yellow)"); + add("text(yellow,0,0,4)"); + add("...it looks like this"); + add("dimension is starting"); + add("to destabilise, just"); + add("like our own..."); + add("position(yellow,above)"); + add("speak_active"); + + add("walk(right,3)"); + + add("squeak(red)"); + add("text(red,0,0,3)"); + add("...we can stay and"); + add("explore for a little"); + add("longer, but..."); + add("position(red,above)"); + add("speak_active"); + + add("walk(left,3)"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("...eventually, it'll"); + add("collapse completely."); + add("position(yellow,above)"); + add("speak_active"); + + add("endtext"); + + //Move to Vertigris' lab + add("fadeout()"); add("untilfade()"); + + add("gotoroom(3,10)"); + add("gotoposition(210,177,0)"); + add("changedir(player,1)"); + add("createcrewman(245,177,green,0,faceleft)"); + add("createcrewman(56,177,blue,0,faceright)"); + + add("fadein()"); add("untilfade()"); + + add("squeak(green)"); + add("text(green,0,0,3)"); + add("There's no telling exactly"); + add("how long we have here. But"); + add("the ship's fixed, so..."); + add("position(green,above)"); + add("speak_active"); + + add("walk(left,3)"); + + add("squeak(blue)"); + add("text(blue,0,0,2)"); + add("...as soon as we're"); + add("ready, we can go home!"); + add("position(blue,above)"); + add("speak_active"); + + add("endtext"); + + //Move to the bridge! + add("fadeout()"); add("untilfade()"); + + add("gotoroom(4,10)"); + add("gotoposition(227,113,0)"); + add("changedir(player,0)"); + add("createcrewman(140,177,purple,0,faceright)"); + add("createcrewman(115,177,yellow,0,faceright)"); + add("createcrewman(90,177,red,0,faceright)"); + add("createcrewman(65,177,green,0,faceright)"); + add("createcrewman(40,177,blue,0,faceright)"); + + add("rescued(purple)"); + add("rescued(red)"); + add("rescued(green)"); + add("rescued(blue)"); + add("rescued(yellow)"); + + add("fadein()"); add("untilfade()"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("What now, Captain?"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Let's find a way to save"); + add("this dimension!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("And a way to save our"); + add("home dimension too!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("The answer is out there, somewhere!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("delay(60)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Let's go!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("fadeout()"); add("untilfade()"); + add("rollcredits()"); + }else if (t == "startepilogue") { + add("cutscene()"); add("untilbars()"); + add("face(player,blue)");add("face(blue,player)"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,1)"); + add("Wow! You found all of them!"); + add("position(blue,below)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Really? Great!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(blue)"); + add("changetile(blue,6)"); //smiling again! blue always needs to specify her mood + add("text(blue,0,0,3)"); + add("I'll run some tests and"); + add("see if I can work out"); + add("what they're for..."); + add("position(blue,below)"); + add("speak_active"); + + add("endtext"); + + add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + + add("musicfadeout()"); + + add("delay(30)"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("changetile(blue,150)"); //upside down frown :( + add("text(player,0,0,2)"); + add("That... that didn't"); + add("sound good..."); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("delay(30)"); + + add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + add("alarmon"); + + add("delay(30)"); + + add("squeak(cry)"); + add("text(blue,0,0,1)"); + add("Run!"); + add("position(blue,below)"); + add("speak_active"); + add("endtext"); + + add("delay(5)"); + + add("missing(green)"); + add("missing(yellow)"); + + add("flash(5)"); add("shake(50)"); add("playef(9,10)"); + add("gotoroom(3,10)"); add("gotoposition(40,177,0)"); + add("createcrewman(208,177,green,1,followposition,120)"); + add("createcrewman(240,177,purple,1,followposition,120)"); + add("createcrewman(10,177,blue,1,followposition,180)"); + + add("squeak(player)"); + add("text(player,80,150,1)"); + add("Oh no!"); + add("backgroundtext"); + add("speak_active"); + add("walk(right,20)"); + + add("endtextfast"); + + //and the next! + add("flash(5)"); add("shake(50)"); add("playef(9,10)"); + add("gotoroom(3,11)"); add("gotoposition(140,0,0)"); + + add("createcrewman(90,105,green,1,followblue)"); + add("createcrewman(125,105,purple,1,followgreen)"); + add("createcrewman(55,105,blue,1,followposition,-200)"); + + add("createcrewman(120,177,yellow,1,followposition,-200)"); + add("createcrewman(240,177,red,1,faceleft)"); + + add("delay(5)"); + add("changeai(red,followposition,-200)"); + + add("squeak(red)"); + add("text(red,100,150,1)"); + add("Not again!"); + add("backgroundtext"); + add("speak_active"); + + add("walk(left,25)"); + + add("endtextfast"); + + //final room: + add("flash(5)"); add("alarmoff"); add("playef(9,10)"); + add("gotoroom(2,11)"); add("gotoposition(265,153,0)"); + + add("createcrewman(130,153,blue,1,faceleft)"); + add("createcrewman(155,153,green,1,faceleft)"); + add("createcrewman(180,153,purple,1,faceleft)"); + add("createcrewman(205,153,yellow,1,faceleft)"); + add("createcrewman(230,153,red,1,faceleft)"); + + add("delay(75)"); + + add("squeak(player)"); + add("changemood(player,0)"); + add("text(player,0,0,1)"); + add("Wait! It's stopped!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("delay(30)"); + add("changemood(purple,0)"); add("changedir(purple,1)"); + add("changemood(red,0)"); add("changedir(red,1)"); + add("changemood(green,0)"); add("changedir(green,1)"); + add("changemood(blue,0)"); add("changedir(blue,1)"); + add("changemood(yellow,0)"); add("changedir(yellow,1)"); + add("delay(30)"); + + add("rescued(green)"); + add("rescued(yellow)"); + add("missing(blue)"); + add("altstates(1)"); + + add("fadeout()"); add("untilfade()"); + + add("gotoroom(2,10)"); + add("gotoposition(227,113,0)"); + add("changedir(player,0)"); + + add("rescued(blue)"); + + add("createcrewman(150,177,purple,0,faceleft)"); + add("createcrewman(90,177,yellow,0,faceright)"); + add("createcrewman(184,185,red,0,faceleft)"); + add("createcrewman(65,177,green,0,faceright)"); + add("createcrewman(35,177,blue,0,faceright)"); + + add("rescued(purple)"); + add("rescued(red)"); + add("rescued(green)"); + add("rescued(yellow)"); + + add("fadein()"); add("untilfade()"); + + add("delay(30)"); + + add("squeak(purple)"); + add("text(purple,0,0,3)"); + add("This is where we were"); + add("storing those shiny"); + add("things? What happened?"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,2)"); + add("We were just playing"); + add("with them, and..."); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(player,0,0,1)"); + add("...they suddenly exploded!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("squeak(blue)"); + add("text(blue,0,0,2)"); + add("But look what they made!"); + add("Is that a teleporter?"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("I think so, but..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(yellow)"); + add("text(yellow,0,0,2)"); + add("I've never seen a teleporter"); + add("like that before..."); + add("position(yellow,above)"); + add("speak_active"); + add("endtext"); + + add("changemood(player,0)"); + + add("delay(30)"); + + add("squeak(red)"); + add("text(red,0,0,1)"); + add("We should investigate!"); + add("position(red,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,1)"); + add("What do you think, Captain?"); + add("position(purple,above)"); + add("speak_active"); + + add("squeak(purple)"); + add("text(purple,0,0,2)"); + add("Should we find out"); + add("where it leads?"); + add("position(purple,above)"); + add("speak_active"); + add("endtext"); + + add("delay(15)"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Let's go!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("walk(left,10)"); + add("flip"); + add("walk(left,5)"); + + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("blackout()"); + + add("delay(45)"); + + add("gotoroom(17,6)"); add("gotoposition(80,109,1)"); + add("changedir(player,1)"); + add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("blackon()"); + + add("delay(15)"); add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("createcrewman(28,65,purple,0,faceright)"); + + add("delay(15)"); add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("createcrewman(145,169,yellow,0,faceleft)"); + + add("delay(15)"); add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("createcrewman(32,169,red,0,faceright)"); + + add("delay(15)"); add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("createcrewman(96,149,green,0,faceleft)"); + + add("delay(15)"); add("flash(5)"); add("shake(20)"); add("playef(10,10)"); + add("createcrewman(155,57,blue,0,faceleft)"); + + add("delay(45)"); + + + add("squeak(cry)"); + add("changemood(blue,1)"); + add("text(blue,0,0,1)"); + add("Oh no! We're trapped!"); + add("position(blue,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(yellow,1)"); + add("text(yellow,0,0,1)"); + add("Oh dear..."); + add("position(yellow,above)"); + add("speak_active"); + + add("squeak(cry)"); + add("changemood(red,1)"); + add("changemood(green,1)"); + add("changemood(purple,1)"); + add("changemood(player,1)"); + add("text(player,0,0,2)"); + add("Hmm... how should we"); + add("get out of this?"); + add("position(player,below)"); + add("speak_active"); + + add("endtext"); + + add("delay(70)"); + + add("squeak(purple)"); add("delay(1)"); + add("squeak(yellow)"); add("delay(1)"); + add("squeak(red)"); add("delay(1)"); + add("squeak(blue)"); add("delay(1)"); + add("squeak(player)"); add("delay(1)"); + add("squeak(green)"); + + add("changemood(yellow,0)"); + add("changemood(blue,0)"); + add("changemood(red,0)"); + add("changemood(player,0)"); + add("changemood(green,0)"); + add("changemood(purple,0)"); + add("text(player,0,0,1)"); add("COMBINE!"); add("position(player,above)"); + add("backgroundtext"); add("speak"); + add("text(purple,0,0,1)"); add("COMBINE!"); add("position(purple,above)"); + add("backgroundtext"); add("speak"); + add("text(yellow,0,0,1)"); add("COMBINE!"); add("position(yellow,above)"); + add("backgroundtext"); add("speak"); + add("text(red,0,0,1)"); add("COMBINE!"); add("position(red,above)"); + add("backgroundtext"); add("speak"); + add("text(green,0,0,1)"); add("COMBINE!"); add("position(green,above)"); + add("backgroundtext"); add("speak"); + add("text(blue,0,0,1)"); add("COMBINE!"); add("position(blue,above)"); + add("speak"); + + add("endtextfast"); + + add("delay(15)"); + add("flip"); + add("changeai(purple,followplayer)"); + add("changeai(blue,followplayer)"); + add("changeai(red,followplayer)"); + add("changeai(yellow,followplayer)"); + add("changeai(green,followplayer)"); + add("walk(right,3)"); + + add("delay(5)"); + add("flash(10)"); add("shake(20)"); add("playef(24,10)"); + add("gotoroom(17,6)"); add("vvvvvvman()"); + + + add("delay(90)"); + + + add("walk(right,6)"); + add("flash(10)"); add("shake(20)"); add("playef(23,10)"); + add("altstates(2)"); + add("gotoroom(17,6)"); + + add("delay(20)"); + + add("walk(right,12)"); + add("flash(10)"); add("shake(20)"); add("playef(23,10)"); + add("altstates(0)"); + add("gotoroom(17,6)"); + + add("delay(20)"); + + add("walk(right,15)"); + + add("gotoroom(18,6)"); add("gotoposition(0,46,0)"); + add("walk(right,5)"); + + add("delay(20)"); + add("flash(10)"); add("shake(20)"); add("playef(24,10)"); + add("undovvvvvvman()"); + add("createcrewman(30,99,purple,0,faceright)"); + add("createcrewman(65,119,yellow,0,faceright)"); + add("createcrewman(135,149,red,0,faceleft)"); + add("createcrewman(170,159,green,0,faceleft)"); + add("createcrewman(205,159,blue,0,faceleft)"); + + + add("delay(60)"); + + + add("changedir(yellow,0)"); + add("changedir(player,0)"); + add("delay(20)"); + add("squeak(purple)"); + add("text(purple,0,0,3)"); + add("Or, you know... we could"); + add("have just warped back"); + add("to the ship..."); + add("position(purple,above)"); + add("speak_active"); + + add("endtext"); + + add("delay(30)"); + + add("changedir(purple,1)"); + add("changedir(yellow,1)"); + add("changedir(player,1)"); + add("changedir(red,1)"); + + add("changedir(green,1)"); + add("squeak(green)"); + add("text(green,0,0,1)"); + add("Wow! What is this?"); + add("position(green,above)"); + add("speak_active"); + + + add("changedir(purple,1)"); + add("changedir(yellow,1)"); + add("changedir(player,0)"); + add("changedir(red,0)"); + add("changedir(green,0)"); + add("squeak(yellow)"); + add("text(yellow,0,0,1)"); + add("It looks like another laboratory!"); + add("position(yellow,above)"); + add("speak_active"); + + add("changedir(purple,1)"); + add("changedir(yellow,1)"); + add("changedir(player,1)"); + add("squeak(red)"); + add("text(red,0,0,1)"); + add("Let's have a look around!"); + add("position(red,above)"); + add("speak_active"); + + add("endtext"); + + add("delay(20)"); + add("changeai(yellow,followposition,500)"); + add("changeai(purple,followposition,500)"); + add("changeai(blue,followposition,500)"); + add("changeai(red,followposition,500)"); + add("changeai(green,followposition,500)"); + + add("delay(21)"); + add("changeai(yellow,faceright)"); + add("flipgravity(yellow)"); add("playef(0,10)"); + add("delay(2)"); + add("changeai(purple,faceright)"); + add("flipgravity(purple)"); add("playef(0,10)"); + + add("delay(48)"); + + add("foundlab"); + add("endtext"); + add("foundlab2"); + add("endtext"); + + add("entersecretlab"); + add("play(11)"); + + add("endcutscene()"); add("untilbars()"); + }else if (t == "returntolab") { + //To get back to the lab from the gravitron + add("gotoroom(19,7)"); add("gotoposition(132,137,0)"); + add("fadein()"); + + add("setcheckpoint()"); + + add("play(11)"); + add("endcutscene()"); add("untilbars()"); + }else { + loadother(t); + } + + running = true; +} \ No newline at end of file diff --git a/mobile_version/src/includes/terminalscripts.as b/mobile_version/src/includes/terminalscripts.as new file mode 100644 index 00000000..cd07a551 --- /dev/null +++ b/mobile_version/src/includes/terminalscripts.as @@ -0,0 +1,816 @@ +public function loadother(t:String):void { + //loads script name t into the array + if (t == "terminal_station_1") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= PERSONAL LOG =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,120,6)"); + add(" Almost everyone has been "); + add(" evacuated from the space "); + add(" station now. The rest of us "); + add(" are leaving in a couple of "); + add(" days, once our research has "); + add(" been completed. "); + add("position(center)"); + add("speak"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "alreadyvisited") { + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("...oh, I've already found this."); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_outside_1") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,5)"); + add(" ... our first breakthrough was "); + add(" the creation of the inversion "); + add(" plane, which creates a "); + add(" mirrored dimension beyond a "); + add(" given event horizon ... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("ifexplored(2,16,alreadyvisited)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showcoordinates(2,16)"); + add("delay(10)"); + add("hidecoordinates(2,16)"); + add("delay(10)"); + add("showcoordinates(2,16)"); + add("delay(10)"); + add("hidecoordinates(2,16)"); + add("delay(10)"); + add("showcoordinates(2,16)"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_outside_2") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,3)"); + add("...with just a small modification to"); + add("the usual parameters, we were able "); + add("to stabilise an infinite tunnel! "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("ifexplored(8,9,alreadyvisited)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showcoordinates(8,9)"); + add("delay(10)"); + add("hidecoordinates(8,9)"); + add("delay(10)"); + add("showcoordinates(8,9)"); + add("delay(10)"); + add("hidecoordinates(8,9)"); + add("delay(10)"); + add("showcoordinates(8,9)"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_outside_3") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,3)"); + add(" ... the final step in creating "); + add(" the dimensional stabiliser was "); + add(" to create a feedback loop ... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("ifexplored(14,1,alreadyvisited)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showcoordinates(14,1)"); + add("delay(10)"); + add("hidecoordinates(14,1)"); + add("delay(10)"); + add("showcoordinates(14,1)"); + add("delay(10)"); + add("hidecoordinates(14,1)"); + add("delay(10)"); + add("showcoordinates(14,1)"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_outside_4") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,4)"); + add(" ...despite our best efforts, "); + add(" the dimensional stabiliser "); + add(" won't hold out forever. Its "); + add(" collapse is inevitable... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("Huh? These coordinates aren't"); + add("even in this dimension!"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_outside_5") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Personal Log =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,5)"); + add(" ... I've had to seal off "); + add(" access to most of our "); + add(" research. Who knows what "); + add(" could happen if it fell "); + add(" into the wrong hands? ... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showsecretlab()"); + add("delay(10)"); + add("hidesecretlab()"); + add("delay(10)"); + add("showsecretlab()"); + add("delay(10)"); + add("hidesecretlab()"); + add("delay(10)"); + add("showsecretlab()"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_outside_6") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,3)"); + add("... access to the control center"); + add("is still possible through the "); + add("main atmospheric filters ... "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + add("delay(10)"); + + add("ifexplored(12,14,alreadyvisited)"); + + add("gamemode(teleporter)"); + add("delay(20)"); + + add("squeak(terminal)"); + add("showcoordinates(12,14)"); + add("delay(10)"); + add("hidecoordinates(12,14)"); + add("delay(10)"); + add("showcoordinates(12,14)"); + add("delay(10)"); + add("hidecoordinates(12,14)"); + add("delay(10)"); + add("showcoordinates(12,14)"); + add("delay(45)"); + + add("gamemode(game)"); + add("delay(20)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_finallevel") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,9)"); + add("* DIMENSIONAL STABILITY GENERATOR *"); + add(""); + add(" [ Currently Generating ] "); + add(" Maximum Stability "); + add(""); + add(" [ Status ]"); + add(" Online"); + add(""); + add("READY _"); + add("position(center)"); + add("speak_active"); + + add("endtextfast"); + add("delay(10)"); + + add("squeak(player)"); + add("text(cyan,0,0,2)"); + add("Aha! This must be what's" ); + add("causing the interference!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("I wonder if I can turn it off?"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add("WARNING: Disabling the Dimensional"); + add("Stability Generator may lead to"); + add("instability! Are you sure you want"); + add("to do this?"); + add("position(center)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("Yes!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,6)"); + add("Seriously! The whole dimension"); + add("could collapse! Just think about"); + add("this for a minute!"); + add(""); + add("Are you really sure you want"); + add("to do this?"); + add("position(center)"); + add("speak_active"); + + add("squeak(player)"); + add("text(cyan,0,0,1)"); + add("Yes!"); + add("position(player,above)"); + add("speak_active"); + + add("endtext"); + + add("stopmusic"); + add("gamestate(200)"); + }else if (t == "finalterminal_finish") { + + + //add("delay(15)"); add("flash(5)"); add("shake(20)"); add("playef(9,10)"); + + add("text(gray,0,114,3)"); + add(" -= WARNING =- "); + add(""); + add(" DIMENSIONAL STABILISER OFFLINE "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("squeak(cry)"); + add("changemood(player,1)"); + add("text(cyan,0,0,1)"); + add("Uh oh..."); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("play(2)"); + add("changemood(player,0)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_station_2") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= Research Notes =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,3)"); + add(" ...everything collapses, "); + add(" eventually. It's the way "); + add(" of the universe. "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_station_3") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add("I wonder if the generator we set"); + add("up in the polar dimension is"); + add("what's affecting our teleporters?"); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,1)"); + add("No, it's probably just a glitch."); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_station_4") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,60,1)"); + add(" -= PERSONAL LOG =- "); + add("position(centerx)"); + add("backgroundtext"); + add("flipme"); + add("speak"); + + add("text(gray,0,114,2)"); + add(" Hah! Nobody will ever "); + add(" get this one. "); + add("position(center)"); + add("speak"); + + add("endtextfast"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_warp_1") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add("...The other day I was chased"); + add("down a hallway by a giant cube"); + add("with the word AVOID on it."); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,1)"); + add("These security measures go too far!"); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_warp_2") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,2)"); + add("The only way into my private lab"); + add("anymore is by teleporter."); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add("I've made sure that it's"); + add("difficult for unauthorised"); + add("personnel to gain access."); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_lab_1") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add("... it turns out the key to"); + add("stabilising this dimension was"); + add("to create a balancing force"); + add("outside of it!"); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,2)"); + add("Though it looks like that's just"); + add("a temporary solution, at best."); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add("I've been working on"); + add("something more permanent,"); + add("but it seems it's going"); + add("to be too late..."); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_lab_2") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,1)"); + add("?SYNTAX ERROR"); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_secretlab") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" -= WARNING =-"); + add(""); + add(" The Super-Gravitron is intended "); + add(" for entertainment purposes only. "); + add("position(center)"); + add("speak_active"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add("Anyone found using the Super"); + add("Gravitron for educational"); + add("purposes may be asked to"); + add("stand in the naughty corner."); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_shipcomputer") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add(" -= D.S.S. SOULEYE =- "); + add(""); + add(" Ship Navigation Controls "); + add("position(center)"); + add("speak_active"); + + add("ifflag(67,terminal_letsgo)"); + + add("squeak(terminal)"); + add("text(gray,0,114,3)"); + add("Error! Error! Cannot isolate"); + add("dimensional coordinates!"); + add("Interference detected!"); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_letsgo") { + add("squeak(player)"); + add("text(player,0,0,2)"); + add("Now that the ship is fixed,"); + add("we can leave anytime we want!"); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,3)"); + add("We've all agreed to"); + add("keep exploring this"); + add("dimension, though."); + add("position(player,above)"); + add("speak_active"); + + add("squeak(player)"); + add("text(player,0,0,1)"); + add("Who knows what we'll find?"); + add("position(player,above)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_radio") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" -= SHIP RADIO =- "); + add(""); + add(" [ Status ]"); + add(" Broadcasting"); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukebox") { + add("cutscene()"); + add("untilbars()"); + + add("squeak(terminal)"); + add("text(gray,0,114,7)"); + add(" -= JUKEBOX =- "); + add(""); + add(" Songs will continue to play "); + add(" until you leave the ship."); + add(""); + add(" Collect trinkets to"); + add(" unlock new songs!"); + add("position(center)"); + add("speak_active"); + + add("endtext"); + + add("iftrinketsless(5,terminal_jukeunlock1)"); + add("iftrinketsless(8,terminal_jukeunlock2)"); + add("iftrinketsless(10,terminal_jukeunlock3)"); + add("iftrinketsless(12,terminal_jukeunlock4)"); + add("iftrinketsless(14,terminal_jukeunlock41)"); + add("iftrinketsless(16,terminal_jukeunlock5)"); + add("iftrinketsless(18,terminal_jukeunlock6)"); + add("iftrinketsless(20,terminal_jukeunlock7)"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukeunlock1") { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 5 Trinkets"); + add(""); + add(" Pushing onwards "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukeunlock2") { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 8 Trinkets"); + add(""); + add(" Positive force "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukeunlock3") { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 10 Trinkets"); + add(""); + add(" Presenting VVVVVV "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukeunlock4") { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 12 Trinkets"); + add(""); + add(" Potential for anything "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukeunlock41") { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 14 Trinkets"); + add(""); + add(" Pressure Cooker "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukeunlock5") { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 16 Trinkets"); + add(""); + add(" Predestined fate "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukeunlock6") { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 18 Trinkets"); + add(""); + add(" Popular Potpourri "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_jukeunlock7") { + add("squeak(terminal)"); + add("text(gray,0,114,4)"); + add(" NEXT UNLOCK: "); + add(" 20 Trinkets"); + add(""); + add(" Pipe Dream "); + add("position(center)"); + add("speak_active"); + add("endtext"); + + add("endcutscene()"); + add("untilbars()"); + }else if (t == "terminal_juke1") { + add("play(4)"); + add("squeak(terminal)"); + add("jukebox(1)"); + }else if (t == "terminal_juke2") { + add("play(1)"); + add("squeak(terminal)"); + add("jukebox(2)"); + }else if (t == "terminal_juke3") { + add("play(2)"); + add("squeak(terminal)"); + add("jukebox(3)"); + }else if (t == "terminal_juke4") { + add("play(6)"); + add("squeak(terminal)"); + add("jukebox(4)"); + }else if (t == "terminal_juke5") { + add("play(3)"); + add("squeak(terminal)"); + add("jukebox(5)"); + }else if (t == "terminal_juke6") { + add("play(8)"); + add("squeak(terminal)"); + add("jukebox(6)"); + }else if (t == "terminal_juke7") { + add("play(11)"); + add("squeak(terminal)"); + add("jukebox(7)"); + }else if (t == "terminal_juke8") { + add("play(10)"); + add("squeak(terminal)"); + add("jukebox(8)"); + }else if (t == "terminal_juke9") { + add("play(12)"); + add("squeak(terminal)"); + add("jukebox(9)"); + }else if (t == "terminal_juke10") { + add("play(9)"); + add("squeak(terminal)"); + add("jukebox(10)"); + } +} \ No newline at end of file diff --git a/mobile_version/src/mapclass.as b/mobile_version/src/mapclass.as new file mode 100644 index 00000000..7b328666 --- /dev/null +++ b/mobile_version/src/mapclass.as @@ -0,0 +1,1611 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class mapclass extends Sprite { + public function mapclass():void { + //Start here! + r = 196; g = 196; b = 196; + colstate = 0; colstatedelay = 0; colsuperstate = 0; + spikeleveltop = 0; spikelevelbottom = 0; + warpx = false; warpy = false; + extrarow = 0; + + showteleporters = false; showtargets = false; showtrinkets = false; + + finalmode = false; finalstretch = false; + finalx = 50; finaly = 50; + + cursorstate = 0; cursordelay = 0; + + final_colormode = false; final_colorframe = 0; final_colorframedelay = 0; + final_mapcol = 0; + final_aniframe = 0; final_aniframedelay = 0; + + rcol = 0; + + //This needs to be in map instead! + invincibility = false; + + //We init the lookup table: + for (i = 0; i < 30; i++) { + vmult.push(int(i * 40)); + teleporters.push(new Point()); + shinytrinkets.push(new Point()); + } + //We create a blank map + for (j = 0; j < 30; j++) { + for (i = 0; i < 40; i++) { + contents.push(int(0)); + optimiser.push(int(0)); + } + } + + for (j = 0; j < 20; j++) { + for (i = 0; i < 20; i++) { + areamap.push(0); + roomdeaths.push(0); + roomdeathsfinal.push(0); + explored.push(0); + } + } + + tileset = 0; + initmapdata(); + + for (i = 0; i < 8; i++) { + specialnames.push(new String); + } + resetnames(); + + //roomtext + + for (i = 0; i < 40; i++) { + roomtextx.push(int(0)); + roomtexty.push(int(0)); + roomtext.push(new String); + } + //here + roomtexton = false; roomtextnumlines = 0; + + //Areamap starts at 100,100 and extends 20x20 + realtmap = new Array(); + realtmap.push("1,2,2,2,2,2,2,2,0,3,0,0,0,4,4,4,4,4,4,4"); + realtmap.push("1,2,2,2,2,2,2,0,0,3,0,0,0,0,4,4,4,4,4,4"); + realtmap.push("0,1,0,0,2,0,0,0,0,3,0,0,0,0,4,4,4,4,4,4"); + realtmap.push("0,0,0,0,2,0,0,0,0,3,0,0,5,5,5,5,4,4,4,4"); + realtmap.push("0,0,2,2,2,0,0,0,0,3,11,11,5,5,5,5,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,0,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,5,0,0,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,5,5,5,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,0,0,0,5,5,5,5,5,5,0"); + realtmap.push("0,0,0,0,0,0,0,0,11,3,0,0,0,5,5,5,5,5,5,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,0,0,0,5,5,5,5,5,5,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,5,5,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,0,5,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,0,5,0"); + realtmap.push("0,0,0,0,0,0,0,0,0,3,0,5,5,0,0,0,0,0,5,0"); + realtmap.push("0,0,0,0,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("0,0,2,2,2,2,2,2,0,3,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("0,2,2,2,2,2,2,2,0,3,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("2,2,2,2,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0"); + realtmap.push("2,2,2,2,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0"); + fillareamap(realtmap); + } + + public function RGB(red:Number,green:Number,blue:Number):Number{ + return (blue | (green << 8) | (red << 16)) + } + + public function intpol(a:int, b:int, c:Number):int { + return int(a + ((b - a) * c)); + } + + public function setteleporter(t:int, x:int, y:int):void { + teleporters[t].x = x; teleporters[t].y = y; + } + + public function settrinket(t:int, x:int, y:int):void { + shinytrinkets[t].x = x; shinytrinkets[t].y = y; + } + + public function resetmap():void { + //clear the explored area of the map + for (j = 0; j < 20; j++) { + for (i = 0; i < 20; i++){ + explored[i + (j * 20)] = 0; + } + } + } + + public function resetnames():void { + //Reset all the special names + specialnames[0] = "Rear Window"; + specialnames[1] = "On the Waterfront"; + specialnames[2] = "The Untouchables"; + specialnames[3] = "Television Newsveel"; + specialnames[4] = "Vwitched"; + specialnames[5] = "Gvnsmoke"; + specialnames[6] = "Please enjoy these repeats"; + specialnames[7] = "Try Jiggling the Antenna"; + + glitchmode = 0; glitchdelay = 0; + } + + public function transformname(t:int):void { + //transform special names into new ones, one step at a time + + /* + if (specialnames[3] == "") { specialnames[3] = ; + }else if (specialnames[3] == "") { specialnames[3] = ; + } + */ + + glitchdelay--; + if(glitchdelay<=0){ + switch(t) { + case 3: + //Television Newsveel -> The 9 O'Clock News + if (specialnames[3] == "Television Newsveel") { specialnames[3] = "Television Newsvel"; + }else if (specialnames[3] == "Television Newsvel") { specialnames[3] = "TelevisvonvNewsvel"; + }else if (specialnames[3] == "TelevisvonvNewsvel") { specialnames[3] = "TvlvvvsvonvNevsvel"; + }else if (specialnames[3] == "TvlvvvsvonvNevsvel") { specialnames[3] = "vvvvvvsvovvNe svel"; + }else if (specialnames[3] == "vvvvvvsvovvNe svel") { specialnames[3] = "vhv vvv'vvovv vevl"; + }else if (specialnames[3] == "vhv vvv'vvovv vevl") { specialnames[3] = "vhv V v'Cvovv vewv"; + }else if (specialnames[3] == "vhv V v'Cvovv vewv") { specialnames[3] = "vhe 9 v'Cvovv vewv"; + }else if (specialnames[3] == "vhe 9 v'Cvovv vewv") { specialnames[3] = "vhe 9 v'Cvovv Newv"; + }else if (specialnames[3] == "vhe 9 v'Cvovv Newv") { specialnames[3] = "The 9 O'Cvovk Newv"; + }else if (specialnames[3] == "The 9 O'Cvovk Newv") { specialnames[3] = "The 9 O'Clock News"; + } + break; + case 4: + //Vwitched -> Dial M for Murder + if (specialnames[4] == "Vwitched") { specialnames[4] = "Vwitvhed"; + }else if (specialnames[4] == "Vwitvhed") { specialnames[4] = "vVwivcvedv"; + }else if (specialnames[4] == "vVwivcvedv") { specialnames[4] = "vvvwMvcvMdvv"; + }else if (specialnames[4] == "vvvwMvcvMdvv") { specialnames[4] = "DvvvwMvfvvMdvvv"; + }else if (specialnames[4] == "DvvvwMvfvvMdvvv") { specialnames[4] = "Dvav Mvfvr Mdvvvv"; + }else if (specialnames[4] == "Dvav Mvfvr Mdvvvv") { specialnames[4] = "Diav M for Mdrver"; + }else if (specialnames[4] == "Diav M for Mdrver") { specialnames[4] = "Dial M for Murder"; + } + break; + case 5: + //Gvnsmoke -> Gunsmoke 1966 + if (specialnames[5] == "Gvnsmoke") { specialnames[5] = "Gvnsmove"; + }else if (specialnames[5] == "Gvnsmove") { specialnames[5] = "Gvnvmovevv"; + }else if (specialnames[5] == "Gvnvmovevv") { specialnames[5] = "Gunvmove1vv6"; + }else if (specialnames[5] == "Gunvmove1vv6") { specialnames[5] = "Vunsmoke 19v6"; + }else if (specialnames[5] == "Vunsmoke 19v6") { specialnames[5] = "Gunsmoke 1966"; + } + break; + case 6: + //Please enjoy these repeats -> In the Margins + if (specialnames[6] == "Please enjoy these repeats") { specialnames[6] = "Please envoy theve repeats"; + }else if (specialnames[6] == "Please envoy theve repeats") { specialnames[6] = "Plse envoy tse rvpvas"; + }else if (specialnames[6] == "Plase envoy these rvpeas") { specialnames[6] = "Plse envoy tse rvpvas"; + }else if (specialnames[6] == "Plse envoy tse rvpvas") { specialnames[6] = "Vl envoy te rvevs"; + }else if (specialnames[6] == "Vl envoy te rvevs") { specialnames[6] = "Vv evo tv vevs"; + }else if (specialnames[6] == "Vv evo tv vevs") { specialnames[6] = "Iv vhv Mvrvivs"; + }else if (specialnames[6] == "Iv vhv Mvrvivs") { specialnames[6] = "In the Margins"; + } + break; + case 7: + //Try Jiggling the Antenna -> Heaven's Gate + if (specialnames[7] == "Try Jiggling the Antenna") { specialnames[7] = "Try Viggling the Antenna"; + }else if (specialnames[7] == "Try Viggling the Antenna") { specialnames[7] = "TryJivglvng theAvtevna"; + }else if (specialnames[7] == "TryJivglvng theAvtevna") { specialnames[7] = "Tvvivglvng thAvtvvv"; + }else if (specialnames[7] == "Tvvivglvng thAvtvvv") { specialnames[7] = "Vvvgglvnv tvnvva"; + }else if (specialnames[7] == "Vvvgglvnv tvnvva") { specialnames[7] = "Vvavvnvs vvtv"; + }else if (specialnames[7] == "Vvavvnvs vvtv") { specialnames[7] = "Veavvn's Gvte"; + }else if (specialnames[7] == "Veavvn's Gvte") { specialnames[7] = "Heaven's Gate"; + } + break; + } + glitchdelay = 5; + }else { + glitchdelay--; + } + } + + public function getglitchname(x:int, y:int):String { + //Returns the name in the final area. + if (roomname == "glitch") { + //8 Cases! + //First, the three "glitches" + glitchdelay--; + if (glitchdelay <= -5) { + glitchmode = (glitchmode + 1) % 2; + glitchdelay = 0; + if (glitchmode == 0) glitchdelay = 20 +int(Math.random() * 10); + } + + if (x == 42 && y == 51) { + if (glitchmode == 0) { + return specialnames[0]; + }else return "Rear Vindow"; + }else if (x == 48 && y == 51) { + if (glitchmode == 0) { + return specialnames[1]; + }else return "On the Vaterfront"; + }else if (x == 49 && y == 51) { + if (glitchmode == 0) { + return specialnames[2]; + }else return "The Untouchavles"; + } + }else if (roomname == "change") { + if (finalstretch) { + if (x == 45 && y == 51) transformname(3); + if (x == 46 && y == 51) transformname(4); + if (x == 47 && y == 51) transformname(5); + if (x == 50 && y == 53) transformname(6); + if (x == 50 && y == 54) transformname(7); + } + + if (x == 45 && y == 51) return specialnames[3]; + if (x == 46 && y == 51) return specialnames[4]; + if (x == 47 && y == 51) return specialnames[5]; + if (x == 50 && y == 53) return specialnames[6]; + if (x == 50 && y == 54) return specialnames[7]; + return roomname; + }else{ + return roomname; + } + return roomname; + } + + public function initmapdata():void { + //Set up static map information like teleporters and shiny trinkets. + numteleporters = 17; + setteleporter(0, 0, 0); + setteleporter(1, 0, 16); + setteleporter(2, 2, 4); + setteleporter(3, 2, 11); + setteleporter(4, 7, 9); + setteleporter(5, 7, 15); + setteleporter(6, 8, 11); + setteleporter(7, 10, 5); + setteleporter(8, 11, 4); + setteleporter(9, 13, 2); + setteleporter(10, 13, 8); + setteleporter(11, 14, 19); + setteleporter(12, 15, 0); + setteleporter(13, 17, 12); + setteleporter(14, 17, 17); + setteleporter(15, 18, 1); + setteleporter(16, 18, 7); + + numshinytrinkets = 18; + settrinket(0, 14, 4); + settrinket(1, 13, 6); + settrinket(2, 11, 12); + settrinket(3, 15, 12); + settrinket(4, 14, 11); + settrinket(5, 18, 14); + settrinket(6, 11, 7); + settrinket(7, 9, 2); + settrinket(8, 9, 16); + settrinket(9, 2, 18); + settrinket(10, 7, 18); + settrinket(11, 6, 1); + settrinket(12, 17, 3); + settrinket(13, 10, 19); + settrinket(14, 5, 15); + settrinket(15, 1, 10); + settrinket(16, 3, 2); + settrinket(17, 10, 8); + } + + public function finalat(x:int, y:int):int { + //return the tile index of the final stretch tiles offset by the colour difference + if (contents[x + vmult[y]] == 740) { + //Special case: animated tiles + if (final_mapcol == 1) { + return contents[x + vmult[y]] - (final_mapcol * 3) + (int(Math.random()*12)*40); + }else{ + return contents[x + vmult[y]] - (final_mapcol * 3) + (final_aniframe * 40); + } + }else if (contents[x + vmult[y]] >= 80) { + return contents[x + vmult[y]] - (final_mapcol * 3); + }else { + return contents[x + vmult[y]]; + } + return 0; + } + + public function maptiletoenemycol(t:int):int { + //returns the colour index for enemies that matches the map colour t + switch(t) { + case 0: return 11; break; + case 1: return 6; break; + case 2: return 8; break; + case 3: return 12; break; + case 4: return 9; break; + case 5: return 7; break; + case 6: return 18; break; + } + return 11; + } + + public function changefinalcol(t:int, obj:entityclass, game:gameclass):void { + //change the map to colour t - for the game's final stretch. + //First up, the tiles. This is just a setting: + final_mapcol = t; + temp = 6 - t; + //Next, entities + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].type == 1) { //something with a movement behavior + if (obj.entities[i].animate == 10 || obj.entities[i].animate == 11) { //treadmill + if(temp<3){ + obj.entities[i].tile = 907 + (temp * 80); + }else { + obj.entities[i].tile = 911 + ((temp-3) * 80); + } + if(obj.entities[i].animate == 10) obj.entities[i].tile += 40; + }else if (obj.entities[i].isplatform){ + obj.entities[i].tile = 915+(temp*40); + }else { //just an enemy + obj.entities[i].colour = maptiletoenemycol(temp); + } + }else if (obj.entities[i].type == 2) { //disappearing platforms + obj.entities[i].tile = 915+(temp*40); + } + } + } + + public function setcol(r1:int, g1:int, b1:int, r2:int, g2:int, b2:int, c:int):void { + r = intpol(r1, r2, c / 5); + g = intpol(g1, g2, c / 5); + b = intpol(b1, b2, c / 5); + } + + public function updatetowerglow():void { + if (colstatedelay <= 0 || colsuperstate > 0) { + if (colsuperstate > 0) colstate--; + colstate++; if (colstate >= 30) colstate = 0; + check = colstate % 5; //current state of phase + cmode = (colstate - check) / 5; // current colour transition + + switch(cmode) { + case 0: setcol(255, 93, 107, 255, 255, 93, check); break; + case 1: setcol(255, 255, 93, 159, 255, 93, check); break; + case 2: setcol(159, 255, 93, 93, 245, 255, check); break; + case 3: setcol(93, 245, 255, 177, 93, 255, check); break; + case 4: setcol(177, 93, 255, 255, 93, 255, check); break; + case 5: setcol(255, 93, 255, 255, 93, 107, check); break; + } + + if (check == 0) { + colstatedelay = 45; + }else { + colstatedelay = 0; + } + if (colsuperstate > 0) colstatedelay = 0; + + tdrawback = true; + towercol = RGB(r*0.04, g*0.04, b*0.04); + }else { + colstatedelay--; + } + } + + public function nexttowercolour():void { + colstate+=5; if (colstate >= 30) colstate = 0; + check = colstate % 5; //current state of phase + cmode = (colstate - check) / 5; // current colour transition + + switch(cmode) { + case 0: setcol(255, 93, 107, 255, 255, 93, check); break; + case 1: setcol(255, 255, 93, 159, 255, 93, check); break; + case 2: setcol(159, 255, 93, 93, 245, 255, check); break; + case 3: setcol(93, 245, 255, 177, 93, 255, check); break; + case 4: setcol(177, 93, 255, 255, 93, 255, check); break; + case 5: setcol(255, 93, 255, 255, 93, 107, check); break; + } + + tdrawback = true; + towercol = RGB(r*0.04, g*0.04, b*0.04); + } + + public function settowercolour(t:int):void { + colstate=t*5; if (colstate >= 30) colstate = 0; + check = colstate % 5; //current state of phase + cmode = (colstate - check) / 5; // current colour transition + + switch(cmode) { + case 0: setcol(255, 93, 107, 255, 255, 93, check); break; + case 1: setcol(255, 255, 93, 159, 255, 93, check); break; + case 2: setcol(159, 255, 93, 93, 245, 255, check); break; + case 3: setcol(93, 245, 255, 177, 93, 255, check); break; + case 4: setcol(177, 93, 255, 255, 93, 255, check); break; + case 5: setcol(255, 93, 255, 255, 93, 107, check); break; + } + + tdrawback = true; + towercol = RGB(r*0.04, g*0.04, b*0.04); + } + + public function spikecollide(x:int, y:int):Boolean { + if (invincibility) return false; + if (tower.at(x,y,0)>= 6 && tower.at(x,y,0) <= 11) return true; + return false; + } + + public function collide(x:int, y:int):Boolean { + if (towermode) { + if (tower.at(x, y, 0) >= 12 && tower.at(x, y, 0) <= 27) return true; + }else if (tileset == 2) { + if (y == -1) return collide(x, y + 1); + if (y == 29+extrarow) return collide(x, y - 1); + if (x == -1) return collide(x + 1, y); + if (x == 40) return collide(x - 1, y); + if (x < 0 || y < 0 || x >= 40 || y >= 29 + extrarow) return false; + if (contents[x + vmult[y]] >= 12 && contents[x + vmult[y]] <= 27) return true; + if (invincibility) { + if (contents[x + vmult[y]] >= 6 && contents[x + vmult[y]] <= 11) return true; + } + }else { + if (y == -1) return collide(x, y + 1); + if (y == 29+extrarow) return collide(x, y - 1); + if (x == -1) return collide(x + 1, y); + if (x == 40) return collide(x - 1, y); + if (x < 0 || y < 0 || x >= 40 || y >= 29+extrarow) return false; + if (contents[x + vmult[y]] == 1) return true; + if (tileset==0 && contents[x + vmult[y]] == 59) return true; + if (contents[x + vmult[y]]>= 80 && contents[x + vmult[y]] < 680) return true; + if (contents[x + vmult[y]] == 740 && tileset==1) return true; + if (invincibility) { + if (contents[x + vmult[y]]>= 6 && contents[x + vmult[y]] <= 9) return true; + if (contents[x + vmult[y]]>= 49 && contents[x + vmult[y]] <= 50) return true; + if (tileset == 1) { + if (contents[x + vmult[y]]>= 49 && contents[x + vmult[y]] < 80) return true; + } + } + } + return false; + } + + public function fillareamap(realtmap:Array):void { + var maprow:Array; + + for (j = 0; j < 20; j++) { + maprow = new Array(); + maprow = realtmap[j].split(","); + for (i = 0; i < 20; i++) { + areamap[i + (j * 20)] = maprow[i]; + } + } + } + + public function settile(xp:int, yp:int, t:int):void { + if (xp >= 0 && xp < 40 && yp >= 0 && yp < 29+extrarow) { + contents[xp + vmult[yp]] = t; + } + } + + /* + * crazy old function + public function fillcontent(tmap:Array):void { + var maprow:Array; + + for (j = 0; j < 29+extrarow; j++) { + maprow = new Array(); + maprow = tmap[j].split(","); + for (i = 0; i < 40; i++) { + contents[i + vmult[j]] = maprow[i]; + } + } + } + */ + + public var currentrow:String; + public var currentrowlength:int; + public var startindex:int, endindex:int; + public var currentchar:String; + + public function fillcontent():void { + //tmap is a 30 element array containing 30 strings, 40 characters long + //need to tokenize each string to extract each + for (j = 0; j < 29 + extrarow; j++) { + currentrow = tmap.contents[j]; + currentrowlength = currentrow.length; + + startindex = 0; endindex = 0; + i = 0; + + //First 39 characters here + while (endindex < currentrowlength) { + currentchar = currentrow.substr(endindex, 1); + if (currentchar == ",") { + contents[i + vmult[j]] = int(currentrow.substr(startindex, endindex - startindex)); + endindex++; startindex = endindex; + i++; + } + endindex++; + } + //Final character here + contents[i + vmult[j]] = int(currentrow.substr(startindex, endindex - startindex)); + } + } + + public function rn(rx:int, ry:int):int { + return rx + (ry * 100); + } + + public function area(rx:int, ry:int):int { + if (finalmode) { + return 6; + }else { + if (rx - 100 >= 0 && rx - 100 < 20 && ry - 100 >= 0 && ry - 100 < 20) { + return areamap[(rx - 100) + ((ry - 100) * 20)]; + }else{ + return 6; + } + } + } + + public function exploretower():void { + for (i = 0; i < 20; i++) { + explored[9 + (i * 20)] = 1; + } + } + + public function hideship():void { + //remove the ship from the explored areas + explored[2 + (10 * 20)] = 0; + explored[3 + (10 * 20)] = 0; + explored[4 + (10 * 20)] = 0; + explored[2 + (11 * 20)] = 0; + explored[3 + (11 * 20)] = 0; + explored[4 + (11 * 20)] = 0; + } + + public function showship():void { + //remove the ship from the explored areas + explored[2 + (10 * 20)] = 1; + explored[3 + (10 * 20)] = 1; + explored[4 + (10 * 20)] = 1; + explored[2 + (11 * 20)] = 1; + explored[3 + (11 * 20)] = 1; + explored[4 + (11 * 20)] = 1; + } + + public function resetplayer(dwgfx:dwgraphicsclass, game:gameclass, obj:entityclass, music:musicclass):void { + if (game.roomx != game.saverx || game.roomy != game.savery) { + gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + } + + game.deathseq = -1; + i = obj.getplayer(); + if(i>-1){ + obj.entities[i].vx = 0; obj.entities[i].vy = 0; + obj.entities[i].ax = 0; obj.entities[i].ay = 0; + obj.entities[i].xp = game.savex; obj.entities[i].yp = game.savey; obj.entities[i].dir = game.savedir; + obj.entities[i].colour = 0; game.lifeseq = 10; obj.entities[i].invis = true; + } + + game.scmhurt = false; //Just in case the supercrewmate is fucking this up! + if (game.supercrewmate) { + if (game.roomx == game.scmprogress + 41) { + game.scmprogress = game.roomx - 41; + }else{ + game.scmprogress = game.roomx - 40; + } + if (game.scmprogress != 0) { + game.scmmoveme = true; + }else { + game.scmmoveme = false; + } + } + } + + public function warpto(rx:int, ry:int, t:int, tx:int, ty:int, dwgfx:dwgraphicsclass, game:gameclass, obj:entityclass, music:musicclass):void { + gotoroom(rx, ry, dwgfx, game, obj, music); + game.teleport = false; + obj.entities[t].xp = tx * 8; obj.entities[t].yp = (ty * 8) - obj.entities[t].h; game.gravitycontrol = 0; + } + + public function gotoroom(rx:int, ry:int, dwgfx:dwgraphicsclass, game:gameclass, obj:entityclass, music:musicclass):void { + //First, destroy the current room + obj.removeallblocks(); + game.activetele = false; game.readytotele = 0; + game.mobilequicksave_thisroom = false; + + obj.opt_useblock = false; + obj.opt_usetrigger = false; + obj.opt_usedamage = false; + obj.opt_usedirectional = false; + obj.opt_usesafe = false; + obj.opt_useactivity = false; + + //Ok, let's save the position of all lines on the screen + obj.nlinecrosskludge = 0; + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].type == 9 && obj.entities[i].active) { + //It's a horizontal line + if (obj.entities[i].xp <= 0 || obj.entities[i].xp + obj.entities[i].w >= 312) { + //it's on a screen edge + obj.copylinecross(i); + } + } + } + + for (i = 0; i < obj.nentity; i++) { + //Of course the player's always gonna be object zero, this is just in case + if (obj.entities[i].rule != 0) obj.entities[i].active = false; + } + obj.cleanup(); + + game.door_up = rx + ((ry - 1) * 100); game.door_down = rx + ((ry + 1) * 100); + game.door_right = rx + 1 + (ry * 100); game.door_left = rx -1 + (ry * 100); + + if (rx < game.roomx) { + game.roomchangedir = 0; + }else { + game.roomchangedir = 1; + } + + if (finalmode) { + //Ok, what way are we moving? + /*if (rx - finalx >= 1) finalx++; + if (rx - finalx <= -1) finalx--; + if (ry - finaly >= 1) finaly++; + if (ry - finaly <= -1) finaly--;*/ + finalx = rx; finaly = ry; + game.roomx = finalx; game.roomy = finaly; game.roomchange = true; + rx = finalx; ry = finaly; + + if (game.roomy < 10) { + game.roomy = 11; finaly = 11; + } + + if(game.roomx>=41 && game.roomy>=48 && game.roomx<61 && game.roomy<68 ){ + game.currentroomdeaths = roomdeathsfinal[game.roomx - 41 + (20 * (game.roomy - 48))]; + }else { + game.currentroomdeaths = 0; + } + + //Final level for time trial + if (game.intimetrial) { + if (game.roomx == 46 && game.roomy == 54) music.niceplay(15); //Final level remix + } + }else if (custommode){ + game.roomx = rx; + game.roomy = ry; + game.roomchange = true; + if (game.roomx < 100) game.roomx = 100 + editor.mapwidth - 1; + if (game.roomy < 100) game.roomy = 100 + editor.mapheight - 1; + if (game.roomx > 100 + editor.mapwidth - 1) game.roomx = 100; + if (game.roomy > 100 + editor.mapheight - 1) game.roomy = 100; + }else { + game.roomx = rx; game.roomy = ry; game.roomchange = true; + if (game.roomx < 100) game.roomx = 119; if (game.roomy < 100) game.roomy = 119; + if (game.roomx > 119) game.roomx = 100; if (game.roomy > 119) game.roomy = 100; + + game.currentroomdeaths = roomdeaths[game.roomx - 100 + (20 * (game.roomy - 100))]; + + //Alright, change music depending on where we are: + //Tower + if (game.roomx == 107 && game.roomy == 106) music.niceplay(4); + if (game.roomx == 107 && game.roomy == 107) music.niceplay(4); + if (game.roomx == 107 && game.roomy == 108) music.niceplay(4); + if (game.roomx == 107 && game.roomy == 109) music.niceplay(4); + if (game.roomx == 108 && game.roomy == 109) { + if (dwgfx.setflipmode) { music.niceplay(9); + }else{ music.niceplay(2); } + } + if (game.roomx == 109) { + if (dwgfx.setflipmode) { music.niceplay(9); + }else{ music.niceplay(2); } + } + //Warp Zone + if (game.roomx == 112 && game.roomy == 101) music.niceplay(4); + if (game.roomx == 113 && game.roomy == 101) music.niceplay(4); + if (game.roomx == 113 && game.roomy == 102) music.niceplay(4); + if (game.roomx == 114 && game.roomy == 101) music.niceplay(12); + if (game.roomx == 115 && game.roomy == 101) music.niceplay(12); + if (game.roomx == 115 && game.roomy == 102) music.niceplay(12); + //Lab + if (game.roomx == 101 && game.roomy == 115) music.niceplay(4); + if (game.roomx == 100 && game.roomy == 115) music.niceplay(4); + if (game.roomx == 101 && game.roomy == 116) music.niceplay(4); + if (game.roomx == 100 && game.roomy == 116) music.niceplay(4); + if (game.roomx == 102 && game.roomy == 116) music.niceplay(3); + if (game.roomx == 102 && game.roomy == 117) music.niceplay(3); + if (game.roomx == 101 && game.roomy == 117) music.niceplay(3); + //Space Station + if (game.intimetrial) { + if (game.roomx == 111 && game.roomy == 112) music.niceplay(1); + if (game.roomx == 111 && game.roomy == 113) music.niceplay(1); + if (game.roomx == 112 && game.roomy == 114) music.niceplay(1); + if (game.roomx == 112 && game.roomy == 115) music.niceplay(1); + }else{ + if (game.roomx == 111 && game.roomy == 112) music.niceplay(1); + if (game.roomx == 111 && game.roomy == 113) music.niceplay(1); + if (game.roomx == 112 && game.roomy == 114) music.niceplay(4); + if (game.roomx == 112 && game.roomy == 115) music.niceplay(4); + } + //Leaving the Ship + if (game.roomx == 104 && game.roomy == 112) music.niceplay(4); + } + temp = rx + (ry * 100); + loadlevel(game.roomx, game.roomy, dwgfx, game, obj, music); + + + dwgfx.backgrounddrawn = false; //Used for background caching speedup + dwgfx.foregrounddrawn = false; //Used for background caching speedup + + //a very special case: if entering the communication room, room 13,4 before tag 5 is set, set the game state to a background + //textbox thingy. if tag five is not set when changing room, reset the game state. (tag 5 is set when you get back to the ship) + if(!game.intimetrial){ + if (obj.flags[5] == 0 && !finalmode) { + game.state = 0; + if (game.roomx == 113 && game.roomy == 104) { + game.state = 50; + } + } + } + + //Ok, kludge to fix lines in crossing rooms - if we're intersecting a gravity line right now, let's + //set it to an inactive state. + + //Alright! So, let's look at our lines from the previous rooms, and determine if any of them are actually + //continuations! + + temp = obj.getplayer(); + if(temp>-1){ + obj.entities[temp].oldxp = obj.entities[temp].xp; + obj.entities[temp].oldyp = obj.entities[temp].yp; + } + + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].type == 9 && obj.entities[i].active) { + //It's a horizontal line + if (obj.entities[i].xp <= 0 || obj.entities[i].xp + obj.entities[i].w >= 312) { + //it's on a screen edge + for (j = 0; j < obj.nlinecrosskludge; j++) { + if (obj.entities[i].yp == obj.linecrosskludge[j].yp) { + //y's match, how about x's? + //we're moving left: + if (game.roomchangedir == 0) { + if (obj.entities[i].xp + obj.entities[i].w >= 312 && obj.linecrosskludge[j].xp <= 0) { + obj.revertlinecross(i, j); + } + }else { + if (obj.entities[i].xp <= 0 && obj.linecrosskludge[j].xp + obj.linecrosskludge[j].w >= 312) { + obj.revertlinecross(i, j); + } + } + } + } + } + } + } + } + + public function currentarea(t:int):String { + switch(t) { + case 0: return "Dimension VVVVVV"; break; + case 1: return "Dimension VVVVVV"; break; + case 2: return "Laboratory"; break; + case 3: return "The Tower"; break; + case 4: return "Warpzone"; break; + case 5: return "Space Station"; break; + case 6: return "Outside Dimension VVVVVV"; break; + case 7: return "Outside Dimension VVVVVV"; break; + case 8: return "Outside Dimension VVVVVV"; break; + case 9: return "Outside Dimension VVVVVV"; break; + case 10: return "Outside Dimension VVVVVV"; break; + case 11: return "The Tower"; break; + } + return "???"; + } + + public function loadlevel(rx:int, ry:int, dwgfx:dwgraphicsclass, game:gameclass, obj:entityclass, music:musicclass):void { + var t:int; + //t = rx + (ry * 100); + //roomname = "[UNTITLED] (" + String(rx)+","+String(ry)+")"; + if (!finalmode) { + explored[rx - 100 + ((ry - 100) * 20)] = 1; + if (rx == 109) { + exploretower(); + } + } + + + roomtexton = false; roomtextx[0] = 0; roomtexty[0] = 0; roomtextnumlines = 0; + + obj.customplatformtile = 0; + obj.platformtile = 0; obj.vertplatforms = false; obj.horplatforms = false; + roomname = ""; background = 1; + warpx = false; warpy = false; + + towermode = false; ypos = 0; extrarow = 0; + + //Custom stuff for warplines + obj.customwarpmode=false; + obj.customwarpmodevon=false; + obj.customwarpmodehon=false; + + if (finalmode) { + t = 6; + //check if we're in the towers + if (rx == 49 && ry == 52) { + //entered tower 1 + t = 7; + }else if (rx == 49 && ry == 53) { + //re entered tower 1 + t = 8; + }else if (rx == 51 && ry == 54) { + //entered tower 2 + t = 9; + }else if (rx == 51 && ry == 53) { + //re entered tower 2 + t = 10; + } + }else if (custommode){ + t= 12; + }else { + t = area(rx, ry); + + if (t == 3) { + //correct position for tower + if (ry == 109) { + //entered from ground floor + i = obj.getplayer(); + obj.entities[i].yp += (671 * 8); + + ypos = (700-29) * 8; + bypos = ypos / 2; + cameramode = 0; + colstate = 0; colsuperstate = 0; + }else if (ry == 104) { + //you've entered from the top floor + ypos = 0; + bypos = 0; + cameramode = 0; + colstate = 0; colsuperstate = 0; + } + } + + if (t < 2) { //on the world map, want to test if we're in the secret lab + if (rx >= 116) { + if (ry >= 105) { + if (ry <= 107) { + if (rx == 119 && ry == 105) { + //Ah, this is just a normal area + }else { + //in the secret lab! Crazy background! + background = 2; + if (rx == 116 && ry == 105) dwgfx.rcol = 1; + if (rx == 117 && ry == 105) dwgfx.rcol = 5; + if (rx == 118 && ry == 105) dwgfx.rcol = 4; + if (rx == 117 && ry == 106) dwgfx.rcol = 2; + if (rx == 118 && ry == 106) dwgfx.rcol = 0; + if (rx == 119 && ry == 106) dwgfx.rcol = 3; + if (rx == 119 && ry == 107) dwgfx.rcol = 1; + } + } + } + } + } + } + + if (rx == 119 && ry == 108) { + background = 5; + dwgfx.rcol = 3; + warpx = true; + warpy = true; + } + + switch(t) { + case 0: case 1: //World Map + tileset = 1; extrarow = 1; + otherlevel.loadlevel(rx, ry, game, obj); + fillcontent(); + roomname = otherlevel.roomname; + tileset = otherlevel.roomtileset; + //do the appear/remove roomname here + + if (otherlevel.roomtexton) { + roomtexton = true; + roomtextx[0] = otherlevel.roomtextx; + roomtexty[0] = otherlevel.roomtexty; + roomtextnumlines = otherlevel.roomtextnumlines; + for (i = 0; i < roomtextnumlines; i++) { + roomtext[i] = otherlevel.roomtext[i]; + } + } + break; + case 2: //The Lab + lablevel.loadlevel(rx, ry, game, obj); + fillcontent(); + roomname = lablevel.roomname; + tileset = 1; background = 2; + dwgfx.rcol = lablevel.rcol; + break; + case 3: //The Tower + tdrawback = true; minitowermode = false; tower.minitowermode = false; + bscroll = 0; scrolldir = 0; + + roomname = "The Tower"; + tileset = 1; background = 3; + towermode = true; + //bypos = 0; ypos = 0; cameramode = 0; + + //All the entities for here are just loaded here; it's essentially one room after all + + + obj.createentity(game, 48, 5456, 10, 1, 505007); // (savepoint) + obj.createentity(game, 224, 4528, 10, 1, 505017); // (savepoint) + obj.createentity(game, 232, 4168, 10, 0, 505027); // (savepoint) + obj.createentity(game, 280, 3816, 10, 1, 505037); // (savepoint) + obj.createentity(game, 152, 3552, 10, 1, 505047); // (savepoint) + obj.createentity(game, 216, 3280, 10, 0, 505057); // (savepoint) + obj.createentity(game, 216, 4808, 10, 1, 505067); // (savepoint) + obj.createentity(game, 72, 3096, 10, 0, 505077); // (savepoint) + obj.createentity(game, 176, 2600, 10, 0, 505087); // (savepoint) + obj.createentity(game, 216, 2392, 10, 0, 505097); // (savepoint) + obj.createentity(game, 152, 1184, 10, 1, 505107); // (savepoint) + obj.createentity(game, 152, 912, 10, 1, 505117); // (savepoint) + obj.createentity(game, 152, 536, 10, 1, 505127); // (savepoint) + obj.createentity(game, 120, 5136, 10, 0, 505137); // (savepoint) + obj.createentity(game, 144, 1824, 10, 0, 505147); // (savepoint) + obj.createentity(game, 72, 2904, 10, 0, 505157); // (savepoint) + obj.createentity(game, 224, 1648, 10, 1, 505167); // (savepoint) + obj.createentity(game, 112, 5280, 10, 1, 50517); // (savepoint) + + obj.createentity(game, 24, 4216, 9, 7); // (shiny trinket) + obj.createentity(game, 280, 3216, 9, 8); // (shiny trinket) + break; + case 4: //The Warpzone + warplevel.loadlevel(rx, ry, game, obj); + fillcontent(); + roomname = warplevel.roomname; + tileset = 1; background = 3; + dwgfx.rcol = warplevel.rcol; + dwgfx.backgrounddrawn = false; + + warpx = warplevel.warpx; warpy = warplevel.warpy; + background = 5; + if (warpy) background = 4; + if (warpx) background = 3; + if (warpx && warpy) background = 5; + break; + case 5: //Space station + spacestation2.loadlevel(rx, ry, game, obj); + fillcontent(); + roomname = spacestation2.roomname; + tileset = 0; + break; + case 6: //final level + finallevel.loadlevel(finalx, finaly, game, obj); + fillcontent(); + roomname = finallevel.roomname; + tileset = 1; background = 3; + dwgfx.rcol = finallevel.rcol; + dwgfx.backgrounddrawn = false; + + if (finalstretch) { + background = 6; + }else{ + warpx = finallevel.warpx; warpy = finallevel.warpy; + background = 5; + if (warpy) background = 4; + if (warpx) background = 3; + if (warpx && warpy) background = 5; + } + + dwgfx.rcol = 6; + changefinalcol(final_mapcol, obj, game); + break; + case 7: //Final Level, Tower 1 + tdrawback = true; minitowermode = true; tower.minitowermode = true; + bscroll = 0; scrolldir = 1; + + roomname = "Panic Room"; + tileset = 1; background = 3; + towermode = true; + + tower.loadminitower1(); + + ypos = 0; + bypos = 0; + cameramode = 0; + colstate = 0; colsuperstate = 0; + break; + case 8: //Final Level, Tower 1 (reentered from below) + tdrawback = true; minitowermode = true; tower.minitowermode = true; + bscroll = 0; scrolldir = 1; + + roomname = "Panic Room"; + tileset = 1; background = 3; + towermode = true; + + tower.loadminitower1(); + + i = obj.getplayer(); + obj.entities[i].yp += (71 * 8); + game.roomy--; finaly--; + + ypos = (100-29) * 8; + bypos = ypos/2; + cameramode = 0; + colstate = 0; colsuperstate = 0; + break; + case 9: //Final Level, Tower 2 + tdrawback = true; minitowermode = true; tower.minitowermode = true; + bscroll = 0; scrolldir = 0; + final_colorframe = 2; + + roomname = "The Final Challenge"; + tileset = 1; background = 3; + towermode = true; + + tower.loadminitower2(); + +obj.createentity(game, 56, 556, 11, 136); // (horizontal gravity line) +obj.createentity(game, 184, 592, 10, 0, 50500); // (savepoint) +obj.createentity(game, 184, 644, 11, 88); // (horizontal gravity line) +obj.createentity(game, 56, 460, 11, 136); // (horizontal gravity line) +obj.createentity(game, 216, 440, 10, 0, 50501); // (savepoint) +obj.createentity(game, 104, 508, 11, 168); // (horizontal gravity line) +obj.createentity(game, 219, 264, 12, 56); // (vertical gravity line) +obj.createentity(game, 120, 332, 11, 96); // (horizontal gravity line) +obj.createentity(game, 219, 344, 12, 56); // (vertical gravity line) +obj.createentity(game, 224, 332, 11, 48); // (horizontal gravity line) +obj.createentity(game, 56, 212, 11, 144); // (horizontal gravity line) +obj.createentity(game, 32, 20, 11, 96); // (horizontal gravity line) +obj.createentity(game, 72, 156, 11, 200); // (horizontal gravity line) + + i = obj.getplayer(); + obj.entities[i].yp += (71 * 8); + game.roomy--; finaly--; + + ypos = (100-29) * 8; + bypos = ypos/2; + cameramode = 0; + colstate = 0; colsuperstate = 0; + break; + case 10: //Final Level, Tower 2 + tdrawback = true; minitowermode = true; tower.minitowermode = true; + bscroll = 0; scrolldir = 0; + final_colorframe = 2; + + roomname = "The Final Challenge"; + tileset = 1; background = 3; + towermode = true; + + tower.loadminitower2(); + + obj.createentity(game, 56, 556, 11, 136); // (horizontal gravity line) + obj.createentity(game, 184, 592, 10, 0, 50500); // (savepoint) + obj.createentity(game, 184, 644, 11, 88); // (horizontal gravity line) + obj.createentity(game, 56, 460, 11, 136); // (horizontal gravity line) + obj.createentity(game, 216, 440, 10, 0, 50501); // (savepoint) + obj.createentity(game, 104, 508, 11, 168); // (horizontal gravity line) + obj.createentity(game, 219, 264, 12, 56); // (vertical gravity line) + obj.createentity(game, 120, 332, 11, 96); // (horizontal gravity line) + obj.createentity(game, 219, 344, 12, 56); // (vertical gravity line) + obj.createentity(game, 224, 332, 11, 48); // (horizontal gravity line) + obj.createentity(game, 56, 212, 11, 144); // (horizontal gravity line) + obj.createentity(game, 32, 20, 11, 96); // (horizontal gravity line) + obj.createentity(game, 72, 156, 11, 200); // (horizontal gravity line) + + i = obj.getplayer(); + + ypos = 0; + bypos = 0; + cameramode = 0; + colstate = 0; colsuperstate = 0; + break; + case 11: //Tower Hallways //Content is held in final level routine + finallevel.loadlevel(rx, ry, game, obj); + fillcontent(); + roomname = finallevel.roomname; + tileset = 2; + if (rx == 108) { background = 7; rcol = 15; } + if (rx == 110) { background = 8; rcol = 10; } + if (rx == 111) { background = 9; rcol = 0;} + break; + case 12: //Custom level + var curlevel:int = (rx - 100) + ((ry - 100) * editor.maxwidth); + game.customcol = editor.getlevelcol(curlevel) + 1; + obj.customplatformtile = game.customcol * 12; + switch(editor.level[curlevel].tileset){ + case 0: //Space Station + tileset = 0; + background = 1; + break; + case 1: //Outside + tileset = 1; + background = 1; + break; + case 2: //Lab + tileset = 1; + background = 2; + dwgfx.rcol = editor.level[curlevel].tilecol; + break; + case 3: //Warp Zone/intermission + tileset = 1; + background = 6; + break; + case 4://Ship + tileset = 1; + background = 1; + break; + default: + tileset = 1; + background = 1; + break; + } + + //If screen warping, then override all that: + dwgfx.backgrounddrawn = false; + if(editor.level[curlevel].warpdir>0){ + if(editor.level[curlevel].warpdir==1){ + warpx=true; + background=3; + dwgfx.rcol = editor.getwarpbackground(rx-100,ry-100); + }else if(editor.level[curlevel].warpdir==2){ + warpy=true; + background=4; + dwgfx.rcol = editor.getwarpbackground(rx-100,ry-100); + }else if(editor.level[curlevel].warpdir==3){ + warpx=true; warpy=true; + background = 5; + dwgfx.rcol = editor.getwarpbackground(rx-100,ry-100); + } + } + + roomname=""; + if(editor.level[curlevel].roomname!=""){ + roomname=editor.level[curlevel].roomname; + } + extrarow = 1; + editor.loadlevel(rx, ry); + + roomtexton = false; + roomtextnumlines = 0; + + for (var edj:int = 0; edj < 30; edj++) { + for (var edi:int = 0; edi < 40; edi++) { + contents[edi + vmult[edj]] = editor.swapmap[edi + vmult[edj]]; + } + } + + //Entities have to be created HERE, akwardly + var tempcheckpoints:int=0; + var tempscriptbox:int=0; + var bx1:int, by1:int, bx2:int, by2:int; + for (edi = 0; edi < editor.editordata.numedentities; edi++) { + //If entity is in this room, create it + var tsx:int = (editor.edentity[edi].x - (editor.edentity[edi].x % 40)) / 40; + var tsy:int = (editor.edentity[edi].y - (editor.edentity[edi].y % 30)) / 30; + + if(tsx==rx-100 && tsy==ry-100){ + switch(editor.edentity[edi].t){ + case 1: //Enemies + bx1=editor.level[rx-100+((ry-100)*editor.maxwidth)].enemyx1; + by1=editor.level[rx-100+((ry-100)*editor.maxwidth)].enemyy1; + bx2=editor.level[rx-100+((ry-100)*editor.maxwidth)].enemyx2; + by2 = editor.level[rx - 100 + ((ry - 100) * editor.maxwidth)].enemyy2; + + if(warpx){ if(bx1==0 && bx2==320){ bx1=-100; bx2=420; } } + if (warpy) { if (by1 == 0 && by2 == 240) { by1 = -100; by2 = 340; } } + + obj.customenemy=editor.level[tsx+((editor.maxwidth)*tsy)].enemytype; + obj.createentity(game, (editor.edentity[edi].x*8)- ((rx-100)*40*8),(editor.edentity[edi].y*8)- ((ry-100)*30*8), 56, + editor.edentity[edi].p1, 4, bx1, by1, bx2, by2); + break; + case 2: //Platforms and Threadmills + if(editor.edentity[edi].p1<=4){ + bx1 = editor.level[rx - 100 + ((ry - 100) * editor.maxwidth)].platx1; + by1 = editor.level[rx - 100 + ((ry - 100) * editor.maxwidth)].platy1; + bx2 = editor.level[rx - 100 + ((ry - 100) * editor.maxwidth)].platx2; + by2 = editor.level[rx - 100 + ((ry - 100) * editor.maxwidth)].platy2; + + if (warpx) { if (bx1 == 0 && bx2 == 320) { bx1 = -100; bx2 = 420; } } + if (warpy) { if (by1 == 0 && by2 == 240) { by1 = -100; by2 = 340; } } + + obj.createentity(game, (editor.edentity[edi].x*8)- ((rx-100)*40*8),(editor.edentity[edi].y*8)- ((ry-100)*30*8), 2, + editor.edentity[edi].p1, editor.level[rx-100+((ry-100)*editor.mapwidth)].platv, bx1, by1, bx2, by2); + }else if(editor.edentity[edi].p1>=5 && editor.edentity[edi].p1<=8){ //Threadmill + obj.createentity(game, (editor.edentity[edi].x*8)- ((rx-100)*40*8),(editor.edentity[edi].y*8)- ((ry-100)*30*8), 2, + editor.edentity[edi].p1+3, 4); + } + break; + case 3: //Disappearing platforms + obj.createentity(game, (editor.edentity[edi].x*8)- ((rx-100)*40*8),(editor.edentity[edi].y*8)- ((ry-100)*30*8), 3); + break; + case 9: + obj.createentity(game, (editor.edentity[edi].x*8)- ((rx-100)*40*8),(editor.edentity[edi].y*8)- ((ry-100)*30*8), 9, editor.findtrinket(edi)); + break; + case 10: //Checkpoints + obj.createentity(game, (editor.edentity[edi].x*8)- ((rx-100)*40*8),(editor.edentity[edi].y*8)- ((ry-100)*30*8), 10, + editor.edentity[edi].p1, ((rx + (ry * 100)) * 20) + tempcheckpoints); + tempcheckpoints++; + break; + case 11: //Gravity Lines + if(editor.edentity[edi].p1==0){ //Horizontal + obj.createentity(game, (editor.edentity[edi].p2 * 8), (editor.edentity[edi].y * 8) - ((ry - 100) * 30 * 8) + 4, 11, editor.edentity[edi].p3); + }else{ //Vertical + obj.createentity(game, (editor.edentity[edi].x * 8) - ((rx - 100) * 40 * 8) + 3, (editor.edentity[edi].p2 * 8), 12, editor.edentity[edi].p3); + } + break; + case 13: //Warp Tokens + obj.createentity(game, (editor.edentity[edi].x*8)- ((rx-100)*40*8),(editor.edentity[edi].y*8)- ((ry-100)*30*8), 13, editor.edentity[edi].p1, editor.edentity[edi].p2); + break; + case 15: //Collectable crewmate + obj.createentity(game, (editor.edentity[edi].x * 8) - ((rx - 100) * 40 * 8) - 4, (editor.edentity[edi].y * 8) - ((ry - 100) * 30 * 8) + 1, 55, editor.findcrewmate(edi), editor.edentity[edi].p1, editor.edentity[edi].p2); + break; + case 17: //Roomtext! + roomtexton = true; + roomtextx[roomtextnumlines] = editor.edentity[edi].x - ((rx-100)*40); + roomtexty[roomtextnumlines] = editor.edentity[edi].y - ((ry-100)*30); + roomtext[roomtextnumlines] = editor.edentity[edi].scriptname; + roomtextnumlines++; + break; + case 18: //Terminals + obj.customscript=editor.edentity[edi].scriptname; + obj.createentity(game, (editor.edentity[edi].x * 8) - ((rx - 100) * 40 * 8), (editor.edentity[edi].y * 8) - ((ry - 100) * 30 * 8) + 8, 20, 1); + obj.createblock(5, (editor.edentity[edi].x * 8) - ((rx - 100) * 40 * 8) - 8, (editor.edentity[edi].y * 8) - ((ry - 100) * 30 * 8) + 8, 20, 16, 35); + break; + case 19: //Script Box + game.customscript[tempscriptbox] = editor.edentity[edi].scriptname; + obj.createblock(1, (editor.edentity[edi].x * 8) - ((rx - 100) * 40 * 8), (editor.edentity[edi].y * 8) - ((ry - 100) * 30 * 8), + editor.edentity[edi].p1 * 8, editor.edentity[edi].p2 * 8, 300 + tempscriptbox); + tempscriptbox++; + break; + case 50: //Warp Lines + obj.customwarpmode=true; + if(editor.edentity[edi].p1==0){ // + obj.createentity(game, (editor.edentity[edi].x * 8) - ((rx - 100) * 40 * 8) + 4, (editor.edentity[edi].p2 * 8), 51, editor.edentity[edi].p3); + }else if(editor.edentity[edi].p1==1){ //Horizontal, right + obj.createentity(game, (editor.edentity[edi].x * 8) - ((rx - 100) * 40 * 8) + 4, (editor.edentity[edi].p2 * 8), 52, editor.edentity[edi].p3); + }else if(editor.edentity[edi].p1==2){ //Vertical, top + obj.createentity(game, (editor.edentity[edi].p2 * 8), (editor.edentity[edi].y * 8) - ((ry - 100) * 30 * 8) + 7, 53, editor.edentity[edi].p3); + }else if(editor.edentity[edi].p1==3){ + obj.createentity(game, (editor.edentity[edi].p2 * 8), (editor.edentity[edi].y * 8) - ((ry - 100) * 30 * 8), 54, editor.edentity[edi].p3); + } + break; + } + } + } + customtrinkets = editor.numtrinkets; + customcrewmates = editor.numcrewmates; + break; + } + //The room's loaded: now we fill out damage blocks based on the tiles. + if (towermode) { + for (j = 0; j < 700; j++) { + for (i = 0; i < 40; i++) { + //Damage blocks + //if (tower.contents[i + tower.vmult[j]] >=6 && tower.contents[i + tower.vmult[j]] <= 11) obj.createblock(2, (i * 8) + 1, j * 8, 6, 8); + } + } + }else{ + initspikes(game, obj); + + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].active){ + if (obj.entities[i].type == 1 && obj.entities[i].behave >= 8 && obj.entities[i].behave < 10) { + //put a block underneath + temp = int(obj.entities[i].xp / 8); + temp2 = int(obj.entities[i].yp / 8); + settile(temp, temp2, 1); + settile(temp+1, temp2, 1); + settile(temp+2, temp2, 1); + settile(temp+3, temp2, 1); + if (obj.entities[i].w == 64) { + settile(temp+4, temp2, 1); + settile(temp+5, temp2, 1); + settile(temp+6, temp2, 1); + settile(temp+7, temp2, 1); + } + } + } + } + } + + //Special scripting: Create objects and triggers based on what crewmembers are rescued. + if (!finalmode) { + //First up: the extra bits: + //Vermilion's quest: + if (rx == 100 && ry == 105) { //On path to verdigris + if (game.crewstats[3] && !game.crewstats[4]) { + obj.createentity(game, 87, 105, 18, 15, 0, 18); + obj.createblock(5, 87-32, 0, 32+32+32, 240, 3); + } + }else if (rx == 107 && ry == 100) { //victoria + if (game.crewstats[3] && !game.crewstats[5]) { + obj.createentity(game, 140, 137, 18, 15, 0, 18); + obj.createblock(5, 140-32, 0, 32+32+32, 240, 3); + } + }else if (rx == 114 && ry == 109) { + if (game.crewstats[3] && !game.crewstats[2]) { + obj.createentity(game, 235, 81, 18, 15, 0, 18); + obj.createblock(5, 235-32, 0, 32+32+32, 240, 3); + } + } + + //Verdigris fixing the ship + if (rx == 101 && ry == 109) { + if (game.crewstats[4]) { + if(game.crewrescued()>4 && game.crewrescued()!=6){ + obj.createentity(game, 175, 121, 18, 13, 0, 18); + obj.createblock(5, 175-32, 0, 32+32+32, 240, 4); + } + } + }else if (rx == 103 && ry == 109) { + if (game.crewstats[4]) { + if(game.crewrescued()<=4 && game.crewrescued()!=6){ + obj.createentity(game, 53, 161, 18, 13, 1, 18); + obj.createblock(5, 53-32, 0, 32+32+32, 240, 4); + } + } + } + + if (rx == 104 && ry == 111) { + //Red + //First: is he rescued? + if (game.crewstats[3]) { + //If so, red will always be at his post + obj.createentity(game, 107, 121, 18, 15, 0, 18); + //What script do we use? + obj.createblock(5, 107-32, 0, 32+32+32, 240, 3); + } + }else if (rx == 103 && ry == 111) { + //Yellow + //First: is he rescued? + if (game.crewstats[2]) { + obj.createentity(game, 198, 105, 18, 14, 0, 18); + //What script do we use? + obj.createblock(5, 198-32, 0, 32+32+32, 240, 2); + } + }else if (rx == 103 && ry == 110) { + //Green + //First: is he rescued? + if (game.crewstats[4]) { + obj.createentity(game, 242, 177, 18, 13, 0, 18); + //What script do we use? + obj.createblock(5, 242-32, 177-20, 32+32+32, 40, 4); + } + }else if (rx == 104 && ry == 110) { + //Purple + //First: is she rescued? + if (game.crewstats[1]) { + obj.createentity(game, 140, 177, 18, 20, 0, 18); + //What script do we use? + obj.createblock(5, 140-32, 0, 32+32+32, 240, 1); + } + }else if (rx == 102 && ry == 110) { + //Blue + //First: is she rescued? + if (game.crewstats[5]) { + //A slight varation - she's upside down + obj.createentity(game, 249, 62, 18, 16, 0, 18); + j = obj.getcrewman(5); + obj.entities[j].rule = 7; obj.entities[j].tile +=6; + //What script do we use? + obj.createblock(5, 249-32, 0, 32+32+32, 240, 5); + } + } + } + + //Make sure our crewmates are facing the player if appliciable + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].rule == 6 || obj.entities[i].rule == 7) { + if (obj.entities[i].state == 18) { + //face the player + j = obj.getplayer(); + if (obj.entities[j].xp > obj.entities[i].xp + 5) { obj.entities[i].dir = 1; + }else if (obj.entities[j].xp < obj.entities[i].xp - 5) { obj.entities[i].dir = 0; } + } + } + } + } + + public function clearoptimiser():void { + for (j = 0; j < 29 + extrarow; j++) { + for (i = 0; i < 40; i++) { + optimiser[int(i + vmult[j])] = int(0); + } + } + } + + public function checkspikeright(x:int, y:int, t:int):int { + //Check how many tiles this extends right for + temp = 0; + while (x < 40 && contents[int(x + vmult[y])] == int(t)) { + optimiser[int(x + vmult[y])] = int(1); + temp++; + x++ + } + return temp; + } + + public function checkspikedown(x:int, y:int, t:int):int { + //Check how many tiles this extends down for + temp = 0; + while (y < 30 && contents[int(x + vmult[y])] == int(t)) { + optimiser[int(x + vmult[y])] = int(1); + temp++; + y++ + } + return temp; + } + + public function initspikes(game:gameclass, obj:entityclass):void { + //Turn spikes into damage blocks for quick collision checking + clearoptimiser(); + + for (j = 0; j < 29 + extrarow; j++) { + for (i = 0; i < 40; i++) { + //Damage blocks + if (optimiser[int(i + vmult[j])] == 0) { + if (tileset == 0) { + if (contents[i + vmult[j]] == 6 || contents[i + vmult[j]] == 8) { + //sticking up + spikecount = checkspikeright(i, j, contents[i + vmult[j]]); + obj.createblock(2, (i * 8), (j * 8) + 4, 8 * spikecount, 4); + } + if (contents[i + vmult[j]] == 7 || contents[i + vmult[j]] == 9) { + //Sticking down + spikecount = checkspikeright(i, j, contents[i + vmult[j]]); + obj.createblock(2, (i * 8), (j * 8), 8 * spikecount, 4); + } + if (contents[i + vmult[j]] == 49 || contents[i + vmult[j]] == 50) { + //left or right + spikecount = checkspikedown(i, j, contents[i + vmult[j]]); + if(spikecount==1){ + obj.createblock(2, (i * 8), (j * 8) + 3, 8, 2); + }else { + obj.createblock(2, (i * 8), (j * 8) + 3, 8, 2 + (8 * (spikecount - 1))); + } + } + }else if (tileset == 1) { + //if (contents[i + vmult[j]] >= 6 && contents[i + vmult[j]] <= 9) obj.createblock(2, (i * 8), (j * 8)+1, 8, 6); + //if (contents[i + vmult[j]] >= 49 && contents[i + vmult[j]] <= 79) obj.createblock(2, (i * 8) + 1, (j * 8) + 1, 6, 6); + if ((contents[i + vmult[j]] >= 63 && contents[i + vmult[j]] <= 74) || + (contents[i + vmult[j]] >= 6 && contents[i + vmult[j]] <= 9)) { + //sticking up) { + if (contents[i + vmult[j]] < 10) contents[i + vmult[j]]++; + //sticking up + if (contents[i + vmult[j]] % 2 == 0) { + spikecount = checkspikeright(i, j, contents[i + vmult[j]]); + obj.createblock(2, (i * 8), (j * 8), 8 * spikecount, 4); + }else{ + //Sticking down + spikecount = checkspikeright(i, j, contents[i + vmult[j]]); + obj.createblock(2, (i * 8), (j * 8) + 4, 8 * spikecount, 4); + } + if (contents[i + vmult[j]] < 11) contents[i + vmult[j]]--; + } + if (contents[i + vmult[j]] >= 49 && contents[i + vmult[j]] <= 62) { + //left or right + spikecount = checkspikedown(i, j, contents[i + vmult[j]]); + if(spikecount==1){ + obj.createblock(2, (i * 8), (j * 8) + 3, 8, 2); + }else { + obj.createblock(2, (i * 8), (j * 8) + 3, 8, 2 + ((spikecount - 1) * 8)); + } + } + }else if (tileset == 2) { + if (contents[i + vmult[j]] == 6 || contents[i + vmult[j]] == 8) { + //sticking up + spikecount = checkspikeright(i, j, contents[i + vmult[j]]); + obj.createblock(2, (i * 8), (j * 8) + 4, 8 * spikecount, 4); + } + if (contents[i + vmult[j]] == 7 || contents[i + vmult[j]] == 9) { + //Sticking down + spikecount = checkspikeright(i, j, contents[i + vmult[j]]); + obj.createblock(2, (i * 8), (j * 8), 8 * spikecount, 4); + } + } + } + //Breakable blocks + if (contents[i + vmult[j]] == 10) { + contents[i + vmult[j]] = 0; + obj.createentity(game, i * 8, j * 8, 4); + } + //Directional blocks + if (contents[i + vmult[j]] >= 14 && contents[i + vmult[j]] <= 17) { + obj.createblock(3, i * 8, j * 8, 8, 8, contents[i + vmult[j]] - 14); + obj.opt_usedirectional = true; + } + } + } + } + + public var roomdeaths:Array = new Array(); + public var roomdeathsfinal:Array = new Array(); + public var areamap:Vector. = new Vector.; + public var contents:Vector. = new Vector.; + public var optimiser:Vector. = new Vector.; + public var explored:Array = new Array(); + public var vmult:Array = new Array(); + public var realtmap:Array = new Array(); + public var temp:int, temp2:int; + public var i:int, j:int; + public var background:int, rcol:int; + public var tileset:int; + public var warpx:Boolean; + public var warpy:Boolean; + + public var roomname:String; + //Special tower stuff + public var towermode:Boolean; + public var ypos:Number, bypos:Number; + public var cameramode:int; + public var cameraseek:int, cameraseekframe:int; + public var resumedelay:int; + public var minitowermode:Boolean; + public var scrolldir:int; + + //This is the old colour cycle + public var r:int, g:int, b:int; + public var check:int, cmode:int; + public var towercol:int; + public var colstate:int, colstatedelay:int; + public var colsuperstate:int; + public var spikeleveltop:int, spikelevelbottom:int; + public var tdrawback:Boolean; + public var bscroll:int; + + //Variables for playing custom levels + public var custommode:Boolean; + public var custommodeforreal:Boolean; + public var customx:int, customy:int; + public var customwidth:int, customheight:int; + public var customtrinkets:int; + public var customcrewmates:int; + public var custommmxoff:int, custommmyoff:int, custommmxsize:int, custommmysize:int; + public var customzoom:int; + public var customshowmm:Boolean; + + //final level navigation + public var finalx:int, finaly:int, finalmode:Boolean; + public var finalstretch:Boolean; //if true, disable screen warping and enable special background + + public var specialnames:Array = new Array(); + public var glitchmode:int, glitchdelay:int, glitchname:String; + + //final level colour cycling stuff + public var final_colormode:Boolean, final_mapcol:int; + public var final_aniframe:int, final_aniframedelay:int; + public var final_colorframe:int, final_colorframedelay:int; + + //Teleporters and Trinkets on the map + public var teleporters:Array = new Array(); + public var shinytrinkets:Array = new Array(); + public var numteleporters:int, numshinytrinkets:int; + public var showteleporters:Boolean, showtargets:Boolean, showtrinkets:Boolean; + + //Roomtext + + public var roomtextx:Vector. = new Vector.; + public var roomtexty:Vector. = new Vector.; + public var roomtexton:Boolean; + public var roomtext:Array = new Array(); + public var roomtextnumlines:int; + + //Levels + public var spacestation2:spacestation2class = new spacestation2class(); + public var otherlevel:otherlevelclass = new otherlevelclass(); + public var lablevel:labclass = new labclass(); + public var warplevel:warpclass = new warpclass(); + public var finallevel:finalclass = new finalclass(); + public var tower:towerclass = new towerclass(); + public var extrarow:int; + + //Accessibility options + public var invincibility:Boolean; + + //Map cursor + public var cursorstate:int, cursordelay:int; + + public var spikecount:int; + } +} \ No newline at end of file diff --git a/mobile_version/src/musicclass.as b/mobile_version/src/musicclass.as new file mode 100644 index 00000000..254cd2c1 --- /dev/null +++ b/mobile_version/src/musicclass.as @@ -0,0 +1,194 @@ +package { + import flash.display.*; + import flash.media.*; + import flash.events.*; + + public class musicclass extends Sprite { + //For Music stuff + public function play(t:int):void { + if (currentsong !=t) { + if (currentsong != -1) { + //Stop the old song first + musicchannel.stop(); + if (currentsong != 0) { + musicchannel.removeEventListener(Event.SOUND_COMPLETE, loopmusic); + } + } + if (t != -1) { + musicfade = 0; + currentsong = t; + if (currentsong == 0 || currentsong == 7) { + //Level Complete theme, no fade in or repeat + musicchannel = musicchan[currentsong].play(0); + musicchannel.soundTransform = new SoundTransform(1.0); + }else { + musicfadein = 90; + musicchannel = musicchan[currentsong].play(0); + musicchannel.soundTransform = new SoundTransform(0); + musicchannel.addEventListener(Event.SOUND_COMPLETE, loopmusic); + } + }else { + currentsong = -1; + } + } + } + + public function loopmusic(e:Event):void { + musicchannel.removeEventListener(Event.SOUND_COMPLETE, loopmusic); + if(currentsong>-1){ + musicchannel = musicchan[currentsong].play(); + musicchannel.addEventListener(Event.SOUND_COMPLETE, loopmusic); + } + } + + public function stopmusic(e:Event):void { + musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); + musicchannel.stop(); + currentsong = -1; + } + + public function haltdasmusik():void { + musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); + musicchannel.stop(); + resumesong = currentsong; + currentsong = -1; + } + + public function silencedasmusik():void { + if(currentsong>-1){ + musicchannel.soundTransform = new SoundTransform(0); + } + } + + public function fadeout():void { + if(currentsong>-1){ + if (musicfade == 0) { + musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); + musicfade = 61; + } + } + } + + public function processmusicfade():void { + musicfade--; + if (musicfade > 0) { + musicchannel.soundTransform = new SoundTransform(musicfade / 60); + }else { + musicchannel.stop(); + currentsong = -1; + } + } + + public function processmusicfadein():void { + musicfadein--; + if (musicfadein > 0) { + musicchannel.soundTransform = new SoundTransform((90-musicfadein) / 90 ); + }else { + musicchannel.soundTransform = new SoundTransform(1.0); + } + } + + + public function processmusic():void { + if (musicfade > 0) processmusicfade(); + if (musicfadein > 0) processmusicfadein(); + + if (nicefade == 1 && currentsong==-1) { + play(nicechange); + nicechange = -1; nicefade = 0; + } + + musicstopother--; + if (musicstopother == 1) { + musicstopother = 0; + if (currentmusicchan == 0) musicchannel2.stop(); + if (currentmusicchan == 1) musicchannel.stop(); + } + if (musicstopother < 0) musicstopother = 0; + + musicchancur--; + if (musicchancur <= 0 && currentsong > -1 && musicchanlen > 0) { + musicchancur = musicchanlen; + if (currentmusicchan == 0) { + musicchannel2 = musicchan[currentsong].play(); + musicstopother = 3; + currentmusicchan = 1; + }else { + musicchannel = musicchan[currentsong].play(); + musicstopother = 3; + currentmusicchan = 0; + } + } + } + + public function niceplay(t:int):void { + //important: do nothing if the correct song is playing! + if(currentsong!=t){ + if(currentsong!=-1) fadeout(); + nicefade = 1; + nicechange = t; + } + } + + public function musicroom(x:int, y:int):int { + return x + (y * 20); + } + + public function changemusicarea(x:int, y:int):void { + switch(musicroom(x, y)) { + case musicroom(11, 4): + niceplay(2); + break; + + case musicroom(2, 4): + case musicroom(7, 15): + niceplay(3); + break; + + case musicroom(18, 1): + case musicroom(15, 0): + niceplay(12); + break; + + case musicroom(0, 0): + case musicroom(0, 16): + case musicroom(2, 11): + case musicroom(7, 9): + case musicroom(8, 11): + case musicroom(13, 2): + case musicroom(17, 12): + case musicroom(14, 19): + case musicroom(17, 17): + niceplay(4); + break; + + default: + niceplay(1); + break; + } + } + + public var musicchan:Array = new Array(); + public var musicchannel:SoundChannel, musicchannel2:SoundChannel; + public var currentmusicchan:int, musicchanlen:int, musicchancur:int, musicstopother:int, resumesong:int; + public var currentsong:int, musicfade:int, musicfadein:int; + + public var nicefade:int, nicechange:int; + + //Play a sound effect! There are 16 channels, which iterate + public function initefchannels():void { + for (var i:int = 0; i < 16; i++) efchannel.push(new SoundChannel); + } + + public function playef(t:int, offset:int=0):void { + efchannel[currentefchan] = efchan[t].play(offset); + currentefchan++; + if (currentefchan > 15) currentefchan -= 16; + } + + public var currentefchan:int; + public var efchannel:Array = new Array(); + public var efchan:Array = new Array(); + public var numplays:int; + } +} diff --git a/mobile_version/src/platformclass.as b/mobile_version/src/platformclass.as new file mode 100644 index 00000000..fc5e0d69 --- /dev/null +++ b/mobile_version/src/platformclass.as @@ -0,0 +1,25 @@ +//Non gamecenter/steam platform specific specific code belongs here +package { + //import com.sticksports.nativeExtensions.SilentSwitch; + import flash.events.*; + import flash.media.SoundMixer; + import flash.media.AudioPlaybackMode; + + public class platformclass { + public function init():void { + //SilentSwitch.apply(); + SoundMixer.audioPlaybackMode = AudioPlaybackMode.AMBIENT; + } + + public function callonwake():void { + //SilentSwitch.apply(); + wakeupcall = 1; + } + + public function callonsleep():void { + + } + + public var wakeupcall:int; + } +} \ No newline at end of file diff --git a/mobile_version/src/saveclass.as b/mobile_version/src/saveclass.as new file mode 100644 index 00000000..7868839d --- /dev/null +++ b/mobile_version/src/saveclass.as @@ -0,0 +1,18 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class saveclass extends Sprite { + public function saveclass():void { + } + + public var explored:Array;// = new Array(); + public var flags:Array;// = new Array(); + public var crewstats:Array;// = new Array(); + public var collect:Array;// = new Array(); + public var customcollect:Array;// = new Array(); + public var moods:Array;// = new Array(); + } +} diff --git a/mobile_version/src/scoreclass.as b/mobile_version/src/scoreclass.as new file mode 100644 index 00000000..076c5a75 --- /dev/null +++ b/mobile_version/src/scoreclass.as @@ -0,0 +1,186 @@ +package { + import com.milkmangames.nativeextensions.ios.*; + import com.milkmangames.nativeextensions.ios.events.*; + import flash.display.Stage; + + public class scoreclass { + public function init(mystage:Stage):void { + if (!GameCenter.isSupported()){ + trace("GameCenter is not supported on this platform."); + } + + trace("Loading game center:"); + gameCenter = GameCenter.create(mystage); + if(!GameCenter.gameCenter.isGameCenterAvailable()){ + trace("this device doesn't have gamecenter."); + } + + if (GameCenter.gameCenter.areBannersAvailable()){ + GameCenter.gameCenter.showAchievementBanners(true); + } + + gameCenter.addEventListener(GameCenterEvent.AUTH_SUCCEEDED,onAuthSucceeded); + gameCenter.addEventListener(GameCenterErrorEvent.AUTH_FAILED,onAuthFailed); + gameCenter.addEventListener(GameCenterEvent.ACHIEVEMENTS_VIEW_OPENED,onViewOpened); + gameCenter.addEventListener(GameCenterEvent.ACHIEVEMENTS_VIEW_CLOSED,onViewClosed); + gameCenter.addEventListener(GameCenterEvent.LEADERBOARD_VIEW_OPENED,onViewOpened); + gameCenter.addEventListener(GameCenterEvent.LEADERBOARD_VIEW_CLOSED,onViewClosed); + gameCenter.addEventListener(GameCenterEvent.ACHIEVEMENT_REPORT_SUCCEEDED,onAchievementReported); + gameCenter.addEventListener(GameCenterEvent.ACHIEVEMENT_RESET_SUCCEEDED,onAchievementReset); + gameCenter.addEventListener(GameCenterEvent.SCORE_REPORT_SUCCEEDED,onScoreReported); + gameCenter.addEventListener(GameCenterErrorEvent.SCORE_REPORT_FAILED,onScoreFailed); + gameCenter.addEventListener(GameCenterErrorEvent.ACHIEVEMENT_REPORT_FAILED,onAchievementFailed); + gameCenter.addEventListener(GameCenterErrorEvent.ACHIEVEMENT_RESET_FAILED,onResetFailed); + GameCenter.gameCenter.authenticateLocalUser(); + } + + + CONFIG::iphonemode { + /** Check Authentication */ + private function checkAuthentication():Boolean{ + if (!GameCenter.gameCenter.isUserAuthenticated()){ + trace("not logged in!"); + return false; + } + return true; + } + + /** Reset Achievements */ + public function resetAchievements():void{ + if (!checkAuthentication()) return; + + GameCenter.gameCenter.resetAchievements(); + } + + public function reportScore(t:int):void{ + // we make sure you're logged in before bothering to report the score. + // later iOS versions may take care of waiting/resubmitting for you, but earlier ones won't. + if (!checkAuthentication()) return; + t = t * 2; //Score is in 30 frame increments + GameCenter.gameCenter.reportScoreForCategory(t, "grp.supgravleaderboard"); + } + + public function opengamecenter():void { + if (!checkAuthentication()) return; + GameCenter.gameCenter.showLeaderboardForCategory("grp.supgravleaderboard"); + } + + /** Show Achievements */ + public function showAchievements():void{ + if (!checkAuthentication()) return; + + //trace("showing achievements..."); + try{ + GameCenter.gameCenter.showAchievements(); + }catch (e:Error){ + //trace("ERR showachievements:"+e.message+"/"+e.name+"/"+e.errorID); + } + } + + public var vvvvvvgamecomplete:int = 0; + public var vvvvvvgamecompleteflip:int = 1; + public var vvvvvvcomplete500:int = 2; + public var vvvvvvcomplete250:int = 3; + public var vvvvvvcomplete100:int = 4; + public var vvvvvvcomplete50:int = 5; + public var vvvvvvtimetrial_station1:int = 6; + public var vvvvvvtimetrial_lab:int = 7; + public var vvvvvvtimetrial_tower:int = 8; + public var vvvvvvtimetrial_station2:int = 9; + public var vvvvvvtimetrial_warp:int = 10; + public var vvvvvvtimetrial_final:int = 11; + public var vvvvvvsupgrav5:int = 12; + public var vvvvvvsupgrav10:int = 13; + public var vvvvvvsupgrav15:int = 14; + public var vvvvvvsupgrav20:int = 15; + public var vvvvvvsupgrav30:int = 16 + public var vvvvvvsupgrav60:int = 17; + public var vvvvvvmaster:int = 18; + + public function reportAchievement(t:int):void{ + if (!checkAuthentication()) return; + + // the '1.0' is a float (Number) value from 0.0-100.0 the percent completion of the achievement. + switch(t) { + case 0: GameCenter.gameCenter.reportAchievement("grp.vvvvvvgamecomplete", 100.0); break; + case 1: GameCenter.gameCenter.reportAchievement("grp.vvvvvvgamecompleteflip", 100.0); break; + case 2: GameCenter.gameCenter.reportAchievement("grp.vvvvvvcomplete500", 100.0); break; + case 3: GameCenter.gameCenter.reportAchievement("grp.vvvvvvcomplete250", 100.0); break; + case 4: GameCenter.gameCenter.reportAchievement("grp.vvvvvvcomplete100", 100.0); break; + case 5: GameCenter.gameCenter.reportAchievement("grp.vvvvvvcomplete50", 100.0); break; + case 6: GameCenter.gameCenter.reportAchievement("grp.vvvvvvtimetrial_station1", 100.0); break; + case 7: GameCenter.gameCenter.reportAchievement("grp.vvvvvvtimetrial_lab", 100.0); break; + case 8: GameCenter.gameCenter.reportAchievement("grp.vvvvvvtimetrial_tower", 100.0); break; + case 9: GameCenter.gameCenter.reportAchievement("grp.vvvvvvtimetrial_station2", 100.0); break; + case 10: GameCenter.gameCenter.reportAchievement("grp.vvvvvvtimetrial_warp", 100.0); break; + case 11: GameCenter.gameCenter.reportAchievement("grp.vvvvvvtimetrial_final", 100.0); break; + case 12: GameCenter.gameCenter.reportAchievement("grp.vvvvvvsupgrav5", 100.0); break; + case 13: GameCenter.gameCenter.reportAchievement("grp.vvvvvvsupgrav10", 100.0); break; + case 14: GameCenter.gameCenter.reportAchievement("grp.vvvvvvsupgrav15", 100.0); break; + case 15: GameCenter.gameCenter.reportAchievement("grp.vvvvvvsupgrav20", 100.0); break; + case 16: GameCenter.gameCenter.reportAchievement("grp.vvvvvvsupgrav30", 100.0); break; + case 17: GameCenter.gameCenter.reportAchievement("grp.vvvvvvsupgrav60", 100.0); break; + case 18: GameCenter.gameCenter.reportAchievement("grp.vvvvvvmaster", 100.0); break; + } + } + + // + // Events + // + private function onAuthSucceeded(e:GameCenterEvent):void + { + trace("Auth succeeded!"); + //showFullUI(); + trace("auth player:" + GameCenter.gameCenter.getPlayerAlias() + "=" + GameCenter.gameCenter.getPlayerID() + ",underage?" + GameCenter.gameCenter.isPlayerUnderage()); + gamecenteron = true; + } + + private function onAuthFailed(e:GameCenterErrorEvent):void + { + trace("Auth failed:"+e.message); + //showAuthUI(); + } + + private function onViewOpened(e:GameCenterEvent):void + { + trace("gamecenter view opened."); + } + private function onViewClosed(e:GameCenterEvent):void + { + trace("gamecenter view closed."); + } + private function onAchievementReported(e:GameCenterEvent):void + { + trace("achievement report success:"+e.achievementID); + } + private function onAchievementFailed(e:GameCenterErrorEvent):void + { + trace("achievement report failed:msg="+e.message+",cd="+e.errorID+",ach="+e.achievementID); + } + private function onScoreReported(e:GameCenterEvent):void + { + trace("score report success:"+e.score+"/"+e.category); + } + private function onScoreFailed(e:GameCenterErrorEvent):void + { + trace("score report failed:msg="+e.message+",cd="+e.errorID+",scr="+e.score+",cat="+e.category); + } + private function onAchievementReset(e:GameCenterEvent):void + { + trace("achievements reset."); + //this.score=0; + //saveScore(); + //this.txtScore.text="Score: "+score; + } + private function onResetFailed(e:GameCenterErrorEvent):void + { + trace("failed to reset:"+e.message); + } + } + + CONFIG::iphonemode { + public var gameCenter:GameCenter; + public var gamecenteron:Boolean = true; + } + } +} diff --git a/mobile_version/src/scriptclass.as b/mobile_version/src/scriptclass.as new file mode 100644 index 00000000..b4bba7ad --- /dev/null +++ b/mobile_version/src/scriptclass.as @@ -0,0 +1,2134 @@ +package { + import flash.ui.Keyboard; + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + import bigroom.input.KeyPoll; + import flash.system.fscommand; + + public class scriptclass extends Sprite { + public var GAMEMODE:int = 0; + public var TITLEMODE:int = 1; + public var CLICKTOSTART:int = 2; + public var FOCUSMODE:int = 3; + public var MAPMODE:int = 4; + public var TELEPORTERMODE:int = 5; + public var GAMECOMPLETE:int = 6; + public var GAMECOMPLETE2:int = 7; + public var EDITORMODE:int = 8; + + include "includes/scripts.as"; + include "includes/terminalscripts.as"; + + public function scriptclass():void { + //Init + for (i = 0; i < 500; i++) { + commands.push(new String); + } + for (i = 0; i < 40; i++) { + words.push(new String); + txt.push(new String); + } + position = 0; scriptlength = 0; scriptdelay = 0; + running = false; + } + + public function clearcustom():void{ + editor.customscript.length = 0; + } + + public function add(t:String):void { + commands[scriptlength] = t; + scriptlength++; + } + + public function tokenize(t:String):void { + j = 0; tempword = ""; + + for (i = 0; i < t.length; i++) { + currentletter = t.substr(i, 1); + if (currentletter == "(" || currentletter == ")" || currentletter == ",") { + words[j] = tempword; + words[j] = words[j].toLowerCase(); + j++; tempword = ""; + }else if (currentletter == " ") { + //don't do anything - i.e. strip out spaces. + }else { + tempword += currentletter; + } + } + + if (tempword != "") { + words[j] = tempword; + } + } + + public function run(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + while(running && scriptdelay<=0 && !game.pausescript){ + if (position < scriptlength) { + //Let's split or command in an array of words + tokenize(commands[position]); + + //For script assisted input + game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; + + //Ok, now we run a command based on that string + if (words[0] == "moveplayer") { + //USAGE: moveplayer(x offset, y offset) + i = obj.getplayer(); + obj.entities[i].xp += int(words[1]); + obj.entities[i].yp += int(words[2]); + + scriptdelay = 1; + }else if (words[0] == "warpdir"){ + var temprx:int = int(words[1]) - 1; + var tempry:int = int(words[2]) - 1; + var curlevel:int = temprx + (editor.maxwidth * (tempry)); + editor.level[curlevel].warpdir = int(words[3]); + //If screen warping, then override all that: + dwgfx.backgrounddrawn = false; + + //Do we update our own room? + if (game.roomx - 100 == temprx && game.roomy - 100 == tempry) { + map.warpx = false; map.warpy = false; + if (editor.level[curlevel].warpdir == 0) { + map.background = 1; + }else if(editor.level[curlevel].warpdir==1){ + map.warpx=true; + map.background=3; + dwgfx.rcol = editor.getwarpbackground(temprx, tempry); + }else if(editor.level[curlevel].warpdir==2){ + map.warpy=true; + map.background=4; + dwgfx.rcol = editor.getwarpbackground(temprx,tempry); + }else if(editor.level[curlevel].warpdir==3){ + map.warpx=true; map.warpy=true; + map.background = 5; + dwgfx.rcol = editor.getwarpbackground(temprx,tempry); + } + } + }else if (words[0] == "ifwarp"){ + if (editor.level[int(words[1]) - 1 + (editor.maxwidth * (int(words[2]) - 1))].warpdir == int(words[3])) { + load("custom_"+words[4]); + position--; + } + }else if (words[0] == "destroy"){ + if(words[1]=="gravitylines"){ + for (var edi:int = 0; edi < obj.nentity; edi++) { + if(obj.entities[edi].type==9) obj.entities[edi].active=false; + if(obj.entities[edi].type==10) obj.entities[edi].active=false; + } + }else if(words[1]=="warptokens"){ + for (edi = 0; edi < obj.nentity; edi++) { + if(obj.entities[edi].type==11) obj.entities[edi].active=false; + } + }else if(words[1]=="platforms"){ + for (edi = 0; edi < obj.nentity; edi++) { + if(obj.entities[edi].rule==2 && obj.entities[edi].animate==100) obj.entities[edi].active=false; + } + } + }else if (words[0] == "customiftrinkets"){ + if (game.trinkets >= int(words[1])) { + load("custom_" + words[2]); + position--; + } + }else if (words[0] == "customiftrinketsless"){ + if (game.stat_trinkets < int(words[1])) { + load("custom_" + words[2]); + position--; + } + }else if (words[0] == "customifflag"){ + if (obj.flags[int(words[1])] == 1) { + load("custom_" + words[2]); + position--; + } + }else if (words[0] == "custommap"){ + if (words[1] == "on") { + map.customshowmm = true; + }else if (words[1] == "off") { + map.customshowmm = false; + } + }else if (words[0] == "delay") { + //USAGE: delay(frames) + scriptdelay = int(words[1]); + }else if (words[0] == "flag") { + if(words[2]=="on"){ + obj.changeflag(int(words[1]), 1); + }else if(words[2]=="off"){ + obj.changeflag(int(words[1]), 0); + } + }else if (words[0] == "flash") { + //USAGE: flash(frames) + game.flashlight = int(words[1]); + }else if (words[0] == "shake") { + //USAGE: shake(frames) + game.screenshake = int(words[1]); + }else if (words[0] == "walk") { + //USAGE: walk(dir,frames) + if (words[1] == "left") { + game.press_left = true; + }else if (words[1] == "right") { + game.press_right = true; + } + scriptdelay = int(words[2]); + }else if (words[0] == "flip") { + game.press_action = true; + scriptdelay = 1; + }else if (words[0] == "tofloor") { + if(obj.entities[obj.getplayer()].onroof>0){ + game.press_action = true; + scriptdelay = 1; + } + }else if (words[0] == "playef") { + music.playef(int(words[1]), int(words[2])); + }else if (words[0] == "play") { + music.play(int(words[1])); + }else if (words[0] == "stopmusic") { + music.haltdasmusik(); + }else if (words[0] == "resumemusic") { + music.play(music.resumesong); + }else if (words[0] == "musicfadeout") { + music.fadeout(); + }else if (words[0] == "musicfadein") { + music.musicfadein = 90; + }else if (words[0] == "trinketscriptmusic"){ + music.play(4); + }else if (words[0] == "gotoposition") { + //USAGE: gotoposition(x position, y position, gravity position) + i = obj.getplayer(); + obj.entities[i].xp = int(words[1]); + obj.entities[i].yp = int(words[2]); + game.gravitycontrol = int(words[3]); + + }else if (words[0] == "gotoroom") { + //USAGE: gotoroom(x,y) (manually add 100) + map.gotoroom(int(words[1])+100, int(words[2])+100, dwgfx, game, obj, music); + }else if (words[0] == "cutscene") { + dwgfx.showcutscenebars = true; + }else if (words[0] == "endcutscene") { + dwgfx.showcutscenebars = false; + }else if (words[0] == "untilbars") { + if (dwgfx.showcutscenebars) { + if (dwgfx.cutscenebarspos < 360) { scriptdelay = 1; position--; } + }else { + if (dwgfx.cutscenebarspos > 0) { scriptdelay = 1; position--; } + } + }else if (words[0] == "text") { + //oh boy + //first word is the colour. + if (words[1] == "cyan") { r = 164; g = 164; b = 255; + }else if (words[1] == "player") { r = 164; g = 164; b = 255; + }else if (words[1] == "red") { r = 255; g = 60; b = 60; + }else if (words[1] == "green") { r = 144; g = 255; b = 144; + }else if (words[1] == "yellow") { r = 255; g = 255; b = 134; + }else if (words[1] == "blue") { r = 95; g = 95; b = 255; + }else if (words[1] == "purple") { r = 255; g = 134; b = 255; + }else if (words[1] == "gray") { r = 174; g = 174; b = 174; + }else { + //use a gray + r = 174; g = 174; b = 174; + } + + //next are the x,y coordinates + textx = int(words[2]); + texty = int(words[3]); + + //Number of lines for the textbox! + txtnumlines = int(words[4]); + for (i = 0; i < txtnumlines; i++) { + position++; + txt[i] = commands[position]; + } + }else if (words[0] == "position") { + //are we facing left or right? for some objects we don't care, default at 0. + j = 0; + + //the first word is the object to position relative to + if (words[1] == "player") { + i = obj.getplayer(); + j = obj.entities[i].dir; + }else if (words[1] == "cyan") { + i = obj.getcrewman(0); + j = obj.entities[i].dir; + }else if (words[1] == "purple") { + i = obj.getcrewman(1); + j = obj.entities[i].dir; + }else if (words[1] == "yellow") { + i = obj.getcrewman(2); + j = obj.entities[i].dir; + }else if (words[1] == "red") { + i = obj.getcrewman(3); + j = obj.entities[i].dir; + }else if (words[1] == "green") { + i = obj.getcrewman(4); + j = obj.entities[i].dir; + }else if (words[1] == "blue") { + i = obj.getcrewman(5); + j = obj.entities[i].dir; + }else if (words[1] == "centerx") { + words[2] = "donothing"; j = -1; + textx = -500; + }else if (words[1] == "centery") { + words[2] = "donothing"; j = -1; + texty = -500; + }else if (words[1] == "center") { + words[2] = "donothing"; j = -1; + textx = -500; texty = -500; + } + + //next is whether to position above or below + if (words[2] == "above") { + if (j == 1) { //left + textx = obj.entities[i].xp -10000; //tells the box to be oriented correctly later + texty = obj.entities[i].yp - 16 - (txtnumlines*8); + }else if (j == 0) { //Right + textx = obj.entities[i].xp - 16; + texty = obj.entities[i].yp - 18 - (txtnumlines * 8); + } + }else { + if (j == 1) { //left + textx = obj.entities[i].xp -10000; //tells the box to be oriented correctly later + texty = obj.entities[i].yp + 26; + }else if (j == 0) { //Right + textx = obj.entities[i].xp - 16; + texty = obj.entities[i].yp + 26; + } + } + }else if (words[0] == "customposition") { + //are we facing left or right? for some objects we don't care, default at 0. + j = 0; + //the first word is the object to position relative to + if (words[1] == "player"){ + i = obj.getcustomcrewman(0); + j = obj.entities[i].dir; + }else if (words[1] == "cyan"){ + i = obj.getcustomcrewman(0); + j = obj.entities[i].dir; + }else if (words[1] == "purple"){ + i = obj.getcustomcrewman(1); + j = obj.entities[i].dir; + }else if (words[1] == "yellow"){ + i = obj.getcustomcrewman(2); + j = obj.entities[i].dir; + }else if (words[1] == "red"){ + i = obj.getcustomcrewman(3); + j = obj.entities[i].dir; + }else if (words[1] == "green"){ + i = obj.getcustomcrewman(4); + j = obj.entities[i].dir; + }else if (words[1] == "blue"){ + i = obj.getcustomcrewman(5); + j = obj.entities[i].dir; + }else if (words[1] == "centerx"){ + words[2] = "donothing"; + j = -1; + textx = -500; + }else if (words[1] == "centery"){ + words[2] = "donothing"; + j = -1; + texty = -500; + }else if (words[1] == "center"){ + words[2] = "donothing"; + j = -1; + textx = -500; + texty = -500; + } + + if (i == 0 && words[1] != "player" && words[1] != "cyan") { + //Requested crewmate is not actually on screen + words[2] = "donothing"; + j = -1; + textx = -500; + texty = -500; + } + + //next is whether to position above or below + if (words[2] == "above"){ + if (j == 1) //left + { + textx = obj.entities[i].xp -10000; //tells the box to be oriented correctly later + texty = obj.entities[i].yp - 16 - (txtnumlines*8); + } + else if (j == 0) //Right + { + textx = obj.entities[i].xp - 16; + texty = obj.entities[i].yp - 18 - (txtnumlines * 8); + } + }else{ + if (j == 1) //left + { + textx = obj.entities[i].xp -10000; //tells the box to be oriented correctly later + texty = obj.entities[i].yp + 26; + } + else if (j == 0) //Right + { + textx = obj.entities[i].xp - 16; + texty = obj.entities[i].yp + 26; + } + } + }else if (words[0] == "backgroundtext") { + game.backgroundtext = true; + }else if (words[0] == "flipme") { + if(dwgfx.flipmode) texty += 2*(120 - texty); + }else if (words[0] == "speak_active") { + //Ok, actually display the textbox we've initilised now! + dwgfx.createtextbox(txt[0], textx, texty, r, g, b); + if (txtnumlines > 1) { + for (i = 1; i < txtnumlines; i++) { + dwgfx.addline(txt[i]); + } + } + + //the textbox cannot be outside the screen. Fix if it is. + if (textx <= -1000) { + //position to the left of the player + textx += 10000; + textx -= dwgfx.textboxwidth(); + textx += 16; + dwgfx.textboxmoveto(textx); + } + + if (textx == -500) { + dwgfx.textboxcenterx(); + } + + if (texty == -500) { + dwgfx.textboxcentery(); + } + + dwgfx.textboxadjust(); + dwgfx.textboxactive(); + + if (!game.backgroundtext) { + game.advancetext = true; game.hascontrol = false; game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)) { + game.jumpheld = true; + } + if (game.mobilemenu) { + if (game.controlstyle == 0) { + /* + for (var vti:int = 0; vti < key.touchPoints; vti++) { + if (key.touchid[vti] != key.controlstick) { + game.jumpheld = true; + } + } + */ + if (key.touchPoints > 0) { + game.jumpheld = true; + } + }else { + if (key.touchPoints > 0) { + game.jumpheld = true; + } + } + } + } + game.backgroundtext = false; + }else if (words[0] == "speak") { + //Exactly as above, except don't make the textbox active (so we can use multiple textboxes) + dwgfx.createtextbox(txt[0], textx, texty, r, g, b); + if (txtnumlines > 1) { + for (i = 1; i < txtnumlines; i++) { + dwgfx.addline(txt[i]); + } + } + + //the textbox cannot be outside the screen. Fix if it is. + if (textx <= -1000) { + //position to the left of the player + textx += 10000; + textx -= dwgfx.textboxwidth(); + textx += 16; + dwgfx.textboxmoveto(textx); + } + + if (textx == -500) { + dwgfx.textboxcenterx(); + } + + if (texty == -500) { + dwgfx.textboxcentery(); + } + + dwgfx.textboxadjust(); + //dwgfx.textboxactive(); + + if (!game.backgroundtext) { + game.advancetext = true; game.hascontrol = false; game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + }else if (words[0] == "endtext") { + dwgfx.textboxremove(); + game.hascontrol = true; + game.advancetext = false; + }else if (words[0] == "endtextfast") { + dwgfx.textboxremovefast(); + game.hascontrol = true; + game.advancetext = false; + }else if (words[0] == "do") { + //right, loop from this point + looppoint = position; + loopcount = int(words[1]); + }else if (words[0] == "loop") { + //right, loop from this point + loopcount--; + if (loopcount > 0) { + position = looppoint; + } + }else if (words[0] == "vvvvvvman") { + //Create the super VVVVVV combo! + i = obj.getplayer(); + obj.entities[i].xp = 30; + obj.entities[i].yp = 46; + obj.entities[i].size = 13; + obj.entities[i].colour = 23; + obj.entities[i].cx = 36;// 6; + obj.entities[i].cy = 12+80;// 2; + obj.entities[i].h = 126-80;// 21; + }else if (words[0] == "undovvvvvvman") { + //Create the super VVVVVV combo! + i = obj.getplayer(); + obj.entities[i].xp = 100; + obj.entities[i].size = 0; + obj.entities[i].colour = 0; + obj.entities[i].cx = 6; + obj.entities[i].cy = 2; + obj.entities[i].h = 21; + }else if (words[0] == "createentity") { + obj.createentity(game, int(words[1]), int(words[2]), int(words[3]), int(words[4]), int(words[5])); + }else if (words[0] == "createcrewman") { + if (words[3] == "cyan") { r=0; + }else if (words[3] == "red") { r=15; + }else if (words[3] == "green") { r=13; + }else if (words[3] == "yellow") { r=14; + }else if (words[3] == "blue") { r=16; + }else if (words[3] == "purple") { r=20; + }else if (words[3] == "gray") { r=19; + }else { r = 19; } + + //convert the command to the right index + if (words[5] == "followplayer") words[5] = "10"; + if (words[5] == "followpurple") words[5] = "11"; + if (words[5] == "followyellow") words[5] = "12"; + if (words[5] == "followred") words[5] = "13"; + if (words[5] == "followgreen") words[5] = "14"; + if (words[5] == "followblue") words[5] = "15"; + + if (words[5] == "followposition") words[5] = "16"; + if (words[5] == "faceleft") { words[5] = "17"; words[6] = "0"; } + if (words[5] == "faceright") {words[5] = "17"; words[6] = "1"; } + if (words[5] == "faceplayer") { words[5] = "18"; words[6] = "0"; } + if (words[5] == "panic") { words[5] = "20"; words[6] = "0"; } + + if (int(words[5]) >= 16) { + obj.createentity(game, int(words[1]), int(words[2]), 18, r, int(words[4]), int(words[5]), int(words[6])); + }else{ + obj.createentity(game, int(words[1]), int(words[2]), 18, r, int(words[4]), int(words[5])); + } + }else if (words[0] == "changemood") { + if (words[1] == "player") { i=obj.getplayer(); + }else if (words[1] == "cyan") { i=obj.getcrewman(0); + }else if (words[1] == "red") { i=obj.getcrewman(3); + }else if (words[1] == "green") { i=obj.getcrewman(4); + }else if (words[1] == "yellow") { i=obj.getcrewman(2); + }else if (words[1] == "blue") { i=obj.getcrewman(5); + }else if (words[1] == "purple") { i=obj.getcrewman(1); + } + + if (int(words[2]) == 0) { + obj.entities[i].tile = 0; + }else { + obj.entities[i].tile = 144; + } + }else if (words[0] == "changecustommood"){ + if (words[1] == "player"){ + i=obj.getcustomcrewman(0); + obj.customcrewmoods[0] = int(words[2]); + }else if (words[1] == "cyan"){ + i=obj.getcustomcrewman(0); + obj.customcrewmoods[0]=int(words[2]); + }else if (words[1] == "customcyan"){ + i=obj.getcustomcrewman(0); + obj.customcrewmoods[0]=int(words[2]); + }else if (words[1] == "red"){ + i=obj.getcustomcrewman(3); + obj.customcrewmoods[3]=int(words[2]); + }else if (words[1] == "green"){ + i=obj.getcustomcrewman(4); + obj.customcrewmoods[4]=int(words[2]); + }else if (words[1] == "yellow"){ + i=obj.getcustomcrewman(2); + obj.customcrewmoods[2]=int(words[2]); + }else if (words[1] == "blue"){ + i=obj.getcustomcrewman(5); + obj.customcrewmoods[5]=int(words[2]); + }else if (words[1] == "purple"){ + i=obj.getcustomcrewman(1); + obj.customcrewmoods[1]=int(words[2]); + }else if (words[1] == "pink"){ + i=obj.getcustomcrewman(1); + obj.customcrewmoods[1]=int(words[2]); + } + + if (int(words[2]) == 0){ + obj.entities[i].tile = 0; + }else{ + obj.entities[i].tile = 144; + } + }else if (words[0] == "changetile") { + if (words[1] == "player") { i=obj.getplayer(); + }else if (words[1] == "cyan") { i=obj.getcrewman(0); + }else if (words[1] == "red") { i=obj.getcrewman(3); + }else if (words[1] == "green") { i=obj.getcrewman(4); + }else if (words[1] == "yellow") { i=obj.getcrewman(2); + }else if (words[1] == "blue") { i=obj.getcrewman(5); + }else if (words[1] == "purple") { i=obj.getcrewman(1); + } + + obj.entities[i].tile = int(words[2]); + }else if (words[0] == "flipgravity") { + //not something I'll use a lot, I think. Doesn't need to be very robust! + if (words[1] == "player") { i=obj.getplayer(); + }else if (words[1] == "cyan") { i=obj.getcrewman(0); + }else if (words[1] == "red") { i=obj.getcrewman(3); + }else if (words[1] == "green") { i=obj.getcrewman(4); + }else if (words[1] == "yellow") { i=obj.getcrewman(2); + }else if (words[1] == "blue") { i=obj.getcrewman(5); + }else if (words[1] == "purple") { i=obj.getcrewman(1); + } + + obj.entities[i].rule =7; + obj.entities[i].tile = 6; + }else if (words[0] == "changegravity") { + //not something I'll use a lot, I think. Doesn't need to be very robust! + if (words[1] == "player") { i=obj.getplayer(); + }else if (words[1] == "cyan") { i=obj.getcrewman(0); + }else if (words[1] == "red") { i=obj.getcrewman(3); + }else if (words[1] == "green") { i=obj.getcrewman(4); + }else if (words[1] == "yellow") { i=obj.getcrewman(2); + }else if (words[1] == "blue") { i=obj.getcrewman(5); + }else if (words[1] == "purple") { i=obj.getcrewman(1); + } + + obj.entities[i].tile +=12; + }else if (words[0] == "changedir") { + if (words[1] == "player") { i=obj.getplayer(); + }else if (words[1] == "cyan") { i=obj.getcrewman(0); + }else if (words[1] == "red") { i=obj.getcrewman(3); + }else if (words[1] == "green") { i=obj.getcrewman(4); + }else if (words[1] == "yellow") { i=obj.getcrewman(2); + }else if (words[1] == "blue") { i=obj.getcrewman(5); + }else if (words[1] == "purple") { i=obj.getcrewman(1); + } + + if (int(words[2]) == 0) { + obj.entities[i].dir = 0; + }else { + obj.entities[i].dir = 1; + } + }else if (words[0] == "alarmon") { + game.alarmon = true; game.alarmdelay = 0; + }else if (words[0] == "alarmoff") { + game.alarmon = false; + }else if (words[0] == "changeai") { + if (words[1] == "player") { i=obj.getplayer(); + }else if (words[1] == "cyan") { i=obj.getcrewman(0); + }else if (words[1] == "red") { i=obj.getcrewman(3); + }else if (words[1] == "green") { i=obj.getcrewman(4); + }else if (words[1] == "yellow") { i=obj.getcrewman(2); + }else if (words[1] == "blue") { i=obj.getcrewman(5); + }else if (words[1] == "purple") { i=obj.getcrewman(1); + } + + if (words[2] == "followplayer") words[2] = "10"; + if (words[2] == "followpurple") words[2] = "11"; + if (words[2] == "followyellow") words[2] = "12"; + if (words[2] == "followred") words[2] = "13"; + if (words[2] == "followgreen") words[2] = "14"; + if (words[2] == "followblue") words[2] = "15"; + + if (words[2] == "followposition") words[2] = "16"; + if (words[2] == "faceleft") { words[2] = "17"; words[3] = "0"; } + if (words[2] == "faceright") { words[2] = "17"; words[3] = "1"; } + + + obj.entities[i].state = int(words[2]); + if (obj.entities[i].state == 16) { + obj.entities[i].para=int(words[3]); + }else if (obj.entities[i].state == 17) { + obj.entities[i].dir=int(words[3]); + } + }else if (words[0] == "alarmon") { + game.alarmon = true; game.alarmdelay = 0; + }else if (words[0] == "alarmoff") { + game.alarmon = false; + }else if (words[0] == "activateteleporter") { + i = obj.getteleporter(); + obj.entities[i].tile = 6; + obj.entities[i].colour = 102; + }else if (words[0] == "changecolour") { + if (words[1] == "player") { i=obj.getplayer(); + }else if (words[1] == "cyan") { i=obj.getcrewman(0); + }else if (words[1] == "red") { i=obj.getcrewman(3); + }else if (words[1] == "green") { i=obj.getcrewman(4); + }else if (words[1] == "yellow") { i=obj.getcrewman(2); + }else if (words[1] == "blue") { i=obj.getcrewman(5); + }else if (words[1] == "purple") { i=obj.getcrewman(1); + } + + if (words[2] == "cyan") { obj.entities[i].colour = 0; + }else if (words[2] == "red") { obj.entities[i].colour = 15; + }else if (words[2] == "green") { obj.entities[i].colour = 13; + }else if (words[2] == "yellow") { obj.entities[i].colour = 14; + }else if (words[2] == "blue") { obj.entities[i].colour = 16; + }else if (words[2] == "purple") { obj.entities[i].colour = 20; + }else if (words[2] == "teleporter") { obj.entities[i].colour = 102; + } + }else if (words[0] == "squeak") { + if (words[1] == "player") { music.playef(11, 10); + }else if (words[1] == "cyan") { music.playef(11, 10); + }else if (words[1] == "red") { music.playef(16, 10); + }else if (words[1] == "green") { music.playef(12, 10); + }else if (words[1] == "yellow") { music.playef(14, 10); + }else if (words[1] == "blue") { music.playef(13, 10); + }else if (words[1] == "purple") { music.playef(15, 10); + }else if (words[1] == "cry") { music.playef(2, 10); + }else if (words[1] == "terminal") { music.playef(20, 10); + } + }else if (words[0] == "blackout") { + game.blackout = true; + }else if (words[0] == "blackon") { + game.blackout = false; + }else if (words[0] == "mobilecontrolsfixmap") { + map.explored[6 + (10 * 20)] = 0; + map.explored[7 + (10 * 20)] = 0; + map.explored[8 + (10 * 20)] = 0; + map.explored[5 + (9 * 20)] = 0; + map.explored[6 + (9 * 20)] = 0; + map.explored[7 + (9 * 20)] = 0; + }else if (words[0] == "domobilecontrols") { + if (game.mobilemenu && game.controlstyle == 0) { + if (game.showcontroltutorial == 0) { + game.showcontroltutorial = 1; game.savemystats = true; + + game.gamestate = game.CONTROLTUTORIALMODE; + game.controltutorialstate = 0; + game.controltutorialstatedelay = 0; + game.controllerp1 = 0; + game.controllerp2 = 0; + game.controllerp3 = 0; + + map.contents[25 + map.vmult[8]] = 495; + map.contents[26 + map.vmult[8]] = 495; + map.contents[34 + map.vmult[8]] = 495; + map.contents[35 + map.vmult[8]] = 495; + + map.contents[36 + map.vmult[4]] = 0; + map.contents[37 + map.vmult[4]] = 0; + map.contents[38 + map.vmult[4]] = 0; + map.contents[39 + map.vmult[4]] = 0; + map.contents[36 + map.vmult[5]] = 0; + map.contents[37 + map.vmult[5]] = 0; + map.contents[38 + map.vmult[5]] = 0; + map.contents[39 + map.vmult[5]] = 0; + map.contents[36 + map.vmult[6]] = 0; + map.contents[37 + map.vmult[6]] = 0; + map.contents[38 + map.vmult[6]] = 0; + map.contents[39 + map.vmult[6]] = 0; + map.contents[36 + map.vmult[7]] = 0; + map.contents[37 + map.vmult[7]] = 0; + map.contents[38 + map.vmult[7]] = 0; + map.contents[39 + map.vmult[7]] = 0; + /* + map.contents[3 + map.vmult[7]] = 495; + map.contents[3 + map.vmult[6]] = 495; + map.contents[9 + map.vmult[7]] = 495; + map.contents[9 + map.vmult[6]] = 495; + map.contents[30 + map.vmult[7]] = 495; + map.contents[30 + map.vmult[6]] = 495; + */ + } + } + }else if (words[0] == "setcheckpoint") { + i = obj.getplayer(); + game.savepoint = 0; + game.savex = obj.entities[i].xp ; + game.savey = obj.entities[i].yp; + game.savegc = game.gravitycontrol; + game.saverx = game.roomx; game.savery = game.roomy; + game.savedir = obj.entities[i].dir; + }else if (words[0] == "gamestate") { + game.state = int(words[1]); + game.statedelay = 0; + }else if (words[0] == "textboxactive") { + dwgfx.textboxactive(); + }else if (words[0] == "gamemode") { + if (words[1] == "teleporter") { + game.gamestate = 5; + dwgfx.menuoffset = 240; //actually this should count the roomname + if (map.extrarow) dwgfx.menuoffset -= 10; + dwgfx.menubuffer.copyPixels(dwgfx.screenbuffer, dwgfx.screenbuffer.rect, dwgfx.tl, null, null, false); + dwgfx.resumegamemode = false; + + game.useteleporter = false; //good heavens don't actually use it + }else if (words[1] == "game") { + dwgfx.resumegamemode = true; + } + }else if (words[0] == "ifexplored") { + if (map.explored[int(words[1]) + (20 * int(words[2]))] == 1) { + load(words[3]); position--; + } + }else if (words[0] == "iflast") { + if (game.lastsaved==int(words[1])) { + load(words[2]); position--; + } + }else if (words[0] == "ifskip") { + if (game.nocutscenes) { + load(words[1]); position--; + } + }else if (words[0] == "ifflag") { + if (obj.flags[int(words[1])]==1) { + load(words[2]); position--; + } + }else if (words[0] == "ifcrewlost") { + if (game.crewstats[int(words[1])]==false) { + load(words[2]); position--; + } + }else if (words[0] == "iftrinkets") { + if (game.trinkets >= int(words[1])){ + load(words[2]); position--; + } + }else if (words[0] == "iftrinketsless") { + if (game.stat_trinkets < int(words[1])){ + load(words[2]); position--; + } + }else if (words[0] == "hidecoordinates") { + map.explored[int(words[1]) + (20 * int(words[2]))] = 0; + }else if (words[0] == "showcoordinates") { + map.explored[int(words[1]) + (20 * int(words[2]))] = 1; + }else if (words[0] == "hideship") { + map.hideship(); + }else if (words[0] == "showship") { + map.showship(); + }else if (words[0] == "showsecretlab") { + map.explored[16 + (20 * 5)] = 1; + map.explored[17 + (20 * 5)] = 1; + map.explored[18 + (20 * 5)] = 1; + map.explored[17 + (20 * 6)] = 1; + map.explored[18 + (20 * 6)] = 1; + map.explored[19 + (20 * 6)] = 1; + map.explored[19 + (20 * 7)] = 1; + map.explored[19 + (20 * 8)] = 1; + }else if (words[0] == "hidesecretlab") { + map.explored[16 + (20 * 5)] = 0; + map.explored[17 + (20 * 5)] = 0; + map.explored[18 + (20 * 5)] = 0; + map.explored[17 + (20 * 6)] = 0; + map.explored[18 + (20 * 6)] = 0; + map.explored[19 + (20 * 6)] = 0; + map.explored[19 + (20 * 7)] = 0; + map.explored[19 + (20 * 8)] = 0; + }else if (words[0] == "showteleporters") { + map.showteleporters = true; + }else if (words[0] == "showtargets") { + map.showtargets = true; + }else if (words[0] == "showtrinkets") { + map.showtrinkets = true; + }else if (words[0] == "hideteleporters") { + map.showteleporters = false; + }else if (words[0] == "hidetargets") { + map.showtargets = false; + }else if (words[0] == "hidetrinkets") { + map.showtrinkets = false; + }else if (words[0] == "hideplayer") { + obj.entities[obj.getplayer()].invis = true; + }else if (words[0] == "showplayer") { + obj.entities[obj.getplayer()].invis = false; + }else if (words[0] == "teleportscript") { + game.teleportscript = words[1]; + }else if (words[0] == "clearteleportscript") { + game.teleportscript = ""; + }else if (words[0] == "nocontrol") { + game.hascontrol = false; + }else if (words[0] == "hascontrol") { + game.hascontrol = true; + }else if (words[0] == "companion") { + game.companion = int(words[1]); + }else if (words[0] == "befadein") { + dwgfx.fadeamount = 0; + dwgfx.fademode= 0; + }else if (words[0] == "fadein") { + dwgfx.fademode = 4; + }else if (words[0] == "fadeout") { + dwgfx.fademode = 2; + }else if (words[0] == "untilfade") { + if (dwgfx.fademode>1) { + scriptdelay = 1; position--; + } + }else if (words[0] == "entersecretlab") { + game.unlock[8] = true; + game.insecretlab = true; + }else if (words[0] == "leavesecretlab") { + game.insecretlab = false; + }else if (words[0] == "resetgame") { + map.resetnames(); + map.resetmap(); + map.resetplayer(dwgfx, game, obj, music); + map.tdrawback = true; + + obj.resetallflags(); + i = obj.getplayer(); + obj.entities[i].tile = 0; + + game.trinkets = 0; for (i = 0; i < 100; i++) { obj.collect[i] = 0; obj.customcollect[i] = 0; } + game.deathcounts = 0; game.advancetext = false; game.hascontrol = true; + game.frames = 0; game.seconds = 0; game.minutes = 0; game.hours = 0; + game.gravitycontrol = 0; game.teleport = false; game.companion = 0; game.roomchange = false; + game.teleport_to_new_area = false; game.teleport_to_x = 0; game.teleport_to_y = 0; + + game.teleportscript = ""; + + //get out of final level mode! + map.finalmode = false; + map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + map.finalstretch = false; + }else if (words[0] == "loadscript") { + load(words[1]); position--; + }else if (words[0] == "rollcredits") { + game.gamestate = 6; + dwgfx.fademode = 4; + game.creditposition = 0; + }else if (words[0] == "finalmode") { + map.finalmode = true; + map.finalx = int(words[1]); map.finaly = int(words[2]); + game.roomx = map.finalx; game.roomy = map.finaly; + map.gotoroom(game.roomx, game.roomy, dwgfx, game, obj, music); + }else if (words[0] == "rescued") { + if (words[1] == "red") { game.crewstats[3] = true; + }else if (words[1] == "green") { game.crewstats[4] = true; + }else if (words[1] == "yellow") { game.crewstats[2] = true; + }else if (words[1] == "blue") { game.crewstats[5] = true; + }else if (words[1] == "purple") { game.crewstats[1] = true; + }else if (words[1] == "player") { game.crewstats[0] = true; + }else if (words[1] == "cyan") { game.crewstats[0] = true; + } + }else if (words[0] == "missing") { + if (words[1] == "red") { game.crewstats[3] = false; + }else if (words[1] == "green") { game.crewstats[4] = false; + }else if (words[1] == "yellow") { game.crewstats[2] = false; + }else if (words[1] == "blue") { game.crewstats[5] = false; + }else if (words[1] == "purple") { game.crewstats[1] = false; + }else if (words[1] == "player") { game.crewstats[0] = false; + }else if (words[1] == "cyan") { game.crewstats[0] = false; + } + }else if (words[0] == "face") { + if (words[1] == "player") { i=obj.getplayer(); + }else if (words[1] == "cyan") { i=obj.getcrewman(0); + }else if (words[1] == "red") { i=obj.getcrewman(3); + }else if (words[1] == "green") { i=obj.getcrewman(4); + }else if (words[1] == "yellow") { i=obj.getcrewman(2); + }else if (words[1] == "blue") { i=obj.getcrewman(5); + }else if (words[1] == "purple") { i=obj.getcrewman(1); + } + + if (words[2] == "player") { j=obj.getplayer(); + }else if (words[2] == "cyan") { j=obj.getcrewman(0); + }else if (words[2] == "red") { j=obj.getcrewman(3); + }else if (words[2] == "green") { j=obj.getcrewman(4); + }else if (words[2] == "yellow") { j=obj.getcrewman(2); + }else if (words[2] == "blue") { j=obj.getcrewman(5); + }else if (words[2] == "purple") { j=obj.getcrewman(1); + } + + if (obj.entities[j].xp > obj.entities[i].xp + 5) { obj.entities[i].dir = 1; + }else if (obj.entities[j].xp < obj.entities[i].xp - 5) { obj.entities[i].dir = 0; } + }else if (words[0] == "jukebox") { + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].type == 13 && obj.entities[j].active) {obj.entities[j].colour = 4;}} + if (int(words[1]) == 1) { + obj.createblock(5, 88 - 4, 80, 20, 16, 25); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 88 && obj.entities[j].yp==80) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 2) { + obj.createblock(5, 128 - 4, 80, 20, 16, 26); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 128 && obj.entities[j].yp==80) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 3) { + obj.createblock(5, 176 - 4, 80, 20, 16, 27); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 176 && obj.entities[j].yp==80) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 4) { + obj.createblock(5, 216 - 4, 80, 20, 16, 28); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 216 && obj.entities[j].yp==80) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 5) { + obj.createblock(5, 88 - 4, 128, 20, 16, 29); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 88 && obj.entities[j].yp==128) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 6) { + obj.createblock(5, 176 - 4, 128, 20, 16, 30); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 176 && obj.entities[j].yp==128) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 7) { + obj.createblock(5, 40 - 4, 40, 20, 16, 31); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 40 && obj.entities[j].yp==40) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 8) { + obj.createblock(5, 216 - 4, 128, 20, 16, 32); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 216 && obj.entities[j].yp==128) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 9) { + obj.createblock(5, 128 - 4, 128, 20, 16, 33); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 128 && obj.entities[j].yp==128) {obj.entities[j].colour = 5;}} + }else if (int(words[1]) == 10) { + obj.createblock(5, 264 - 4, 40, 20, 16, 34); + for (j = 0; j < obj.nentity; j++) {if (obj.entities[j].xp == 264 && obj.entities[j].yp==40) {obj.entities[j].colour = 5;}} + } + }else if (words[0] == "createactivityzone") { + if (words[1] == "red") { i=3; + }else if (words[1] == "green") { i=4; + }else if (words[1] == "yellow") { i=2; + }else if (words[1] == "blue") { i=5; + }else if (words[1] == "purple") { i=1; + } + + if (i == 4) { + obj.createblock(5, obj.entities[obj.getcrewman(i)].xp - 32, obj.entities[obj.getcrewman(i)].yp-20, 96, 60, i); + }else{ + obj.createblock(5, obj.entities[obj.getcrewman(i)].xp - 32, 0, 96, 240, i); + } + }else if (words[0] == "createrescuedcrew") { + //special for final level cutscene + //starting at 180, create the rescued crewmembers (ingoring violet, who's at 155) + i = 215; + if (game.crewstats[2] && game.lastsaved!=2) {obj.createentity(game, i, 153, 18, 14, 0, 17, 0); i += 25; } + if (game.crewstats[3] && game.lastsaved!=3) {obj.createentity(game, i, 153, 18, 15, 0, 17, 0); i += 25; } + if (game.crewstats[4] && game.lastsaved!=4) {obj.createentity(game, i, 153, 18, 13, 0, 17, 0); i += 25; } + if (game.crewstats[5] && game.lastsaved!=5) {obj.createentity(game, i, 153, 18, 16, 0, 17, 0); i += 25; } + }else if (words[0] == "restoreplayercolour") { + i = obj.getplayer(); + obj.entities[i].colour = 0; + }else if (words[0] == "changeplayercolour") { + i = obj.getplayer(); + + if (words[1] == "cyan") { obj.entities[i].colour = 0; + }else if (words[1] == "red") { obj.entities[i].colour = 15; + }else if (words[1] == "green") { obj.entities[i].colour = 13; + }else if (words[1] == "yellow") { obj.entities[i].colour = 14; + }else if (words[1] == "blue") { obj.entities[i].colour = 16; + }else if (words[1] == "purple") { obj.entities[i].colour = 20; + }else if (words[1] == "teleporter") { obj.entities[i].colour = 102; + } + }else if (words[0] == "altstates") { + obj.altstates = int(words[1]); + }else if (words[0] == "activeteleporter") { + i = obj.getteleporter(); + obj.entities[i].colour = 101; + }else if (words[0] == "foundtrinket") { + music.silencedasmusik(); + music.playef(3,10); + + game.trinkets++; + obj.collect[int(words[1])] = 1; + + dwgfx.textboxremovefast(); + + dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found a shiny trinket!"); + dwgfx.textboxcenterx(); + + dwgfx.createtextbox(" " + help.number(game.trinkets) + " out of Twenty ", 50, 135, 174, 174, 174); + dwgfx.textboxcenterx(); + + if (!game.backgroundtext) { + game.advancetext = true; game.hascontrol = false; game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + }else if (words[0] == "foundlab") { + music.playef(3,10); + + dwgfx.textboxremovefast(); + + dwgfx.createtextbox(" Congratulations! ", 50, 85, 174, 174, 174); + dwgfx.addline(""); + dwgfx.addline("You have found the secret lab!"); + dwgfx.textboxcenterx(); + dwgfx.textboxcentery(); + + if (!game.backgroundtext) { + game.advancetext = true; game.hascontrol = false; game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + }else if (words[0] == "foundlab2") { + dwgfx.textboxremovefast(); + + dwgfx.createtextbox("The secret lab is seperate from", 50, 85, 174, 174, 174); + dwgfx.addline("the rest of the game. You can"); + dwgfx.addline("now come back here at any time"); + dwgfx.addline("by selecting the new SECRET LAB"); + dwgfx.addline("option in the play menu."); + dwgfx.textboxcenterx(); + dwgfx.textboxcentery(); + + if (!game.backgroundtext) { + game.advancetext = true; game.hascontrol = false; game.pausescript = true; + if (key.isDown(90) || key.isDown(32) || key.isDown(86) + || key.isDown(Keyboard.UP) || key.isDown(Keyboard.DOWN)) game.jumpheld = true; + } + game.backgroundtext = false; + }else if (words[0] == "everybodysad") { + for (i = 0; i < obj.nentity; i++) { + if (obj.entities[i].rule == 6 || obj.entities[i].rule == 0) { + obj.entities[i].tile = 144; + } + } + }else if (words[0] == "startintermission2") { + map.finalmode = true; //Enable final level mode + map.finalx = 46; map.finaly = 54; //Current + + game.savex = 228; game.savey = 129; game.saverx = 53; game.savery = 49; + game.savegc = 0; game.savedir = 0; //Intermission level 2 + game.savepoint = 0; + game.gravitycontrol = 0; + + map.gotoroom(46, 54, dwgfx, game, obj, music); + }else if (words[0] == "telesave") { + if (!game.intimetrial && !game.nodeathmode && !game.inintermission) { + //game.savetele(map, obj, music, help); + game.savequick(map, obj, music, help); + } + }else if (words[0] == "createlastrescued") { + if (game.lastsaved==2) { r=14; + }else if (game.lastsaved==3) { r=15; + }else if (game.lastsaved==4) { r=13; + }else if (game.lastsaved==5) { r=16; + }else { r = 19; } + + obj.createentity(game, 200, 153, 18, r, 0, 19, 30); + i = obj.getcrewman(game.lastsaved); + obj.entities[i].dir = 1; + }else if (words[0] == "specialline") { + switch(int(words[1])) { + case 1: + txtnumlines = 1; + + txt[0] = "I'm worried about " + game.unrescued() + ", Doctor!"; + break; + case 2: + txtnumlines = 3; + + if (game.crewrescued() < 5) { + txt[1] = "to helping you find the"; + txt[2] = "rest of the crew!"; + }else { + txtnumlines = 2; + txt[1] = "to helping you find " + game.unrescued() + "!"; + } + break; + } + }else if (words[0] == "trinketbluecontrol") { + if (game.trinkets == 20 && obj.flags[67] == 1) { + load("talkblue_trinket6"); position--; + }else if (game.trinkets >= 19 && obj.flags[67] == 0) { + load("talkblue_trinket5"); position--; + }else { + load("talkblue_trinket4"); position--; + } + }else if (words[0] == "trinketyellowcontrol") { + if (game.trinkets >= 19) { + load("talkyellow_trinket3"); position--; + }else { + load("talkyellow_trinket2"); position--; + } + }else if (words[0] == "redcontrol") { + if (game.insecretlab) { + load("talkred_14"); position--; + }else if (game.roomx != 104) { + if (game.roomx == 100) { + load("talkred_10"); position--; + }else if (game.roomx == 107) { + load("talkred_11"); position--; + }else if (game.roomx == 114) { + load("talkred_12"); position--; + } + }else if (obj.flags[67] == 1) { + //game complete + load("talkred_13"); position--; + }else if (obj.flags[35] == 1 && obj.flags[52] == 0) { + //Intermission level + obj.flags[52] = 1; + load("talkred_9"); position--; + }else if (obj.flags[51] == 0) { + //We're back home! + obj.flags[51] = 1; + load("talkred_5"); position--; + }else if (obj.flags[48] == 0 && game.crewstats[5]) { + //Victoria's back + obj.flags[48] = 1; + load("talkred_6"); position--; + }else if (obj.flags[49] == 0 && game.crewstats[4]) { + //Verdigris' back + obj.flags[49] = 1; + load("talkred_7"); position--; + }else if (obj.flags[50] == 0 && game.crewstats[2]) { + //Vitellary's back + obj.flags[50] = 1; + load("talkred_8"); position--; + }else if (obj.flags[45] == 0 && !game.crewstats[5]) { + obj.flags[45] = 1; + load("talkred_2"); position--; + }else if (obj.flags[46] == 0 && !game.crewstats[4]) { + obj.flags[46] = 1; + load("talkred_3"); position--; + }else if (obj.flags[47] == 0 && !game.crewstats[2]) { + obj.flags[47] = 1; + load("talkred_4"); position--; + }else { + obj.flags[45] = 0; + obj.flags[46] = 0; + obj.flags[47] = 0; + load("talkred_1"); position--; + } + }else if (words[0] == "greencontrol") { + if (game.insecretlab) { + load("talkgreen_11"); position--; + }else if (game.roomx == 103 && game.roomy == 109) { + load("talkgreen_8"); position--; + }else if (game.roomx == 101 && game.roomy == 109) { + load("talkgreen_9"); position--; + }else if (obj.flags[67] == 1) { + //game complete + load("talkgreen_10"); position--; + }else if (obj.flags[34] == 1 && obj.flags[57] == 0) { + //Intermission level + obj.flags[57] = 1; + load("talkgreen_7"); position--; + }else if (obj.flags[53] == 0) { + //Home! + obj.flags[53] = 1; + load("talkgreen_6"); position--; + }else if (obj.flags[54] == 0 && game.crewstats[2]) { + obj.flags[54] = 1; + load("talkgreen_5"); position--; + }else if (obj.flags[55] == 0 && game.crewstats[3]) { + obj.flags[55] = 1; + load("talkgreen_4"); position--; + }else if (obj.flags[56] == 0 && game.crewstats[5]) { + obj.flags[56] = 1; + load("talkgreen_3"); position--; + }else if (obj.flags[58] == 0) { + obj.flags[58] = 1; + load("talkgreen_2"); position--; + }else{ + load("talkgreen_1"); position--; + } + }else if (words[0] == "bluecontrol") { + if (game.insecretlab) { + load("talkblue_9"); position--; + }else if (obj.flags[67] == 1) { + //game complete, everything changes for victoria + if (obj.flags[41] == 1 && obj.flags[42] == 0) { + //second trinket conversation + obj.flags[42] = 1; + load("talkblue_trinket2"); position--; + }else if (obj.flags[41] == 0 && obj.flags[42] == 0) { + //Third trinket conversation + obj.flags[42] = 1; + load("talkblue_trinket3"); position--; + }else { + //Ok, we've already dealt with the trinket thing; so either you have them all, or you don't. If you do: + if (game.trinkets >= 20) { + load("startepilogue"); position--; + }else { + load("talkblue_8"); position--; + } + } + }else if (obj.flags[33] == 1 && obj.flags[40] == 0) { + //Intermission level + obj.flags[40] = 1; + load("talkblue_7"); position--; + }else if (obj.flags[36] == 0 && game.crewstats[5]) { + //Back on the ship! + obj.flags[36] = 1; + load("talkblue_3"); position--; + }else if (obj.flags[41] == 0 && game.crewrescued() <= 4) { + //First trinket conversation + obj.flags[41] = 1; + load("talkblue_trinket1"); position--; + }else if (obj.flags[41] == 1 && obj.flags[42] == 0 && game.crewrescued() == 5) { + //second trinket conversation + obj.flags[42] = 1; + load("talkblue_trinket2"); position--; + }else if (obj.flags[41] == 0 && obj.flags[42] == 0 && game.crewrescued() == 5) { + //Third trinket conversation + obj.flags[42] = 1; + load("talkblue_trinket3"); position--; + }else if (obj.flags[37] == 0 && game.crewstats[2]) { + obj.flags[37] = 1; + load("talkblue_4"); position--; + }else if (obj.flags[38] == 0 && game.crewstats[3]) { + obj.flags[38] = 1; + load("talkblue_5"); position--; + }else if (obj.flags[39] == 0 && game.crewstats[4]) { + obj.flags[39] = 1; + load("talkblue_6"); position--; + }else{ + //if all else fails: + //if yellow is found + if (game.crewstats[2]) { + load("talkblue_2"); position--; + }else{ + load("talkblue_1"); position--; + } + } + }else if (words[0] == "yellowcontrol") { + if (game.insecretlab) { + load("talkyellow_12"); position--; + }else if (obj.flags[67] == 1) { + //game complete + load("talkyellow_11"); position--; + }else if (obj.flags[32] == 1 && obj.flags[31] == 0) { + //Intermission level + obj.flags[31] = 1; + load("talkyellow_6"); position--; + }else if (obj.flags[27] == 0 && game.crewstats[2]) { + //Back on the ship! + obj.flags[27] = 1; + load("talkyellow_10"); position--; + }else if (obj.flags[43] == 0 && game.crewrescued() == 5 && !game.crewstats[5]) { + //If by chance we've rescued everyone except Victoria by the end, Vitellary provides you with + //the trinket information instead. + obj.flags[43] = 1; obj.flags[42] = 1; obj.flags[41] = 1; + load("talkyellow_trinket1"); position--; + }else if (obj.flags[24] == 0 && game.crewstats[5]) { + obj.flags[24] = 1; + load("talkyellow_8"); position--; + }else if (obj.flags[26] == 0 && game.crewstats[4]) { + obj.flags[26] = 1; + load("talkyellow_7"); position--; + }else if (obj.flags[25] == 0 && game.crewstats[3]) { + obj.flags[25] = 1; + load("talkyellow_9"); position--; + }else if (obj.flags[28] == 0) { + obj.flags[28] = 1; + load("talkyellow_3"); position--; + }else if (obj.flags[29] == 0) { + obj.flags[29] = 1; + load("talkyellow_4"); position--; + }else if (obj.flags[30] == 0) { + obj.flags[30] = 1; + load("talkyellow_5"); position--; + }else if (obj.flags[23] == 0) { + obj.flags[23] = 1; + load("talkyellow_2"); position--; + }else { + load("talkyellow_1"); position--; + obj.flags[23] = 0; + } + }else if (words[0] == "purplecontrol") { + //Controls Purple's conversion + //Crew rescued: + if (game.insecretlab) { + load("talkpurple_9"); position--; + }else if (obj.flags[67] == 1) { + //game complete + load("talkpurple_8"); position--; + }else if (obj.flags[17] == 0 && game.crewstats[4]) { + obj.flags[17] = 1; + load("talkpurple_6"); position--; + }else if (obj.flags[15] == 0 && game.crewstats[5]) { + obj.flags[15] = 1; + load("talkpurple_4"); position--; + }else if (obj.flags[16] == 0 && game.crewstats[3]) { + obj.flags[16] = 1; + load("talkpurple_5"); position--; + }else if (obj.flags[18] == 0 && game.crewstats[2]) { + obj.flags[18] = 1; + load("talkpurple_7"); position--; + }else if (obj.flags[19] == 1 && obj.flags[20] == 0 && obj.flags[21] == 0) { + //intermission one: if played one / not had first conversation / not played two [conversation one] + obj.flags[21] = 1; + load("talkpurple_intermission1"); position--; + }else if (obj.flags[20] == 1 && obj.flags[21] == 1 && obj.flags[22] == 0) { + //intermission two: if played two / had first conversation / not had second conversation [conversation two] + obj.flags[22] = 1; + load("talkpurple_intermission2"); position--; + }else if (obj.flags[20] == 1 && obj.flags[21] == 0 && obj.flags[22] == 0) { + //intermission two: if played two / not had first conversation / not had second conversation [conversation three] + obj.flags[22] = 1; + load("talkpurple_intermission3"); position--; + }else if (obj.flags[12] == 0) { + //Intro conversation + obj.flags[12] = 1; + load("talkpurple_intro"); position--; + }else if (obj.flags[14] == 0) { + //Shorter intro conversation + obj.flags[14] = 1; + load("talkpurple_3"); position--; + }else{ + //if all else fails: + //if green is found + if (game.crewstats[4]) { + load("talkpurple_2"); position--; + }else{ + load("talkpurple_1"); position--; + } + } + } + + position++; + }else { + running = false; + } + } + + if(scriptdelay>0){ + scriptdelay--; + } + } + + public function resetgametomenu(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + + game.gamestate = TITLEMODE; + dwgfx.flipmode = false; + obj.nentity = 0; + dwgfx.fademode = 4; + game.createmenu("gameover"); + } + + public function startgamemode(t:int, key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + + game.showloadingnotice = false; + switch(t) { + case 0: //Normal new game + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.start(obj, music); + game.jumpheld = true; + dwgfx.showcutscenebars = true; + dwgfx.cutscenebarspos = 320; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { map.resetplayer(dwgfx, game, obj, music); } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intro"); + break; + case 1: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.start(obj, music); + game.loadtele(map, obj, music); + game.gravitycontrol = game.savegc; + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { map.resetplayer(dwgfx, game, obj, music); } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 2: //Load Quicksave + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.start(obj, music); + game.loadquick(map, obj, music); + game.gravitycontrol = game.savegc; + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){ + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + //a very special case for here needs to ensure that the tower is set correctly + if (map.towermode) { + map.resetplayer(dwgfx, game, obj, music); + + i = obj.getplayer(); + map.ypos = obj.entities[i].yp - 120; + map.bypos = map.ypos / 2; + map.cameramode = 0; + map.colsuperstate = 0; + } + dwgfx.fademode = 4; + break; + case 3: + //Start Time Trial 1 + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; game.intimetrial = true; game.timetrialcountdown = 150; game.timetrialparlost = false; + game.timetriallevel = 0; game.timetrialpar = 75; game.timetrialshinytarget = 2; + + music.fadeout(); + game.gamestate = GAMEMODE; game.starttrial(game.timetriallevel, obj, music); game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 4: + //Start Time Trial 2 + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; game.intimetrial = true; game.timetrialcountdown = 150; game.timetrialparlost = false; + game.timetriallevel = 1; game.timetrialpar = 165; game.timetrialshinytarget = 4; + + music.fadeout(); + game.gamestate = GAMEMODE; game.starttrial(game.timetriallevel, obj, music); game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 5: + //Start Time Trial 3 tow + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; game.intimetrial = true; game.timetrialcountdown = 150; game.timetrialparlost = false; + game.timetriallevel = 2; game.timetrialpar = 105; game.timetrialshinytarget = 2; + + music.fadeout(); + game.gamestate = GAMEMODE; game.starttrial(game.timetriallevel, obj, music); game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 6: + //Start Time Trial 4 station + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; game.intimetrial = true; game.timetrialcountdown = 150; game.timetrialparlost = false; + game.timetriallevel = 3; game.timetrialpar = 200; game.timetrialshinytarget = 5; + + music.fadeout(); + game.gamestate = GAMEMODE; game.starttrial(game.timetriallevel, obj, music); game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 7: + //Start Time Trial 5 warp + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; game.intimetrial = true; game.timetrialcountdown = 150; game.timetrialparlost = false; + game.timetriallevel = 4; game.timetrialpar = 120; game.timetrialshinytarget = 1; + + music.fadeout(); + game.gamestate = GAMEMODE; game.starttrial(game.timetriallevel, obj, music); game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 8: + //Start Time Trial 6// final level! + hardreset(key, dwgfx, game, map, obj, help, music); + game.nocutscenes = true; game.intimetrial = true; game.timetrialcountdown = 150; game.timetrialparlost = false; + game.timetriallevel = 5; game.timetrialpar = 135; game.timetrialshinytarget = 1; + + music.fadeout(); + map.finalmode = true; //Enable final level mode + map.finalx = 46; map.finaly = 54; //Current + map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.gamestate = GAMEMODE; game.starttrial(game.timetriallevel, obj, music); game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 9: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.nodeathmode = true; + game.start(obj, music); + game.jumpheld = true; + dwgfx.showcutscenebars = true; + dwgfx.cutscenebarspos = 320; + //game.starttest(obj, music); + //music.play(4); + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){ + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + + load("intro"); + break; + case 10: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + game.nodeathmode = true; game.nocutscenes = true; + + game.start(obj, music); + game.jumpheld = true; + dwgfx.showcutscenebars = true; + dwgfx.cutscenebarspos = 320; + //game.starttest(obj, music); + //music.play(4); + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){ + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + + load("intro"); + break; + case 11: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + + game.startspecial(0, obj, music); + game.jumpheld = true; + + //Secret lab, so reveal the map, give them all 20 trinkets + for (j = 0; j < 20; j++) { + obj.collect[i] = true; + for (i = 0; i < 20; i++) { + map.explored[i + (j * 20)] = 1; + } + } + game.trinkets = 20; + game.insecretlab = true; + map.showteleporters = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){ + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else { + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + music.play(11); + dwgfx.fademode = 4; + break; + case 12: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 2; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; game.companion = 11; game.supercrewmate = true; game.scmprogress = 0; + map.finalmode = true; map.finalx = 41; map.finaly = 56; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else {map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_1"); + break; + case 13: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 3; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; game.companion = 11; game.supercrewmate = true; game.scmprogress = 0; + map.finalmode = true; map.finalx = 41; map.finaly = 56; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else {map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_1"); + break; + case 14: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 4; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; game.companion = 11; game.supercrewmate = true; game.scmprogress = 0; + map.finalmode = true; map.finalx = 41; map.finaly = 56; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else {map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_1"); + break; + case 15: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 5; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; game.companion = 11; game.supercrewmate = true; game.scmprogress = 0; + map.finalmode = true; map.finalx = 41; map.finaly = 56; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else {map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_1"); + break; + case 16: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 2; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + map.finalmode = true; map.finalx = 41; map.finaly = 56; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else {map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_2"); + break; + case 17: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 3; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + map.finalmode = true; map.finalx = 41; map.finaly = 56; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else {map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_2"); + break; + case 18: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 4; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + map.finalmode = true; map.finalx = 41; map.finaly = 56; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else {map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_2"); + break; + case 19: + game.gamestate = GAMEMODE; + hardreset(key, dwgfx, game, map, obj, help, music); + music.fadeout(); + + game.lastsaved = 5; + + game.crewstats[game.lastsaved] = true; + game.inintermission = true; + map.finalmode = true; map.finalx = 41; map.finaly = 56; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; + game.startspecial(1, obj, music); + game.jumpheld = true; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + if(obj.nentity==0){ obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else {map.resetplayer(dwgfx, game, obj, music);} + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + load("intermission_2"); + break; + case 20: + //Level editor + hardreset(key, dwgfx, game, map, obj, help, music); + editor.reset(); + music.fadeout(); + + game.gamestate = EDITORMODE; + game.jumpheld = true; + + if (dwgfx.setflipmode) dwgfx.flipmode = true;//set flipmode + if(obj.nentity==0){ + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else{ + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + dwgfx.fademode = 4; + break; + case 21: //play custom level (in editor) + game.gamestate = GAMEMODE; + music.fadeout(); + hardreset(key, dwgfx, game, map, obj, help, music); + game.customstart(obj, music); + game.jumpheld = true; + + + map.custommode = true; + map.customx = 100; + map.customy = 100; + + //dwgfx.showcutscenebars = true; + //dwgfx.cutscenebarspos = 320; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){ + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else{ + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + if(editor.levmusic>0){ + music.play(editor.levmusic); + }else{ + music.currentsong=-1; + } + //load("intro"); + break; + case 22: //play custom level (in game) + //Initilise the level + //First up, find the start point + editor.weirdloadthing(editor.ListOfMetaData[game.playcustomlevel].file_num); + editor.findstartpoint(game); + + game.showloadingnotice = true; + game.gamestate = GAMEMODE; + music.fadeout(); + hardreset(key, dwgfx, game, map, obj, help, music); + game.customstart(obj, music); + game.jumpheld = true; + + map.custommodeforreal = true; + map.custommode = true; + map.customx = 100; + map.customy = 100; + + //dwgfx.showcutscenebars = true; + //dwgfx.cutscenebarspos = 320; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){ + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else{ + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + + editor.generatecustomminimap(dwgfx, map); + map.customshowmm=true; + if(editor.levmusic>0){ + music.play(editor.levmusic); + }else{ + music.currentsong=-1; + } + dwgfx.fademode = 4; + //load("intro"); + break; + case 23: //Continue in custom level + //Initilise the level + //First up, find the start point + editor.weirdloadthing(editor.ListOfMetaData[game.playcustomlevel].file_num); + editor.findstartpoint(game); + + game.showloadingnotice = true; + game.gamestate = GAMEMODE; + music.fadeout(); + hardreset(key, dwgfx, game, map, obj, help, music); + map.custommodeforreal = true; + map.custommode = true; + map.customx = 100; + map.customy = 100; + + game.customstart(obj, music); + game.customloadquick(editor.ListOfMetaData[game.playcustomlevel].file_num, map, obj, music); + game.jumpheld = true; + game.gravitycontrol = game.savegc; + + + //dwgfx.showcutscenebars = true; + //dwgfx.cutscenebarspos = 320; + + //set flipmode + if (dwgfx.setflipmode) dwgfx.flipmode = true; + + if(obj.nentity==0){ + obj.createentity(game, game.savex, game.savey, 0, 0); //In this game, constant, never destroyed + }else{ + map.resetplayer(dwgfx, game, obj, music); + } + map.gotoroom(game.saverx, game.savery, dwgfx, game, obj, music); + /* Handled by load + if(ed.levmusic>0){ + music.play(ed.levmusic); + }else{ + music.currentsong=-1; + } + */ + editor.generatecustomminimap(dwgfx, map); + dwgfx.fademode = 4; + //load("intro"); + break; + case 100: + game.savestats(map, dwgfx); + fscommand("quit"); + break; + } + } + + public function teleport(dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + //er, ok! Teleport to a new area, so! + //A general rule of thumb: if you teleport with a companion, get rid of them! + game.companion = 0; + + i = obj.getplayer(); //less likely to have a serious collision error if the player is centered + obj.entities[i].xp = 150; + obj.entities[i].yp = 110; + if(game.teleport_to_x==17 && game.teleport_to_y==17) obj.entities[i].xp = 88; //prevent falling! + + if (game.teleportscript == "levelonecomplete") { + game.teleport_to_x = 2; game.teleport_to_y = 11; + }else if (game.teleportscript == "gamecomplete") { + game.teleport_to_x = 2; game.teleport_to_y = 11; + } + + game.gravitycontrol = 0; + map.gotoroom(100+game.teleport_to_x, 100+game.teleport_to_y, dwgfx, game, obj, music); + j = obj.getteleporter(); + obj.entities[j].state = 2; + game.teleport_to_new_area = false; + + game.savepoint = obj.entities[j].para; + game.savex = obj.entities[j].xp + 44; + game.savey = obj.entities[j].yp + 44; + game.savegc = 0; + + game.saverx = game.roomx; game.savery = game.roomy; + game.savedir = obj.entities[obj.getplayer()].dir; + + if(game.teleport_to_x==0 && game.teleport_to_y==0){ game.state = 4020; + }else if(game.teleport_to_x==0 && game.teleport_to_y==16){ game.state = 4030; + }else if(game.teleport_to_x==7 && game.teleport_to_y==9){ game.state = 4040; + }else if(game.teleport_to_x==8 && game.teleport_to_y==11){ game.state = 4050; + }else if(game.teleport_to_x==14 && game.teleport_to_y==19){ game.state = 4030; + }else if(game.teleport_to_x==17 && game.teleport_to_y==12){ game.state = 4020; + }else if(game.teleport_to_x==17 && game.teleport_to_y==17){ game.state = 4020; + }else if(game.teleport_to_x==18 && game.teleport_to_y==7){ game.state = 4060; + }else { game.state = 4010; } + + if (game.teleportscript != "") { + game.state = 0; + load(game.teleportscript); + game.teleportscript = ""; + }else{ + //change music based on location + if (dwgfx.setflipmode && game.teleport_to_x == 11 && game.teleport_to_y == 4) { + music.niceplay(9); + }else{ + music.changemusicarea(game.teleport_to_x, game.teleport_to_y); + } + if (!game.intimetrial && !game.nodeathmode && !game.inintermission) { + if (dwgfx.flipmode) { + dwgfx.createtextbox(" Game Saved ", -1, 202, 174, 174, 174); + dwgfx.textboxtimer(25); + }else{ + dwgfx.createtextbox(" Game Saved ", -1, 12, 174, 174, 174); + dwgfx.textboxtimer(25); + } + game.savetele(map, obj, music, help); + } + } + } + + public function hardreset(key:KeyPoll, dwgfx:dwgraphicsclass, game:gameclass, map:mapclass, + obj:entityclass, help:helpclass, music:musicclass):void { + //Gameclass: + game.hascontrol = true; + game.gravitycontrol = 0; game.teleport = false; game.companion = 0; game.roomchange = false; + game.teleport_to_new_area = false; game.teleport_to_x = 0; game.teleport_to_y = 0; + game.teleportscript = ""; + + game.tapleft = 0; game.tapright = 0; + game.startscript = false; game.newscript = ""; + game.alarmon = false; game.alarmdelay = 0; game.blackout = false; + game.useteleporter = false; game.teleport_to_teleporter = 0; + + game.nodeathmode = false; game.nocutscenes = false; + + for (i = 0; i < 6; i++) { + game.crewstats[i] = false;; + } + game.crewstats[0] = true; + game.lastsaved = 0; + + game.deathcounts = 0; game.gameoverdelay = 0; + game.frames = 0; game.seconds = 0; game.minutes = 0; game.hours = 0; + game.gamesaved = false; + game.savetime = "00:00"; game.savearea = "nowhere"; game.savetrinkets = 0; + + game.intimetrial = false; + game.timetrialcountdown = 0; game.timetrialshinytarget = 0; + game.timetrialparlost = false; game.timetrialpar = 0; game.timetrialresulttime = 0; + + game.totalflips = 0; + game.hardestroom = "Welcome Aboard"; game.hardestroomdeaths = 0; game.currentroomdeaths=0; + + game.swnmode = false; game.swntimer = 0; game.swngame = 0;//Not playing sine wave ninja! + game.swnstate = 0; game.swnstate2 = 0; game.swnstate3 = 0; game.swnstate4 = 0; game.swndelay = 0; game.swndeaths = 0; + game.supercrewmate = false; game.scmhurt = false; game.scmprogress = 0; game.scmmoveme = false; + game.swncolstate = 0; game.swncoldelay = 0; + game.swnrank = 0; game.swnmessage = 0; + game.creditposx = 0; game.creditposy = 0; game.creditposdelay = 0; + + game.inintermission = false; + game.insecretlab = false; + + game.state = 0; game.statedelay = 0; + //dwgraphicsclass + dwgfx.backgrounddrawn = false; + dwgfx.textboxremovefast(); + dwgfx.flipmode = false; //This will be reset if needs be elsewhere + //mapclass + map.warpx = false; map.warpy = false; + map.showteleporters = false; map.showtargets = false; map.showtrinkets = false; + map.finalmode = false; map.finalstretch = false; + map.finalx = 50; map.finaly = 50; + map.final_colormode = false; map.final_colorframe = 0; map.final_colorframedelay = 0; + map.final_mapcol = 0; + map.final_aniframe = 0; map.final_aniframedelay = 0; + map.rcol = 0; + map.resetnames(); + map.custommode=false; + map.custommodeforreal=false; + + map.customshowmm=true; + + + for (j = 0; j < 20; j++) { + for (i = 0; i < 20; i++) { + map.roomdeaths[i] = 0; + map.roomdeathsfinal[i] = 0; + map.explored[i + (j * 20)] = 0; + } + } + //entityclass + obj.nearelephant = false; + obj.upsetmode = false; obj.upset = 0; + + obj.trophytext = 0 ; obj.trophytype = 0; + obj.altstates = 0; + + for (i = 0; i < 100; i++) { + obj.flags[i] = false; + } + + for (i = 0; i < 6; i++){ + obj.customcrewmoods[i]=1; + } + + + for (i = 0; i < 20; i++) { + obj.collect[i] = 0; + obj.customcollect[i] = 0; + } + + if (obj.getplayer() > -1) { + obj.entities[obj.getplayer()].tile = 0; + } + + //Script Stuff + position = 0; scriptlength = 0; scriptdelay = 0; + scriptname = "null"; running = false; + } + + //Script contents + public var commands:Array = new Array(); + public var words:Array = new Array(); + public var txt:Array = new Array(); + public var scriptname:String; + public var position:int, scriptlength:int; + public var looppoint:int, loopcount:int; + + public var scriptdelay:int, running:Boolean; + public var tempword:String, currentletter:String; + + //Textbox stuff + public var textx:int, texty:int; + public var r:int, g:int, b:int; + public var txtnumlines:int; + + //Misc + public var i:int, j:int, k:int; + } +} diff --git a/mobile_version/src/textboxclass.as b/mobile_version/src/textboxclass.as new file mode 100644 index 00000000..0c829e25 --- /dev/null +++ b/mobile_version/src/textboxclass.as @@ -0,0 +1,107 @@ +package { + import flash.display.*; + import flash.geom.*; + import flash.events.*; + import flash.net.*; + + public class textboxclass extends Sprite { + public function textboxclass():void { + firstcreate(); + } + + public function firstcreate():void { + //Like clear, only it creates the actual arrays, etc + for (iter = 0; iter < 10; iter++) { + var t:String = new String; t = ""; + line.push(t); + } + x = 0; y = 0; w = 0; h = 0; numlines = 0; lw = 0; tl = 0; tm = 0; active = false; timer = 0; + } + + public function clear():void { + //Set all values to a default, required for creating a new entity + for (iter = 0; iter < 12; iter++) { + line[iter]=""; + } + textrect = new Rectangle(); + xp = 0; yp = 0; w = 0; h = 0; numlines = 1; lw = 0; tl = 0; tm = 0; active = true; timer = 0; + } + + public function centerx():void { resize(); xp = 160 - (w / 2); resize(); } + public function centery():void { resize(); yp = 120 - (h / 2); resize(); } + + public function adjust():void { + resize(); + if (xp < 10) xp = 10; + if (yp < 10) yp = 10; + if (xp + w > 310) xp = 310 - w; + if (yp + h > 230) yp = 230 - h; + resize(); + } + + public function initcol(rr:int, gg:int, bb:int):void { + tr = rr; tg = gg; tb = bb; + r = 0; g = 0; b = 0; tl = 0.5; + } + + public function setcol(rr:int, gg:int, bb:int):void { + r = rr; g = gg; b = bb; + } + + public function update():void { + if (tm == 0) { + tl += .1; + if (tl >= 1) { tl = 1; tm = 1; } + setcol(int(tr * tl), int(tg * tl), int(tb * tl)); + }else if (tm == 2) { + tl -= .1; + if (tl <= 0.5) { tl = 0.5; active = false; } + setcol(int(tr * tl), int(tg * tl), int(tb * tl)); + } + if (timer > 0) { + timer--; + if (timer == 0) tm = 2; + } + } + + public function remove():void { + //tm = 2; tl = 1; //Remove mode + tm = 2; tl = 0.4; //Remove mode + } + + public function removefast():void { + tm = 2; tl = 0.4; //Remove mode + } + + public function resize():void { + //Set the width and height to the correct sizes + max = 0; + for (iter = 0; iter < numlines; iter++) if (line[iter].length > max) max = line[iter].length; + + lw = max; + w = (max +2) * 8; + h = (numlines + 2) * 8; + textrect.x = xp; textrect.y = yp; textrect.width = w; textrect.height = h; + } + + public function addline(t:String):void { + line[numlines] = t; + numlines++; + resize(); + if (numlines >= 12) numlines = 0; + } + + //Fundamentals + public var line:Array = new Array; + public var xp:int, yp:int, lw:int, w:int, h:int, numlines:int; + public var r:int, g:int, b:int; + public var tr:int, tg:int, tb:int; + public var textrect:Rectangle; + public var active:Boolean; + public var timer:int; + + public var tl:Number, tm:int; + + public var iter:int, max:int; + } +} diff --git a/mobile_version/src/tmap.as b/mobile_version/src/tmap.as new file mode 100644 index 00000000..054e6ef2 --- /dev/null +++ b/mobile_version/src/tmap.as @@ -0,0 +1,23 @@ +package { + public class tmap { + public static function init():void { + for (var i:int = 0; i < 30; i++) { + contents.push(""); + } + + index = 0; + } + + public static function reset():void { + index = 0; + } + + public static function push(t:String):void { + contents[index] = t; + index++; + } + + public static var contents:Vector. = new Vector.; + public static var index:int; + } +}